Click to See Complete Forum and Search --> : create window and then open(parsing issue)


eewald
05-08-2003, 11:41 AM
I have an include file that contains an applet.

I am calling window.open to open a new window.

then document.write to populate it with my include file reference so it calls

I'll use psuedocode to try and illustrate

window.open
then document.write("<script src="includefile"/>")
then close

The problem is that it doesnt see the applet the way it is parsed. I believe this is because the window is opened and then written to. Is there a way to write text to a document and then open it as a new window.

AdamGundry
05-08-2003, 11:47 AM
By "applet", do you mean a Java applet or a Javascript script? They are different languages.

I assume you are escaping quotes correctly, i.e
document.write("<script src=\"includefile\"/>");

Could you create a HTML page to load in the window, instead of dynamically generating the code?

Adam

eewald
05-08-2003, 12:17 PM
That was quick.. thanks!

I mean java applet, I'm dynamically writing the applet tags.

sorry I should have said why I can't create an html page to load. I have to use document.write to assign a token string inside the created html. Its generated dynamically so I can't have it hard coded in the html.. and it also has to be there before that include executes so I can't add it after I open the html. So I'm left with either not using the include(it works when I do this but Id rather not) or figure out a way to write a document and then launch it as a window.

Am i sol? Thanks for taking the time to read!

AdamGundry
05-08-2003, 01:40 PM
Could you create a HTML document to open in the window, and pass the token string on the URL. You could then read the token string in the new window page and use document.write() to include it there?

Adam