storing combo box value
Moderator: General Moderators
storing combo box value
hello friends,
i have a code like this :
<tr>
<td>Task Status :</td>
<td>
<select name="status">
<option value="juststarted">Just Started</option>
<option value="halfcompleted">Half Completed</option>
<option value="almostcompleted">Almost Completed</option>
<option value="completed">Completed</option>
</select>
</td>
</tr>
what is want is when i select a value from combo box (lets say completed) it should display as completed( and not the first value "just started").so how to use isset function for this.............thanx in advance
i have a code like this :
<tr>
<td>Task Status :</td>
<td>
<select name="status">
<option value="juststarted">Just Started</option>
<option value="halfcompleted">Half Completed</option>
<option value="almostcompleted">Almost Completed</option>
<option value="completed">Completed</option>
</select>
</td>
</tr>
what is want is when i select a value from combo box (lets say completed) it should display as completed( and not the first value "just started").so how to use isset function for this.............thanx in advance
Re: storing combo box value
You'll need to generate this HTML:
Code: Select all
...<option value="completed" selected>Completed</option>...There are 10 types of people in this world, those who understand binary and those who don't
Re: storing combo box value
u r rite but what if i want to select any other value lets say almost completed then........that will not solve my purpose.......please suggest some other option
Re: storing combo box value
???
You decide what HTML has to be generated ... so, where is the problem?
You decide what HTML has to be generated ... so, where is the problem?
There are 10 types of people in this world, those who understand binary and those who don't
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: storing combo box value
Almost!
Two things...
1.) This is the PHP code forum and that is not PHP! This thread needs to be moved to the clientside forum. With 9 posts you should know this by now.
2.) VladSun is half correct but he's missing the value!
I'm pretty sure you want to utilize JavaScript to execute a function when the user changes the value of the select menu.
...of course you're going to need to learn how to reference things better in order to ask the questions to the required depth in order to receive the answers you desire.
Two things...
1.) This is the PHP code forum and that is not PHP! This thread needs to be moved to the clientside forum. With 9 posts you should know this by now.
2.) VladSun is half correct but he's missing the value!
Code: Select all
<option attribute="value"></option><option selected="selected"></option>Code: Select all
<select onchange="my_function();">Code: Select all
my_function() {alert('The select menu\'s value has changed.');}Re: storing combo box value
http://www.w3schools.com/Xhtml/xhtml_syntax.aspJAB Creations wrote:2.) VladSun is half correct but he's missing the value!
There are 10 types of people in this world, those who understand binary and those who don't
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: storing combo box value
How does this question have anything to do with PHP?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: storing combo box value
Thank you for noticing too.JAB Creations wrote:This thread needs to be moved to the clientside forum.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: storing combo box value
There may be PHP involved, so I am giving the OP the benefit of the doubt.JAB Creations wrote:Thank you for noticing too.JAB Creations wrote:This thread needs to be moved to the clientside forum.