| | |
why won't this script work?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Any input is appreciated.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="text/javascript"> function validateForm(form1) { alert("Please enter your name."); } </script> </head> <body> <form name="form1" id="form1" method="post" onSubmit="validateForm(form1);"> <input type="text" id="name" name="name" /> <input type="submit" name="SubmitName" value="Submit" /> </form> </body> </html>
Last edited by Tekmaven; Aug 8th, 2008 at 5:33 pm. Reason: Code tags
html Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title>
javascript Syntax (Toggle Plain Text)
<script type="text/javascript"> <!--Begin Hiding //I just modified your code. Pls. Take a good look. function validateForm(form) { alert('Please enter your name.'); } // Done Hiding --> </script>
html Syntax (Toggle Plain Text)
</head> <body> <form name="form1" method="post" onSubmit="validateForm(this.form);"> <input type="text" id="name" /> <input type="submit" name="SubmitName" value="Submit" /> </form> <!-- Hope it helps you, enjoy your coding...--> </body> </html>
Dev.Opera — FOLLOW THE STANDARDS, BREAK THE RULES...
![]() |
Similar Threads
- help with shell script padding files with spaces (Shell Scripting)
- Linux Shell Script needs help writing program (Shell Scripting)
- Please help to modify this perl script. I need to add more urls (Perl)
- Need help with Mail php script!! (PHP)
- Please help me make this script work in Netscape (JavaScript / DHTML / AJAX)
- Using find in a bash shell script (Shell Scripting)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Getting Data From Other Sites
- Next Thread: Required field validation
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close codes cookies createrange() cursor date debugger dependent disablefirebug dom dropdown editor element embed engine events explorer ext file form forms getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl maps math media microsoft mimic object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post programming progressbar regex runtime safari scriptlets scroll search security session shopping size software sql text textarea unicode variables web website window windowofwords windowsxp wysiwyg \n





