• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

document.getElementByID() not working in IE8

 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ,
i am dynamically creating <Select> tag .. and trying to append that to my td element

so i am doing like

var cmpCtl = document.getElementById("my-td"); whre "my-td" is id of td tag

cmpCtl.appendChild(objSelect);

this doesnt work in IE8 it works in IE9 and FF ..


any clue or any other alernative ??
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have more than omen element with that same id value?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe there are some tag that are not closed, like a div or an input. some time ago I have problems with js because of it. All my code worked on Firefox and Chrome, but not in IE. I discovered that I have malformed HTML and it worked again.
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


here is my other function where i am trying to get that TD


i googled it : found related to add TBODY .. is that missing? but on firebug i can see tbody added automatically


i am trying this since last 2 days but no sucess >
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you use code tags, so the code is readable?

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya Done Eric code is dynamically creating table inside div and use case is i have options under options means like district is option based on selected district need to show city so i am trying to append city options to TD tag
unfortunately its not working in IE8 the code works fine on IE9 ..

i get reference of TD tag but .appendChild not working if i do getElementByName().appendChild it says object doesnt suport this property......



 
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic