156 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
+3 more
SachaG says

While working on a html template, I wanted to include some global files like the header and footer to avoid duplicating the same code in all the files. But I wondered if there was a way to do this without having to resort to PHP . Although it’s a popular language, some buyers might want to use the files with ASP , Rails, or another server-side language.

It turns out it’s very easy to do with jQuery, so I wrote up a very short tutorial:

http://www.themedesigner.net/using-jquery-to-include-files/

Disclaimer: don’t use this technique if you think your buyers are going to use the files as they are, because if they use a client-side include on their live site, Google won’t be able to index it. But it’s still a useful trick for something like an admin interface template.

960 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+4 more
jeffeatworld says

This is one way, but I’m pretty sure you can just use AJAX to include the file in the same way.

156 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
+3 more
SachaG says

Using AJAX to include the file is already what I’m doing… I’m not sure what you mean?

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by