Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Opening multiple details pages in frames?!?!

Posted on 2003-11-07
8
Medium Priority
?
233 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
Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

 
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 80 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

609 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