Aurigma Forums
»
Legacy Products
»
Archive
»
Image Uploader
»
Adding a new field (or updating a field's content)
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?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello,
Please post your code in order we checked it. |
Best regards, Fedor Skvortsov
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 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
|
|
|
|
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 |
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Image Uploader
»
Adding a new field (or updating a field's content)
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.