Olá galera! Sou novato aqui no fórum ainda estou me adaptando, mas vi que tem muita coisa pra mim aqui!Bom, procurei sobre campos obrigatorios em varios lugares com varios exemplos, mas nao consegui resolver, talvez pelo mode de explicar nao sei. Entao queria que vcs me ajudassem sobre isso. Vou postar um codigo em HTML, e queria que os campos (NOme, Editora, Autor, Exemplares) ficassem como obrigatórios. E que ficar algum campo em branco, uma msg em javascript aparecesse. ACho que entenderam! Agradeço desde Já! VLw!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cadastros de livros</title>
</head>
<body><h2>Cadastro de Livros</h2>
<form action = "recebecadlivro.php" method ="post" >
<table border="0">
<tr><td>
<p >Nome </td><td><input type ="text" name = nome size="50"> <br></td></tr>
<tr><td><p > Editora: </td><td><input type ="text" name = editora size="50"> <br></p></td></tr>
<tr><td><p > Autor: </td><td><input type ="text" name = autor size="50"> <br></p></td></tr>
<tr><td><p > Status: </td><td><select size="1" name= "status"><option>Disponível</option><option>Locado</option><option>Reservado</option><b></p></td></tr>
<tr><td><p > Exemplares </td><td><input type ="text" name = ex size="50"> <br></p></td></tr>
<tr><td><p > Categoria: </td><td><input type ="text" name = categoria size="50"> <br></p></td></tr>
<tr><td><p ><input type = submit value ="Cadastro"> </td><td><input type = reset value="Limpar"></p></td></tr>
</table>
</body>
</html>

Campo Obrigatório
Started By Jovem Tec, 01/09/2011, 14:47
2 replies to this topic
#1
Posted 01/09/2011, 14:47
#2
Posted 02/09/2011, 09:26
Acredito que neste caso vc terá que aprender Javascript...
Lugar bom para aprender é Developer Center do mozilla :
https://developer.mo...g/en/javascript
Abraços
Lugar bom para aprender é Developer Center do mozilla :
https://developer.mo...g/en/javascript
Abraços
Procurando freelancer
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
#3
Posted 02/09/2011, 10:31
Acredito que neste caso vc terá que aprender Javascript...
Lugar bom para aprender é Developer Center do mozilla :
https://developer.mo...g/en/javascript
Abraços
Opa galera! Bom, eu consegui fazer aqui no meu form! Fiz em JavaScript! Vlw galera! ate mais
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)