Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 11, 2005, 06:37 PM   #1
macbaseball
macrumors 6502a
 
macbaseball's Avatar
 
Join Date: Feb 2005
Location: Northern California
Generating URL

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.
macbaseball is offline   0 Reply With Quote
Old May 11, 2005, 07:01 PM   #2
superbovine
macrumors 68030
 
superbovine's Avatar
 
Join Date: Nov 2003
would you care to elaborate on what language you would be doing your project in?
superbovine is offline   0 Reply With Quote
Old May 11, 2005, 07:11 PM   #3
macbaseball
Thread Starter
macrumors 6502a
 
macbaseball's Avatar
 
Join Date: Feb 2005
Location: Northern California
Quote:
Originally Posted by superbovine
would you care to elaborate on what language you would be doing your project in?
I'm trying to make a widget, so probably Javascript, or HTML.
macbaseball is offline   0 Reply With Quote
Old May 12, 2005, 05:38 AM   #4
robbieduncan
Demi-God (Moderator)
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
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.
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC