Google adsense breaks render :partial =>


Hey everybody, i’ve got a control that returns a partial, no biggie.
Except when that partial contains the javascript for my adsense account.
Then the partial renders correctly, and then quickly replaces my page
with nothing by the ad. When i take away my adsense js, everything works
great. Has anyone encountered this before, or know how to get around it?

def submit_remote_form
render :partial => “my_partial”

#views /my_partial

<% remote_form_for :action => :submit_remote_form do |f| %>
<%= f.text_field :something %>

<%= f.submit “submit” %>

<script type="text/javascript"><!--
google_ad_client = "";
/* WhySpam Square */
google_ad_slot = "";
google_ad_width = 200;
google_ad_height = 200;
<script type="text/javascript"

<% end %>

I know i could get around this by taking out the adsense js, but that
would require “creative” (to say the least) html/css design to get the
same result.