Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and Javascript combination problem.. Please help!!!

Status
Not open for further replies.

ravula2000

IS-IT--Management
Mar 8, 2002
205
US

function fill(){
<% szXMLStream = myob.getlist(empid,<emptype>)
....
%>
}

This is a javascript function using ASP code. myob is a dll and getlist is a method which calls a stored procedure in the database and returns a stream object. The method accepts 2 parameters, empid and emptype.

Now my problem is ====
The <emptype> comes on from the first character of a listbox. When ever I change the type I need to call that function to get the new result set from the store procedure.
that means at <emptype> I could able to put the 1st char of the list box selcted value.

I declared a variable in asp - selectedetp and tried to assign the value like this..
<%selectedetp=%>theform.emptype.value
so that I can call the function.
But it is not working..

Some body can give me some sugestion.

Thanks





 
Hi ...
you can't act like this.
because when the listbox appears on the client browser, and the page loades completly, the connection between the client's browser and the server will be closed.
now when you change the listbox value, it's on the client side but your DLL is on the server.
the only work you can to is that by changing the list box, you refresh the page and run the ASP code again. but there is some other ways that are much more faster and pretty.
you can run a javascript by changing the value of the listbox and in that javascript you can open a new window and run the ASP code in it and then close the new windo and restore the return value of the nre window in a variable.
----
TNX.
E.T.
 
Ya.. got it.. and Iam working on resubmitting the page again..

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top