Clickable image that does SC_REDIR

Hello.

I have a label field that has an image it that I want to be able to click on and redirect to another page in my app.

I have the code below but its not working?

Any ideas?

Thanks!

“onLoad Event”

$varSQL = “select cartID, cart_model, cart_image from tb_cart_model”;
sc_lookup(rs,$varSQL);

if (isset({rs[0][0]})) {

$varImg3={rs[2][2]};
$theImage3 = file_get_contents("…/…/…/file/img/Cart_Images/".$varImg3);
{7100} = ‘<a href="<?php echo("$PHP_SELF?execute=click_function")?>"><img height=“200px” width=“200px” src="data:image/jpg;base64,’ . base64_encode( $theImage3 ) . ‘" /></a>’;

if ( isset($execute) ){
click_function();
}
}

The function “click_function()” just simply has “sc_redir(form_tb_parts.php);” in it for the redirect.

Not sure if this helps you, but I think that currently onclick doesn’t work? Then you can consider to create an image field and apply a link to it. That links to a blank application where you do the sc_redir.