[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: select option value into a variable



Hi,
Here's one example of a working select:

<html>
<head>
<title>Display Option</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function display() {
  DispWin = window.open('','NewWin',
'toolbar=no,status=no,width=300,height=200')
  message = "<ul><li><b>Option: </b>" + document.form1.product.value;
"</ul>";
  DispWin.document.write(message);
}
</script>
</head>
<body>

<form name="form1">

ex: <select name="product">
<option value="a">Apple</option>
<option value="b">Orange</option>
</select>

<p><input TYPE="BUTTON" VALUE="Display" onClick="display();"></p>



</form>
</body>
</html>

Tom B
Internet Content Developer
tbirchmire@xxxxxxx


------ Original Message ------
Received: Wed, 15 Sep 2010 09:08:55 AM EDT
From: vijaya lakshmi <vijayalakshmi6jun@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx, bang-phpug@xxxxxxxxxxxxxxx
Subject:  select option value into a variable

> Hi,
> need to take the option value of select into a php  variable.
> 
> Can you plz help me in doing this.
> 
> ex: <select name="product">
> <option value="a">Apple</option>
> <option value="b"></option>
> </select>
> 
> so if i select apple then another list box is to be generated.
> 
> if i select orange a diffrent list box should be generated.
> 
> Can you please guide me on how to go about this.
> 
> Thanks in advance......
> 
> 
> -- 
> Thanks & Regards
> Vijayalakshmi
> 
> 
> [Non-text portions of this message have been removed]
> 
> 



[PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux