|May 11, 2005, 06:37 PM||#1|
I'm trying to figure out how to generate a URL which then would be a link.
What I want to do is only change the middle part of a URL. Most of the codes I'm seen only can change the end of the URL. Could someone help me out.
|May 11, 2005, 07:11 PM||#3|
|May 12, 2005, 05:38 AM||#4|
Basically you are on your own. If you are using the window.location object you can get the various parts of the URL:
If your document is at http://myhost.com:8080/my/folder/pat...arch=test#fred
hash: returns #fred
host: returns myhost.com:8080
hostname : returns myhost.com
href: the entire text
pathname: returns /my/folder/parh/document.html
port: returns 8080
protocol: returns http:
search: returns ?search=test
Notet that these are read/write so you can do (say) window.location.path = '/my/new/path/page.html';
If you just have a string then it's up to you to parse it.
Sponsor me to cycle 100Km round London in the dark
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|What generation is my Macbook?||MrFluffums||MacBook||5||Apr 10, 2011 09:05 AM|
|iPod 3rd generation.....HELP!!||Shmuco||iPod||3||Jan 13, 2011 12:44 PM|
|iTunes Image Generator URL?||MatthewBowman87||Mac Applications and Mac App Store||3||May 8, 2008 10:08 AM|
All times are GMT -5. The time now is 04:38 PM.