Re: 2 Qs re JS scripting
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 13 Aug 2005 08:48:13 -0400
Randy Webb wrote:
> Bob Barrows [MVP] said the following on 8/12/2005 6:02 PM:
>> Adrian wrote:
>>
>>> 1. I have an HTML file on a local harddisk and I want to open it
>>> from another local .js file passing it a string for it to read and
>>> display e.g. test.html?this_is/atest so how do I do all of that?!
<snip>
>>
>> You need ASP in order to use a querystring,
This statement is admittedly in error. My head's in the ASP world, so when I
think of displaying something, I tend to think of "response.write"
>> which means you need a
>> web server. You cannot use a querystring in a .htm file, especially
>> one opened from a hard drive without using a web server.
>
> Excuse me? JScript is very well capable of handling a queryString.
>
> var myLoc = document.location.href;
> var queryString = myLoc.split('?');
> if (queryString[1]){alert(queryString[1])}
> else{alert('NO Query String present')}
>
> Why do you need a web server?
>
Could you explain how to open an html file from a hard drive, passing a
dynamic querystring to it without a web server?
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: 2 Qs re JS scripting
- From: Randy Webb
- Re: 2 Qs re JS scripting
- From: McKirahan
- Re: 2 Qs re JS scripting
- References:
- 2 Qs re JS scripting
- From: Adrian
- Re: 2 Qs re JS scripting
- From: Bob Barrows [MVP]
- Re: 2 Qs re JS scripting
- From: Randy Webb
- 2 Qs re JS scripting
- Prev by Date: Re: 2 Qs re JS scripting
- Next by Date: Re: 2 Qs re JS scripting
- Previous by thread: Re: 2 Qs re JS scripting
- Next by thread: Re: 2 Qs re JS scripting
- Index(es):
Relevant Pages
|