Matt Posted March 14, 2006 Share Posted March 14, 2006 On the new design for my site, I want to save the navigation bar and the extras bar to two seperate files and link to them from the page, so when I change something on one of the two bars, I can simply edit it inside the single file and have it reproduced across the site. I DON'T want to use frames, so is there anything else I can do? Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 You could use server side includes, see php page http://www.w3schools.com/php/php_includes.aspIt can also be done with javascript, see section on using the external script: http://www.w3schools.com/js/js_whereto.aspThe ssi is probably the best way, if you can use php. Link to comment Share on other sites More sharing options...
Matt Posted March 14, 2006 Author Share Posted March 14, 2006 You could use server side includes, see php page http://www.w3schools.com/php/php_includes.aspIt can also be done with javascript, see section on using the external script: http://www.w3schools.com/js/js_whereto.aspThe ssi is probably the best way, if you can use php.<{POST_SNAPBACK}> I saved the HTML seperately as a .js file, then put the code on the main page where I wanted it to go (<script type="text/javascript" src="leftbar.js"></script>) but it still isn't coming up, and no, I don't know how to use PHP.Is there anything else I can do? Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 Let me see the contents of your leftbar.js file.Remeber an external javascript must contain only javascript and to write html to a page you should use:document.write("<p>put menu here</p>");document.write("<p>put menu here</p>");and also you dont need to use <script> tag in the external js. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now