Monday, December 17, 2007

link_to helper, popup option and IE

Ah, the amount of time spent on this could have really been well spent elsewhere!

If you trying to use link_to as below:

link_to "View Image", { :action => "view" }, :popup => ['new_window_name', 'height=300,width=600']
# => View Image

Be very careful when you specify 'new_window_name'.

It shouldn't have any embedded spaces in the string.

Else IE will barf and throw a runtime exception! Firefox works fine though.


Mike said...

Thanks for posting this! I just ran into the same problem, and I'm sure I'd have wasted a lot of time if I hadn't seen your post.

Andy Stewart said...

Saved me some time -- thanks.

Anonymous said...

Thanks a lot... u saved my time...