Results 1 to 2 of 2

Thread: Passing values not working in JS, PHP and Oracle

  1. #1
    Join Date
    Mar 2014

    Passing values not working in JS, PHP and Oracle

    I need help with mo coding problem. I need to design database update with ORACLE, PHP and JavaScript. So the deal is, I can get the populated dropdown list working and I can see the values. When i select a particular entry, the onchange tag will call java script so it can direcly getting the values from the server.

    In this case I could query the corresponding quantity with the headmark. Please help me..

    PHP Code:
    <script type="text/javascript"
    OnSelectionChange (select) { 
    selectedOption select.options[select.selectedIndex]; 
    alert ("The selected option is " selectedOption.value); 
    PHP Code:
    <label for="headmark" class="lbl-ui select"> 

    $result oci_parse($conn$sql_hm_comp); 

    '<SELECT name="headmark" id="headmark" onchange="OnSelectionChange(this)">'.'<br>'
    '<OPTION VALUE=" ">'."".'</OPTION>'

    $row oci_fetch_array($result,OCI_ASSOC)){ 
    $HM $row ['HEAD_MARK']; 
                                    <div class="row"> 
                                        <div class="col4 first"> 
                                            <label for="lnames" class="lbl-text tleft">Total Quantity:</label> 
                                        <div class="col8 last"> 
                                            <label class="lbl-ui"> 

    $qty_result oci_parse($conn$sql_hm_qty); 
    $qty oci_fetch($qty_result); 
    "<label class='lbl-ui'>'.$qty.' </label>"

  2. #2
    Join Date
    Mar 2007
    You either need to set a cookie or you use a Form to pass the data to a new page with the GET method or pass the data to the server and incorporate it in the next page.
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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

Recent Articles