gnetcanada
12-15-2004, 10:52 PM
Ok guys, here is what im trying to accomplish:
I have a web browser object, a variable URL gets passed into it, it could be a url in ANY form (www.url.com, http://www.url.com, url.com, www.url.com/file.htm) etc.
I want a script that will stript the string down to the root url, so url.com or just, url. It needs to work in all circumstances. What im trying to do with this is simple, i want to disable the user from going to web pages that do not exist in the domain,
for example, if they go to google.com and then click on an external link (a page not on the google.com server) then it wont let them, it will revert back to teh home url. (google is a bad example cause its a search engine, but any site that links externally to another is a valid example).
any ideas how this can be done, while still making it compatible with all URL Formats?
Shawn
I have a web browser object, a variable URL gets passed into it, it could be a url in ANY form (www.url.com, http://www.url.com, url.com, www.url.com/file.htm) etc.
I want a script that will stript the string down to the root url, so url.com or just, url. It needs to work in all circumstances. What im trying to do with this is simple, i want to disable the user from going to web pages that do not exist in the domain,
for example, if they go to google.com and then click on an external link (a page not on the google.com server) then it wont let them, it will revert back to teh home url. (google is a bad example cause its a search engine, but any site that links externally to another is a valid example).
any ideas how this can be done, while still making it compatible with all URL Formats?
Shawn