Hello everyone,
I am trying to add an option to print my view, i.e the display webpage
in my Rails application.At present I am using HTML DOM for that but I
want to do that in ruby.Following some online tutorials, I am trying to
use rjs for that. the codes are some thing like this
# view.rhtml
<%=link_to_remote ("Print Page", :url => {:action => :print})%><br />
# doc.rjs
page.hide 'header'
page.hide 'header2'
page.<<'javascript:window.open();'
page.show 'header'
page.show 'header2'
Can anyone give some idea as to why this is not working?I have very less
knowledge in this.Is there any other way to do the same?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---