•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,768 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,471 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 320 | Replies: 2 | Solved
![]() |
•
•
Join Date: Oct 2007
Posts: 30
Reputation:
Rep Power: 1
Solved Threads: 0
Any input is appreciated.
<!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 : 21 Days Ago at 4:33 pm. Reason: Code tags
•
•
Join Date: Aug 2008
Posts: 21
Reputation:
Rep Power: 1
Solved Threads: 5
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>
Mastery is not something that strikes in an instant. Through the study of technique, one learns the best most efficient ways of making characters come alive...
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- 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


Linear Mode