Jump to content

shiloh2

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by shiloh2

  1. @kingphilip

    Yes, it is  <script language="javascript">document.write(document.getElementById("grading").value)</script> ..

    but when i var_dump that, it will return to "Third Grading"  .. so i decided to match with a string.. but fails. any ideas?

     

     

    @pkedpker.

    how to encode it to php?  ..

  2. Hi, i just want to ask for any help about my problem.. Im using javascript to get the value of my dropdown. using the onchange Event. Here is my Code:

     

    my  dropdown selected is "Third Grading"
    
    $drop = '<script language="javascript">document.write(document.getElementById("grading").value)</script>';
    if ($drop == "Third Grading") {
    echo "ok";
    }else{
    echo "no";
    }

     

    i used var_dump($drop) and var_dump("Third Grading") .. this is the result

     

    string(95) "Third Grading" string(13) "Third Grading"

    end one echo "no" resulting the else in if statement..

     

    can someone help me why it results to "no".. 

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.