Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Permission denied error


  • Please log in to reply

#1
lalit_qa

lalit_qa

    New Member

  • Member
  • Pip
  • 2 posts
Hey Guys,

i was just writting a javascript to test my browser. Guys i am not comfortable in this so im not able to trace the problem in mmy code.

<script language="javascript">
var password="yummy";
var pass;
var count=1;
pass=prompt('Please enter your password!', '');
if(pass==password)
{
window.location="http://www.yahoo.com";
}
else
{
while(count<=4){
if(count==4){
ALERT1();
window.location="http://www.google.com";
}
else{
count=count+1;
pass=prompt('Please enter your password!','');
}
}
}
function ALERT1()
{alert("you have lost all your chance! now go to google and search karo");
}
</Script>


Please :tazz:

And please don't laugh if i made any stupid mistake ;)
  • 0

Advertisements


#2
Mycah

Mycah

    Member

  • Member
  • PipPipPip
  • 104 posts
Well, exactly what is this doing? Its a login script right? But i think u added a extra = at line 6
  • 0

#3
lalit_qa

lalit_qa

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

Hey Guys,
i was just writting a javascript to test my browser. Guys i am not comfortable in this so im not able to trace the problem in mmy code.
<script language="javascript">
var password="yummy";
var pass;
var count=1;
pass=prompt('Please enter your password!', '');
if(pass==password)
{
window.location="http://www.yahoo.com";
}
else
{
while(count<=4){
if(count==4){
ALERT1();
window.location="http://www.google.com";
}
else{
count=count+1;
pass=prompt('Please enter your password!','');
}
}
}
function ALERT1()
{alert("you have lost all your chance! now go to google and search karo");
}
</Script>
Please  :tazz:
And please don't laugh if i made any stupid mistake ;)

View Post



Well i think i got the answer.... Actually i was missing the break; statement after the line No. 15 of the code.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP