hey all..
i was wondering if anyone culd help me wid this..
i've a html file with javascript and a php file..
i need to access the db result generated by the php file in my javascript..to dynamically load drop down menu in the html file..
was wondering if i cud use somehin like..
var abc='load.php?array_name='+array_name;
to access the array in php file..
It will be good if you try to code yourself, we are always there to help you out if you get stuck up somewhere in the code, to start with, here is the ajax functions you can use -
you can call the httpRespObj(url) on focus of the select element(whatever way you like it).
"url" is your php script (i called it fetch.php) which fetches the data from the db.
<select onFocus="return httpRespObj('fetch.php?id=<?=$id?>');">
If you dont need to pass any id to the request, you can safely omit that part
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.