Solved

Opening multiple details pages in frames?!?!

Posted on 2003-11-07
8
229 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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