469,308 Members | 2,691 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,308 developers. It's quick & easy.

object required? But object is found...

27
Hi,

I have the following jscript function :

Expand|Select|Wrap|Line Numbers
  1. function wait()
  2.   {
  3.         var obj;
  4.      document.body.style.cursor = 'wait';
  5.      obj = getElementById("contenuForm");
  6.      obj.style.cursor = 'wait';  
  7.      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
  8.      function EndRequestHandler(sender, args){
  9.          document.body.style.cursor = 'auto';
  10.      }
  11.  
  12.   }
but i get an error on the bold line. Object requested. Is it a syntax error or is my getElementById cannot return the element?
Nov 19 '07 #1
3 969
gits
5,390 Expert Mod 4TB
hi ...

you should use:

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('your_id');
kind regards
Nov 19 '07 #2
phfle1
27
Thanks for the fast response
Nov 19 '07 #3
gits
5,390 Expert Mod 4TB
does it work now ? :)
Nov 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.