iframe src in Haml
10,823
Try :
If files on same place
%iframe{:src => "blog_posts/new2.haml"}
else suggest to use it as :
make a routes for new2 action and call into iframe via url like :
%iframe{:src => "http://yourdomain.com/new2"}
Author by
Marina
Updated on June 04, 2022Comments
-
Marina almost 2 years
I always get an empty page when using an iframe. I put, in src, the location of the Haml file containing the code to create the checkboxes:
view.haml:
%iframe{:src => "file:///home/marina/project/app/views/blog_posts/new2.haml"}
new2.haml:
%h1 popup br %input{:name => "option1", :type => "checkbox", :value => "Milk"} Milk %br %input{:name => "option2", :type => "checkbox", :value => "Butter"} Butter %br %input{:name => "option3", :type => "checkbox", :value => "Cheese"} Cheese %br