In comp.lang.javascript message <45**********************@news.free.fr>,
Thu, 23 Nov 2006 02:17:34, Elegie <el****@invalid.comwrote:
>Dr J R Stockton wrote:
>>-----------------------------------------------------------------------
FAQ Topic - How do I open a new window with javascript?
-----------------------------------------------------------------------
<snip>
>Perhaps it would be worth adding to that code a minimal statement to write
into a specific element
wRef.document.getElementById("X").innerHTML = "Z" // to <p ID=X>
I would think that, by nature, a FAQ entry should address only one
topic. It is my understanding that opening a window, accessing some
other document and modifying a document structure are three different
matters, identified as such in the current version of the FAQ. Would
you use that very example for all of them? :)
Anyone wanting to open a new *empty* window is very likely to want to
write to it (wRef.document.body.innerHTML=Str does that, for me).
A recent questioner seemed to want to have a new window containing in
part standard text and in part customised text, for which the quoted
code could be used.
In general, where a number of questions are likely to occur together or
in succession, they can often better be answered together. That may
mean that, while the enlarged entry is a replacement for the original
and should inherit its position in the FAQ, it may need a new Subject
line - "How do I open and use a new window with javascript?" maybe.
ISTM that the fiction that every FAQ Section 4 entry necessarily
corresponds exactly to a specific question once asked should be
abandoned - "Opening and using a new window with javascript?". Instead,
the quasi-questions should be adapted to fit the most useful answers.
However, if Section 4 elements, such as 4.42, were deemed subdivisible
into 4.42.1, 4.42.2, ... then different subdivisions might well be used.
Several existing sub sections of could then be grouped within the
concept of "window-handling".
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk DOS 3.3, 6.20 ; WinXP.
Web <URL:http://www.merlyn.demon.co.uk/- FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demon.co.uk/batfiles.htm- also batprogs.htm.