G
Guest
I have a control that simply displays a list of links. Following one of the
links doesn't post back or redirect to another page, it simply hides the
current panel and shows the one you selected... So the behavour is similar to
a tab control.
The user is expected to fill out required data on each of the panels before
pressing a submit button which is visible from all panels.
Problem I have is validating the data entered by the user. I can use built
in validators to actualy do the validation but consider this type of
situation.
The user loads the page and enters some but not all of the data on the first
panel. They then follow the link to the second panel (which sets DISPLAY:none
on the currently visible panel and DISPLAY:block on the new panel using
javascript)
If the user then enters the required data on the second panel and presses
the submit button the validators fire and fail on the first panel but the
user cannot tell because the panel is not visible.
I want to be able to do one of the following:
A) validate a panel as it loses visiblity without a postback. This way the
user must enter the data before they leave the panel. (server side validation
will still occur when the submit button is pressed but the data will already
be known good) This would be the prefered option
b) force the panel with the failed validator to be visible when the server
side validation occurs.
c) display some kind of message on the currently visible panel indicating
that there are failed validators on the first panel so the user is aware and
can correct the problem.
Any ideas would be helpful
links doesn't post back or redirect to another page, it simply hides the
current panel and shows the one you selected... So the behavour is similar to
a tab control.
The user is expected to fill out required data on each of the panels before
pressing a submit button which is visible from all panels.
Problem I have is validating the data entered by the user. I can use built
in validators to actualy do the validation but consider this type of
situation.
The user loads the page and enters some but not all of the data on the first
panel. They then follow the link to the second panel (which sets DISPLAY:none
on the currently visible panel and DISPLAY:block on the new panel using
javascript)
If the user then enters the required data on the second panel and presses
the submit button the validators fire and fail on the first panel but the
user cannot tell because the panel is not visible.
I want to be able to do one of the following:
A) validate a panel as it loses visiblity without a postback. This way the
user must enter the data before they leave the panel. (server side validation
will still occur when the submit button is pressed but the data will already
be known good) This would be the prefered option
b) force the panel with the failed validator to be visible when the server
side validation occurs.
c) display some kind of message on the currently visible panel indicating
that there are failed validators on the first panel so the user is aware and
can correct the problem.
Any ideas would be helpful