|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
same form wrong values
when a user submits a wrong value for a field is there a way to return the form with the given values but with a red asterix indicating where the error was and their previous values still filled in.
I would like to do that instead of having to make them go back a page. Is this only possible in javascript or somthing?
__________________
"In theory, there is no difference between theory and practice. But, in practice, there is."
|
|
#2
|
||||
|
||||
|
Client side - use Javascript to validate the form before it is submitted to the server.
Server side - after the form is submitted check for errors. If there are errors, redisplay the form with the fields highlighted. This will require your form to accept data - to pre-load the fields with values. Part of the the data supplied to the form could be a list of fields identified with errors. Your form display code can then choose to highlight the fields. Grim
__________________
*** Experimental Python Markup CGI V2 *** |
|
#3
|
|||
|
|||
|
thanks grim. is this only done in javascript or can it be done easily in python?
|
|
#4
|
||||
|
||||
|
Client side - stick to javascript. at least you know the client has it installed.
Python client scripting did work once (for IE anyway) but not anymore ![]() Grim |
|
#5
|
|||
|
|||
|
Quote:
you can do the whole thing with Python. |
|
#6
|
|||
|
|||
|
Quote:
really??? can you let me know o howi would go about doingthis? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > same form wrong values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|