Dynadot โ€” .com Registration $8.99

Need help!

Spaceship Spaceship
Watch
Impact
1,817
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Scroll down to the bottom of the source code.
Instead of input type="button" you need input type="submit" like this:

Code:
<input type="submit" Name="Button" Value="Submit" onClick="CheckData()" class="9-font">

Remarks:
- use quotes for attributes eg. input type="submit" instead of input type=submit
- your validation routine is in vb. It will only work with internet explorer. Javascript would be better (work on other browsers too).

Donate to charity instead: http://www.namepros.com/the-break-room/249268-npemergencyfund-npef-info.html :hehe:
 
0
•••
Scroll down to the bottom of the source code.
Instead of input type="button" you need input type="submit" like this:

Actually you would want this as a button or the form would be submitted to the form action which is not what we want at this time (before validation).
(this is assuming we are ignoring the fact that a standard submit should be used to make sure the form always submits regardless of the client side validation [the VBScript])

The problem is as sdsinc pointed out, your function is written in VBScript which is a Microsoft technology, as such only Internet Explorer supports it. The function could easily be re-written in javascript as they are very similar languages, this would allow cross platform compatibility. (also VBScript is/has been a source of many exploits)

Matt
 
Last edited:
0
•••
I agree that the vbscript should indeed be changed to javascript, which is much more widely supported.

However, I strongly disagree that an input type="button" should be used to submit a normal form. Clientside validation should never be trusted, so adding validation as onsubmit="return validationfunction()" is much better as it gives support for browsers that triggers errrors in your javascript or which doesn't parse javascript at all.
 
0
•••
Thanks you all!
I have solved the problem. :)
I appreciate your help!!

BTW, $NP sent.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back