Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 19th, 2004, 08:34 PM
caroundw5h caroundw5h is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 185 caroundw5h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 44 m 50 sec
Reputation Power: 0
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."


Reply With Quote
  #2  
Old April 20th, 2004, 01:50 AM
Grim Archon's Avatar
Grim Archon Grim Archon is offline
Mini me.
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: Cambridge, UK
Posts: 783 Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)  Folding Points: 1488 Folding Title: Novice Folder
Time spent in forums: 3 Days 2 h 15 m 57 sec
Reputation Power: 12
Send a message via MSN to Grim Archon
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 ***

Reply With Quote
  #3  
Old April 20th, 2004, 08:08 AM
caroundw5h caroundw5h is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 185 caroundw5h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 44 m 50 sec
Reputation Power: 0
thanks grim. is this only done in javascript or can it be done easily in python?

Reply With Quote
  #4  
Old April 20th, 2004, 08:51 AM
Grim Archon's Avatar
Grim Archon Grim Archon is offline
Mini me.
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: Cambridge, UK
Posts: 783 Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)Grim Archon User rank is Corporal (100 - 500 Reputation Level)  Folding Points: 1488 Folding Title: Novice Folder
Time spent in forums: 3 Days 2 h 15 m 57 sec
Reputation Power: 12
Send a message via MSN to Grim Archon
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

Reply With Quote
  #5  
Old April 22nd, 2004, 02:22 PM
jimmy2k1 jimmy2k1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 89 jimmy2k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 12
Quote:
Originally Posted by caroundw5h
thanks grim. is this only done in javascript or can it be done easily in python?

you can do the whole thing with Python.

Reply With Quote
  #6  
Old April 22nd, 2004, 02:30 PM
caroundw5h caroundw5h is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 185 caroundw5h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 44 m 50 sec
Reputation Power: 0
Quote:
Originally Posted by jimmy2k1
you can do the whole thing with Python.

really??? can you let me know o howi would go about doingthis?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > same form wrong values

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap