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.
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...
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?
I want to retire in 40 years. When I retire, I want to withdraw $20,000 every...
I want to retire in 40 years. When I retire, I want to withdraw $20,000 every 6 months from my savings for a period of 10 years. However, at the end of years two and three in my retirement, I will need to spend $40,000 and $60,000 respectively to send my grandson to culinary school. Assuming I can earn 4% compounded semi-annually, answer the following question: How much money will I need at year 40 to fund sending my grandson...
Step 1: What Do I Want to Be When I Grow Up? What do I want...
Step 1: What Do I Want to Be When I Grow Up? What do I want to be know for? If there was one thing I would like people to remember me for, what would that be? What should my epitaph say about me? When I retire, what I would like my most important accomplishment to be? Step 2: My Personal Mission Based on the results of the self-assessment about values and the answers to the preceding questions, write your...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT