View Full Version : function call when onClick on image occurs

01-24-2007, 05:57 PM
Hello, what I'm trying to achieve is that when an image is clicked: it redirects to a webpage. I do not wan't it to just redirect however, some values should be given(window size, referrer, browser version and so on) before the other webpage is requested. I'll do this with a javascript function that appends some values(like a GET method) to the link:

<SCRIPT language="javascript">

function createAppendedString(link)
//perform some actions and create a link
function redirect(link)
//calls createAppendedString with link as argument

This code is called fro mthe following image:
<IMG src='source' align='middle' onclick="this.redirect('main.php')"></IMG>

why doesn't it work, if I click on the image it displays that an error occured

01-24-2007, 08:03 PM