Can I assign an ASP variable a javascript value ?

Results 1 to 2 of 2

Thread: Can I assign an ASP variable a javascript value ?

  1. #1
    Join Date
    Dec 1969

    Default Can I assign an ASP variable a javascript value ?

    Hi<BR><BR>I was working in a situation where i got caught into a problem the problem is stated as follows<BR><BR><BR>I want to associate a javascript value stroed in a javascript variable say X to an ASP variable inside the &#060;SCRIPT&#062; tag can i do this <BR><BR><BR>This problem i got while populating a combobox2 depending on a value without submiting the form could anyone suggest me a better idea for doing the same .The combobox2 is populated using the query eg:-<BR><BR>Select name,id from x where id in(select id from Y where Z= (combobox1 value)<BR>all i need to do is set this query without submiting the value of combobox1 can i do this ..<BR><BR>Its urgent kindly suggest<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Cross-post, and CLIENT/SERVER-SIDE LANGS...

    Again, for the 3rd time this week...<BR><BR>ASP is a server-side language. JavaScript is a client-side language most of the time (don&#039;t get JavaScript confused with Java or JScript, both of which can be run on a server).<BR><BR>Assuming that you are using JavaScript on the client side, and VBScript for your ASP pages...<BR><BR>ASP is run on the server, the results are then fed down to the client in the form of HTML and/or JavaScript. Once the page has left the server, you can no longer interact with the ASP.<BR><BR>Hence, short of sending that JavaScript variable back to the server in a form or as part of the querystring, you can never assign an ASP variable to a JavaScript value.<BR><BR>That clear things up a bit?<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts