Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple redirects

Status
Not open for further replies.

WARlrus

Programmer
Mar 11, 2006
5
GB
Hi
I am running a site with a log-in system

When the user logs in (in "mainContentFrame"), i want the frame "leftFrame" to refresh and the frame "mainContentFrame" to refresh as well.

Is there any way of doing this in javascript?
 
You can always consider targetting the frameset itself. But quit clowning around with frames unless you really need them... surely theres a way to perfeorm your login without relying on Javascript?!

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Sorry Dan, that didn't work.

I've decided I'll just do it by asking the user to refresh the site.

Thanks for the help :)
 
Do bear in mind the code that I gave you was guesswork, as I had no information about the relationship between the two frames to go on.

Perhaps if you post your frameset code, that might help.

Dan





[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
The frameset is:
<frameset rows="*" cols="195,*" framespacing="0" frameborder="YES" border="1" bordercolor="#FF9900">
<frame src="navigation.php" name="leftFrame" scrolling="AUTO" noresize>
<frameset rows="*" cols="*,202" framespacing="0" frameborder="YES" border="1" bordercolor="#FF9900">
<frameset rows="79,*" cols="*" framespacing="0" frameborder="YES" border="1" bordercolor="#FF9900">
<frame src="header2.php" name="topFrame" scrolling="NO" noresize >
<frame src="main.htm" name="mainFrame" scrolling="NO">
</frameset>
<frame src="stats.php" name="rightFrame" scrolling="AUTO" noresize>
</frameset>
</frameset>

Hope thats what you meant!
 
Assuming "mainFrame" is the "mainContentFrame" you mention, try changing this:

Code:
parent.frames['leftFrame'].location.reload(true);

to this:

Code:
top.frames['leftFrame'].location.reload(true);

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
mainContentFrame is an iFrame within mainFrame

The code you said does not work on my site

Could it be something to do with being used in onLoad() code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top