Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] getElementsByTagName not working ???
- From: kim.hoogenberg at virgil.nl (Kim Hoogenberg)
- Subject: [Javascript] getElementsByTagName not working ???
- Date: Thu Jul 21 08:36:54 2005
Further more,
Also <script src="file.js"></script> tags cause the browser to fire a
get request to the server for that file. Then the browser retrieves its
content if the file exists and then parses all javascript inside before
moving on to the next html tag on the page.
Kim
> I guess I thought - the page would load into the browser, then the
> HTML parsed into a data structure (DOM) and then the script run
> (things like document.write executed) and finally the page
> rendered/displayed.
>
> but it makes sense that it just ploughs straight into it as it
> comes... it's not a problem in the slightest, I am just surprised I
> didn't know about it until now.
>
> James
>
>
> At 14:30 21/07/2005, you wrote:
>
>> When the browser is parsing an html page and it is comming across a
>> <script> tag, it'll parse the contents immediately, because there can
>> be document.write('<span>bla</span>') like statements inside there
>> that need to be parsed at that point. So, when you need to access
>> HTML elements like the anchor you are trying, it must be parsed by
>> the browser at the time your script is fired.
>>
>> Kim
>>
>>> Hell, I didn't know you had to worry about that.....
>>>
>>> Thanks all
>>>
>>> James
>>>
>>> At 13:52 21/07/2005, you wrote:
>>>
>>>> Are you calling this *after* the page loads? Or at least after that
>>>> link exists? :-)
>>>>
>>>> --
>>>> Hassan Schroeder ----------------------------- hassan@xxxxxxxxxxxxxx
>>>> Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
>>>>
>>>> dream. code.
>>>>
>>>>
>>>> _______________________________________________
>>>> Javascript mailing list
>>>> Javascript@xxxxxxxxxx
>>>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>>
>>>
>>>
>>> _______________________________________________
>>> Javascript mailing list
>>> Javascript@xxxxxxxxxx
>>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>>
>>
>> _______________________________________________
>> Javascript mailing list
>> Javascript@xxxxxxxxxx
>> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] getElementsByTagName not working ???
- From: James
- [Javascript] getElementsByTagName not working ???
- From: Kim Hoogenberg
- [Javascript] getElementsByTagName not working ???
- From: James
- [Javascript] getElementsByTagName not working ???
- Prev by Date: [Javascript] getElementsByTagName not working ???
- Next by Date: [Javascript] JavaScript books
- Previous by thread: [Javascript] getElementsByTagName not working ???
- Next by thread: [Javascript] JavaScript books
- Index(es):