SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict hiddenpearls's Avatar
    Join Date
    Dec 2007
    Location
    Pakistan
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to get ads google code in ajax ?

    hi guys ,
    i m using ajax in php , so when i call ajax , i show the ads code with the messages . but ads doesn't show up .

    following is the code , please have a look

    echo "<div style='background:#E8E8E8;border=1px solid red;color:#000000; padding:5px;'>".$title.'<div style="color:#000000; "><script type="text/javascript"><!--
    google_ad_client = "pub-254235423452352";
    /* 728x15, Jobs-CVs */
    google_ad_slot = "0421584882";
    google_ad_width = 728;
    google_ad_height = 15;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></div>'.trim($str,array('<br>','<br />','')).'<br><div align="right">
    <table width="160" height="27" border="0" bgcolor="#E8E8E8" cellpadding="0" cellspacing="0">
    <tr>
    <td width="10" style="background-image:url(images/search_left.gif); background-repeat:no-repeat;">&nbsp;</td>
    <td width="150" style="background-image:url(images/search_right.gif); background-repeat:no-repeat;"><div align="center"><span style="color: #FFFFFF;
    font-weight: bold;"><a href="jobs_view/'.$obj->id.'/'.str_replace(' ','-',$obj->title).'" target="_blank" style="color:white;text-decoration:none;">Apply Now</a></span></div></td>
    </tr>
    </table>
    </div>'."</div>";
    Last edited by AutisticCuckoo; Aug 6, 2008 at 00:12. Reason: Self-promotion removed

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    When a web browser throws some HTML code into an element with innerHTML, it doesn't parse that HTML and look for JavaScript to execute. But there are lots of Google results for how to make it do that:

    http://www.google.com/search?q=execute+javascript+ajax

    Your signature needs to be in your profile, not in the body of your posts. Click "My SitePoint" at the top of the page then "Edit Signature".

  3. #3
    Non-Member
    Join Date
    Aug 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JS frameworks will work fine, you should use them


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
  •