• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Anchor tag calling Javascript function

 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am calling a javascrit function from anchor tag ... my problem is whatever the function return back anchor tag transfer the control to a new window, but i dont want this to hapen .... the jsp containing anchor tag has form fields and i am doing the validations of these form fields by calling a function present in javascript on clicking anchor tag.




here when any of the radio button is not selected the function returns false and the anchor tag display false as output in the window.. which i dont want ... Can anybody suggest me how do i make the anchor tag behave like a button.....

Also here i am using anchor tag because instead of using normal html buttons i created a fancy button using anchor tag. and now i need to use anchor tags evrywhere to invoke javascript functions.
>
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
simple got it just need to add onClick instead of HREF
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic