Rank: Member
Groups: Member
Joined: 12/19/2006(UTC) Posts: 7
|
Is there a way to make this a required field before uploading? Meaning that the user can not leave the form field blank. Code:<td align="left" width="770">
<form id="Form1" name="Form1">
Author: <input id="Author" type="text" size="50" value="" name="Author" />
</form>
</td>
Code://...other params...
iu.addParam("AdditionalFormName", "");
//...other params...
Thanks Edited by user Thursday, February 21, 2008 6:58:13 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
Hello, You can make a custom button which will be unavailable until the data is entered to the form fields. In button click event handler you can call Send method. Edited by user Thursday, February 21, 2008 7:00:13 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/19/2006(UTC) Posts: 7
|
I have read the documentation and have no clue how to implement this.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 7/26/2006(UTC) Posts: 203
|
|
Best regards, George Ulyanov
|
|
|
|
Rank: Member
Groups: Member
Joined: 2/18/2007(UTC) Posts: 1
|
You might like to consider using the progress function to validate the input. Here's an example I just implemented where the user needs to select one of a range of destination accounts for the images they are uploading. If they fail to choose an account before clicking upload, the upload is cancelled before the files are transferred (the user's selection of files remains in the browser, so they just have to pick an account and click Upload again). Code:<div id="UploadArea">
<p>Please select a destination account, and use the browser below to select and upload your images.</p>
<form name="UploadForm">
Destination account:
<select name="UploadAccountChoice">
<?= $upload_account_option_list ?>
</select>
<div id="AurigmaBox">
<script type="text/javascript">
function ImageUploaderProgress( Status, Progress, ValueMax, Value, StatusText ) {
if ( Status == "START" ) {
// Cancel the upload if the user has not selected a destination account.
SelectedAccount = document.UploadForm.UploadAccountChoice.value;
if ( SelectedAccount == "" ) {
alert( "You have not selected an account to upload to.\n\n" +
"The upload will be suspended.\n" +
"To continue, choose a destination account and click 'Upload' again." );
getImageUploader( "ImageUploader1" ).Stop();
}
}
// ...
}
var iu = new ImageUploaderWriter("ImageUploader1", 700, 400);
iu.addParam("Action", "aurigma_upload_handler.php");
// Disable the upload cancellation dialog.
iu.addParam("MessageUploadCancelledText", "");
iu.addParam("AdditionalFormName", "UploadForm");
iu.addEventListener("Progress", "ImageUploaderProgress");
iu.writeHtml();
</script>
</div>
</form>
</div>
Cheers, Robert Edited by user Thursday, February 21, 2008 6:57:41 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
Hello, You can also cancel the upload by returning false value in BeforeUpload event handler. Edited by user Thursday, February 21, 2008 7:03:53 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/19/2006(UTC) Posts: 7
|
I think i figured out why I can't get any of this to work....I have Aurigma Version 1.1 for Java. I think I will get newer version an try again.
thanks
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.