Dan Wright
2006-Jan-16 07:00 UTC
[Rails] ruby embedded code replacement for onclick in link?
Is there a ruby embedded code replacement for something like this? <a href="#" onclick="window.open(''http://192.168.78.12:3000/portfolio/show/<%item.id %>'', ''test'', ''width=660, height=500,resizable=no'')"> <%= image_tag item.image_url, :size => ''200x150'' %></a> Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/8c35871f/attachment.html
Jan Prill
2006-Jan-16 12:48 UTC
[Rails] ruby embedded code replacement for onclick in link?
Hi, Dan, have a look at the :popup option of the link_to helper: http://api.rubyonrails.com/classes/ActionView/Helpers/UrlHelper.html#M000332 Best regards Jan Prill Dan Wright wrote:> Is there a ruby embedded code replacement for something like this? > > <a href="#" > onclick="window.open(''http://192.168.78.12:3000/portfolio/show/ <%= > item.id <http://item.id> %>'', ''test'', ''width=660, > height=500,resizable=no'')"> > <%= image_tag item.image_url, :size => ''200x150'' %></a> > > Thanks, > > Dan > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Dan Wright
2006-Jan-16 14:53 UTC
[Rails] ruby embedded code replacement for onclick in link?
Doh!! Don''t know how I missed that one. Thanks, Dan On 1/16/06, Jan Prill <JanPrill@blauton.de> wrote:> > Hi, Dan, > > have a look at the :popup option of the link_to helper: > > http://api.rubyonrails.com/classes/ActionView/Helpers/UrlHelper.html#M000332 > > Best regards > Jan Prill > > Dan Wright wrote: > > Is there a ruby embedded code replacement for something like this? > > > > <a href="#" > > onclick="window.open(''http://192.168.78.12:3000/portfolio/show/ <%> > item.id <http://item.id> %>'', ''test'', ''width=660, > > height=500,resizable=no'')"> > > <%= image_tag item.image_url, :size => ''200x150'' %></a> > > > > Thanks, > > > > Dan > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/3b91f582/attachment-0001.html