simcoweb Posted March 21, 2010 Share Posted March 21, 2010 Is there a method for doing an SSI type include using javascript, specifically JQuery? I have a menu I want to include in each page but don't want to convert to PHP nor use standard SSI methods if possible. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/196039-can-javascript-emulate-an-ssi-call/ Share on other sites More sharing options...
Mchl Posted March 21, 2010 Share Posted March 21, 2010 Try this: http://www.exit12.org/?p=5 Or maybe simply put your menu code inside document.write() and include it as JS script Quote Link to comment https://forums.phpfreaks.com/topic/196039-can-javascript-emulate-an-ssi-call/#findComment-1029719 Share on other sites More sharing options...
simcoweb Posted March 21, 2010 Author Share Posted March 21, 2010 I'll check out that link. The only problem I see with using the document.write() is it takes away the ability to be able to edit just one global menu file and defeats the purpose of the include concept. The problem i'm having is that when using the standard SSI include statement, because the menu is a UL block element, it's automatically placing a line break ahead of it which makes the menu have a space above it. If I can get rid of that problem then the whole thing is corrected. Quote Link to comment https://forums.phpfreaks.com/topic/196039-can-javascript-emulate-an-ssi-call/#findComment-1029750 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.