• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

kyd

clearjade

New Member
Is it just me or is kyd.net down? It was down a couple days ago and then it was up after a day or so. And now it's down again but it's been like this for a few days. I'm really hesitating to get another guestbook since I have to change all the links on my pages again! My god I hate tables. I wish there was a way to keep the same menu on every page without using frames. I'd use IFRAME but it doesn't work for netscape.

[Edited by clearjade on 02-03-2001 at 03:40 PM]
 
use .js files

The way I maintain the same look on all my pages is using .js files. You can store all the info you want to be displayed on your menu in that one file then referrence it from all of your files. Then when you edit the .js file, it changes on all of the other pages.

Wedge
http://www.oasiscentral.com
 
Pardon my stupidity, but what exactly are .js files? Isn't that extension for javascript or something? Don't laugh at me :p It would be nice in your explanation for a reference on how to make it perhaps? If it is exactly what I'm looking for, this new info would be greatly appreciated. :)
 
It is a JavaScript extension. There's a basic ssi work-around in JavaScript. You put all your files in a text file with the *.js extension and use a JavaScript code to call it. Correct me if I'm wrong, but I think it's this:

Code:
<script language="JavaScript" src="file.js"></script>
 
So you just write up the html code and save it as .js, and then stick that <script whatever></script> where you want the html to be displayed on another page?
 
Originally posted by clearjade
My god I hate tables.
I hate them too. It took me 3 years... 3 years!!! to figure out how those <TD>'s worked.. :mad: but now that I've finally figured it out, heh heh... I love tables! :D
Originally posted by clearjade
I wish there was a way to keep the same menu on every page without using frames
Oh yeah, it's possible... just place the same menu code on every single page you want it on, like what I'm doing. ^^" It's hard work to update all the pages if/when you modify the menu code, so use some software that has the template feature like Dreamweaver, but I recommend you write your own scripts somewhere else like Notepad or CuteHTML. Follow me?
BTW, you'll be needing to use tables if you want to do it this way...

Or, you can create a file with your menu code in it and then call it using SSI.
 
Heh I know it doesn't work that way now since I tried it last night lol. I like tables for menus except for the fact that if I want to change one link in a table...I have to change all the rest. It is hell when I have many pages and having to change every single one and also to upload every single one. I have many subdirectories as well. In reply to using tables to keep the same menu on every page...that's what I AM doing. I just keep saving my old files as a new html file and then just change whatever. I'm so confused about that SSI and .js file. Explain!! I am javascript illiterate. All I do is copy and paste lol.
 
Originally posted by clearjade
I'm so confused about that SSI and .js file. Explain!! I am javascript illiterate. All I do is copy and paste lol.

Forget about the ssi. Make a file called "menu.js" in notepad, and put your menu HTML in it. Put that file in the same as all your html files. Now copy and paste this into the files you want the menu to be called:

Code:
<SCRIPT language="JavaScript" src="menu.js"></SCRIPT>

I can't get much simpler, unless you want pictures ;).
 
Correct me if im wrong, but that doesn't work. You have to use the javascript document.write command dont you? I'd like to see a running example of one that doesn't have that.
 
I said I tried that last night and all it gave me was a javascript error in Internet Explorer.
I cut out the menu and saved it as a .js file. Then put the script code where I wanted the menu to be located. Didn't work. And besides Lex said it doesn't work that way. I also tried leaving the html menu code for the menu in the page and pasting the script code in the head tag. That had no effect when I changed the .js file. Mayhaps the javascript write command might work?
 
Originally posted by jw
Correct me if im wrong, but that doesn't work. You have to use the javascript document.write command dont you?

Whoops :(. I wasn't even thinking when I wrote that, this should work:


Code:
[i]This is how to write the menu.js file[/i]::..

<!-- Begin
document.write(' HTML HERE '); 
document.write(' HTML HERE '); 
document.write(' HTML HERE '); 
document.write(' HTML HERE '); 
document.write(' HTML HERE '); 
document.write(' HTML HERE '); 
// End -->


Code:
[i]How to call it[/i]::..
<SCRIPT LANGUAGE="JavaScript" src="footer.js"></script>
 
clearjade, try what Nick suggested, and see what happens.

Or..., like I was saying above, you can use some software that has the template feature.

This is how it's done in Dreamweaver 4:
You create a template file with your menu code in it, then you start a new page using the template. You add your content where ever you appointed in the template file. If you change a link in the template, all files using the template will get updated automatically by Dreamweaver (with your consent, of course) when you save the template file.

So it's like changing something in one file and you get updated codes in all the other files that uses the template without having to open, change and save each singular file, sorta like what you want, right?
 
That way (that Nick said) should work. But if you want to use pure HTML for your menu, and not go through all the pages to replace it by hand, try this program called BK ReplaceEm .

Here is a download link http://download.cnet.com/downloads/0-4003619-100-881501.html?tag=st.dl.10001-103-1.lst-7-1.881501

It searches through all files in a folder(subfolders too), and replaces the line(or paragraph) of text you enter with what you want to change it to. It works great for HTML too. Say you want to change all your links that point to index.html to links that get home.html . Just search for <a href="index.html"> and replace with <a href="home.html"> . It's that easy. SSI is probably the best way, but this is an easy alternative.
 
Hey cool thanks for the link. I was kinda hesitant about the javascript since not everyone has it enabled. But I'll think about either way and see which method works best. I don't really like using programs for html editing but I'll try it anyway. :)
 
Back
Top