This is a migrated thread and some comments may be shown as answers.

ImageManager script and server side action

3 Answers 36 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 16 Dec 2008, 04:07 PM
Hi,

I have many problems to build my ImageManager and make one Button_Click server side in the same action. To lauch the Image Manager I use one classical javascript like :

<script type="text/javascript">  
    var currentTextBoxID;    
    function ImageManagerFunction(sender, args)    
    {    
        var selectedItem = args.SelectedItem;    
        var resultImageObject = args.Result;    
            
        var txt = $get(currentTextBoxID);    
        txt.value = selectedItem.getPath();    
    }            
    </script> 
 
    <asp:TextBox ID="Linkthumb4" runat="server"></asp:TextBox> 
    <telerik:dialogopener runat="server" id="DialogOpener1" >    
    </telerik:dialogopener> 
    <button onclick="currentTextBoxID='<%= Linkthumb4.ClientID %>';$find('<%= DialogOpener1.ClientID %>').open('ImageManager');return false;">Select</button>   
  

And the constructor server side. My problem is that I need to lauch another action server side with the button_Click event. I have tried changing the single button to one asp:button runat server and add the javascript with one attributes.add, but in this case the "<%= %>" are not well interpreted.

<

 

asp:Button ID="Action" runat="server" Text="Select" Width="60px"/>

 

script.
in addition..
function

 

lauch()

 

{

currentTextBoxID=$get(

'Linkthumb4'); NO working well to search the Linkthumb4.Client ID

 

$find($get(

'DialogOpener1')).open('ImageManager');  NO working well get DialogOpener1.ClientID

 

}

codebehind

Action.Attributes.Add(

"onClick", "lauch();return false;"); added server side to add after my code
...mycode

Someone have one solution to build completly this ImageManager server side or to attach one complementary action server side to asp:button without postback event.

Thanks.

 

3 Answers, 1 is accepted

Sort by
0
Nikolay Raykov
Telerik team
answered on 19 Dec 2008, 04:07 PM
Hi Pierre,

I am not exactly sure what you are trying to achieve. Could you give us more information about your scenario.

For more information about how to use the Image Manager outside the editor, please check the following KB article - I believe it will be of help:

http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx

All the best,
Nikolay Raykov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pierre
Top achievements
Rank 1
answered on 19 Dec 2008, 07:43 PM
Hi Nikolay,

I use now many time ImageManagerStand alone with full success. My current problem is when I need to launch complementary action linked to the same button that is used to build the ImageManager. Actually is very difficult to work with, because many times I need to link more information server side like user folders definitions. If this information is know at page load, is ok, but if this folder information is captured during postbacks or click events the ImageManager can not be reinstantiate easily. I have tried to instantiate the ImageManager during !IsPostBack or IsPostBack, but others events in my pages generate errors when causes more postback like radUpload. Finally I need to manage many complementary items like Sessions or cookies to keep the information that can be easier make if ImageManager is build server side or during the Click events.

Regards  
0
Nikolay Raykov
Telerik team
answered on 22 Dec 2008, 03:17 PM
Hello Pierre,

Could you, please, open a support ticket and send us a sample version of you project with detailed information about your scenario? We will look into it and provide you with an appropriate solution.

Regards,
Nikolay Raykov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Pierre
Top achievements
Rank 1
Answers by
Nikolay Raykov
Telerik team
Pierre
Top achievements
Rank 1
Share this question
or