+ 2
How can i save html data in json file.
i am creating stock management web application using JavaScript and want to save html form data in json file, can anyone help also please explain the method.
14 ответов
+ 4
@qubit, we use asp to generate html pages from server sides using a script, in .NET platform
similarly like we use jsp in java platform,
I ll suggest not to go that way, use json instead of XML if possible , parsing is so much easier, and try nodejs, since u already know JavaScript
try nodejs tutorials by The Net Ninja, videos are very short and to the point, you ll find your answers in one of those videos hopefully.
+ 7
it's generally done by a Backend program using action attribute ,
u ll need something like AJAX with some server side language , node , etc
but you can dig deeper here
https://www.xmlfiles.com/articles/saving-html-form-data-to-xml/
doubts like this makes me disappointed , and that's when I think that's it now I need to learn backend, I ll highly suggest node js
+ 4
@qubit, I ll give it a try share it👍
+ 4
you can meet me at https://sololearndevconnect.slack.com, my I'd is Morpheus
+ 4
ok, 👍other SoloLearner s hang out there too, it's a good place to connect
+ 3
You can only read xml but can't write xml using JavaScript due to client browser security concerns.
+ 3
yup, missed an s in articles , now it's there
+ 2
as @morpheus said, i also have searched this on google and visited to xmlfiles.com the previous days and i found Microsoft XMLDOM also that i need to be familiar with ASP to work with it.
+ 2
hey @morpheus, i have searched about json and also starts to implement to save form data in json using ajax to fetch data from the form and to read and write data in json using JSON.stringify() and JSON.parse() methods in json but there's an error in my programme that after the conversion of the form data into json object using stingify, only thing goes wrong at the if statement when i check for (request.readyState == 4 && request.status == 200)
but the XMLHttpRequest always has readyState = 1 and status = 0 when i do console.log(request);
i faced problems in the starting but going on my way i have resolved them all and i think this is the last problem!
can u help me?
i can send u my html and JavaScript code if u want ...
waiting for ur quick response, need help.
+ 1
i just guess that its a type of language..
make me correct if anyone knows about that!
+ 1
thank you @morpheus for the discussion and also to help me.
i will do search for them..
:-)
+ 1
@morpheus, how i be the part of the sololearndevconnect.slack.com workplace
0
please wait as i am singing in to the just installed slack.. come 2 u there