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

QueryString Question?????

Status
Not open for further replies.

CDNJungler

Programmer
Jul 16, 2002
11
CA
This is my problem....I have reports that are created dynamically. They then have a row header which is a link to a more detailed graph of the info on that row. Anyhow, I'm absolutly "braindead" as of late(medication for wisdom teeth) and I can't get the querystring to pass pver the right values. Please if anyone can help my teeth and I would greatly apprieciate it!! Thanks and here is what my code looks like right now.....

****This is my "main page code"**********

function openRespond(SaleID,DealID,AccID)
{
var url = SaleID+"?Deal="+DealID&"Acc="+AccID;
window.open(url,null, 'location=0,status=0,resizable=yes,width=450,height=425');
}

****Then the link looks loike this**************
<tr><td><A href=&quot;javascript:eek:penRespond('Detail.asp',<%Response.Write(Session(&quot;Var_ID&quot;))
%>,'CDN_Jungler')&quot;>CDN</a></td></tr>

****But this doesn't work, I tried...
Response.Write Request.QueryString(&quot;Deal&quot;)
Response.Write Request.QueryString(&quot;Acc&quot;)
****to see what my values were in the querystring but it doesn't work. Please fix my querystring??
 
if your session variable var_ID is as string containing blanks, your link should look like this :

<A href=&quot;javascript:eek:penRespond('Detail.asp','<%response.Write(Session(&quot;Var_ID&quot;))
%>','CDN_Jungler')&quot;>CDN</a>

else, try to prompt your url before sending it by putting an alert call before thje window.open in your script. Water is not bad as soon as it stays out human body ;-)
 
My Session variable is actually a numerical value so I don't pass it over as a sting. It's already in the right format. Actually the problem I'm haveing is passing over just the value for the &quot;Acc&quot; name=value pair. When I Response.Write them, I get the value for the &quot;Deal&quot; correctly, but I get &quot;Acc=2&quot; for the &quot;Acc&quot; Querystring value.I only want the &quot;2&quot; for the &quot;Acc&quot; QueryString value.
 
replace this :
Code:
    var url = SaleID+&quot;?Deal=&quot;+DealID&&quot;Acc=&quot;+AccID;
    window.open(url,null, 'location=0,status=0,resizable=yes,width=450,height=425');

by this :
Code:
    var url = SaleID+&quot;?Deal=&quot;+DealID&&quot;Acc=&quot;+AccID;
    alert (&quot;myUrl=&quot; + url);
    window.open(url,null, 'location=0,status=0,resizable=yes,width=450,height=425');

and tell me if the prompt is already false (ie, it writes something like
Code:
&quot;...&Acc=2&quot;
or like
Code:
&quot;...&Acc=Acc=2&quot;
Water is not bad as soon as it stays out human body ;-)
 
???
so try to prompt separatly all the variables received by the openRespond function to check wich one is bad eg :
Code:
alert (&quot;SaleID=&quot; + SaleID);
alert (&quot;DealID=&quot; + DealID);
alert (&quot;AccID=&quot; + AccID);

what does it give ? Water is not bad as soon as it stays out human body ;-)
 
Well all my values are correct....but now it I'm getting the &quot; page cannot be found error&quot; and I know the name of the page is correct. So it musn't be the QueryString giving me the problem, it must be something else. Because thanks to your info I now know the values being passed are correct. hmmm..I'm stumped!
 
function openRespond(SaleID,DealID,AccID)
{
var url = SaleID + &quot;?Deal=&quot; + DealID + &quot;&Acc=&quot; + AccID;
window.open(url,null, 'location=0,status=0,resizable=yes,width=450,height=425');
}



Hope that does the trick.
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top