Re: [OT] Re: Javascript problem

2008-02-11 Thread Pablo Vázquez Blázquez
Hi Jeromy, Thanks for your explanation. Now, my problem has a reason. Well, you say "The S2 implementation executes the scripts at the end of parsing, not as each script tag is encountered". At the end of parsing is before inserting html into the DOM, isn´t it? So, if it is so, that's my prob

Re: [OT] Re: Javascript problem

2008-02-11 Thread Laurie Harper
addOnLoad() should cause the function to be executed as soon as the DOM is complete, which may be before the page has finished loading and rendering. However, since the DOM will be fully constructed, getElementById() should work properly at that point. I'd go with Dave's advice and confirm that

Re: [OT] Re: Javascript problem

2008-02-11 Thread Pablo Vázquez Blázquez
If I use a hidden iframe to do the same, it works. I didn´t put the script tag in the . I don´t understand why I should do it... I´m using Tiles and my header is reused in several pages, and this script is only valid for few ones. Thanks. Dave Newton escribió: --- Pablo Vázquez Blázquez <[EMA

Re: [OT] Re: Javascript problem

2008-02-11 Thread Dave Newton
--- Pablo Vázquez Blázquez <[EMAIL PROTECTED]> wrote: > > function init() { > alert(document.getElementById('name[0]')); > } > > dojo.addOnLoad(init); > > > It is the same as: > > > alert(document.getElementById('name[0]')); > > > It is executed before the pag

Re: [OT] Re: Javascript problem

2008-02-11 Thread Lukasz Lenart
Did you put such code inside page header's tags? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [OT] Re: Javascript problem

2008-02-11 Thread Pablo Vázquez Blázquez
function init() { alert(document.getElementById('name[0]')); } dojo.addOnLoad(init);


It is the same as:


   alert(document.getElementById('name[0]'));


It is executed before the page loads.

Dave Newton escribió:

--- P