Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gerases

    IE Mac

    You know, just a couple of minutes ago, we decided not to support that browser. That was just one of the quirks of the browser. There's many more (regular expressions for instance). I want to thank you for following up on this. It's REALLY very nice of you.
  2. gerases

    IE Mac

    Yep, assigning the element an id and using it to refer to the element works fine.
  3. gerases

    IE Mac

    Ok, after I add the row to the table, I do: alert(document.forms[0].my_name); which generates precisely this: "undefined". FF and everything else work fine. No errors.
  4. gerases

    IE Mac

    What I do in the code is create a select element and then populate it from an array. It's the populate stage where I get the error -- I get something like "undefined" whenever I try to access it.
  5. gerases

    IE Mac

    Yes, the table is inside a form. It works in all browsers but the Mac IE. elem.name doesn't do it. What's interesting is that when I do alert(myRow.innerHTML), everything looks fine. The element has the right name attribute. Here's the output of the alert: <TD><SELECT name=my_name...
  6. gerases

    IE Mac

    So it seems that the forms collection is not updated after a new element is added dynamically?
  7. gerases

    IE Mac

    Hello, I've got this pesky problem with the IE under Mac (5.1). Here's the code. var myTable = document.getElementById("tableID").getElementsByTagName("tbody")[0]; var myRow = document.createElement('TR'); var myTD = document.createElement('TD'); var elem = document.createElement('select')...
  8. gerases

    createelement / name

    Hmm, take a look at the article below. Would be curious about your thoughts. http://www.easy-reader.net/archives/2005/09/02/death-to-bad-dom-implementations/
  9. gerases

    createelement / name

    So how do I do it across browsers without sniffing? In IE it's: elem = createElement("<select name='my_name'>") In FF: elem = createElement('select'); elem.name = 'my_name' In Safari: elem = createElement('select'); elem.setAttribute('name', 'my_name'); Safari doesn't error back on elem.name =...
  10. gerases

    createelement / name

    Sorry, it did work when I created a simple case. Something within my more complicated case is messing it up, but I'll figure it out. Thanks A LOT for the tip!!!
  11. gerases

    createelement / name

    Nope, I actually tried that before I posted. The name is still missing... Did you try it in your Safari?
  12. gerases

    createelement / name

    Sorry, I was typing from my memory and forgot "document." before createElement...
  13. gerases

    createelement / name

    Weird behavior in Safari: myRow = createElement('tr'); myTD = createElement('td'); elem = createElement('select'); elem.name = 'my_name'; myTD.appendChild(elem); myRow.appendChild(myTD); alert(myRow.innerHTML) gives: <TR> <TD> <SELECT></SELECT> </TD> </TR> Bottom line, the name...
  14. gerases

    Events

    Here's a thread I found that sort of discusses what I'm talking about: http://www.codingforums.com/archive/index.php?t-10479.html A related question to my previous posts is: if "if (event)" in a function that doesn't have "event" defined produces "event undefined", then how come checking for...
  15. gerases

    Events

    You're right, I should have made my question more clear.
  16. gerases

    Events

    Yep, I know that window.event is IE only. See, I think, the problem with your version of the function is that if it's assigned within a form like so: "<INPUT type="button" onclick="enterPressed(event)">, it will work in IE because after a series of lookups in the scope chain, it will eventually...
  17. gerases

    Events

    Hello, here's a function that I have a question about: function enterPressed(e) { var charCode; if (window.event) { charCode = event.keyCode; } else { charCode = e.which; } // alert(charCode); if (charCode == 13) { return true; } else { return false; } }...
  18. gerases

    create button with createElement

    Yep, you're absolutely right. That's what I ended up doing. I tried to play with attachEvent (IE only) and addEventListener (everything but IE) and onclick worked best. Thank you!
  19. gerases

    create button with createElement

    Cool. Just tried it and it works perfectly both in IE and FF. Thank you! Your comments were extremely helpful.
  20. gerases

    create button with createElement

    No, I meant when one creates a button with createElement.

Part and Inventory Search

Back
Top