in order to make an image be an action, it has to be either a link, or a form.
a simple javascript can make it a post form, or you just create it as a link..
ie..
<a href="thispage.php?lang=en"><img src="english.jpg"></a>
or..
a form..
<form name="english" method="post" action="thispage.php">
<input type="hidden" name="lang" value="en">
<a href="javascript:document.english.submit();"><img src="english.jpg"></a>
</form>
that should get you in the right direction.
Making an image trigger an action
Moderators: egami, macek, gesf
easiest javascript solution
no need forms, no need to create a javascript function, no need a href link....
no need forms, no need to create a javascript function, no need a href link....
Code: Select all
<img src="img.jpg" onclick="document.location.href='mapage.php?lang=fr';">