Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Information not saving on form with option group 1

Status
Not open for further replies.

pandapark

Technical User
Jan 29, 2003
92
GB
Hi

I've a form with an option group. I'm using VBscript to write server-side validation - has to be like this
When I submit the form it retains any text values but I can't get it to retain the option group value - I am plugging this code into an off the shelf package so i can't use method such as below
<option value="under 18" <% If AgeGroup = "under 18" Then Response.Write "SELECTED" %>>under 18

this is part of what i have

b = b & "<select name=Law id=Law"
b = b & "<option value="""">Select a Law Type</option>"
b = b & "<option value=""Gen"">Gen</option>"
b = b & "<option value=""Lit"">Lit</option>"
b = b & "</select>"

I want to say if the user chooses Gen but doesn't meet the all the validation it retains the value Gen

any ideas much appreciated
Tony
 
split up your concantenation lines

Code:
....
b = b & "<option value=""Gen""
if condition then 
b = b & " selected >Gen</option>" 
else 
b = b & ">Gen</option>" 
end if
....



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top