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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP & Javascript

Status
Not open for further replies.

andyrne

Technical User
Feb 15, 2001
43
GB
I've an asp page which reads a db and comes up with four fields. In the same page I've a javascript block which needs to read these fields: any idea how I could accomplish this? (also posted in asp forum)
 
Just assign the DB results to variables, and echo the ASP variables in your JS:

Code:
var someVar = '<%=aspVarName%>';



Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
oh, and I thought that sort of thing was used when code placed in the html; the little asp I've done has been in asp.net (separte code from html).
 

Do let us know if the code worked for you.

Dan



[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top