Save modification made by a ecmascript on svg file

# Mister Vanhalen (13 years ago)

Hello everyone,

I created a small program in an svg file. I can color some parts of my svg file thank to a ecmascript script. But when I save my svg after changing color in a navigator, I didn't get a modified svg.

My svg is the same as the initial. In my ecmascript I use x.setAttribute("fill", "blue").... and some other function to change the visual.

I would like to save when I modify color in a navigator (like an usual program).

  • I open my svg in a navigator
  • I change the color (through the ecmascript)
  • I save the svg in my navigator with the modifications

How can I manage the question?

Thank you for your help,

Mr

# Rick Waldron (13 years ago)

I think the SVG2 working groups are a more appropriate venue for this question, the mail list is here: www-svg at w3.org

www.w3.org/TR/SVG2

# Russell Leggett (13 years ago)

This mailing list is for discussion about the ecmascript language design itself. I actually think stackoverflow.com is your best bet for your type of question. To give you my own very brief take on it - browser save always just saves the original document it downloaded, whether html or svg. If you want to save the updated version, you would have to use JS to get it out of the DOM, and either send it to a server, or use the HMTL5 file apis.

# Mister Vanhalen (13 years ago)

Thank you very much for your answers. I thought it was possible to save data from server with ecmascript, that why I post it here. I'm gonna search through your weblinks. Thank you for your advices,

Mr