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

Notification

Icon
Error

Options
Go to last post Go to first unread
paulmckillop  
#1 Posted : Tuesday, June 05, 2007 5:27:49 PM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Hi guys, we have just downloaded the ImageUploader Dual a few days ago and are working with a trial version with the view to integrating it into our site. One of the issues we are having is: when I call : iu.addEventListener("Progress", "ImageUploader_Progress"); I clearly cannot add any parameters in. The problem for us is that our application, on the page we wish to integrate ImageUploader, has a list of data items. Each of these items of data can be opened on the page at the same time (although most users just open one item at a time and close it), and each one could potentially have an ImageUploader open within it. I have got this much all working fine. The problem is that this is all AJAX driven, and when the ImageUploader completes, I need to perform some javascript actions, rather than reload the page. So I place these actions inside the ImageUploader_Progress(.....) function. However, for these particular actions, I need to know the id of the particular data item that was opened, in order to perform changes on it through javascript. If I don't have the id, I cannot do what I need to do. But how can I pass the id in to ImageUploader_Progress function? I wrote the contents to an alert box, of the each of the 5 arguments passed by default to each "Progress" listener function, but none of them seem to include anything I could use to hack in the id. For example, the ImageUploader object id for each data item has the data item id at the end of the id, e.g. "ImageUploader56", so if I could get this object id from within the ImageUploader_Progress function, then I could grab the data item id from the end. Any basic hack like this would do. Thanks for your time, PAUL.
Alex Makhov  
#2 Posted : Wednesday, June 06, 2007 4:36:29 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello, That is a very interesting thing to do. I see the following resolution. You have to send current Image Uploader ID as a parameter of an Action property and then return it from the upload processing script as a result page which will be available in Progress event listener in last parameter. So change your action setting code line to the following:
Code:
iu99.addParam("Action", "http://myServer/upload.aspx?ID=99");
And then you will get this parameter in your upload processing script. There is another way to add a field – use the AddField method to add ID as a field, for example:
Code:
getImageUploader("ImageUploader99").AddField("ID", "99");
Please inform me about the result, I’m interested too ;)

Edited by user Friday, February 22, 2008 5:17:47 PM(UTC)  | Reason: Not specified

Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
paulmckillop  
#3 Posted : Wednesday, June 06, 2007 5:27:37 PM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Thanks for your prompt reply Alex, that sounds workable. I'll give it a go and let you know what happens. Cheers, PAUL.
paulmckillop  
#4 Posted : Saturday, June 09, 2007 3:02:09 PM(UTC)
paulmckillop

Rank: Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 12

Alex, I tried your suggestion and it is now working perfectly. I can execute slightly different code now in the Progress event according to the id that I receive back from the StatusText parameter. I can have several of the ImageUploaders on the page at once and process each Progress event accordingly. Thank you for your time. Regards, PAUL.
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.