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

location.search not working.

Status
Not open for further replies.

slatet

Programmer
Sep 11, 2003
116
0
0
US
We have taken over another company's project. They used frames. I am trying to update the URL so that I may eventually pass it to a new page.

This is the URL that is in the browser:


When I do this:

var urlloc = location.search;

I only get:

?Filter=None

The Sort value is lost. Does anyone know why?

Thanks in advance
 
Hi-


you need to type: location.search.substr(1) and anything after the ? will fill your variable

Ciao
Placido

P.S.
Knowledge gives you the mean to see the door...
Wisdom gives you the key to open it...
 
Thanks, but I am still only getting

?Filter=None
 
Change that. Using

var urlloc = location.search.substr(1);

I get

Filter=None
 
The browser probably thinks that &Sort is a parameter of Reports.aspx instead of StatusReport.aspx. Escape your parameter values to write your URL like this instead:

Code:
[URL unfurl="true"]http://localhost/tms/Reports.aspx?TargetPage=StatusReport.aspx%3FFilter%3DNone%26Sort%3DNone[/URL]

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
That appears to have done it. I now get

?Filter=None&Sort=None

THANKS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top