Can a newly created element not be accessed by existing code

Can a newly created element not be accessed by existing code

See: http://forums.wuggawoo.co.uk/test.html

For some reason, button#updatePost or a#test (removed it now) can be referenced after being created.

Any help?