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

23rd of September 2013 0

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!

Filed under § jquery forms — Tagged with , , , , , ,

Share it!

Was it good for you to?

Sponsors

Support for the site!

No sponsors at the moment.



Your opinion matters. Add it below.


Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments

Categories



Copyright jqueryui.info since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.