View Full Version : How to show html from a js script

10-03-2007, 06:46 AM
hi, everyone know that google using

<script type="text/javascript"><!--
google_ad_client = "";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";

<script type="text/javascript"

to display the ads. And the view source actually see nothing of the ads code but jz same like above. Anyone know how to do tht? i tried to search from net but seems like cant get my answer. I even try to download the google's JS code. But... it seems too difficult to me. Can anyone provide me a sample on how to do tht?

Thanks for helping

10-03-2007, 07:32 AM

10-03-2007, 12:21 PM
Oh, sorry, i am not asking how to put adsense code, :)

i am asking how to apply this technique in my website.


user may paste

<script type="text/javascript"><!--
... my parameter

<script type="text/javascript"

And their site will show my website content. It's hopefully not an RSS, XML remote fetch, but a google adsense approach (include a JS script and can get the content)


10-05-2007, 09:06 AM
You could use JavaScript + PHP to get your page contents.

10-05-2007, 11:49 PM
:(, cannot. coz some of the member grabbing my JS code may not running a PHP site, but ASP, JSP etc

10-06-2007, 12:21 AM
You want to not use PHP in order to have people steal your code?


10-06-2007, 01:22 AM
no, actually the story is like this...

I need to create a banner rotator engine for public.
1. signup
2. login > banner management
3. copy ads code from other affiliate network, paste into my system
4. set the ratio for each banner (E.g. they put 5 banners into the panel)
5. press 'submit' button.
6. my portal will generate a CODE (this is wht i need, something like google ads)

<script type="text/javascript"><!--
mymember_id = 123
mymember_rotator_code = 123abc

<script type="text/javascript"
7. the member just paste my code into their website, and once visitor come to their site, it will trigger my JS code. and their banner will be loaded ACCORDING to the ratio they site in my website

P.S. the reason i need a JS is bcoz some of them may not running a PHP site. But ASP, ASP.NET, Perl site. So i think JS is a bit universal for them.

Story end. Thanks for helping