Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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