mardi 9 octobre 2018

Javascript/Jquery JSON File Upload

I have to create a html list with one li name import . On back i have create input type ="file" which will be hidden .

If user click on import it should fire file upload from back using .click()enter image description here.

Once the use select the .json file it can be of any name ..

enter image description here

Then On click of open button of file upload it should save the json and pass the json object with an event dispatcher . I have create event dispatcher but not able to get json

Issue : I am not able to save the json object using .onChange and also .onChange work single time then i have to refresh then it work again.

enter image description here

Requirement: On click of import button, hidden file import will fire then on selecting the json file of any name (json filem can be of any name) function will save the json object and json object will be sent using iframe using event dispatcher . Issue:: Not able to save the json or get the json . I tried getjson but it if for single file name .

Aucun commentaire:

Enregistrer un commentaire