Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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?

![]() |
Hide img if src invalid
|
PHP Double Login Problem
|

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