Results 1 to 1 of 1

Thread: get a value from select box

  1. #1
    Join Date
    Jul 2007

    get a value from select box

    hello all,

    I am having difficulties getting the current value of a select box to pass to a function

    this is what my code looks like:

    PHP Code:
    dbQuery("SELECT PriceCode, Name FROM pricecode ORDER BY PriceCode");
    $PriceRetail $row_rsProduct['PriceRetail'];
    $pc           $row_rsProduct['PriceCode'];
    $pct           "'".$pc."'";
    $Cost          $row_rsProduct['Cost'];
    $row dbFetchAssoc($sql))
           <option value="<?php echo $row['PriceCode'];?><?php if($row['PriceCode'] == $row_rsProduct['PriceCode']){echo 'selected';}?>><?php echo $row['PriceCode']."|".$row['Name'];?></option>
                    <td><input size="7" name="Cost" type="text" id="Cost" style="text-align:right" value="<?php echo $Cost;?>"></td>
      <form name="calc">
        <a class="calc" style="cursor:pointer" onClick="recalc_prompt(<?php echo $ProductId?>,<?php echo $pct?>)">Recalc prices</a>

    with this code the variable $pct is only going to be the stored db value - but I need to get the select box current selection value to pass to my function -

    Any Ideas??

    Last edited by samoht; 11-02-2007 at 10:50 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center