Hi AllI have a textbox and a button, a buton when click it display the contentselector modal dialog. When user click OK on this dialog, it closed and it assign the url to textbox ? Just easy, but it take me a lot of works. Please help me !I can code the OnClick in the button:string url = SiteUrls.Instance().ContentSelectorModal;SelectButton.Attributes["OnClick"] = CommunityServer.Controls.ModalHelper.BuildHandler(this.Page, url, 600, 400, "AAAAAAAAA", true);The AAAAAAAAA text I know this is a callback function. But I don't know how to write it. :(Please help me write the callback function when the modal dialog close. And it assign the url to the textbox.Thanks.
Instead of using the SiteUrl directly, I'd suggest using the static method:
SelectButton.Attributes["OnClick"] = CommunityServer.Controls.SelectContentForm.GetOpenScript("SET CONTENT SCRIPT") + "; return false;";
where SET CONTENT SCRIPT is a javascript script that will be executed with a variable called "content" containing the selected content, such as:
"alert(content);"
which would alert the source of the selected content.
Thanks. Problem fixed.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com