Results 1 to 2 of 2

Thread: appendchild() IE vs Firefox

  1. #1
    Join Date
    Nov 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default appendchild() IE vs Firefox

    I'm having an issue with IE and Firefox being compatible...

    myEle.text is not being passed to IE but is to Firefox

    myEle = document.createElement("select") ;
    myEle = document.createElement("option") ;
    myEle.value = 0 ;
    myEle.text = "[------- SELECT ITEM -------]" ;
    controlToPopulate.appendChild(myEle)


    Any ideas?
    Last edited by no1uknow; 11-08-2005 at 03:35 PM.

  2. #2
    Join Date
    Nov 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK I figured this out....

    you have to createTextNode and do some appending...
    Interesting...

    myEle=document.createElement("option");
    theText=document.createTextNode("[------- SELECT ITEM -------]");
    myEle.appendChild(theText);
    myEle.setAttribute("value","0");
    controlToPopulate.appendChild(myEle);

Bookmarks

Posting Permissions

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