Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] getElementsByTagName not working ???
- From: james at southspace.org (James)
- Subject: [Javascript] getElementsByTagName not working ???
- Date: Thu Jul 21 08:33:51 2005
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
- Follow-Ups:
- [Javascript] getElementsByTagName not working ???
- From: Kim Hoogenberg
- [Javascript] getElementsByTagName not working ???
- References:
- [Javascript] getElementsByTagName not working ???
- From: James
- [Javascript] getElementsByTagName not working ???
- From: Kim Hoogenberg
- [Javascript] getElementsByTagName not working ???
- Prev by Date: [Javascript] getElementsByTagName not working ???
- Next by Date: [Javascript] getElementsByTagName not working ???
- Previous by thread: [Javascript] getElementsByTagName not working ???
- Next by thread: [Javascript] getElementsByTagName not working ???
- Index(es):