Hi,
I am creating a form using HTML and JSP.
I connect to my DB and perform a SQL stmt that retreives , emp_name and emp_id.
I then propulate a DDL with emp_name from my resulset above.
What I need is that when a value from the DDL changes, I call a new SQL statement , select t.task1 from emp e,task t where t.emp2task=e.emp_id
and e.emp_id=??? ==> id mapping the name selecte in the ddl,
and I need to display task1 in a text box situated just below the DDL.
I 've tried the onChange() and javascript but all i can do is an alert of the emp_name, not even the emp_id and I also don't know from javascript how to format and pass variable back to JSP ?
can anyone help me there?
Thanks.
I am creating a form using HTML and JSP.
I connect to my DB and perform a SQL stmt that retreives , emp_name and emp_id.
I then propulate a DDL with emp_name from my resulset above.
What I need is that when a value from the DDL changes, I call a new SQL statement , select t.task1 from emp e,task t where t.emp2task=e.emp_id
and e.emp_id=??? ==> id mapping the name selecte in the ddl,
and I need to display task1 in a text box situated just below the DDL.
I 've tried the onChange() and javascript but all i can do is an alert of the emp_name, not even the emp_id and I also don't know from javascript how to format and pass variable back to JSP ?
can anyone help me there?
Thanks.