In my code, within portal-referal.asp, under option explicit, I check :
selected=false
if request.form("portals") <> "" then
if request.form("portals") <> "Select portal" then
selected=true
end if
end if
MY problem is that 'selected' is ALWAYS false even when i make a selection on the form.
I can't figure if it's the 'if then' or because when the page returns to the client, the <select> is reset.
Could some one please help.
cheers.
if request.form("portals") <> "" and request.form("portals") <> "Select portal" then
selected = true
else
selected = false
end if
try this
if you do not want the list to reset, you have to set the value dynmically. Check the returned value and put the "selected" attribute in <option ...> tag dynamically.