Forum: Ruby on Rails using in_place_editor and overlib js popup hoses up browser

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
438cb86dbcf719b1736db26e78de35a3?d=identicon&s=25 dav.coleman (Guest)
on 2005-12-02 02:50
(Received via mailing list)
Hi,

I'm having a problem. I am using overlib to create popups on my rails
app. The popups contain HTML and everything was working nicely until I
tried including in_place_editor-generated javascript within that popup
HTML. I'll try to give a rough overview here. Hopefully someone else
has run into this already and figured out how to mix these two
together.

The popup is created in the browser when the user mouses over an image

<%
  popup = profile_popup(sidebar_user)   # gets the HTML for the popup
  popup = escape_javascript popup         # converts any ' to \', any
newlines to \n
  img_url = sidebar_user.thumbnail_url("50x50")
  img_html = "<img src=\"#{img_url}\" ALIGN=\"LEFT\"
onMouseOver=\"return overlib(popup_html_#{sidebar_user.id}, CAPTION,
'Profile for #{sidebar_user.login}', FGCOLOR, '#999999', BGCOLOR,
'#333333', BORDER, 4, CAPTIONFONT, 'Garamond', TEXTFONT, 'Courier',
CAPTIONSIZE, 4, MOUSEOFF, STICKY, FIXX, 100, FIXY, 75 )\"
onmouseout=\"return nd();\"/>"
%>
This topic is locked and can not be replied to.