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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking to multiple frames 1

Status
Not open for further replies.

bugg

Programmer
Jun 20, 2001
62
0
0
US
Hi, I'm working on a website that consists of a number of frames:

mainFrame
titleFrame
navFrame
logoFrame

within the nav frame, I have a table set up with multiple text "links", and I'd like clicking on one to change both the mainFrame and the titleFrame, but have only been successful in getting it to change one or the other. I'd like to keep the navFrame and logoFrame the as the same things regardless of the mainFrame and titleFrame's content. Do I have to create a whole new frameset for each "page", or am I able to just update these two frames? Any suggestions? thanks much

-bugg

 
Though I don't know much about javascript, i know that u can do this using it. You can use the following function to load any page in any frame.
e.g. onClick="MM_goToURL('parent.frames[\'anyFrame\']','pagetoopen.htm');

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+&quot;.location='&quot;+args[i+1]+&quot;'&quot;);
}

I hope it works for u.
Harshdeep Singh
 
Thanks for the quick reply Harshdeep, I'll give it a go this weekend

-bugg
 
<a href=&quot;link.htm&quot; target=&quot;titleFrame&quot; onclick=&quot;window.mainFrame.location='link.htm'&quot;>click here</a>

sometime you just gotta say &quot;WHAT THE @#*% !!&quot;
 
thanks to both of you, I got it to work hybridizing the two as:

onclick=&quot;'parent.cardFrame.location='cardwellConsulting.htm'&quot;

&quot;window.frame.location&quot; wasn't working for me, but &quot;parent.frame.location&quot; seems to... is there a way to make this onclick action manipulate two (or more) frames, or would I have to write and invoke a function such as in Harshdeep's suggestion?
thanks

bugg
 
You should be able to use, note the &quot;;&quot; seperating the commands.

Code:
onclick=&quot;parent.cardFrame.location='cardwellConsulting.htm';parent.nutherFrame.location='nexthtmlpage.htm'&quot;

Cheech

[Peace][Pipe]
If you don't stand up for something, you'll fall down. Toke it Easy.
Howard Marks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top