<div id="CSV"
<li style="width: 100%; float: left; clear: left;">
<input onclick="go('CSV')" type="button"
value="Download in CSV Format" />
</li>
</div>
Trying to download the file by using the onclick function. I have tried the following code, it executes but doesn't download the file.
Set x = ie.document.getElementById("CSV")
x.Click
Also x.onclick gives error and x.FireEvent "onclick" also doesn't work. Please help.

'CSV'is the ID of the parent element (the div) that houses the input element. You need to target the<input>tag - not the<div>tagGetElementsByTagName("input");) - That will return aCollectionobject though of all<input>elements so you will have to loop through and test the properties of each one to get the one you want. Then you can use the.Clickmethod.