how redirect to a new window when a ads are clicked
I got hooked up with the following scenario. I have a google ad with me that I wanted to display in my view file. I successfully achieved it but I require in this way like when user clicks on it he should redirected a new window where that content related to that ad should be open up. for reference I'm pasting my code related to my ad.Please help me out
<script type="text/javascript">
google_ad_slot = "6257988877";
google_ad_width = 200;
google_ad_height = 200;
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
So when user clicks on it the advert should be open开发者_Go百科ed in a new window. Any kind of help is welcome. Please help me.
In short, NO.
Your answer can be found at the google adsense support http://www.google.com/adsense/support/bin/answer.py?answer=9737
The long answer: Maybe!
You could try to add an onLoad function that goes through all the anchor links of your page and adds for the Google ones a target="_blank"
attribute.
精彩评论