| Author |
Anchor tag calling Javascript function
|
carina caoor
Ranch Hand
Joined: Jun 23, 2007
Posts: 300
|
|
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
Joined: Jun 23, 2007
Posts: 300
|
|
simple got it just need to add onClick instead of HREF
|
 |
 |
|
|
subject: Anchor tag calling Javascript function
|
|
|