Jump to content

dipsnaik

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Contact Methods

  • Yahoo
    deep44u@yahoo.com

dipsnaik's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi alll... my prob is how to assecc a php variabl;e in a java script funtion e.g in the below code we have populated a drop down menu with values given... this value we want to access in the javascript function.. in mssql query... i know that i can access that varianble using document.formname.varaibe;.value... but how to access this form\'s drop down menu.. in the mssql query... <html> <head> <? echo \"<script type=text/Javascript> n\"; echo \"function rent()n\"; echo\"{n\"; require(\'deep_function.inc\'); db_conn_select(); echo \"alert(document.ganapati.ss1.value)n\"; // this value is prnitng fine $sho=$ss1; $res=mysql_query(\"select login from user_details where user_id=\'$sho\'\"); $row=mysql_fetch_array($res); $t1=$row[login]; echo \"document.ganapati.t.value=\"$t1\";n\"; echo \"alert(document.ganapati.t.value)n\"; echo \"} n\"; echo \"</script>n\"; ?> </head> <body> <form name=\"ganapati\" method=\"post\"> <select name=\"ss1\" onchange=\"rent();\"> <option value=\"1001\"> Ha </option> <option value=\"1006\"> Dhapni </option> <option value=\"1002\"> Brown SHirt </option> </select> <input type=\"text\" name=\"s\"> <input type=\"text\" name=\"t\"> </form> </body> </html> whenever we hard code the where clause \'s value.. its gving the output correctly... how to access java script varable in the MySQL query?????????? plzzzzzzzzzzzzzzz help.... thanx in advance.... Deepali
×
×
  • 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.