OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Return the Choice from Drop-Down

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Return the Choice from Drop-Down
Page: [1]
 
EasyBee

 

Posts: 16
Joined: 5/1/2003
Status: offline

 
Return the Choice from Drop-Down - 4/3/2009 14:11:33   
I know how to retrieve the Value of a Drop-Down after submitting form..
How can I retrieve the Choice of a Drop-Down when the Choice and Value are different?

Example:
My Choice = 1 ½” but the Value is 112
After submitting the Search.. I need the Choice to default not the Value..

Can that be done?

TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Return the Choice from Drop-Down - 4/3/2009 14:18:22   
Well, hit me with a stick but I don't think I understand. It's your form, right? So why not make the dd value 1.5 (one and one-half) instead of 112? You should do this anyway as numerically it is correct. Now, if you want to display 1½ then you can use some scripting substitution to substitute the html entity & # 1 8 9 ; (without the spaces) for the 1.5 like this:
<%
if myfield="1.5" then
myfield = "1 & # 1 8 9 ;"
end if
%>

and it will display 1½ instead of 1.5

< Message edited by TexasWebDevelopers -- 4/3/2009 14:24:41 >


_____________________________

:)

Follow us on TWITTER

(in reply to EasyBee)
EasyBee

 

Posts: 16
Joined: 5/1/2003
Status: offline

 
RE: Return the Choice from Drop-Down - 4/3/2009 16:22:42   
Ok, thanks for your response.. But let’s forget about 1-1/2 and 1.5 and the 112.
What if my Choice was “Blue” and the Value was “987642”
How can I default the dd to the choice of “Blue” after submitting form?
Keep in mind that the choice “Blue” is just one of many choices.

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Return the Choice from Drop-Down - 4/3/2009 18:27:19   
Oh, you want to "persist" the selection after submit.
So there are a few ways to do this-one is to send the data to a database and then call the data back out to the page again so the user can change their entry.
Another way is to use javascript to persist the choice:
http://www.texaswebdevelopers.com/examples/persist_selected_option.asp

_____________________________

:)

Follow us on TWITTER

(in reply to EasyBee)
EasyBee

 

Posts: 16
Joined: 5/1/2003
Status: offline

 
RE: Return the Choice from Drop-Down - 4/10/2009 15:23:50   
Thanks.. Your 1st response put me on the right track..
Cookies was the answer..

(in reply to TexasWebDevelopers)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Return the Choice from Drop-Down
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts