Download file present in relative path using Jquery

How to download log file that is present within my project folder.

Below is my html and javascript code

                         label for="Inverter">LOG-FIle For</label>
      <select name="options" class="selectStyle" id="select">
		   <option>Select The Value</option>
	<option value="CUF">CUF</option>
    <option value="EFFICIENCY">EFFICIENCY</option>
    </select>
    <label for="upload">Select Date</label>		
    <input id="dateIpone" name="dateone" type="date" >
		
    <input type="submit" value="download" name="Download" class="btn btn-default customButton" onclick="download()">
      <input type="reset" name="reset" value="reset" class="btn btn-default"/>



      <script type="text/javascript">
function download()
{
  var type=	$("#select").val();
  var date = $("#dateIpone").val();
   var combine = type+date;
    var path = "logfile/"+combine+".txt"; //relative-path
    $('location').attr('href',path);
 }
 </script>

There’s no location element you could select with jQuery… did you mean something like this?

window.location.href = path

ya…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.