|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/27/2005 Posts: 35
|
Is it possible to add items to the "data" object on the client side with Javascript? I know how to do it in codebehind, but sometimes we have selection values in the hosting page and would like to set those when upload is clicked.
Thanks
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
Sure. You can use the set_Data("key", "value") method on the SlickUpload/UploadConnector object. Take a look at the CustomFileName example. Will that work for you?
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/27/2005 Posts: 35
|
Yeah, this works:
kw("<%=slickUpload.ClientID %>_connector").set_Data("albumid", su_albumid);
But, I didn't see an example of this in the samples. Is that the correct way to access the UploadConnector object? Thanks for all your help!
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
If you're using the SlickUpload control, you don't have to access the UploadConnector directly -- the SlickUpload control wraps the FileSelector, FileList, UploadConnector and UploadProgressDisplay controls in one.
You should be able to do this:
kw("<%=slickUpload.ClientID %>").set_Data("albumid", su_albumid);
Does that work for you?
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/27/2005 Posts: 35
|
|
|
|
|
Guest |