Jump to content

getElementsById help


xiownthisplacex
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...