Connecting Tech Pros Worldwide Help | Site Map

php drop-down menu

Newbie
 
Join Date: Jan 2007
Posts: 2
#1: Jan 21 '07
ok i need the coding for a drop-down menu that when a computer part is selected it automatically changes the price and specs of the computer. thanks
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#2: Jan 21 '07

re: php drop-down menu


Quote:

Originally Posted by midclasswhiteboy

ok i need the coding for a drop-down menu that when a computer part is selected it automatically changes the price and specs of the computer. thanks

What is "need the coding" mean? Do you expect the team to deliver code-on-demand? This is a programmer help programmer forum, not a code factory.
You should have written at least some of that code yourself. Then, when you run into problems, we can assist you with your code.

Ronald :cool:
Newbie
 
Join Date: Jan 2007
Posts: 2
#3: Jan 21 '07

re: php drop-down menu


ok sorry about that here is the drop down menu and the text field. i need help with making the "test 1" and "cost" going into the text box when u select it. thanks

Expand|Select|Wrap|Line Numbers
  1. <form id="form1" name="form1" method="post" action="">
  2.   <label>
  3.   <select name="select">
  4.     <option value="100" selected="selected" desc="test 1" cost="50">test 1</option>
  5.     <option value="101" desc="test 2" cost="100">test 2</option>
  6.     <option value="102" desc=test"test 3" cost="800">test 3</option>
  7.   </select>
  8.   </label>
  9.   <label></label>
  10.   <input name="textfield" type="text" value="" size="10" />
  11. </form>
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#4: Jan 21 '07

re: php drop-down menu


Quote:

Originally Posted by midclasswhiteboy

ok sorry about that here is the drop down menu and the text field. i need help with making the "test 1" and "cost" going into the text box when u select it. thanks

Expand|Select|Wrap|Line Numbers
  1. <form id="form1" name="form1" method="post" action="">
  2.   <label>
  3.   <select name="select">
  4.     <option value="100" selected="selected" desc="test 1" cost="50">test 1</option>
  5.     <option value="101" desc="test 2" cost="100">test 2</option>
  6.     <option value="102" desc=test"test 3" cost="800">test 3</option>
  7.   </select>
  8.   </label>
  9.   <label></label>
  10.   <input name="textfield" type="text" value="" size="10" />
  11. </form>

That is not a valid form and will never be. Something like
Expand|Select|Wrap|Line Numbers
  1. desc="xxxx" 
  2. cost="yyy">
are not valid html attributes of the <select> tag. I advise you to read the html manual for the specification of that tag. The label above the select has no function and the empty <label></label> under the dropdown has no use. Also, what do you want to accomplish when you don't even submit the form?

Are you pulling my leg?

Ronald :cool:
Reply