You are here: irt.org | FAQ | JavaScript | Link | Q911 [ previous next ]
This is okay:
<a href="javascript:myFunctionName()"><img="...></A>
However, the following can cause problems:
<a href="javascript:history.back()"><img="...></a>
It can cause a blank page to be loaded with the text: javascript:history.back() displayed.
Change it to something like:
<script language="JavaScript"><!-- function myFunctionName() { history.back(); } //--></script> <a href="javascript:myFunctionName()"><IMG="...></a>
Better yet make them browser friendly:
<script language="JavaScript"><!-- function myFunctionName() { history.back(); } //--></script> <a href="default.htm" onClick="this.href='javascript:myFunctionName()'"><img="...></a>