Help - Search - Members - Calendar
Full Version: Probleme With My Script
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
Sickness
I've got some problem with a script of mine.
The script is working like google adsense and it's showing ads, but when I try to put this script on other website the ads doesnt appear, should I put something in my script to allow the ads to be shown on a other website?
This is the script to include the real one:


CODE
&lt;script type="text/javascript"><!--
var type = 2;
var bg_color = "ffffff";
var border_color = "000000";
var txt_color = "000000";
var title_color = "15417e";
var site = "0";
//-->

</script>
<script type="text/javascript" src="http://www.community-ads.fr.nf/lapub.js"></script>


If you cant understand me just say it.


thank's for the help
MrTouz
CODE
</script>
&lt;script type="text/javascript" src="http://www.community-ads.fr.nf/lapub.js"></script>


Should be :

CODE
</script>
<script type="text/javascript" src="http://www.community-ads.fr.nf/lapub.js"></script>


Dunno if you noticed but you had '&lt;' instead of '<'.

Might be the error ?
Sickness
that's put '&lt;' when I've pasted the code, this is not the problem, I've found the problem but I cant solve it,

I can't open the php file when I try the script from a other website.
Sickness
My problem is: accessing a php script on an external server is possible in PHP with the function loadHtmlFile, but is it possible with Javascript?

The query XHR tells me that's not permitted, and that's logical, but how then to fetch rendering of the page in PHP by javascript.

Please help me!! wacko.gif
Ed
You'll have to introduce a proxy script, the proxy script will basically be a locally hosted php script that grabs the remote url's source and the XHR request uses that to obtain the remote source.
Sickness
How does the proxy script work? And can I do that without a proxy script, cuz I want something like google adsense, just put a javascript code on your website to include the banner.
Ed
What have you got so far?
Sickness
We can show the ads on our website but that doesnt work on other website, this is a preview


P.-S. the website is not completly translated and the ads are currently just in french.


This will be something like a link exchange member put the ads on their website, with a style like google adsense, when they've putted the ads on their site they can add their own ads in the database and it's will be free.
MrTouz
pas mal le site internet. et bonne idée.
Sickness
Merci, mais avant d'ouvrir, il faut régler le problème et finir la traduition, après quand le principal est fait il ne restera qu'à ouvrir pour les premiers 10 inscrit pour un moi de beta test et pendnt ce temps là pofiner le site régler les bugs trouvés et coder le forum.

_____________________________

Thank's, but before the opening day, we need to fix the problem and also complete the translation, and finally open for the ten first registred members for a month while we will under beta testing while we will fix the bugs and also code the forum.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.