| | |
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 |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser bug calendar captchaformproblem cart close codes column cookies css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 iframe index java javascript javascripthelp2020 jawascriptruntimeerror jquery jsp libcurl listbox maps masterpage media menu microsoft mimic mp4 onmouseoutdivproblem onmouseover paypal pdf php player position post problem programming prototype redirect regex safari scale scriptlets scroll search security select software sql text textarea toggle unicode variables w3c website window windowofwords windowsxp





