SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting data to display ads

    Hi
    I want to code a JS file that enables me to give a code to my users to place on their site so that I'll display ads on their site. the code they will place on their site is like this:
    Code:
    <script type="text/javascript">
    partnerid = "3832";
    keyword="host";
    backgroundcolor="FFFFFF";
    width="336";
    height="280";
    scriptid="4ebb512"
    <script id="4ebb512" type="text/javascript" src="http://domain.com/WebFiles/display_ad.js">
    But how that display_ad.js file (hosted on my server) will collect the data in the code (like height, width, partnerid,etc) to decide what to desplay?
    I really need it. any help or refering to a tutorial is highly appreciated
    thanks in advance

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can use those variables directly from display_ad.js; they're in scope. The easiest way to pass them to a server-side script to do the real work is to append them to the URL of an appropriately sized iframe.

  3. #3
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks
    Hi
    i was using iframes with src=http://mydomain.com/adgenerator.php?referrer=username to display ads on other sites. Now I need to display inline ads like what you see on mouseover on underlined words at http://takfekr.com/inline.html
    How can I do that?
    I know the basic js but don't know on what to study to be able to code the inline ads quikly to get my job done. can you help me on what i should study? how should my approach to the problem be?
    Thanks


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
  •