Jump to content

Recommended Posts

Please tell me why the following html does not call the javascript submit_click() function.

<!DOCTYPE html>
<html>
   <head>
   <title>Page Title</title>
   <meta name="[url=""]viewport[/url]" content="[url=""]width=device-width,initial-scale=1[/url]">
   <link rel="[url=""]stylesheet[/url]" type="[url=""]text/css[/url]" href="[url="view-source:http://localhost/prince/style/style.css"]style/style.css[/url]"/>
   <script language="[url=""]Javascript[/url]" type="[url=""]text/javascript[/url]" src="[url="view-source:http://localhost/prince/js/Diva.js"]js/Diva.js[/url]"></script>
   <style type="[url=""]text/css[/url]">a {text-decoration: none}</style>
   <script language=[url=""]javascript[/url]>
   function submit_click()
       {
       alert("Button Pressed");
       progExe("logon.php?"uname="+uname+"&Passwrd="+passwrd);
       }
   </script>
   </head>

   <body>
<!--- <form name="logon" ID="logon" action="logon.php" method="post"> -->
<table align="[url=""]center[/url]" border="[url=""]3[/url]" cellspacing="[url=""]0[/url]" cellpadding="[url=""]3[/url]">
<tr><td>Username:</td><td>
<input type="[url=""]text[/url]" name="[url=""]uname[/url]" id=[url=""]uname[/url] maxlength="[url=""]40[/url]" placeholder="[url=""]Enter your UserName[/url]" autofocus required>
</td></tr>
<tr><td>Password:</td>
<td>
<input type="[url=""]password[/url]" name="[url=""]passwrd[/url]" id=[url=""]passwrd[/url] maxlength="[url=""]50[/url]" placeholder="[url=""]Password[/url]" required>
</td></tr>
<tr><td colspan="[url=""]3[/url]" align="[url=""]center[/url]">
<button type="[url=""]button[/url]" onclick="[url=""]submit_click()[/url]">Logon</button>
<a href="[url="view-source:http://localhost/prince/register.html"]register.html[/url]"><input type=[url=""]submit[/url] value="[url=""]RegisterSelf[/url]">
<a href="[url="view-source:http://localhost/prince/client.html"]client.html[/url]"><input type=[url=""]submit[/url] value="[url=""]RegisterClient[/url]">
</td></tr>
</table>
<center>
<div id="[url=""]loadingNode[/url]";></div>
</center>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/270064-html5-javascript-not-working-together/
Share on other sites

We were speaking of 'language', not 'type'. That said, I agree that including (or not including) either of them shouldn't make a difference. But look at his current script tag:

 

<script language=[url=""]javascript[/url]>

 

Even assuming that the is some kind of bbcode/templating code, the script tag is messed up.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.