0

Hello ladies and gentlemen

I've been trying to find a workaround this issue, and maybe you can help me find a solution.

I've got a signature footer bar in a html document. This footer bar must display in several websites, in several domains, so i've been looking for an include code to do this for me.

Since it is a code hosted in an external server, i cannot do that with a <!--#include --> ssi inclusion. I couldn't manage to get a ESI include to work either, and I don't want to use a php include, since that would be my only reason to use php, and I honestly don't want to.

So, I thought about doing it through Javascript. I tried it the AJAX way, creating a function to call my external html, and pass it to a <div class="signature"></div> and call the function right after the container, but it didn't work, so I thought maybe calling it live, without using functions, since I'd have to use a trigger to call it via AJAX.

Any suggestions?

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Nichito
0

Found out how to solve it... jsut needed to include a javascript file that wrote the content of the file into the html dynamically... something like this:

<html>
<body>
   <script type="text/javascript" src="http://domain/signature.js"></script>
</body>
</html>

and the javascript file goes like this:

document.write("<style type=\"text/css\">.signature{...}</style><div class=\"signature>content</div>");
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.