in my rails app, i have got one URL *
(http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=code&chld=H|0)*in 
Javascript

*view.html.erb*
*
*
*
 <td><%= link_to "QR","#", :onclick => "showCode();"%></td>

*

<script type="text/javascript">
var imageURL;
var showCode = function () {
  imageURL = "*
http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=code&chld=H|0*";
  $("#*qr*").html("<a href="+*imageURL*+" class='btn btn-primary 
pull-left'>Save</a>");
}
</script>
<div id="*qr*">

</div>

I need to download this image via click this Save button, I have use this 
way, But it will prompt one window, not downloading
Is there any way to do this?


Thank you
vishnu


-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/WuF4kLBQjWcJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to