following html coding are for the file uploading. I have a function which i want to write in jQuery style.
<form method="post" action="upload">
<input type="file" id ="file_upload_id"/>
<input type="submit" id= "dont_click" />
<input type ="button" id ="only_click_me" onClick="clickme();"/>
</form>
<script type="text/javascript">
function clickme(){
document.getElementID("file_upload_id").click(); //
document.getElementbyID("file_upload_id").onChange = function() {
document.getElementById('dont_click').click()
};
}
</script>
This is how i want to convert the lines of coding :
$(function(){
$("#file_upload_id").click(function() {
onChange : function(){
$("#dont_click").click();
}
});
});
Like that,