Thanks, I will try that.
On Sep 11, 4:09 am, Alex Weber <[EMAIL PROTECTED]> wrote: > check this thread > out:http://groups.google.com/group/jquery-en/browse_thread/thread/f427781... > > its mainly about loading multiple libraries but the concept of > appending elements to the DOM vs using document.write() might work for > you :) > > On Sep 10, 4:39 pm, henry <[EMAIL PROTECTED]> wrote: > > > I have a problem with IE (6 & 7) when I have something like this: > > > <script type="text/javascript" src="http://domain.com/ > > generateCode.php"></script> > > > and the server returns HTML and JS in place using document.write(), > > such as: > > > <script type="text/javascript"> > > document.write(' > > <div id="x">TESTING</div> > > <script type="text/javascript" src="http://domain2.com/ > > jquery.js"></script> > > <script type="text/javascript"> > > $().ready({ > > $('#x').css("color:red"); > > }); > > ); > > </script> > > > IE6 & IE7 would give me script error, Error: Object expected. But FF > > is fine. > > > I found 2 solutions, > > > a.) use defer="true" > > <script type="text/javascript" src="http://domain.com/ > > generateCode.php" defer="true"></script> > > > b.) server returns JS that use window.onload instead of $().ready() > > > Are there any other solutions? > > > Thank you