Results 1 to 7 of 7

Thread: querystring

  1. #1
    prem Guest

    Default querystring

    I want to get two values in the querystring....<BR>The code that i am using looks like<BR>function xx()<BR>{<BR>window.navigate(&#039../teacher/teaStuNotes.asp?dd=&#039+formSelect.grdPer.value)< BR>}<BR>this works but when i want to put a second parameter here like<BR>function xx()<BR>{<BR>window.navigate(&#039../teacher/teaStuNotes.asp?dd=&#039+formSelect.grdPer.value & dd=+formSelect.grdPeriod.value) <BR>}<BR>it gives me an error is this the right way to use two parameters in querystring, or is there any other way<BR>

  2. #2
    Steve Cimino Guest

    Default RE: querystring

    You&#039re missing a second set of quotes. Also, don&#039t use the same name (dd) for your other value. You won&#039t be able to tell the two apart later.<BR><BR>../teacher/teaStuNotes.asp?dd=&#039+formSelect.grdPer.value & &#039&ee=&#039+formSelect.grdPeriod.value)<BR><BR> It probably would behoove you to place your values in an escape() function, in case there are any spaces.<BR><BR>&#039&ee=&#039escape(formSelect.grd Period.value)<BR> <BR>

  3. #3
    prem Guest

    Default RE: querystring

    Steve i used this syntax but it is not getting the parameters in the url bar<BR>with one parameter it is <BR>StudentTracking/teacher/teaStuNotes.asp?bb=2<BR><BR>the function now is<BR>function yy()<BR>{<BR>window.navigate(&#039../teacher/teaStuNotes.asp?bb=&#039+formSelect.grdPeriod.valu e & &#039&dd=&#039+formSelect.grdPer.value)<BR>}<BR>bu t the url bar says<BR>StudentTracking/teacher/0<BR><BR>is there something wrong with my java script<BR>

  4. #4
    Steve Cimino Guest

    Default RE: querystring

    You&#039re trying to use that new JVBScript language.<BR><BR>You have a & to concatenate the string right before the &dd. Change that to a +. & in JavaScript means bitwise AND. A bad thing for what you&#039re trying to do (which is why you have a 0).

  5. #5
    Join Date
    Dec 1969

    Default My fault. I should have caught that earlier

    Sorry. I even pasted it back in there in my example for you. Those things bite you when you switch languages enough times.<BR><BR>Ah well. Hope everything is cleared up now.

  6. #6
    prem Guest

    Default RE: My fault. I should have caught that earlier

    Steve.... I am still having problem with this<BR><BR> what i am trying to do is.. i have two combo boxes and i one contains semester and one period... they work fine individually... but when i want to find a combination it just defaults to the initial combination of semester1 and period(x)<BR>or semester(x) and period1....<BR>but is is still giving me a 0 there in the url bar.....<BR>i dont know why... i have tried all that u told me and also any combination that is possible.....<BR><BR>

  7. #7
    prem Guest

    Default Problem Solved

    Hey steve.... <BR> Thanks.....<BR> It worked.......<BR>

Posting Permissions

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