Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onClick problem

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
US
I have a link that needs to do the following with one click:

1. open a page in my right frame, and find a named anchor.

2. run some javascript contained in the page.

Ive tried this:

<a href="javascript:parent.right.location='deadlines.html#sir';parent.right.openandclose(0)">

and this:

<a href="deadlines.html#sir" target="right" onClick="javascript:parent.right.openandclose(0)">

However both of these methods require a second click before the javascript executes.

I think the problem with the second method is that the onClick happens before the href navagation. But what's wrong with the first example?
 
um with the second example you might try an onMouseup and see if that works...just a thought
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top