HighDots Forums  

variable in querystring

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss variable in querystring in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darren Woodbrey
 
Posts: n/a

Default variable in querystring - 01-24-2006 , 09:54 AM






I have a javascript variable assigned on an asp page. I want to use that
variable in a querystring assigned to a button with the onclick event. How
do i do this? If it was a vbscript variable I would do it this way:

onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=<%=
custid%>')". But I have a javascript variable called custid. Any help
would be appreciated. Thanks!



Reply With Quote
  #2  
Old   
Guy
 
Posts: n/a

Default Re: variable in querystring - 01-24-2006 , 02:07 PM






Darren Woodbrey a écrit :
Quote:
I have a javascript variable assigned on an asp page. I want to use that
variable in a querystring assigned to a button with the onclick event. How
do i do this? If it was a vbscript variable I would do it this way:

onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=<%=
custid%>')". But I have a javascript variable called custid. Any help
would be appreciated. Thanks!
in javascript :
onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=" +
custid + "')";

GR


Quote:


Reply With Quote
  #3  
Old   
Darren Woodbrey
 
Posts: n/a

Default Re: variable in querystring - 01-25-2006 , 07:21 AM



"Guy" <guy (AT) nospam (DOT) fr> wrote

Quote:
Darren Woodbrey a écrit :
I have a javascript variable assigned on an asp page. I want to use that
variable in a querystring assigned to a button with the onclick event.
How do i do this? If it was a vbscript variable I would do it this way:

onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=<%=
custid%>')". But I have a javascript variable called custid. Any help
would be appreciated. Thanks!

in javascript :
onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=" +
custid + "')";

GR

Thanks for the reply:
This is my entire button code:

<input type="button"
onClick="MM_openBrWindow('../../customer/address_lookup.asp?custid=" +
custid + "','','scrollbars=yes,resizable=yes,width=650,heig ht=400')"
value="....">

Is does not seem to work and I get an "Unterminated string constant" error




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.