PDA

View Full Version : keeping the Domain name static


ajay
05-15-2003, 02:49 PM
This is similar to the problem posted by peeps “File's path without filename?”

I've been trying to get the Domain name static no matter which page I go to on the site.

For Example

www.mysite.com/help.html

should by displayed as

www.mysite.com

when clicking on a link

I have been told to have a look at document.URL

Once again I guess this is probably a very easy question, I’m completely new to javascript so any help would be greatly appreciated!

Thank You

tamienne
05-15-2003, 03:10 PM
One way to do what you're asking is by frames.

Have one frameset with one row/column. Just make sure your links don't break out of your frame.

ajay
05-15-2003, 03:13 PM
I know it can be done in frames because of the main index.html remains static, but i'm using dreamweaver and using style sheets / tables.

tamienne
05-15-2003, 03:52 PM
I'm not sure what you mean then.

Are you saying from a user standpoint or from a developer standpoint?

If it's from a userstandpoint and want to make it appear like all your links link to your domain you can do something like this...

<A HREF="http://www.mydomain.com" onClick="document.location=realpagename">
so in the status bar it looks like you're still going to http://www.mydomain.com. You'll want to keep the frame piece as i was telling you earlier though

you can use dreamweaver/style sheets and tables with frames...not sure what is wrong there..