Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Side bar 3

Status
Not open for further replies.

Animasu

Technical User
Aug 5, 2005
23
GB
Hi, on a website, there is useually links down the left hand side of a page, i was wondering if there is a way where i could place links down the side of the page but if i needed to change them i would only have to change 1 page without changing many others, preferably not useing frames,

Thanks

- James
 
you could use templates if you use a program such as frontpage or dreamweaver. What i do, since i use php is use a php include file.

How about if you have an external javascript (.js) file, and use document.writeln("") here.
For example, in the html file:

<script SRC="myMenu.js">
</script>

And in the file:

<!-- hide script from old browsers

document.writeln("<a href="#">Option 1</a><br>");
document.writeln("<a href="#">Option 2</a><br>");

// end hiding script from old browsers -->

Howzat?

A computer always does what you tell it to, but rarely does what you want it to.....
 
ooo thats a good idea i never would have thought of that, i will give it a shot ^_^ Thank you!!

- I Fail it! Wtf?
 
Animasu, I would highly recommend not using javascript to write the links to your page. What you really want to use is server side includes. Have a look at these links:


-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Like i said, i normally use php, and therefore use the include - or to be even surer "require".

The only problem i can see with using javascript (and it can be a big problem) is that some people might have javascript turned off, but if so, you could use the noscript tags and tell them how to turn it on......

A computer always does what you tell it to, but rarely does what you want it to.....
 
you could use the noscript tags and tell them how to turn it on......

This isn't really even the problem. Most of the people that will have javascript turned off know that they have it turned off - and already know how to turn it back on. Using javascript causes accessibility problems - and that is the major factor here.

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
actually most people i've asked have no idea what the **** javascript is let alone turning it on!

But kaht is right - the aim is in the future is that the site should be fully functional with javascript disabled.

I was trying to offer a different solution. But serverside ph, asp etc is the way to keep everyone happy!

A computer always does what you tell it to, but rarely does what you want it to.....
 
some people might have javascript turned off
One set of "people" who'll have scripting switched off are the search engine spiders, and if they can't navigate your site, because everythings hidden in scripts, they can't index it.

SSI, or the php equivalent, is the way to go. See faq253-3309 or faq253-2000 for more info.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Hi, Thank you all for these posts i will take all this into account and see what i come up with
Thank you once again ^_^

- James

- I Fail it! Wtf?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top