Solved

Opening multiple details pages in frames?!?!

Posted on 2003-11-07
8
225 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
  • 4
  • 3
8 Comments
 
LVL 23

Expert Comment

by:adilkhan
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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now