Home  |  About  | Last |  Submit  |  Contact
AllQuests.com




Previous Question:  Question About 2Checkout  eCommerceNext Question:  Adding DVD Mini Movie to Website  Just Starting Your Design
Question Linking webpages ( SitePoint Forums Just Starting Your Design )
Updated: 2008-08-12 05:51:16 (12)
Linking webpages

When you make a website and have to link the subpages together how do you do it? I mean, i can do it but are you meant to put all the html files and all the images into one folder (thats how i have it, and it works)and upload it to your server? Or are you supposed to spread them out like for example Newbikesupples/homepage/aboutus/history? Will it work the way i have it (when its onlilne)? If it will is it going to slow down the download time at all. When the brouser loads the page does it d/l all the images in the folder or just the ones it needs to display the page.

Answers: Linking webpages ( SitePoint Forums Just Starting Your Design )
Linking webpages

three ways to anchor (link) webpages

1. absolute
This is where you put in the exact URL of the linked page.
Code:
<A href="http://www.yourdomain.com/index.htm">CLICK HERE</A>
2. relative to the calling page
This is where you put the address relative to the page referencing it.
Code:
<A href="about/aboutus.htm">CLICK HERE</A>
the called page (aboutus.htm) is inside the directory "about"

3. relative to the root directory
Quite similar to #2 but it is ALWAYS referenced from the root directory.
Code:
<A href="/about/aboutus.htm">CLICK HERE</A>
Note the forward slash "/" before about.

N.B.
i think you have to use backward slash "\" for linux servers.
_________________
most of the time images are placed in a separate folder
(usually "images")
_________________
it is not necessary to place them in separate folders though it really makes your files more organized.
_________________
it will hardly affect your d/l time if placed in different folders. However, if you are linking an image or file in another domain, it still has to get the file there first which adds to loadtime.
_________________
when a page loads, it caches the images used for that page. (unless you turn caching off in your browser)

madmax

Linking webpages

thanks for the quick response Madmax, i greatly appreciate it

mslodyczka

Linking webpages

Quote:
Originally posted by madmax
N.B.
i think you have to use backward slash "\" for linux servers.
Nope.

duckie

Linking webpages

BTW if you wanna open it in a new window do this:


target="_blank"




Just my 2 cents

Logus

Linking webpages

In addition to that you can also use:

target="_self"
target="_new"

or you can name your target so that it can be called again rather than open a new window e.g. target="MyTargetPage" .

QReyes

Linking webpages

Quote:
Originally posted by friend_al_23
In addition to that you can also use:

target="_self"
target="_new"
Nope. The four reserved target names are "_blank", "_parent", "_self" and "_top".

duckie

Linking webpages

Quote:
Originally posted by duckie
The four reserved target names are "_blank", "_parent", "_self" and "_top".
Can you give us their functions. Like which one opens a page inside a frame without opening a new window.

QReyes

Linking webpages

"_blank" opens a new window.

"_parent" replaces the parent frameset with the targetted URL.

"_self" is the default behaviour.

"_top" replaces the entire window with the targetted URL, replacing all framesets.

duckie

Linking webpages

thanks for all the info guys, another question, if i have 30 imagees in my image folder and the the site only needed 20 of them will the browser load all of the or just the ones which are needed? Oh..and another thng, when you make a popup window with "target=_blank" how do you put content in it. Im guessing you just make an ordinary page and link it something like "target="_blank url="whatever.html" ???

mslodyczka

Linking webpages

Only the images needed will be loaded.

To open a link in a new window, do this:

Code:
<a href="myfile.html" target="_blank">Link Text</a>

duckie

Linking webpages

Quote:
Originally posted by mslodyczka
thanks for all the info guys, another question, if i have 30 imagees in my image folder and the the site only needed 20 of them will the browser load all of the or just the ones which are needed?
From what I understand you want to put a page containing 20 images and you have a directory with 30 images? You put image in your page using <img src="your_image.gif"> so it does not really affect the other images since you will be hand coding them yourselves.

Quote:
Originally posted by mslodyczka
Oh..and another thng, when you make a popup window with "target=_blank" how do you put content in it. Im guessing you just make an ordinary page and link it something like "target="_blank url="whatever.html" ???
Yes. Your assumption is correct.

QReyes

Linking webpages

Yea, i got it now. Thanks alot for all the help though

mslodyczka

Previous Question:  Question About 2Checkout  SitePoint Forums  eCommerceNext Question:  Adding DVD Mini Movie to Website  SitePoint Forums  Just Starting Your Design

- Source: Linking webpages SitePoint Forums Just Starting Your Design
- Previous Question: Question About 2Checkout SitePoint Forums eCommerce
- Next Question: Adding DVD Mini Movie to Website SitePoint Forums Just Starting Your Design