I tryed it and it still doesn't work.

I think the problem, is after da instruction:
main.document.close();

When I trie to access main.document.getElementById('t').value, it doesnt
exists yet.

I've put an alert before this last instuction.
On IE, Netscape and Opera all the HTML is written (and visible on the
browser), so the instruction "main.document.t.value="t"" works.

But on Mozilla, at the alert break, no html is visible. And the instruction
main.document.getElementById('t').value="t" isn't executed. Probably because
the var isn't defined. And this I can't understand why.


Can you help me?
Fred

<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ian Thomas wrote:
>
> > Fred Figueiredo wrote:
> >
> >> After this I call a funcion that does:
> >> ....
> >> main.document.t.value="hello";
> >> ...
> >
> >
> > Is t an element (ie using document.all)? If so, you should be doing
> > main.document.getElementById('t').value="hello";
> >
> > Ian
> >
>
> He didn't give the <input> tag an id.  He only gave it a name.
> Try using main.document.write('<input type=text name="t" id="t">');
> and then use document.getElementById('t') and it should work.
>



Reply via email to