[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write() and <



Hey Gordon,

Check out my example at
http://www.his.com/~smithers/freq/beta/

I use the same methodology that I posted earlier.

function WriteToOutputWindow() {
 winObj=open('',mywin)
 mywin.document.write('<HTML>...')
 mywin.document.write('&lt; TABLE &gt;')
 ...
 mywin.document.close()
}

and don't ever have to call document.open() bc I call window.open.
The trouble with my output lies somewhere in the &lt; code.
If I throw a write() instead of writeln() with &gt; in it, my output is screwed.
I'm just trying to take the formatted HTML I use to write a frame in JS, and
show that HTML in an output window.

Go to my sight and click on 'show HTML' button.

Thanks again,
Andy Augustine

At 10:29 AM 2/14/96 -0800, Gordon McComb wrote:
>You don't show it, but since you have a document.close, you need to open a
>new stream in order to properly output text. This will of course delete
>anything you previously write to the document (if you don't want to do that,
>remove the document.close).  In fact, if you're not careful, you can crash
>Netscape if you close the output stream and try to write something afterward. 
>
>At 11:35 AM 2/14/96 -0500, you wrote:
>>I have a HTML tag that I want to output to a window without having it
>>parsed. (<TABLE>)
>>
>>function drawTable(tableObj) {
>> document.write('&lt;TABLE&gt;')
>> .
>> .
>> document.close()
>>}
>>
>>Should output <TABLE> and it does.  However when I call this function a
>>second time, some of the tags don't print and some very strange output
>>occurs. Any suggestion?
>
>
>