Solved

HREF and two targets

Posted on 2004-04-29
5
617 Views
Last Modified: 2008-03-17
The following code snippet is from an events calendar that I've been working on for some time:

Write_TD "<A HREF=events.asp?date="& Server.URLEncode(dToday) & " CLASS='TODAY1' target='bottom'> " & intPrintDay & "</A>", "HL"

Question:
How do I add code that will allow HREF to target two frames instead of just one?

Currently, the HREF tag targets only the events.asp page.

I need HREF to target two pages ("events.asp" in an Iframe called "bottom" simultaneously with a page called "date.asp" in an Iframe called "middle").

Note:  CLASS='TODAY1' and "HL" are used in conjunction with an embedded CSS. The URLEncode string provides date information which when the link is clicked sends the date to the events.asp page.

I've already tried and failed using JavaScript with an "onClick" function, and I've tried the following code which only generates javascript errors:

<head>
<script language=javascript>
<!--
function go(p1,p2)
{
parent.frame1.location.href=p1;
parent.frame2.location.href=p2;
}
//-->
</script>
</head>

<body>

<a href=javascript:go('page1.asp','page2.asp')


Any help would be greatly appreciated.  
0
Comment
Question by:bapasba
5 Comments
 
LVL 12

Accepted Solution

by:
rcmb earned 63 total points
Comment Utility
Try using javascript something like this

function openPages() {
window.frames[1].location=doc1.html
window.frames[2].location=doc2.html
}

<A href="javascript:openPages();">Link</A>

window.frames is an array of all the frames listed in the order that they are in the html document. Array index starts a 0.

In the above example I'm assuming the link is in the first frame and you want to change the second two frames.

RCMB
0
 
LVL 23

Assisted Solution

by:adilkhan
adilkhan earned 62 total points
Comment Utility
or Try

top.frames[0].location = var_name
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

16 Experts available now in Live!

Get 1:1 Help Now