How to Cancel Validation for a <A> tag with OnClick Event.

R

RSB

I have Few <A href> tags with onclick javascript fuction. and in that
javascript fuction i am using
window.document.form1.submit(); to submit the page.
Now this submit does a Validation before i submit the page and i want to
ignore it.

and as i am using <A> tags as button so there is no Causevalidation property
which i can set to false.
Please help me to achive this.
Thanks.
RSB
 
S

Scott Mitchell [MVP]

RSB said:
I have Few <A href> tags with onclick javascript fuction. and in that
javascript fuction i am using
window.document.form1.submit(); to submit the page.
Now this submit does a Validation before i submit the page and i want to
ignore it.

and as i am using <A> tags as button so there is no Causevalidation property
which i can set to false.
Please help me to achive this.

Is there any reason you can't use a LinkButton and simply set its
CausesValidation to False?

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top