javascript - Same Origin Policy - Displaying Ads -


i've got difficult problem iframes, origins, ads , on.

so have started new website, mockrs.com, , i'm trying place ads there generate revenue. ad code looks this:

<aside id="leftad" class="adwrapper160x600">     <div class="ad">                   <script language="javascript" type="text/javascript" charset="utf-8">             cpxcenter_width = 160;                 cpxcenter_height = 600;         </script>         <script language="javascript" type="text/javascript" src="http://ads.cpxcenter.com/cpxcenter/showad.php?nid=4&amp;zone=22607&amp;type=banner&amp;sid=18035&amp;pid=17900&amp;subid=">         </script>     </div> </aside> 

this code should render ads , does, they're 'placeholder' ads. real ads not rendered because of error. chrome says this:

blocked frame origin "http://ads.cpxcenter.com" accessing frame origin "http://mockrs.com". protocols, domains, , ports must match. blocked frame origin "http://mockrs.com" accessing frame origin "http://ads.cpxcenter.com". protocols, domains, , ports must match.

i think may related same origin policy, i'm not sure, because other external scripts execute without problem , can render iframes on site (facebook renders button , ad provider renders 'placeholder' ads).

what's more, chrome shows 2 or 3 such errors , don't show @ all. i'm insanely confused, me guys?

it "sop" issue. far know, there elegant ways implement advertisments without facing problem. in addition t.j. crowders advice ask ad broker correct implementation, might find interesting:

http://code.google.com/p/browsersec/wiki/part2#life_outside_same-origin_rules


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -