Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

the JS statement document.getElementsByName("PME_data_myfield").item(0).outerHTML=""; is not executed in FF, it works on all other browsers

  • 1 antwoord
  • 10 hebben dit probleem
  • 4 weergaven
  • Laatste antwoord van cor-el

more options

I am trying to remove an input element from a form with the above statement in a javascript. It works on all other browsers but not on FF. It does not generate an error either. Instead of removing the item it just seems to be ignoring the statement.

I remove the element with the above statement and then re create a new one with document.createElement. In FF it duplicates the element.

I am trying to remove an input element from a form with the above statement in a javascript. It works on all other browsers but not on FF. It does not generate an error either. Instead of removing the item it just seems to be ignoring the statement. I remove the element with the above statement and then re create a new one with document.createElement. In FF it duplicates the element.

Alle antwoorden (1)

more options

Firefox only supports innerHTML and not outerHTML, so you need to use other code for Firefox.

See e.g.:

Bewerkt door cor-el op