Computing.Net > Forums > Web Development > Javascript automation settimeout

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Javascript automation settimeout

Reply to Message Icon

Name: stroke6463
Date: October 23, 2007 at 11:20:32 Pacific
OS: XP Pro
CPU/Ram: idk
Comment:

I am very new to javascript but I am working on a program that will auto-login to a web page and then display a new page if the login is successful. I have a framed index.htm page. The main1.htm will auto-login in the main frame but then I want to have main2.htm open in that same frame but I can't. Here is the code I have now:


<HTML>
<BODY>

<SCRIPT language="JavaScript">
{

function start()
{
parent.main.document.location="main2.htm"
}

parent.main.document.location="main1.htm"

setTimeout("start()", 5000);
}
</SCRIPT>

</BODY>
</HTML>


It logs in fine but it won't load main2.htm. It says access denied in the script error message. It occurs in the function.

Is there anyway to correct this or maybe is there some what to sleep and just load main2.htm? Or maybe code to add to main1.htm to load main2.htm once the login is complete?



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Hide img if src invalid PHP Double Login Problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Javascript automation settimeout

Determine if Pop-up was blocked www.computing.net/answers/webdevel/determine-if-popup-was-blocked/3839.html

Javascript program www.computing.net/answers/webdevel/javascript-program-/2075.html

Confict using two JavaScript tools www.computing.net/answers/webdevel/confict-using-two-javascript-tools/2036.html