Loading 2 pages in different frameswith the same link

subject is saying it all..

how do you do that..

whats the javascript, asp  or html to load 2 different htmlpages in 2 frames.

Normally you can link to 1 page via
<A HREF .. with a target frame,

but i want 2 to load at the same time.

Laterz,
SHeMMesH
shammashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

al162960Commented:
With HTML you would have to reconstruct your entire frameset calling up a document that breaks up your existing structure and makes a new one.

With javascript you'd have to call a function that takes the documents and targets as parameters from your <A HREF> tag.

I assume you have a least 3 frames in your page and 1 of them if static, the other arent, is that it?

cheers

Luis
0
shammashAuthor Commented:
I have in total 5 frames orso
1 Banner Frame, 1 SiteTree Frame a Info Frame and Fill Frames to make unfilled space black if the window is fullscreen


Banner Frame is Static as well as the 3 garbage Frames

by Clicking on a Link in the SiteTree it has to Load a Page in the Info Frame (big frame right beneath) and reload the SiteTree in the left beneath.
The sitetree is a ASP Page and the info Page will be HTML.

The url of the info frame i want to be given to the asppage which then can load a new url to the Info Frame.

Every link gives back a ClickedItem Name to the ASP which checks it for access level for that user and then gets the url of a database.

Just gimme the code :)

I know you could critize this by that its not needed to load 2 pages etc. but its needed believe me, i can add 10 pages on why i have to load 2 pages at the same time.

anyway...

So i want 2 links loaded when you click on one.

* You click on a button

Want Primary Loaded in Frame SiteTree:
XTree.Asp?ClickedItem=Home
Target = XTree

and it has to load either from asp or directly from the link:
http://www.clan.login.nl/Home.html 
with Target = TInfo


If you want to look at it surf to url
http://clan.login.nl/

The sitetree doesn't work good yet (very busy with coding, but then you understand that i want 2 pages loaded. A reload of the tree and a new Page to be views in the info frame.

Laterz,
SHeMMesH












0
shammashAuthor Commented:
btw please give Full code...

I'm not that good with javascript and html (but prof. coder with VB and ASP and things)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tecbuilderCommented:
To change the page in multiple frames do the following.  In the header of your page with the anchor that you will click on add the following code.

<head>
<script language="javascript">
<!--
// add more framex references for more frames to update.
// for example:  UpdateFrames(frame1, frame2, frame3, frame4)
function UpdateFrames(frame1, frame2) {
  top.SiteTree.Location=frame1;
  top.Info.Location=frame2;
// not by using the same structure i.e. top.YourFrameName.Location=framex you can update any frame.

}
//-->
</script>

Next you ned to change the anchor tag to reference the function.  To do this use:

<a href="javascript:UpdateFrames('NewURL.html', OtherURL.html')>Click Me</a>

tec
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
morbiusxCommented:
tecbuilder has your answer!
0
compmaniaCommented:
<frameset rows=""> <-- insert size here
<frame src="page1" name="sidebar" NORESIZE scrolling="auto" marginwidth="0"
  marginheight="0" frameborder="1" framespacing="1">
<frame src="page2" name="ROOT" NORESIZE marginwidth="0" marginheight="0"
  frameborder="0" framespacing="1">
</frameset>

You will have to mess around with the col and row in the frameset, change the page1 & 2 to your html pages, if you want scrolling on the pages etc...

You make that an html file then link to it normally.
0
egbservicesCommented:
Place the following js... (I place it just after the <body text="...... line)

<script LANGUAGE="JavaScript"><!-- Hide from tired old browsers

function multiLoad(doc1,doc2) {
  parent.main.location.href=doc1;
  parent.head.location.href=doc2;
}

// --></script>

Use this to open 2 pages at once....

<a href="javascript:multiLoad('main1.htm', 'head1.htm')"><img SRC="images/image.gif" ALT="image name" BORDER=0 height=22 width=30></a>

You can add...  parent.menu.location.href=doc3; if there are 3 frames.
and add the doc3 part to the link <a href="javascript:multiLoad('main1.htm', 'head1.htm','menu1.htm')">

This setup work fine with our page, http://swiss.org.nz 
good luck, Edi
0
tecbuilderCommented:
egbservices, I had posted that answer a couple of days ago.  You should read all the comments before posting.  The best place to locate javascript code is in the head area.  That way the browser has read the scripts before it starts loading the body of the page.  JavaScript code can be located anywhere on the page and work, but should be placed in the head.

TypeO:
In a comment line.
// note by using the same structure i.e. top.YourFrameName.Location=framex you can update any frame.

tec
0
egbservicesCommented:
techbuilder... I guess you are correct. If I compare the two js's carefully the seem to be very similar just an other joice of words. Shammash should now be even more convinced with your comment and award you the points. Edi
0
itssookCommented:
you will need to make a third page calling it index.html or whatever you want....then you will need to insert the following code:

<html>
<frameset rows="20%,80%">
<frame src="page1.html" name="side">
<frame src="page2.html" name="MAIN" NORESIZE>
</frameset>
</html>

you can substitute the 20%,80% fro whatever sizess you want to put in.
and you have to change the names of the pages that you are going to call into the seperate frames.

Good luck.

0
compmaniaCommented:
itssook: please do not repeat a previous comment as an answer.
0
shammashAuthor Commented:
I can't accept your Answer Itsook..

TecBuilder posted a better answer as a comment.

I used it and it works, so i think this one can be closed..

TecBuilder > If You repost your answer as an answer instead of a comment, then i can accept it and close the thread.


For the people suggesting Framesets, you shouldn't be Web Coders.... tsss it makes the loading time of the page increase by days.... even a newbie can come up with that.

Anyone wanna see what it looks like, surf to http://clan.login.nl

Its still in production but most things work (SiteTree making use of Graphical Buttons, Oneliner, Security, Soon Message Board, and Voting Booth as well as some realtime generated charts)

Laterz,
SHeMMeSH

TecBuilder Repost your Answer as an Answer, then i can credit you for your answer.. Instead of other people telling me things i already know, and which is just not efficient web coding.






0
shammashAuthor Commented:
Used it, works fine... :))


hmm... forget the last comment of me...
(part of it)

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.