Can I use an image instead.....
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.
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.
Arielladog posted this at 17:01 — 9th April 2000.
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).]
Moderate at JavaScriptCity Forums
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.