Modulate my navigation bar

NamecheapNamecheap
Watch

Aphrodisiac

New Member
Impact
0
I'm not using php or any active scripting nor am I using any programs, just Notepad.

I'm using normal HTML with CSS and JS

I was wondering if there was an easy way to dump my navigation bar on a seperate document that can be inserted into the html file. This would make changing my navigation bar (if ever) very easy.

One way I know of is by using JS, document.write("navigation bar code")
This however, becomes very tedious and messy.

For example

Code:
function dumpmenu(){document.write("<table class=menu><tr><td>menu1</td><td>menu2</td><td>menu3</td><td>menu4</td><td>menu5</td><td>menu6</td><td>menu7</td></tr></table>");}
--------
<html>
<head><script language="javascript" src="menu.js"></script></head>
<body>
<script>dumpmenu();</script>
</body>
</html>

I was hoping that there was a way of dumping HTML code on a seperate file while keeping it visually editable

meaning... keeping it in a seperate file similiar to this
Code:
<table class=menu>
 <tr>
  <td>menu1</td>
  <td>menu2</td>
  <td>menu3</td>
  <td>menu4</td>
  <td>menu5</td> 
  <td>menu6</td>
  <td>menu7</td>
</tr></table>

True, I could use a for loop, but it still gets messy because I actually have alot more code involved then just what I've shown (wanted to keep it somewhat simple while explaining my problem).

Any ideas?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
You could do that using Frames but they are very bad when it comes to search engines.

Or you can use a content manangement system - that will be it very easy for you to update your site.

Good luck.

Regards,

Studio:wave:
 
0
•••
StudioWorks said:
You could do that using Frames but they are very bad when it comes to search engines.

Or you can use a content manangement system - that will be it very easy for you to update your site.

Good luck.

Regards,

Studio:wave:
I would like to stay away from frames as well, because they have other potiential design issues I'd like to stay away from.

As for the content management system, I haven't seen that before, I'll check it out. Is it like PHP stuff? because I don't know how to use it and IIRC you need software to support it. Therefore it wouldn't work for my "personal webspace", instead I'd have to host my own so that I have the full functionality available to me.

anymore ideas :)?

thanks
 
0
•••
You could use the PHP or ASP 'include' command, just one line of code.

Google it.
 
0
•••
I know I can use PHP or ASP, but I can't use it because I am not the administrator and I could not enable PHP or ASP support, therefore I can't use it no?

http://www.php.net/manual/en/introduction.php
You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.
 
0
•••
Well if you cant use PHP or ASP your only option is frames - and they are bad :)
 
0
•••
php may already be enabled

have you tried it?
 
0
•••
Well even if one server does support it, it is not garunteed that all servers will. The problem I have is that I'm making a website for a friend, and it's rather large, so if there are any design changes, I do not want to change every single file. Thus the needed for the module/external css/js, thus the unknown residence of the website.

So I don't want to make a webpage that works for one server, and when it needs to be moved to a new server, it doesn't work.

I hope that's somewhat clear
 
0
•••
Okay
just learned this today @ my business class
u can do it with FRONTPAGE! So you might wana use that
In front page...u can add something called SHARED BORDERS and Navigation bar
It is the easiest and efficent way to do it :)
 
0
•••
I'll get back to this when I get front page lol
 
0
•••
you can do it with server side includes. I tbasically works the same way asp or php does, but most web servers have it turned on.

Code:
<!-- #include virtual="/includes/navbar.txt"-->

Then I believe you have to name the file calling the navbar with the extension .shtml

Give it a try.
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back