Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to display the same links in every page?

Reply
Thread Tools

How to display the same links in every page?

 
 
fraternitydisposal@gmail.com
Guest
Posts: n/a
 
      08-28-2006
I'm making a personal site which contains links like home, resume,
feedback, hobbies, links in every page. And i've managed to create an
external css. How can i insert the said links in every page without
copying and pasting the links in every page?

My webhost doesn't support server side scripting. Can i store the links
in an external file and insert them by client side scripting? Please
help.

 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      08-28-2006
On 2006-08-28, wrote:
> I'm making a personal site which contains links like home, resume,
> feedback, hobbies, links in every page. And i've managed to create an
> external css. How can i insert the said links in every page without
> copying and pasting the links in every page?
>
> My webhost doesn't support server side scripting.


Does it support server-side includes? Try a line like this in a
file with .shtml for its extension (e.g., index.shtml):

<!--#include virtual="links.html" -->

> Can i store the links in an external file and insert them by client
> side scripting? Please help.


An alternative is to have a link to a page of links.


--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
Reply With Quote
 
 
 
 
fraternitydisposal@gmail.com
Guest
Posts: n/a
 
      08-28-2006
Infact I want to make a common navigation bar in every page which is
similar to :

Feedback
Resume
Hobbies
Research
Publications
Testimonials
etc

There won't be any dropdown menus. My webhost is worst of its kind. I
want to use javascript. Please help.

 
Reply With Quote
 
Ed Mullen
Guest
Posts: n/a
 
      08-28-2006
wrote:
> I'm making a personal site which contains links like home, resume,
> feedback, hobbies, links in every page. And i've managed to create an
> external css. How can i insert the said links in every page without
> copying and pasting the links in every page?
>
> My webhost doesn't support server side scripting. Can i store the links
> in an external file and insert them by client side scripting? Please
> help.
>


You could put the menu (links) in an external file and have it inserted
dynamically into each page via javascript. The pluses are that it
doesn't rely on server-side functions and you can change one file and
have it change every page on your site. The minus is that visitors must
have javascript enabled for your pages to work properly. You may well
see lots of negative comments in html and css newsgroups about
javascript. I personally find most of the concerns unfounded.

My site uses this technique. I have a header that is used on every
page. The content of the header is several buttons containing the menu
navigation system. All of the header info comes from the same file. To
change the menu on 200+ pages on my site I change just one or two files.

See Design Considerations at: http://edmullen.net/siteinfo.html

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Chastity is curable if detected early.
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      08-29-2006
Something like this?:

http://www.dynamicdrive.com/dynamicindex1/hover.htm


It's CSS, not Javascript, but it seems to be what you are asking for.

HTH

VR/

John


 
Reply With Quote
 
fraternitydisposal@gmail.com
Guest
Posts: n/a
 
      08-29-2006

Ed Mullen wrote:
> wrote:
> > I'm making a personal site which contains links like home, resume,
> > feedback, hobbies, links in every page. And i've managed to create an
> > external css. How can i insert the said links in every page without
> > copying and pasting the links in every page?
> >
> > My webhost doesn't support server side scripting. Can i store the links
> > in an external file and insert them by client side scripting? Please
> > help.
> >

>
> You could put the menu (links) in an external file and have it inserted
> dynamically into each page via javascript. The pluses are that it
> doesn't rely on server-side functions and you can change one file and
> have it change every page on your site. The minus is that visitors must
> have javascript enabled for your pages to work properly. You may well
> see lots of negative comments in html and css newsgroups about
> javascript. I personally find most of the concerns unfounded.
>
> My site uses this technique. I have a header that is used on every
> page. The content of the header is several buttons containing the menu
> navigation system. All of the header info comes from the same file. To
> change the menu on 200+ pages on my site I change just one or two files.
>
> See Design Considerations at: http://edmullen.net/siteinfo.html
>
> --
> Ed Mullen
> http://edmullen.net
> http://mozilla.edmullen.net
> http://abington.edmullen.net
> Chastity is curable if detected early.


This is what I'm looking for. But i'm failing to understand and modify
your javascript to fit my needs. I possible mention a good source to
learn javascript.

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      08-29-2006
In article
< .com>,
wrote:

> I'm making a personal site which contains links like home, resume,
> feedback, hobbies, links in every page. And i've managed to create an
> external css. How can i insert the said links in every page without
> copying and pasting the links in every page?


