f



Getting parameters from the get method

Hello,

I am pretty rusty with javascript and I am trying to make a webpage
that will basically act as a wrapper from one webpage to another.  What
I mean by this is that I will hit this page like:
webpage.htm?Param1=... and I will take the passed params and post them
to another page.  I have the post part working, but I was just
wondering how I can use just Javascript and read those values passed to
this webpage.  Is this even possible?

Thanks for all of your time.

Matt

0
10/6/2005 7:58:05 PM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

3 Replies
859 Views

Similar Articles

[PageSpeed] 40

"Matt"  wrote
> Hello,
>
> I am pretty rusty with javascript and I am trying to make a webpage
> that will basically act as a wrapper from one webpage to another.  What
> I mean by this is that I will hit this page like:
> webpage.htm?Param1=... and I will take the passed params and post them
> to another page.  I have the post part working, but I was just
> wondering how I can use just Javascript and read those values passed to
> this webpage.  Is this even possible?
>
> Thanks for all of your time.
>
> Matt

Yes, it's certainly possible.
The query string (the "?Param1=..." part of the url) is available via the
window.location.search  property.
A google search on "parse query string javascript" will do the trick.
-alu


0
alu
10/6/2005 9:26:51 PM
"alu" wrote
>
> "Matt"  wrote
> > Hello,
> >
> > I am pretty rusty with javascript and I am trying to make a webpage
> > that will basically act as a wrapper from one webpage to another.  What
> > I mean by this is that I will hit this page like:
> > webpage.htm?Param1=... and I will take the passed params and post them
> > to another page.  I have the post part working, but I was just
> > wondering how I can use just Javascript and read those values passed to
> > this webpage.  Is this even possible?
> >
> > Thanks for all of your time.
> >
> > Matt
>
> Yes, it's certainly possible.
> The query string (the "?Param1=..." part of the url) is available via the
> window.location.search  property.
> A google search on "parse query string javascript" will do the trick.
> -alu
>

Just out of curiosity, has anyone else noticed that Win IE (~6.0.28) no
longer passes query strings from (Flash) ActionScript links on local files?
As for js, Javascript 1.3 documentation mentions "The search property...
applies to HTTP URLs only.", but it's never been an issue for local files on
any browser I've tested on in the past.
Bug, security issue, or correction?
-alu


0
alu
10/6/2005 10:00:14 PM
alu,

Thanks, you are a life saver.  Thank you for all of your help.

Matt

0
Matt
10/7/2005 12:25:02 PM
Reply: