Check this sample,, I have used the Assetpicker code from here in some
controls with no issues.

http://msdn.microsoft.com/en-us/library/aa981226.aspx


Cheers
Ajay

On Wed, Dec 3, 2008 at 7:35 PM, Trent Allday <[EMAIL PROTECTED]>wrote:

>
>
> I add the following using RegisterClientScriptBlock which adds
>
>
>
> function launchPicker()
>
> {
>
> var url=location.protocol + "//" + location.hostname + ":" + location.port
> ;
>
> var callback=function(arr)
>
> {
>
> if(arr==null || arr==undefined)
>
> return;
>
> var site=arr[1];
>
> var list=arr[2];
>
> var
> x=document.getElementById('ctl00_m_g_5d5c3226_b2b4_440e_8699_ae0db4ddac86_TxtFolder');
> <!-- this will need to change if you change the layout -->
>
> x.value = url + site + (site == '/' ? '' : '/') + list;
>
> }
>
> LaunchPickerTreeDialog("Select
> Destination","","","",url,null,"","","/_layouts/images/Copy.gif", 0,
> callback );
>
> }
>
>
>
> Then I call
>
>
>
>         Dim rollupImage as New TextBox
>
>         rollupImage.ID = "TxtFolder"
>
>         pnl.Controls.Add(rollupImage)
>
>
>
>
>
>         newLitControl("<script type='text/javascript' language='javascript'
> src='/_layouts/1033/PickerTreeDialog.js'></script><input type='button'
> id='sendToBrowse' onclick='launchPicker();' value='...'>", pnl)
>
>
>
>
>
> There is no LaunchPickerTreeDialog in AssetPickers.js
>
>
>
> Regards,
>
>
>
> Trent Allday
>
> TAD Solutions  |  P: (03) 9018 9040 | F: (03) 9769 7561 | M: 0418 745 253
> | W: TadSolutions.com.au <http://tadsolutions.com.au/>
>
>
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of *Guljar,
> Sardar
> *Sent:* Wednesday, 3 December 2008 5:18 PM
> *To:* [email protected]
> *Subject:* RE: AssetImagePicker.aspx
>
>
>
> How did you use /_layouts/1033/PickerTreeDialog.js in your webpart? By
> using Page.RegisteredClient Script?
>
> And how you are trying now?
>
>
>
> Regards,
>
> Sardar
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of *Trent
> Allday
> *Sent:* Wednesday, 3 December 2008 5:10 PM
> *To:* [email protected]
> *Subject:* AssetImagePicker.aspx
>
> Hi Guys,
>
>
>
> I am running MOSS and I am creating a custom web part which allows the user
> to click "edit image" link which opens out of the box
> /_layouts/AssetImagePicker.aspx. Within the picker the user can select the
> image and click ok. I am trying to get the selected image back to my custom
> webpart.
>
>
>
> I have done similar before with LaunchPickerTreeDialog() using JavaScript
> (/_layouts/1033/PickerTreeDialog.js) but cant see how to use the picker js
> file – "/_layouts/1033/AssetPickers.js".
>
>
>
> If anybody has done this before or if anybody knows how to do this I would
> love to hear from them!
>
>
>
> Regards,
>
>
>
> Trent
>  ------------------------------
>
> List address: [email protected]
>
> Subscribe: [EMAIL PROTECTED]
>
> Unsubscribe: [EMAIL PROTECTED]
>
> Further instructions: http://www.codify.com/lists/ozmoss
>
>
>  ------------------------------
>
> "This email (including any attachments) is confidential. If you are not the
> intended recipient you must not copy, use, disclose, distribute or rely on
> the information contained in it. If you have received this email in error,
> please notify the sender immediately by reply email and delete the email
> from your system. Confidentiality and legal privilege attached to this
> communication are not waived or lost by reason of mistaken delivery to you.
> Lend Lease does not guarantee that this email or the attachment(s) are
> unaffected by computer virus, corruption or other defects. Lend Lease may
> monitor incoming and outgoing emails for compliance with its Email Policy.
> Please note that our servers may not be located in your country."
>  ------------------------------
>
> List address: [email protected]
>
> Subscribe: [EMAIL PROTECTED]
>
> Unsubscribe: [EMAIL PROTECTED]
>
> Further instructions: http://www.codify.com/lists/ozmoss
>   ------------------------------
> List address: [email protected]
> Subscribe: [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> Further instructions: http://www.codify.com/lists/ozmoss
>
List address: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
Further instructions: http://www.codify.com/lists/ozmoss

Reply via email to