Reading URLs

A

Andi B

Hi folks,

Does anyone know if it is possible to store the URL of a browser window as a
variable? For example:

var loc = window.location.href

in JavaScript will store the contents of the address bar as the variable
loc.

Regards and thanks for any assistance,

Andi
 
E

Evertjan.

Andi B wrote on 07 sep 2004 in microsoft.public.inetserver.asp.general:
Does anyone know if it is possible to store the URL of a browser
window as a variable? For example:

var loc = window.location.href

in JavaScript will store the contents of the address bar as the
variable loc.

Not with serverside Javascript. This is a serverside NG.
 
A

Andi B

Ah! Sorry - I meant to say using ASP - let me re-write that...

Is it possible using ASP to store the URL of a browser window as a variable?
 
M

Mark Schupp

ASP doesn't know what a browser or browser window is. You can get the URL of
the script that is being executed with
Request.ServerVariables("SCRIPT_NAME") and save that in a variable if you
wish.
 
J

Jeff Cochran

Ah! Sorry - I meant to say using ASP - let me re-write that...

Is it possible using ASP to store the URL of a browser window as a variable?

Not with server-side JavaScript *or* VBScript. And this is still a
server-side group. :)

Think about it. The browser URL is on the *client*. Not much you can
do on the server with it.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top