Permalink
Browse files

Use direct attribute setters instead of setAttribute (ie compatibility)

  • Loading branch information...
1 parent f683471 commit c9a4e079154268ac2bee2082f564d594eaa20d0c Glenn Murray committed Oct 23, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 public/javascripts/page_preview.js
@@ -4,8 +4,12 @@ function write_to_iframe(text) {
$('page-preview').parentNode.removeChild($('page-preview'));
var iframe = document.createElement('iframe');
iframe.id = 'page-preview';
- iframe.setAttribute('style','width:100%;height:40em;display:none;border:1px solid black;margin-top:0.3em')
iframe.setAttribute('frameborder','0');
+ iframe.style.width = "100%";
+ iframe.style.height = "40em";
+ iframe.style.display = "none";
+ iframe.style.border = "1px solid black";
+ iframe.style.marginTop = '0.3em';
$('preview_container').appendChild(iframe);
var doc = $('page-preview').contentDocument;
if (doc == undefined || doc == null)

0 comments on commit c9a4e07

Please sign in to comment.