Jump to content

JesuZ

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JesuZ's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah, I'm not refreshing page... But when I've input-fields in my element, with some values, that I've wrote in them... And I notice that hey, I need another field for more information, and press button to add new field, yeah, it will add there new field, but in same time, all earlier fields turn empty, and I'll have to write values in again.
  2. Added this in other (old solved) topic. There you see my current script...
  3. Hello, I found nice way to add stuff in element innerHTML, but when I'm adding stuff in there, it clears everytime fields in it... Is there way to update innerHTML, without losing data in fields? Thanks for help.
  4. Hello, I'm new face in here... Found this topic via Google, and this helped me kind of lot... I've kind of code where should add new fields by clicking button, for sending more information to php-script. <div id="areas"> <p>Tiles between: <input name="minValues[]" type="text" id="min" size="5" /> - <input name="maxValues[]" type="text" id="max" size="5" /></p> </div> Using script below for onClick-action function addRow() { var elem = document.getElementById('areas'); var newText = '<p>\nTiles between:\n<input name="minValues[]" type="text" id="min" size="5" /> - <input name="maxValues[]" type="text" id="max" size="5" />\n</p>\n'; elem.innerHTML += newText; } I've little problem, that if I've already entered some values to old fields, and add a new one, all click will clear all older fields values also. How might I could avoid that?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.