The obvious answer to the particular question is use Search and
Replace function in any decent text editor. No need to copy and
paste at all.

--
dorayme
 
Reply With Quote
 
Ed Mullen
Guest
Posts: n/a
 
      08-29-2006
wrote:
> Ed Mullen wrote:
>> wrote:
>>> I'm making a personal site which contains links like home, resume,
>>> feedback, hobbies, links in every page. And i've managed to create an
>>> external css. How can i insert the said links in every page without
>>> copying and pasting the links in every page?
>>>
>>> My webhost doesn't support server side scripting. Can i store the links
>>> in an external file and insert them by client side scripting? Please
>>> help.
>>>

>> You could put the menu (links) in an external file and have it inserted
>> dynamically into each page via javascript. The pluses are that it
>> doesn't rely on server-side functions and you can change one file and
>> have it change every page on your site. The minus is that visitors must
>> have javascript enabled for your pages to work properly. You may well
>> see lots of negative comments in html and css newsgroups about
>> javascript. I personally find most of the concerns unfounded.
>>
>> My site uses this technique. I have a header that is used on every
>> page. The content of the header is several buttons containing the menu
>> navigation system. All of the header info comes from the same file. To
>> change the menu on 200+ pages on my site I change just one or two files.
>>
>> See Design Considerations at: http://edmullen.net/siteinfo.html
>>
>> --
>> Ed Mullen
>> http://edmullen.net
>> http://mozilla.edmullen.net
>> http://abington.edmullen.net
>> Chastity is curable if detected early.

>
> This is what I'm looking for. But i'm failing to understand and modify
> your javascript to fit my needs. I possible mention a good source to
> learn javascript.
>


Elsewhere you said you didn't need drop-down menus. So, all you need
from my method is to use

<script src="yourfile.js" type="text/javascript"></script>

in the <body> section of your page where you want the content to appear.

Then create a file (e.g., yourfile.js) and use the following to put the
content you want to appear on each page.

var writeExternalContent = '';
writeExternalContent += '<a href="link1.html">Link1</a>';
.... etc ...
document.writeln(writeExternalContent)

Here's a test case: http://edmullen.net/temp/t1.html
Here's the js file: http://edmullen.net/temp/yourfile.js

As to tutorials on javascript, I'd go to the bookstore and get a basic
book to start with.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Error: Keyboard not attached. Press F1 to continue ...
 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      08-29-2006
On 28 Aug 2006 16:46:26 -0700, wrote:

>Infact I want to make a common navigation bar in every page which is
>similar to :
>
>Feedback
>Resume
>Hobbies
>Research
>Publications
>Testimonials
>etc
>
>There won't be any dropdown menus. My webhost is worst of its kind. I
>want to use javascript. Please help.


Hi Fraternity,

This can be done using Dreamweaver by setting the navigation bar as a
fixed area in a template. Useful for a really large site, (where
changes to the navigation bar in the template will then ripple out
across the entire site) but for a smaller site copy & paste might be
easier (and a lot cheaper).

All the best,

Andrew
--

Andrew
http://www.andrews-corner.org
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-29-2006
<> scripsit:

> My webhost is worst of its kind. I
> want to use javascript. Please help.


1) Change host.
2) Stop wanting to use javascript.

You're welcome.

P.S. Whatever you think you need, your visitors, if any, won't need a boring
set of navigational links on every page. Include just a link to the main
page, which contains links to the subpages.

(Alternatively, design the set of navigational links well, so that you won't
need to change it, and "manually" copy it to all subpages. This is trivial.
You have less than a dozen pages, right? Well, at the point of design where
people ask questions like yours, they usually haven't got a single content
page, and won't have one for quite some time, since they waste time with
irrelevant things like making navigation a problem and fine-tuning the
visual appearance down to the last pixel.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Explorer.exe error report every time access every type of video me =?Utf-8?B?SXJ3YW5zeWFo?= ASP .Net 4 10-30-2007 07:49 AM
Sipgate registration times out at the same time every day alexd UK VOIP 20 02-27-2006 02:50 PM
Same variable on every JSP page Steven Java 1 03-07-2005 06:04 PM
Putting same Javascript function in every ASP.net page Shikari Shambu ASP .Net 2 08-06-2004 10:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57