Query Strinhs Using Javscript

Results 1 to 2 of 2

Thread: Query Strinhs Using Javscript

  1. #1
    Join Date
    Dec 1969

    Default Query Strinhs Using Javscript

    Hi,<BR><BR>I was wondering how one would pass a querystring in Javascript ? I have<BR>tried every where, but I could not find clues. Mine one liner code looks<BR>like the following.<BR><BR>level3ID = theMenu.addChild (level2ID, "Document", "Demographics",<BR>"Demographics.asp?id=27", "Demographics"); <BR><BR>It works fine when I hardcode the value after the question mark. But what if<BR>I want to add the variable.<BR><BR>In the same page, I request for the id from the sending page through this.<BR><BR>&#060;%<BR>stPatientID = Request.Form("cmbPatient")<BR>%&#062;<BR><BR>Then I have code in the Javascript -<BR><BR>&#060;script language="JavaScript"&#062;<BR><BR>..<BR>&#060;/script&#062;<BR><BR>level3ID = theMenu.addChild (level2ID, "Document", "Demographics",<BR>"Demographics.asp?id=&#060;%=st PatientID%&#062;", "Demographics"); <BR><BR>But the id within the script tag inside the JavaScript does not seem to be<BR>recognized. So How I include this variable in the JavaScript ?<BR><BR>Any hints would help.<BR>Thanks,<BR>Srini<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Query Strinhs Using Javscript

    One little hint:<BR><BR>You get QueryStrings back from the ASP page via Request.QueryString("variableName").<BR><BR>Not Request.Form("formObjectName"). This is for forms being submited by the calling page.<BR><BR><BR>Vadim C.

Posting Permissions

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