Jump to content

getElementsById help


xiownthisplacex

Recommended Posts

So i'm trying to edit a webpage that has this tag that i posted. But, I am having trouble identifying the element. i am using this: webiste code

<body id="tinymce" class="mceContentBody " contenteditable="true" spellcheck="false" style="padding-bottom: 50px; overflow-y: hidden; " dir="ltr">......</body>

in my javascript

function test(){var res = document.getElementById('tinymce');if (res)return true;elsereturn false;}test();

So it returns false and i can't figure out why :/ any help? thanks.

Link to comment
Share on other sites

where are calling that JS? Are you doing it after the document has loaded? You should show us where you are calling test() in your page.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...