By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,970 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,970 IT Pros & Developers. It's quick & easy.

HTML & Ajax not working as expected

P: 6
Please tell me why the following html does not call the javascript submit_click() function.
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.     <title>Page Title</title>
  5.     <meta name="viewport" content="width=device-width,initial-scale=1">
  6.     <link rel="stylesheet" type="text/css" href="style/style.css"/>
  7.     <script language="JavaScript" type="text/javascript" src="js/Diva.js"></script>
  8.     <style type="text/css">a {text-decoration: none}</style>
  9.     <script language=javascript>
  10.     function submit_click()
  11.         {
  12.         alert("Button Pressed");
  13.         progExe("logon.php?"uname="+uname+"&Passwrd="+passwrd);
  14.         }
  15.     </script>
  16.     </head>
  17.  
  18.     <body>
  19. <!--- <form name="logon" ID="logon" action="logon.php" method="post"> -->
  20. <table align="center" border="3" cellspacing="0" cellpadding="3">
  21. <tr><td>Username:</td><td>
  22. <input type="text" name="uname" id=uname maxlength="40" placeholder="Enter your UserName" autofocus required>
  23. </td></tr>
  24. <tr><td>Password:</td>
  25. <td>
  26. <input type="password" name="passwrd" id=passwrd maxlength="50" placeholder="Password" required>
  27. </td></tr>
  28. <tr><td colspan="3" align="center">
  29. <button type="button" onclick="submit_click()">Logon</button>
  30. <a href="register.html"><input type=submit value="RegisterSelf">
  31. <a href="client.html"><input type=submit value="RegisterClient">
  32. </td></tr>
  33. </table>
  34. <center>
  35. <div id="loadingNode";></div>
  36. </center>
  37. </body>
  38. </html>
  39.  
Oct 30 '12 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
so I donít have to repeat myself: http://www.dreamincode.net/forums/to...&#entry1733957
Oct 30 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.