Solved

HREF and two targets

Posted on 2004-04-29
5
628 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
ID: 10954993
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
ID: 10956184
or Try

top.frames[0].location = var_name
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update static table with two columns and multiple rows... 15 83
INNER JOIN ? 8 41
Error viewing ASP page 12 148
ASP CDO - Limiting Connections 2 36
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 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

20 Experts available now in Live!

Get 1:1 Help Now