Some one help me !

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

phuocle
Not Ranked
11 Posts
Points 100
By: phuocle
Posted: Sun, Jun 29 2008 12:09 PM

Hi All

I 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.

 

 

Answered (Verified) Verified Answers

Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,185
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Mon, Jun 30 2008 9:54 AM In reply to

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.

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 20 |

All Replies

Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,185
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Mon, Jun 30 2008 9:54 AM In reply to

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.

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 20 |
phuocle
Not Ranked
11 Posts
Points 100
By: phuocle
Posted: Mon, Jun 30 2008 9:38 PM In reply to

Thanks. Problem fixed.

 

 
  • Post Points: 5 |
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com