From: DL on 21 Apr 2010 09:30 .... <script type="text/javascript"> function setFrm() { var fh = document.getElementById('txt'); fh.style.width = (screen.width - 60); fh.style.height = (screen.height - 330); } </script> .... <body onload="setFrm();"> .... <iframe id="txt" name="txt" contenteditable="true"></iframe> OUTCOME: the above is working across IE7/8 and Firefox3.5. <img onclick="var x = frames['txt'].document.selection.createRange();x.execCommand('InsertOrderedList');x.select();" src="icons/list_ordered.gif" style="valign:bottom;width:25;height: 20" /> OUTCOME: the above Ordered List function is not working with IE8 while it works with both IE7 and Firefox3.5, specifically, upon click, order number goes out of the iframe instead of being inside, how come? How can we fixt it? (I understand when the Style of Width and Height for the iframe is set within the iframe element, this is not an issue but I'd like to set the iframe's width and height dynanically). Thanks in advance.
From: Joe Nine on 21 Apr 2010 10:47 DL wrote: > <script type="text/javascript"> > > function setFrm() { > var fh = document.getElementById('txt'); > fh.style.width = (screen.width - 60); > fh.style.height = (screen.height - 330); > } > > </script> You need to add "px" to it. fh.style.width = (screen.width - 60)+"px"; fh.style.height = (screen.height - 330)+"px";
From: DL on 21 Apr 2010 11:05 On Apr 21, 10:47 am, Joe Nine <j...(a)yahoo.com> wrote: > DL wrote: > > <script type="text/javascript"> > > > function setFrm() { > > var fh = document.getElementById('txt'); > > fh.style.width = (screen.width - 60); > > fh.style.height = (screen.height - 330); > > } > > > </script> > > You need to add "px" to it. > > fh.style.width = (screen.width - 60)+"px"; > fh.style.height = (screen.height - 330)+"px"; Great catch. I just did, still to no avail (same problem). What else could we try? Thanks.
|
Pages: 1 Prev: What Women Wants To listen:). http:/www.fashion4world.net Next: Getting Server data using AJAX |