Is there a way to use JavaScript or jQuery to include a header and footer like php?

Question by simsketch: Is there a way to use JavaScript or jQuery to include a header and footer like php?
I know how to do this with php, but I want to be able to view my site locally without having a server like XAMPP setup. This way, I can give my site to anyone and they can view it, but when I need to make changes to the header or footer, I only want to have to change one file.

Best answer:

Answer by Gitlez
Yes and No. Yes you can with certain things you can include the script, with the contents of that script writing html into the page.

No, in the sense that you cannot include header or begging html tags inside the document.

Possible solution: Thumbdrive Servers. You can download a self contained server (Server2Go), then all you need to do is zip the folder to share with others. All they’ll have to do is unzip the file, then run the one program file.

Let me know if you need some more info on this.

Cheers,

Gitlez

Yahoo Contact Form –> http://answers.yahoo.com/my/message_do?kid=mgNFAKInaa

Add your own answer in the comments!

About Admin