So, I have created a popup here to load an external JSON file from the system. I want to store that JSON file into one variable in the javascript file. how to achieve this using jquery or javascript?
/* Style this however you like */
#input-file-replacer {
padding: 3px 5px;
border: 1px solid #ccc;
border-radius: 3px;
background: #ddd;
color: #333;
cursor: pointer;
}
<label>
<input type="file" name="input-name" style="display: none;" />
<span id="input-file-replacer">Select file</span>
</label>