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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a function after onClick

Status
Not open for further replies.

Nunners

Programmer
Aug 22, 2001
25
0
0
GB
Hi,

I have a piece of code which, initially clicks a URL in the "target_frame" frame window. This changes the page to bring up a print menu.

I would then like the function, i have below, to click another URL in the same "target_frame" frame.

The click script and function, looks like....

<script = &quot;Javascript&quot;>
function press_export()
{
parent.target_frame.document.links[3].href;
}
</script>

<a href =&quot;about:&quot;
onMouseOver=&quot; status = 'links to target frame. '; return true;&quot;
onMouseOut=&quot;status = '' &quot;
onClick=&quot;this.href=parent.target_frame.document.links[5].href; setTimeout('press_export()',1500);&quot; target=&quot;target_frame&quot;;
>Print Disco Report

However the press_export link never gets pressed. how can this be?

thanks for any help

Nunners
 
try:

<script = &quot;Javascript&quot;>
function press_export()
{
parent.target_frame.document.links[3].click();
}
</script>
 
sorry, i mashed up the script tag, it should say:

<script language=&quot;javascript&quot;>
function press_export()
{
parent.target_frame.document.links[3].click();
}
</script>
 
you my friend, are a legend.

thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top