Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assign a function to the anchor via javascript.

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys.
as u see from the code below; i have some problems
1-i 'd like to assign a function to the anchor via javascript. I read that void( 0 ) would do that. it works, but then onClick-event handler doesnot. It cannot submit the form.
2-the gif image cannot be rendered. Although the relative path is absolutely true.
3-is window.document.forms-i notation not correct, bcos IE gives object null error.
regards....

td
a href="javascript:void(0);"
on-Click = "check_and_submit_form(t his);" &st;
img src="../images/wwr3DGrau_MA2_oben.gif"
alt="being loaded.Sei Geduldig !!!"
align="left" height="95" width="112"
a
td
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<td>
< a href="javascript:void(0);">
onClick = "check_and_submit_form(this);"
<img src="../images/wwr3DGrau_MA2_oben.gif"
alt="being loaded.Sei Geduldig !!!"
align="left" height="95" width="112">
</a>
</td>
Try this way
<td>
< a href="javascript:check_and_submit_form(this);"><img src="../images/wwr3DGrau_MA2_oben.gif"
alt="being loaded.Sei Geduldig !!!"
align="left" height="95" width="112">
</a>
</td>
Eric
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this way also

<a href="javascript:void(document.check_and_submit.submit(this))"><img border="0" src="" > </a>
[ May 08, 2003: Message edited by: sunitha raghu ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic