473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Reading URLs

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
Jul 19 '05 #1
4 1369
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 19 '05 #2
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?

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 19 '05 #3
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.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Andi B" <mg****@dsl.pipex.com> wrote in message
news:41***********************@news.dial.pipex.com ...
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?
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


Jul 19 '05 #4
On Tue, 7 Sep 2004 21:06:35 +0100, "Andi B" <mg****@dsl.pipex.com>
wrote:
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
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: phpkid | last post by:
Howdy I've been given conflicting answers about search engines picking up urls like: http://mysite.com/index.php?var1=1&var2=2&var3=3 Do search engines pick up these urls? I've been considering...
26
by: Howard Brazee | last post by:
I would like to click on a URL of a html document that will open several URLs at once for me. Does someone have an example of a html document that will do this?
1
by: DM | last post by:
I'm working on a site with more than 1700 HTML files. We'll be moving files around on this site a lot because we're reorganizing it. I'm thinking of writing a script that will convert all URLs in...
8
by: Claude Yih | last post by:
Hi, everyone. The other day I wrote a piece of code to see how the UTF-8 text file was saved in the memory. Although the code worked seemingly well, I still cannot understand a problem about the...
10
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
9
by: brett | last post by:
I have a main aspx file for my site and use web controls as includes for content. The url may look like this: www.abc.com/main.aspx?page1 I'd like to store content in a text file and...
9
by: Salve =?iso-8859-1?Q?H=E5kedal?= | last post by:
What is the best regular expression for finding urls in plain text files? (By urls I mean http://www.something.com, but also www.something.com, or salve@somewhere.com) Salve
2
by: Simon Wigzell | last post by:
I have inherited a database driven website that comes with a table of image links. The images are scattered all of the internet and there are thousands of them. I would like to write an asp script...
3
by: WebCM | last post by:
How to apply nice URL-s into CMS? 1. Should we use nice urls for every page? 2. Do we need to put a FULL path into <a href="">? 3. What is faster and better? a) 10 rules in .htaccess...
3
by: Gregory Leck | last post by:
I can import a .txt document into a TextBox Each line in the TextBox contains a URL, for example, http://www.whateverdomain.com I would like to convert each URL to the following format: <a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.