document.location.search is null in ie7 rc1 for local url

I launch my app from a local file and pass it the location of a remote server in the query string. For example, given the following shortcut:

"C:\Program Files\Internet Explorer\iexplore.exe"file:///c:/abc/abc.html?REMOTE_SERVER=https://ie7.microsoft.com/server/

I have javascript on that page which parsesdocument.location.searchto obtainREMOTE_SERVER. In ie6, this works. In ie7 rc1, it is null. Can anyone suggest a fix or workaround? -Thanks

[745 byte] By [howard-goldstein] at [2007-12-25]
# 1
I had a similar problem. Try document.URL; it works on IE7 and prior versions.
Cudjo at 2007-9-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 2

This does not seem to work. document.URL is slightly different. It changes the forward slashes to backward after the drive letter and removes one of the forward slashes after file:///, but it still removes the search...

goldstei at 2007-9-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 3

Just to follow up with a "me too". We are trying to run JsUnit testing in an automated fasion. JsUnit uses the document.location.search property to parse the query string. When passing a url to a local file with a query string, the search property is an empty string. For example...

"C:\Program Files\Internet Explorer\iexplore.exe" file:///c:/jsunit/tests/testRunner.html?testPage=C:/jsunit/tests/jsUnitTestSuite.html&autoRun=true

The expected value of document.location.search is file:///c:/jsunit/tests/testRunner.html?testPage=C:/jsunit/tests/jsUnitTestSuite.html&autoRun=true, but this is not the case. Further, this appears to be a change in behavior from ie6 to ie7.

Any ideas would be greatly appreciated.

-Andy

Techsplicer at 2007-9-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 4

Try this way, Use an wrapper html to wrap the parameterized web page(ex. p.htm)

wrapper.htm

<html>
<head>
<script>
function load(){
window.document.links[0].click();
}
</script>
</head>
<body onload="load()">
<a href="file:///C|/p.htm?template=print.xml&source=instance.xml">a</a>
</body>
</html>

SkipperHsu at 2007-9-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...