Jump to content

anky4588

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by anky4588

  1. I jzz want that whenever I select a option in my drop down it's respective name and price is shown in my labels,I want it dynamically ie through my database,plz provide me the code,I used your opinion birbal.I am pasting my code plz see to it. <html><head> <title><center>Purchase Item</center></title> <style type="text/css">.main_box{width:600px;height:400px;border:1px solid#ccc;margin:0;padding:10px 15px;;background:#FFBF80;}.left_box{width:200px;height:25px;text-align:right;padding:0 5px 0 0;margin:5px 5px;float:left;}.seperator{width:10px;height:25px;padding:0 5px;margin:5px ;float:left;}.right_box{width:300px; height:25px; margin:5px; padding:0 5px; float:left;}.clear{clear:both;}</style><h1>PURCHASE</h1></head><body><div id="1" class="main_box"><div class="left_box"> <b> PRODUCT CODE</b></div><div class="seperator">:</div><div class="right_box"> <select name="optionList" id="optionList" onchange="copy();" ><option value="Select your Option " ></option> <option value="RAM" >PR1</option> <option value="KEYBOARD" ">PR2</pption> <option value="SPEAKER" >PR3</option> <option value="LED">PR4</option> </select> </div><div class"=clear";></div><div class="left_box"><b>PRODUCT NAME</b></div><div class="seperator">:</div><div class="right_box"> <div id="label"> <script language="javascript">function copy() { document.getElementById("label").innerHTML = document.getElementById("optionList").value}</script> </div></div><div class"=clear";></div> <div class="left_box"> <b> PRICE</b> </div> <div class="seperator">:</div> <div class="right_box"> <input type="text"/> </script> </input> </div><div class"=clear";></div> <div class="left_box"> <b> QUANTITY</b> </div> <div class="seperator">:</div> <div class="right_box"> <input type="text" id="quantity" value="" /> </div><div class"=clear";></div> <div class="left_box"><input name="submit" type="submit" value="SUBMIT"></div><div class="right_box"><div class="seperator"></div><input name="clear" type="reset" value="CLEAR"></div></div> </div> </form> </body></html>

×
×
  • Create New...