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!

onClick or similar solution needed

Status
Not open for further replies.

beaglezx

Instructor
May 28, 2002
2
0
0
GB
Is it possible to cause two actions with an onClick?
I want to change an image and then activate a link that opens a new window - all with a single click.When I close the new window and go back, I want the changed image to stay changed.

Many thanks for any offers of help. I am an HTML programmer but have only used bits of javascript in the past - so my knowledge is minimal.

Beaglezx
 
OR

Put the items in a function and call that from the onClick;
Code:
<script>
function DoThisStuff() {
  stuff_1;
  stuff_2;
  alert('wow - this is more fun than I thought!');
}
</script>
...
<a href=&quot;...&quot; onclick=&quot;DoThisStuff()&quot;>
Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top