Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can somebody help me with this code? 1

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have this code that I want to customize by using an image button:

<td width=&quot;100%&quot; align=&quot;center&quot;><input type=&quot;button&quot; value=&quot;<%=COM_Back%>&quot; name=&quot;cmdBack&quot; LANGUAGE=javascript onclick=cmdBack_onclick(&quot;<%=RetURL%>&quot;)></td>

This is my customized tag:

<td width=&quot;100%&quot; align=&quot;center&quot;><input type=&quot;image&quot; src=&quot;\myserver\images\bback.gif&quot; LANGUAGE=javascript onclick=cmdBack_onclick(&quot;<%=RetURL%>&quot;)></td>

It didn't work, the RetURL is empty. So I did this:

<td width=&quot;100%&quot; align=&quot;center&quot;><a href=&quot;<%=RetURL%>&quot;><img src=&quot;\myserver\images\bback.gif&quot;</a></td>

This one work. I just want to know what was wrong with my second tag.
 

also if it's just a back button why not try:

<img src=&quot;pic.gif&quot; onClick=&quot;window.location='javascript:history.go(-1)';&quot;>
 
You can also try simplifying things a bit and adding a cursor that tells people it is clickable and an alt tag as well :

<img src=&quot;pic.gif&quot; onClick=&quot;history.go(-1)&quot; style=&quot;cursor:pointer;&quot; alt=&quot;go back&quot;> Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top