How to get Cancel button click event in Javascript?

Mar 5, 2010 at 3:21 PM

Hi all

How can I get the cancel button click event in javascript? Because of the possible file status value (Flajaxian.File_Cancelled = 4) I was supposed to get it in the FileStateChanged event, but the only status I got within this event are 2 and 3 (Flajaxian.File_Uploading and Flajaxian.File_Uploaded).

Any thoughts?

<script type="text/javascript">

    function FileStateChanged(uploader, file, httpStatus, isLast) {
        Flajaxian.fileStateChanged(uploader, file, httpStatus, isLast);
        document.getElementById('status').value += "\nNew Status: " + file.state;

     <textarea id="status" rows="10">Status</textarea>
     <fjx:FileUploader ID="FileUploader1" runat="server"
                          JsFunc_FileStateChanged="FileStateChanged" />

Sep 22, 2010 at 11:13 PM
Edited Sep 22, 2010 at 11:57 PM

Did you ever solve this issue, esmlima?

I'm having the same issue, and also can't get it to fire events for 1 either (Flajaxian.Selected, supposed to fire when you select a file).  I can work around the file selected event problem with something like this:

function GenerateFileRow(uploader, row, container) {
	Flajaxian.generateFileRow(uploader, row, container);

Be sure to set that up on the component though, via the JsFunc_GenerateFileRow attribute.

Unfortunately I still see no way to get notification for the Cancel button being clicked.  We also may be missing out on Flajaxian.Error (5), since I don't know what causes that state to to be thrown.