JScript and QueryString 
Author Message
 JScript and QueryString

I found the answer from Vidar 13. dec. saying that

var
res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";

should work on .asp page with <SCRIPT language="JavaScript">.

I get a RT-error from MS saying 'Request' is undefined.

Any ideas what's wrong here?
How do you else fetch the values? (NT4-SP6,IIS4)

flemming



Sun, 20 Jul 2003 20:05:06 GMT  
 JScript and QueryString
Hi

Server script only


--
--
Best Regards
  Vidar Petursson
 ==============================
   Microsoft Internet, Client, SDK MVP
 ==============================
 http://www.icysoft.com
 http://www.dna.is



 ==============================
  No matter where you go there you are
 ==============================
--


Quote:
> I found the answer from Vidar 13. dec. saying that

> var

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";
Quote:

> should work on .asp page with <SCRIPT language="JavaScript">.

> I get a RT-error from MS saying 'Request' is undefined.

> Any ideas what's wrong here?
> How do you else fetch the values? (NT4-SP6,IIS4)

> flemming



Sun, 20 Jul 2003 20:32:08 GMT  
 JScript and QueryString
Vidar,

Thanks for your fast hint, but I still get the error in

file wrkprof.asp (a PopUp-window):

<script>
function op_wprf1()
{
     var
res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";

opener.location.href="corr.asp?VAL="+res+document.forms.eformular.amount.val
ue;
     self.close();

Quote:
}

</script>
<body onload="this.focus()">
<form name="eformular">
<input name="amount">
<input type="button" value="Go" onclick="op_wprf1()" id=button1
name=button1>
</form>
</body>
----------------------------------------------------------- and that's all
which is called from file corr.asp with:

<SCRIPT language="JavaScript">
function op_wprf(dn)
{

open("wrkprof.asp?bla=49","eformular","height=100,width=180,target=_blank,sc
reenX=400,screenY=400");

Quote:
}

</SCRIPT>

Do you see here what's wrong/misssing in returning from the PopUp?

flemming

Quote:
> Hi

> Server script only


> --
> --
> Best Regards
>   Vidar Petursson
>  ==============================
>    Microsoft Internet, Client, SDK MVP
>  ==============================
>  http://www.icysoft.com
>  http://www.dna.is



>  ==============================
>   No matter where you go there you are
>  ==============================
> --



> > I found the answer from Vidar 13. dec. saying that

> > var

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";

- Show quoted text -

Quote:

> > should work on .asp page with <SCRIPT language="JavaScript">.

> > I get a RT-error from MS saying 'Request' is undefined.

> > Any ideas what's wrong here?
> > How do you else fetch the values? (NT4-SP6,IIS4)

> > flemming



Sun, 20 Jul 2003 21:52:38 GMT  
 JScript and QueryString
As Vidar said it's a Server side only function. If you need such variables
on the CLIENT side - this is where on-load is executed then declare son
var's and reference them as needed.

something like
<% ...
var var v_bla;

v_bla = Request.QueryString("bla");
...
%>
HTH
Rubn



Quote:
> Vidar,

> Thanks for your fast hint, but I still get the error in

> file wrkprof.asp (a PopUp-window):

> <script>
> function op_wprf1()
> {

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";
opener.location.href="corr.asp?VAL="+res+document.forms.eformular.amount.val
Quote:
> ue;
>      self.close();
> }
> </script>
> <body onload="this.focus()">
> <form name="eformular">
> <input name="amount">
> <input type="button" value="Go" onclick="op_wprf1()" id=button1
> name=button1>
> </form>
> </body>
> ----------------------------------------------------------- and that's all
> which is called from file corr.asp with:

> <SCRIPT language="JavaScript">
> function op_wprf(dn)
> {

open("wrkprof.asp?bla=49","eformular","height=100,width=180,target=_blank,sc

- Show quoted text -

Quote:
> reenX=400,screenY=400");
> }
> </SCRIPT>

> Do you see here what's wrong/misssing in returning from the PopUp?

> flemming


> > Hi

> > Server script only


> > --
> > --
> > Best Regards
> >   Vidar Petursson
> >  ==============================
> >    Microsoft Internet, Client, SDK MVP
> >  ==============================
> >  http://www.icysoft.com
> >  http://www.dna.is



> >  ==============================
> >   No matter where you go there you are
> >  ==============================
> > --



> > > I found the answer from Vidar 13. dec. saying that

> > > var

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";

- Show quoted text -

Quote:

> > > should work on .asp page with <SCRIPT language="JavaScript">.

> > > I get a RT-error from MS saying 'Request' is undefined.

> > > Any ideas what's wrong here?
> > > How do you else fetch the values? (NT4-SP6,IIS4)

> > > flemming



Mon, 21 Jul 2003 01:25:30 GMT  
 JScript and QueryString
What about on a JScript-only client, without using ASP? Is there a handy
function like Request.QueryString() that parses the values from
location.search?

Tony


Quote:
> As Vidar said it's a Server side only function. If you need such variables
> on the CLIENT side - this is where on-load is executed then declare son
> var's and reference them as needed.

> something like
> <% ...
> var var v_bla;

> v_bla = Request.QueryString("bla");
> ...
> %>
> HTH
> Rubn



> > Vidar,

> > Thanks for your fast hint, but I still get the error in

> > file wrkprof.asp (a PopUp-window):

> > <script>
> > function op_wprf1()
> > {

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";
opener.location.href="corr.asp?VAL="+res+document.forms.eformular.amount.val

- Show quoted text -

Quote:
> > ue;
> >      self.close();
> > }
> > </script>
> > <body onload="this.focus()">
> > <form name="eformular">
> > <input name="amount">
> > <input type="button" value="Go" onclick="op_wprf1()" id=button1
> > name=button1>
> > </form>
> > </body>
> > ----------------------------------------------------------- and that's
all
> > which is called from file corr.asp with:

> > <SCRIPT language="JavaScript">
> > function op_wprf(dn)
> > {

open("wrkprof.asp?bla=49","eformular","height=100,width=180,target=_blank,sc

- Show quoted text -

Quote:
> > reenX=400,screenY=400");
> > }
> > </SCRIPT>

> > Do you see here what's wrong/misssing in returning from the PopUp?

> > flemming


> > > Hi

> > > Server script only


> > > --
> > > --
> > > Best Regards
> > >   Vidar Petursson
> > >  ==============================
> > >    Microsoft Internet, Client, SDK MVP
> > >  ==============================
> > >  http://www.icysoft.com
> > >  http://www.dna.is



> > >  ==============================
> > >   No matter where you go there you are
> > >  ==============================
> > > --



> > > > I found the answer from Vidar 13. dec. saying that

> > > > var

res=(Request.QueryString("bla").Count>0)?Request.QueryString("bla").Item:"";

- Show quoted text -

Quote:

> > > > should work on .asp page with <SCRIPT language="JavaScript">.

> > > > I get a RT-error from MS saying 'Request' is undefined.

> > > > Any ideas what's wrong here?
> > > > How do you else fetch the values? (NT4-SP6,IIS4)

> > > > flemming



Mon, 21 Jul 2003 02:12:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. JScript Reqquest.Querystring

2. querystring in JScript

3. querystring null on asp-jscript

4. JScript QueryString key/value pair assignment

5. Request.QueryString in Jscript?

6. Problems with listbox and asp and request.querystring.

7. Request.QueryString

8. Problems with &amp; in QueryString

9. HOWTO: Add TextBox Data to QueryString

10. Reading QueryString in JavaScript

11. request.querystring in JavaScript?

12. Request.QueryString

 

 
Powered by phpBB® Forum Software