Results 1 to 7 of 7

Thread: How to show html from a js script

  1. #1
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to show html from a js script

    hi, everyone know that google using

    Code:
    <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"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    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

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

  3. #3
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh, sorry, i am not asking how to put adsense code,

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

    Eg.

    user may paste
    Code:
    <script type="text/javascript"><!--
    ... my parameter
    //-->
    
    <script type="text/javascript"
      src="http://mydomain.com/my_javascript_.js">
    </script>
    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)

    Thanks

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    You could use JavaScript + PHP to get your page contents.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #5
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    , cannot. coz some of the member grabbing my JS code may not running a PHP site, but ASP, JSP etc

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You want to not use PHP in order to have people steal your code?

    Explain...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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"
    src="http://mydomain.com/my_javascript_.js">
    </script>
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •