Can I use an image instead.....

They have: 21 posts

Joined: Mar 2000

Can I use an image instead of a button for the javascrip alerts? I tried doing this: input type="image" src="pic addy" onClick="alert('whatever'); window.location='url'" But that doesnt work.

They have: 122 posts

Joined: Jun 1999

If I understand you correctly, it is possible. Here is what you would do:
<script language="javacript">
function gotoa() {
alert('Alert this message.');
top.location.href="yoururl.html";
}
</script>
<IMG SRC="somepic.gif" onclick="gotoa()">

[This message has been edited by Arielladog (edited 09 April 2000).]

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.