Do these Javascript statements work?

Discussion in 'Web Design and Development' started by Jas123, Sep 11, 2010.

  1. macrumors member

    if (document.form_name.parentNode == document.getElementById('name_of_id'))

    var a =
  2. Moderator emeritus


    Need more context.
  3. macrumors member

    Could I successfully determine if a particular div tag is the parent node of a particular form element with the first statement?
  4. Moderator emeritus


    Both halves of the if statement return a node element, so it should work.

Share This Page