Actually it's wierd... can't really figure out when the window is referencable and
when it's not..
This is what does work:
win=open("javascript:void(0)","thewindow","width=400,height=400")
win.moveTo(0,0)
win.document.write("<HTML><BODY>bla</BODY></HTML>");win.document.close()
win.focus()
Now moving the window after writing to it generated an error.. but not before....
And trying to focus the window before writing in the HTML tags, also generates an
error....
now go figure ...
-----Ursprungligt meddelande-----
Från: Bart Bizon <[EMAIL PROTECTED]>
Till: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: den 4 mars 2001 22:20
Ämne: SV: [Dynapi-Dev] DynAPI layer techniques applied to windows
What probably happens is when you load a page into a new window,
the browser sees that new page as the object to reference.
It's pretty simple actually; you can't script in a page before it's referencable.
You never notice this in normal pages, since it already is referencable when you
script into it (resoved HTTP header and all that jazz).
But for a new browser window being referenced from the opener window, it's a whole
other ballpark.
Now, I'm not 100% sure that my assumptions are correct, but the wierd thing you don't
get errors when doing some things, like for instance:
win=open("javascript:void()","thewindow","width=400,height=400")
win.document.write(something);
(True, Dan, it is crappy that this does not work for every case... but hey, thems the
brakes. )
-----Ursprungligt meddelande-----
Från: Dann <[EMAIL PROTECTED]>
Till: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: den 4 mars 2001 21:06
Ämne: Re: [Dynapi-Dev] DynAPI layer techniques applied to windows
>Yeah,
>
>I do understand what you mean... my point is that a scripting language should
>not allow this kind of operation. It does not make sense in a 'scripting
>language' context. There is no room for 'uninitialized' objects in a
>scripting language... it has nothing to do with real world programming -
>there is a world of difference between real programming languages like C++,
>Java... or what the heck Delphi :) and a scripting language like Javascript.
>Of course, with the threading example you present, this kind of situation is
>possible and understandable... in Javascript environment, it doesn't make
>sense at all... as I remember correctly, a lot of keys have been pressed to
>discuss your ideas on programming, I fear we might end up in a similar
>discussion. I expect real run-time safeties in a browser scripting language
>in those situations where you access or manipulate browser objects. There is
>no room for volatile content, it makes the scripting language not workable.
>
>Any further and we would have fight it out in private :))
>
>CU,
> Dann
>
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev