Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download

Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Inline with included Javascript freezes IE7 and 8


Speedup My PC
  #1 (permalink)  
Old 08-22-2009
DA Ward

Posts: n/a
Inline with included Javascript freezes IE7 and 8
I have a particular set of pages which is feezing both newer IE browsers and
their debuggers (and probably the older as well). No error messages: an
outright freeze.

Basically, there's a parent .asp page with an iframe. The iframe's content
is generated by a call to a javascript function from the parent and written
by document.writes. The iframe's content is written at page load, and
rewritten everytime a selection is made in the parent page, which recalls the
function and rewrites the iframe's content using changed variables which both

the iframe's dynamically rendered document contains both inline script (of
the form <script type='text/javascript>function foo() {}</script>) and
included javascript files (of the form <script src=something.js

evidently this is what freezes the IE browsers. If the iframe content
contains both inline and outside javascript files, the browser freezes in the
middle of loading the parent page (which, you remember, also produces the
iframe content initially). There is no problem with other browsers'
accessing the same content.

Is there something simple I'm missing?

I have a complete test case: the parent page containing the iframe, the
script which puts minimal content into the iframe, and a dummy outside
javascript file to be referenced in the iframe content. This is the problem
reduced to its simplest terms, if you want to put it on the server, here it

//this is "Something.asp", the parent page. notice that it is written on
the server, but, or course, appears to the browser as html. It sets up an
iframe. then it calls a function (writesomething() in an outside file:
something.js, which provides markup to the iframe...

<%@ LANGUAGE = "JavaScript" %>


Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
Response.Write("<html lang='en'>\r");
Response.Write("<meta http-equiv='content-type' content='text/html;
charset=UTF-8' />\r");
Response.Write("<meta name='description' content=' ' />\r");
Response.Write("<meta name='keywords' content=' ' />\r");
Response.Write("<meta name='Author' content='DA Ward -' />\r");
Response.Write("<meta name='copyright' content='© 2009 DA Ward, Associates'
Response.Write("<title>IE 8 Flaw master page</title>\r");
Response.Write("<style type='text/css'>\r\r");

Response.Write("<style type='text/css'>\r\r");
Response.Write("body {color:black; font-size:24px; text-align:center;
width:980px; height:600px;}\r\r");
Response.Write("<Script type='text/javascript'
Response.Write("<div style='float:left; width:980px;'>\r");
Response.Write("<div style='float:left; width:260px; padding:40px 20px;'>\r");
Response.Write("This is the server page, which sets markup and calls
something.js.<br><br>Something.js writes its own markup into the iframe on
the right.<br><br>As it's coded now, the page loads.<br><br>To freeze the
browser, uncomment the lines at the end of something.js.<br><br>If you play
around, you'll see that IE browsers accept (in something.js) an imported .js
file or a native function, but not both (without freezing).<br><br>This
behaviour has totally scuttled the site I'm working on...\r");
Response.Write("<div style='float:left; width:680px;'>\r");
Response.Write("<iframe name='somethingholder' id='somethingholder'
style='width:600px; height:350px; padding:40px;' src='dummy.htm'

Response.Write("<SCRIPT type='text/javascript'>\r");


//this is the function that writes to the iframe: call it "something.js".
Save it in the same folder as the rest.

function writesomething ()
var odoc = frames['somethingholder'].document;
odoc.write("<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
odoc.write("<html lang='en'>\r");
odoc.write("<meta http-equiv='content-type' content='text/html;
charset=UTF-8' />\r");
odoc.write("<meta name='description' content=' ' />\r");
odoc.write("<meta name='keywords' content=' ' />\r");
odoc.write("<meta name='Author' content='DA Ward -'
odoc.write("<meta name='copyright' content='© 2009 DA Ward, Associates'
odoc.write("<title>IE 8 Flaw iframe written by Jscript</title>\r");
odoc.write("<style type='text/css'>\r\r");
odoc.write("h1 {color:red; font-size:30px;}\r\r");

odoc.write("<h1>Something.js writes the content of this iFrame. Examine
it's code.<br><br>Uncomment lines to freeze IE 8 and 7.<br><br>Works fine in
Firefox, Chrome, and Safari...</h1>\r");

odoc.write("<script src='importedsomething.js'

//odoc.write("<script type='text/javascript'>\r\r");
//odoc.write("function inlinesomething () {var xxxmmm = 'foo'};\r\r");

// this is any old outside javascript file: call it "importedsomething.js"
and put it in the same folder as all the others. It is the script
referenced in the iframe.

function importedsomething ()
var somethingelse = "see, I told you...!"

//this is dummy.htm . It is the temporary content of the iFrame until
something.js refills it.

<HTML><BODY STYLE='background-color:#FFEEFF;'>
<CENTER>please wait a moment....</CENTER>

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-22-2009
DA Ward

Posts: n/a
RE: Inline with included Javascript freezes IE7 and 8

"DA Ward" wrote:

> I have a particular set of pages which is feezing both newer IE browsers and
> their debuggers (and probably the older as well).

Guys, just discovered an IE developers forum. Will cross-post there. Hope
you don't mind...
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
loss of inline autocomplete is the end Gary R. microsoft.public.internetexplorer.general 7 06-01-2009 17:35
Inline Autocomplete disabled in IE8 Peter Afonin microsoft.public.internetexplorer.general 8 05-28-2009 13:35
Editing Inline HTML Steve F. 1 05-18-2008 21:12
Vista Randomly Freezes - HJT Log Included Krs maintenance 6 04-19-2008 00:47
Viewing .jpg attachments inline =?Utf-8?B?Um9u?= 3 03-22-2007 21:34

All times are GMT +1. The time now is 00:56.

Driver Scanner - Free Scan Now is part of the Heads Network. See also , and

Design by Vjacheslav Trushkin for
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120