This is an extension to the problem already posted here: [display an alert message on successfull submission of a form](https://stackoverflow.com/questions/7143986/display-an-alert-message-on-successfull-submission-of-a-form)

Another problem has arisen now. Until now I was calling this function onclick event of a "submit" button. 
But now my requirements have changed a little. Now I have to call this function by clicking a link.
The html code for that link is as shown below:

```
<a href="javascript:void(0);" onclick="javascript:customTargetReportToCSV('saveReport',0);">
    Save Report 
    <img height="16" width="16" style="vertical-align: bottom;" src="/img/icn_export.gif" alt="export">
</a>

```

And now nothing is working. The event handler attached with the `.submit()` is not getting invoked at all.