Force Validation check

J

Jake

Hi everyone,

I am using a popup window to display a calander control.
When the user select a date the date on the main window
is set to the selected date and the popup closes useing
javascript.

The problem is this bypasses the form validation on the
main page and the error message is not dispalyed untill
the form is submited. I need to be able to validate the
date entered as soon as it is selected, and not wait till
the form is submited.

Does any one know how to raise an event on the main
window when the value of one of its controls is set by
its child.

Thanks in advance

Jake

Cheers jake
 
N

Natty Gur

Jake Hi,

If you will take a look at WebUiValidation.js (which holds the
validation code) you can see that the validetor hook the onchange event.
Try to call the onchange event of the control after you change its
value.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
J

Jake

Natty,

Thanks for your feedback. I have implemented your
suggestion of useing the ValidatorValidate() method of
the .js file and it works fine.

The only limitation I have now is i dont know how to
reference the function from the popup. I can only call
it from the parent useing:

onClick="javascript:ValidatorValidate(vldCompFromDate);"

Would you know how to call it from the child?

I have tried the following and that didnt work:

window.opener.ValidatorValidate('vldCompFromDate');

Cheers Jake
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top