Solved

Opening multiple details pages in frames?!?!

Posted on 2003-11-07
8
230 Views
Last Modified: 2010-04-25
Hey there,

I have three frames. Frame 1 has a menu, when a item in the menu is clicked frame 2 displays a details page. Now this is fine but how do i make frame 3 open another details page using the same URL parameter when a menu item in frame one is clicked.

Basicly i need two seperate details pages to open in two seperate frames with one click.. Any ideas?

Nugs
0
Comment
Question by:Nugs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9703503
<a href="javaScript:top.frames[1].location='abc.html';top.frames[2].location='klm.html'"> Update Two Frames </a>
0
 
LVL 8

Expert Comment

by:klykken
ID: 9703510
Hi Nugs,
You will have to use javascript to help yuo with this.

This is the javascript:

<script language="JavaScript"><!--
function functionName(fileName1,fileName2) {
    parent.frameName1.location.href = fileName1;
    parent.frameName2.location.href = fileName2;
}
//--></script>

And your link will have to look like this:

<a href="javascript:functionname('file1.html','file2.html')">Link</a>

If you need any more help with implementing this code, let me know!

-klykken
0
 
LVL 2

Author Comment

by:Nugs
ID: 9704482
klykken,

I implemented the code that you provided, with not much success. I'm getting an expected ")" when i run a debugger on it. Take a look at the code as i have it now. I also need not only to open two pages in two frames but pass a URL parameter to these frames.

So here is the code:

...
<script language="JavaScript"><!--
function TwoFrame(main.asp,right.asp) {
    parent.Mainframe.location.href = main.asp;
    parent.Rightframe.location.href = right.asp;
}
//--></script>
...
<a href="javascript:TwoFrame('main.asp','right.asp')"><img src="<%=(SectionSlides.Fields.Item("SectionSlide").Value)%>" border="0"></a>
...


here is the code used to open the details page in the 'main' frame that works using the 'Go To Details Page' server behavior:
...
<A HREF="main.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "ProjCode=" & SectionSlides.Fields.Item("ProjCode").Value %>" target="mainFrame"><img src="<%=(SectionSlides.Fields.Item("SectionSlide").Value)%>" border="0"></a>
...

All i need now is for the right.asp page to send the same URL param' something like the below code and then basicly combine the two so that both the mainFrame and rightFrame open there respective pages with the same URL param':

<A HREF="right.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "ProjCode=" & SectionSlides.Fields.Item("ProjCode").Value %>" target="rightFrame"><img src="<%=(SectionSlides.Fields.Item("SectionSlide").Value)%>" border="0"></a>

Any more help you can give me in figuring this out would be awesome.
Nugs
0
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 
LVL 2

Author Comment

by:Nugs
ID: 9704486
PS: it was this line that was giving me the error:

function TwoFrame(main.asp,right.asp)
0
 
LVL 8

Accepted Solution

by:
klykken earned 20 total points
ID: 9704599
You cannot have a dot in the function like that. (main.asp,right.asp) I think you mistakenly changed the function in the javascript because you thought the 'fileName1' should be replaced by the name of your file, it doesn't :-)

So use this instead:

<script language="JavaScript"><!--
function TwoFrame(fileName1,fileName2) {
    parent.Mainframe.location.href = fileName1;
    parent.Rightframe.location.href = fileName2;
}
//--></script>

<a href="javascript:functionname('main.asp','right.asp')">Link</a>

-klykken
0
 
LVL 8

Expert Comment

by:klykken
ID: 9704677
You could also use a much easier version like this:

<a href="main.asp" target="mainFrame" onClick="parent.rightFrame.location='right.asp'">Link</a>

Not sure why I didn't think of that right away... Much easier and intuitive..

-klykken




0
 
LVL 2

Author Comment

by:Nugs
ID: 9704723
Ok, that makes sence... but where in this code does it pass the URL param' for the selected record?
0
 
LVL 2

Author Comment

by:Nugs
ID: 9704770
Oh my bad, sometime i ask questions before i try to answer them myself. The link would look something liek this to pass the URL param' :

<a href="javascript:TwoFrame('main.asp?projCode=<%=(SectionSlides.Fields.Item("ProjCode").Value)%>','right.asp?projCode=<%=(SectionSlides.Fields.Item("ProjCode").Value)%>')"><img src="<%=(SectionSlides.Fields.Item("SectionSlide").Value)%>" border="0"></a>

There are still some fine tuning to do but i have run out of time, i have to leave but will be back tonight to let you know if i got it working ok, and if not then to get some more help from ya if you willing and  finaly to award some points.

Thanks again
Nugs
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question