Hello,
I have an iframe in my page that for some reason is rendering all of the
code from the parent page. Basically what I have going is the parent
page with its wrapper and header and all that just getting repeated with
in the iframe even though all the those divs are not explicitly coded in
to the iframe. Hope that makes sense.Below is any relevant code.
iframe
<iframe SRC="<%= url_for :action => 'file_add', :id => @vari%>"
FRAMEBORDER="0" WIDTH="100%" HEIGHT="10" ONLOAD="this.height =
Math.max(this.contentWindow.document.body.offsetHeight,this.contentWindow.document.body.scrollHeight,this.contentWindow.document.documentElement.offsetHeight,this.contentWindow.document.documentElement.scrollHeight);">TODO:
no-iframes file uploader</IFRAME>
partial - I tried wrapping it in empty html to remedy this but that
didn’t work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<% form_tag({:action=> 'file_add', :id => @proof.id}, {:multipart =>
true}) do %>
<%= hidden_field 'vari', 'id' %>
<label for="file">Add:</label>
<%= file_field_tag 'file', 'onChange' => 'this.form.submit();' %>
<%= submit_tag "Add" %>
<% end %>
<UL>
<% @vari.files.each { |file| %>
<LI><A HREF="<%= url_for :action => 'file', :id => @vari, :file_id =>
file.id, :name => file.name %>"><%=h file.name %></A> from
<%=h case file.belongs_to
when 'requester' then @vari.requester.displayName
when 'subject' then @vari.subject.displayName
when 'sender' then @vari.subject.displayName
when 'author' then @vari.author.displayName
end %></LI>
<% } %>
</UL>
</body>
</html>