Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
carinspector  
#1 Posted : Thursday, February 8, 2007 4:45:43 AM(UTC)
carinspector

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

Alex Makhov  
#2 Posted : Thursday, February 8, 2007 2:47:28 PM(UTC)
Alex Makhov

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

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

carinspector  
#3 Posted : Friday, February 9, 2007 3:51:19 AM(UTC)
carinspector

Rank: Member

Groups: Member
Joined: 12/19/2006(UTC)
Posts: 7

I have read the documentation and have no clue how to implement this.

George Ulyanov  
#4 Posted : Friday, February 9, 2007 12:57:19 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 203

Please see User Quota Sample. It shows how to implement it.

Edited by user Monday, October 27, 2008 8:04:08 PM(UTC)  | Reason: Not specified

Best regards,

George Ulyanov

robertsinton  
#5 Posted : Sunday, February 18, 2007 1:08:43 PM(UTC)
robertsinton

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

Alex Makhov  
#6 Posted : Tuesday, February 20, 2007 1:39:15 PM(UTC)
Alex Makhov

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

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

carinspector  
#7 Posted : Tuesday, March 6, 2007 7:57:10 PM(UTC)
carinspector

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

Users browsing this topic
Guest
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.