Delimiters appear to be wrong in sample code. On Tue, Aug 11, 2009 at 11:18 AM, James <james.gp....@gmail.com> wrote:
> > Have you tried hard-coding the frameset HTML in the source (not via > Javascript) to see if the page shows up properly? > > Also, try using Firebug for Firefox to debug. With Firebug you can > view the HTML as it is even with content dynamically added after page > load. > > On Aug 10, 11:31 pm, cokegen <coke...@gmail.com> wrote: > > Hi, I'm trying to output a frameset and I tried everything but can't > > get it to work. The frameset never appears in the generated html. > > > > The html and js code is the following: > > > > index.html > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml"> > > <head> > > <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/ > > jquery.min.js" type="text/javascript"></script> > > <script src="scripts.js" type="text/javascript"></script> > > <meta http-equiv="Content-Type" content="text/html; > charset=utf-8" /> > > <title>my page</title> > > </head> > > </html> > > > > scripts.js > > > > $(function() { > > > > $('html').append('<frameset cols="*,31"><frame > src="mainframe.html" / > > > > ><frame src="otherframe.html" /></frameset>'); > > }); > > > > I tried different combinations of prepend(), before(), etc but it's > > the same. I suspect that the frameset should be written before the DOM > > is loaded, but I don't know if it's that or that I basically don't > > understand anything at all :-( > > > > Could someone point me in the right direction ? > > > > Thanks in advance