dcsimg
Results 1 to 3 of 3

Thread: "Document.value" ERROR in IE11

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2013
    Location
    Spain
    Posts
    44

    "Document.value" ERROR in IE11

    Hi everyone, I'm having issues with thit piece of code:

    Code:
    if (document.bandform.bandmail.value.length==0){ 
    		 document.getElementById('bandmaillabel').style.color = "red";
    		 document.bandform.bandmail.focus()
          	 return false; 
       	}
    This works in all the browsers, except IE11, I've run the debugger in IE11 and I got this: ""Unable to obtain the property 'value', null reference or not defined".

    Why? Thanks so much.

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,606

    Re: "Document.value" ERROR in IE11

    How is your <form> tag defined? Do you have both the id and name attributes for it?

    http://stackoverflow.com/questions/7...e-is-undefined
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2013
    Location
    Spain
    Posts
    44

    Re: "Document.value" ERROR in IE11

    Quote Originally Posted by tr333 View Post
    How is your <form> tag defined? Do you have both the id and name attributes for it?

    http://stackoverflow.com/questions/7...e-is-undefined
    Thanks for answering! I found the problem, the ID and NAME tags had the same value and IE took the ID value instead of taking the NAME, so It returned a Null. But I still don't know why only IE returned Null, all other browsers worked fine.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width