2 Replies - 583 Views - Last Post: 17 March 2011 - 03:39 AM

#1 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 148
  • View blog
  • Posts: 831
  • Joined: 26-May 10

IE Only Error

Posted 17 March 2011 - 12:12 AM

So in IE only I'm getting the error "Object doesn't support this property or method" for the following line:

info_fname = document.getElementById('info_fname').value;


I'm assuming it's saying that info_fname doesn't have a 'value' attribute. Info_fname is the id of a text type input tag, which obviously does have a value property. Can someone tell me what is causing this error?

Is This A Good Question/Topic? 0
  • +

Replies To: IE Only Error

#2 nkasei28  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 93
  • Joined: 10-May 09

Re: IE Only Error

Posted 17 March 2011 - 03:28 AM

Try something like this:
  
  var inputText=document.getElementById('info_fname');
   var info_fname=inputText.value;

   alert(info_fname);



Looks like the same thing with yours but try it. it might work
Was This Post Helpful? 1
  • +
  • -

#3 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 148
  • View blog
  • Posts: 831
  • Joined: 26-May 10

Re: IE Only Error

Posted 17 March 2011 - 03:39 AM

Thank you very much. I didn't need to split them up like you did, but you reminded me that I wasn't using the 'var' keyword to declare these variables. I feel kind of silly now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1