• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

assign a function to the anchor via javascript.

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic