• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

assign a function to the anchor via javascript.

 
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

 
author
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
 
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 ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic