![]() |
Anyone care to help me debug my crappy JavaScript please?
I have to produce a webpage that uses a while{} to ensure that a valid password is entered into a prompt box. Valid passwords include atleast 6 characters, include a @ and begin with the number 0.
Any ideas? Thanks in advance!! Code:
<html> |
So anyways...
This is where im at now: Code:
<script language = "JavaScript"> |
I think that this is proof that IE8 is "not ready yet"...typical of any microsoft product when it is actually released! Have you tried it with IE7/Firefox 3/Safari etc etc? Does it work in these?
Worth a shot: If you want a quick way of trying out IE7, you need to look at Virtual PC 2007 from MS. Its a free download, and will let you run a seperate XP OS at the same time as your host OS. Might be worth getting hold of some extra RAM which you can assign to the Virtual OS, as it will slow your machine down a bit. HTH Mark |
Cheers for that Mark! Sounds like you've been in my shoes before then? What area do you work in then?
|
Right, just need one piece of advice if anyone is able to help??
When I run the above code, and enter a VALID password it shows the alert as below, however, if the password is NOT valid the code just seems to get lost and then I have to close IE. Does anyone know how I can get past Code:
if (intValidPassword = 1); Thanks :) Code:
<script language = "JavaScript"> |
Under 'fail' conditions, your while loop is not getting any new information upon which to re-evaluate the situation. Once a fail, always a fail :( and that is not IE8's fault. Moving 1 line will cure the problem.
Regards, Jon. |
Jon,
Can you give me a hint as to which line to move? Thanks for the reply :) Cris |
Also, I presume that
Code:
if (intValidPassword = 1); Code:
if (intValidPassword == 1); Thanks :) |
Actually it's 2 lines. I was looking at post 2 when I wrote 1 line.
Moving Quote:
Tweaked a little further it will handle the cancel button too: Quote:
And yes to your last question. Regards, Jon. |
*bows at your feet*
Thanks a tonne Jon! |
Quote:
Jon. |
All times are GMT. The time now is 10:49 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
oOple.com