|
lovduv -> ***solved*** asp variable+Javascript url (2/12/2007 16:47:22)
|
This a carry over from a post I made in ASP and Database, but I thought it may be better suited for this forum: Ok so I have a DetailsView control running on a page...works fine I have a javascript powered by another site on the same page....works fine In the javascript there is a link which passes a variable to the other site i.e <script type="text/javascript" src="http://www.somesite.com/cool.asp?nick=nick name"></script> That link displays the "nickname" info from the other site in the script on my page In my Database I have records of these nick names and show a specific "nick name" and that nick name's info from my DB in the DetailsView control on my page. Under that I display the javascript for the other site. I want to update the java script url above with the nick name from my page. The field name in my Database for nick names is "Nname". How would I pass the value for "Nname" into the url in red above? So it would then be <script type="text/javascript" src="www.somesite.com/cool.asp?nick="Nname Value" "></script> I tried this, but it didn't work. <script type="text/javascript" src="www.somesite.com/cool.asp?nick=<%QueryStringField="Nname"%>"></script> I think I might need to declare the variable, but I thought I already did that in my DetailsView?
|
|
|
|