Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

getting page url

Original Message
Name: sunnyinjeti
Date: October 7, 2006 at 06:14:54 Pacific
Subject: getting page url
OS: win2000
CPU/Ram: 256
Comment:
hi
can some one tell me how to capture the url on the browser address bar.
let me explain my problem.
when ever a person enters a url on the adress bar and submit i need to show up a different page before that page and so i need to caputer the url that the person enters so that i need to redirect to it after i display the initial page depending so some conditions.. like if the user agrees to terms and conditions i will have to take him to the page he wants.
i may not have explained the problem properly but some one pls let me know if there is any function in java script or html that can capture the url on the browser adress bar.
thank u.

Report Offensive Message For Removal


Response Number 1
Name: Michael J (by mjdamato)
Date: October 7, 2006 at 12:26:00 Pacific
Subject: getting page url
Reply: (edit)
I know of no way to accomplish that, and I would think that it can't be done - at least I hope so. It would be a huge securoty risk. Just think about it, I am on somesite.com and decide I want to go do my banking. I type in my banks URL, but somesite.com redirects me to their spopof site that mimics my bank's site.

What you are trying to accomplish sounds very familiar to some of the disclaimers I have seen on other sites. In otherwords I click a link and the site pops up a message that I am choosing to go to another site and they are not responsible for the content I see there. That IS possible by making the links fire off a javascript function instead of just opening the linked page.

But, tyring to hijack the URL a users types into the address should not be possible.

Michael J


Report Offensive Follow Up For Removal

Response Number 2
Name: StuartS
Date: October 7, 2006 at 18:31:05 Pacific
Subject: getting page url
Reply: (edit)
If you want your users to accept terms and conditions before entering you web site then make that the default page, usually index.html depending on how the web server is set up.

The URL itself doesnt contain any page information as to which page to show. In the absence of any informationas to which page to load, the server will load the default page.

Once the terms and condition shave been accepted then you direct them to the web site proper.

When a web server receives an request from a remote computer, the TCP/IP header contains the URL entered. You can capture that, but if you try and redirect the user to another web site then most modern browsers with anti-hijacking built in will reject it.

If its a different page on the same site then thats a different matter.

Stuart


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: getting page url

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




My PC has been hijacked!

Lexmark 2600 Printer Issues

btk1w1 infected start here post

Unwanted message remians on screen

Slow boot time


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC