Click to See Complete Forum and Search --> : Choices in select box to run script to run a query?


drzeus
11-24-2003, 12:45 AM
Guys, I'm a newbie to javascript, I have a select box. When a choice is made, I need a script to run to do a query and then to display the results.

I know I need to write an onclick function, which must run this query: say: select initials
from table
where patientnumber = the selected patient number in the select box.

Then I need it to return the initials to be displayed on my page.

Can anybody help? I really don't have a clue as to where to start.

Khalid Ali
11-24-2003, 07:18 AM
you are in for a some learning..
1. you need to submit the form to your server side application(could be php,jsp...etc)

2. then ou need torun a query to your database using server side scripting(database could be one of allots e.g mysql,mas access)

3. once you get the results back you can post them back to the page that initiated this request.

drzeus
11-25-2003, 05:21 AM
Thanks for your reply Khalid,

I do realise I need to study this more before I take on such tasks. I really just started playing around with Javascript two days ago, so I suppose I shouldn't expect too much too soon.

Cheers.