By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

Getting parameters from the get method

P: n/a
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

Oct 6 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
alu

"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
Oct 6 '05 #2

P: n/a
alu
"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
Oct 6 '05 #3

P: n/a
alu,

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

Matt

Oct 7 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.