156 posts
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • France
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
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
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
  • United Kingdom
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
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • France
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
SachaG says

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

by
by
by
by
by
by