Question

In: Computer Science

upload cvs file dialog it's sub menu bar and when I click this I want to...

upload cvs file dialog

it's sub menu bar and when I click this I want to popup file dialog and select cvs file

<a href="#" id="loadCSV">Load CSV file</a>

Solutions

Expert Solution

For this you have to use javascript+ jQuery

HTML code for this is

<HTML>

<title>Uploading CSV file</title>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

<style>

#loadCSV{
text-decoration:none;
}
#CSVupload{
display:none
}

</style>

</head>

<input id="CSVupload" type="file" accept=".csv"/>
<a href="" id="loadCSV">Load CSV file</a>

<script>

$(function(){
$("#loadCSV").on('click', function(e){
e.preventDefault();
$("#CSVupload:hidden").trigger('click');
});
});

</scripts>

If any queries comment please

if any one getting problems with jQuery then use simple code without hyper link

<label>
<input type="file" id="file" accept=".csv" style="display: none;">
Load CSV File
</label>

check it out

Thank you:)


Related Solutions

c++ I want to flip the string when it's string type. For example, if it is...
c++ I want to flip the string when it's string type. For example, if it is 'apple', I would like to print 'elppa'. how can i do?
I have been trying to upload a png file I edited with the information required, the...
I have been trying to upload a png file I edited with the information required, the editor's message is " URL missing" but then I can't type in anything in that cell. Please help. 4.31 Calculate the enthalpy change or the heat of the following reactions at 298oC by using the values from Standard Enthalpies and Free Energies of formation at 298oC. Please, if you must use values form another tabulation please specify and comment. a) 2HI(g) → H2(g) +...
*Please don't answer with photos, DO NOT UPLOAD PHOTO, it's hard to read. I post this...
*Please don't answer with photos, DO NOT UPLOAD PHOTO, it's hard to read. I post this question twice, please don't answer this post if you already answer the other one, if you can answer different answer that's fine. REASON WHY I POST IT TWICE, I NEED TWO DIFFERENT VIEW. Discussion Hi All - this week you will learn about DNA - the molecule of life! You may think that protein-coding genes are the most important, but results from the Human...
It's NOT letting me upload a photo. I don't know why. Maybe you can google a...
It's NOT letting me upload a photo. I don't know why. Maybe you can google a photo? I'm sorry. Didn't think this would be such a hassle. Required Prepare a vertical analysis of both the balance sheets and income statements for 2019 and 2018.  Analysis Bal Sheet Analysis Inc Stmt  Complete this question by entering your answers in the tabs below. Prepare a vertical analysis of the balance sheets for 2019 and 2018. (Percentages may not add exactly...
hello, i need to find chi square using statsgraphic. how can i upload the excel file...
hello, i need to find chi square using statsgraphic. how can i upload the excel file here. plz help....im on my last resort here. thank you.
so i want to read in a file. just to keep it simple, the text file...
so i want to read in a file. just to keep it simple, the text file has student name and the grade, separated by a space. let's say there are 192 student's name and I want to read them in and made them into a Student /object class, which has a constructor, student(string name, int grade). individually creating them seems pain in the ass. reading in should work for any number of names. So how do I do this in...
i need a javafx code 1. first create menu bar with option open and save 2....
i need a javafx code 1. first create menu bar with option open and save 2. when user click on open it opens the file only image file 3. when user click on save it saves as new file.
For c language. I want to read a text file called input.txt for example, the file...
For c language. I want to read a text file called input.txt for example, the file has the form. 4 hello goodbye hihi goodnight where the first number indicates the n number of words while other words are separated by newlines. I want to store these words into a 2D array so I can further work on these. and there are fewer words in the word file than specified by the number in the first line of the file, then...
I made the command cp code in c language. But when I copy a file, file...
I made the command cp code in c language. But when I copy a file, file permissions are not copied equally. So I want to copy the file authority as well. What should I do? #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { struct stat st; char ch; int src, dst; if(argc != 3) { printf("argument error \n"); printf("usage: ./a.out src dest \n"); exit(0); } src = open(argv[1], O_RDONLY); if(src == -1){ perror("open...
When making aspirin I need to write the reaction, it's physical properties, and it's theoretical yield....
When making aspirin I need to write the reaction, it's physical properties, and it's theoretical yield. How do I find the theoretical yield?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT