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

Notification

Icon
Error

Options
Go to last post Go to first unread
captain_torche  
#1 Posted : Wednesday, May 03, 2006 5:46:15 PM(UTC)
captain_torche

Rank: Member

Groups: Member
Joined: 5/3/2006(UTC)
Posts: 4

Hello everybody.
I'm experiencing a little problem with the imageUploader.
I'd like to update a form field, when pressing the 'cancel' button, in order to make a possible recovery of the upload.
I succeed to catch the event, and update the field, but the information is not available in the action page when I press the submit button (It's still the old value).

I tried to update an existing field, and to create a new field (with addField), but in both ways I can't catch the value.

I guess it's because the applet processes the additional forms and fields when loading, but is there a way to force it without making it reload?
Fedor  
#2 Posted : Wednesday, May 03, 2006 10:29:16 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,537

Thanks: 4 times
Was thanked: 56 time(s) in 55 post(s)
Hello,

Please post your code in order we checked it.
Best regards,
Fedor Skvortsov
captain_torche  
#3 Posted : Wednesday, May 03, 2006 10:58:25 PM(UTC)
captain_torche

Rank: Member

Groups: Member
Joined: 5/3/2006(UTC)
Posts: 4

The code is very long, so i'll post the reader's digest version ;)

Chronologically :
In the ImageUploader_Progress function (which works perfectly), I added these lines :
Code:
if(Status == 'CANCEL') {
	var remaining = getImageUploader("ImageUploader").getUploadFileCount();
	if(remaining  < total)
		getImageUploader("ImageUploader").AddField('action_to_do', 'add');
}

While pressing the Cancel button, I can catch the values (verified with a alert()).

I also tried to update an existing field's value :
Code:
if(remaining  < total) {
     var field = document.getElementById('action');
     field.value = 'add';
}


Both of these methods won't work.

The applet is loaded in the JavaScript code, just below the ImageUploader_Progress() function, like this :
Code:
var iu = new ImageUploaderWriter("ImageUploader", 760, 500);
[...]
iu.writeHtml();

Edited by user Monday, February 18, 2008 2:46:56 PM(UTC)  | Reason: Not specified

Fedor  
#4 Posted : Sunday, May 07, 2006 11:17:40 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,537

Thanks: 4 times
Was thanked: 56 time(s) in 55 post(s)
I am sorry for delay. We are checking this problem and I it will be fixed in upcoming Image Uploader 4.0. It should be available already on this week.
Best regards,
Fedor Skvortsov
Alex Makhov  
#5 Posted : Tuesday, May 09, 2006 8:28:02 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Try to check if the method AddFileld is called. Add the message showing line to your code because it looks like AddField method is never called.

Code:
if(Status == 'CANCEL') {
  var remaining = getImageUploader("ImageUploader").getUploadFileCount();
  if(remaining  < total){
    alert('I am here');
    getImageUploader("ImageUploader").AddField('action_to_do', 'add');
  }
}

Edited by user Monday, February 18, 2008 2:47:20 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.