GPSAddict
asked on
Validation Summary vs Javascript
Hi, I'm using a validation summary. When I set the show msgbox property to true, it'll show the msgbox but only if the page submits. Any way to call the validationsummary from a custom javascript function without submitting the page (static msgbox will do) ? If so, what would be code, thanks.
Do the validation in javascript...post you validation code and experts will be more than happy to help you
ASKER
Wouldn't it be easier to let .NET handle all the error processing and simply call the summary in js ? That way I have a single line of code to write...It is possible or not ?
If not, I guess I'd need a generic function that checks if some fields (texboxes, radios, checkboxes and listboxes) are null or empty (with trim).
Oh and the fields are set to run on server.
Thanks
If not, I guess I'd need a generic function that checks if some fields (texboxes, radios, checkboxes and listboxes) are null or empty (with trim).
Oh and the fields are set to run on server.
Thanks
try enabling EnableClientScript="true" in Validation Summary
ASKER
I know that but it still requires the form to submit...
if there is an error it does not post back. - this is the function of EnableClientScript="true
the link i gave you, it does not postback if there is an error.
the link i gave you, it does not postback if there is an error.
ASKER
It still submits the form...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for links, it helps me understand all of the validators behavior. However, it is still unclear to me how I could, upon a button click,successfully show the content of the validatorsummary msgbox without submitting the page ! In your links I found out what event to use server-side but I have no idea how to retrieve the validatorsummary message (unless it is impossible to do so without submitting ?) Any ideas ? Thanks
ASKER
Please note I am not trying to retrieve the text property of validators but the message that would be returned by the validatorsummary with a msgbox (I want to use a msgbox also). Thanks
Please post your Validation Summary Code. so that i can see whats happening
ASKER
Nevermind, I'll do the complete validation in js. Thanks