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

Image Editor Customization

2 Answers 50 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Amr Saafan
Top achievements
Rank 2
Amr Saafan asked on 22 Apr 2010, 08:05 PM
Hello,
I know how to customize the Image Editor but I have another problem with it.
I added a button to the Image Editor that open a popup window using the following Javascript code:
function popWin() { 
            window.open("Directories.aspx""""width=300,height=300,location=1,status=1,scrollbars=1"); 
            return false
        } 
in the Directories.aspx page the following Javascript function:
function onNodeClicking(sender, args) 
    { 
        var node = args.get_node(); // You get the root node   
        var s = node.get_text(); // text of the root node   
        var currentObject = node.get_parent(); // here node.get_parent() returns treeview        
        while (currentObject != null) { 
 
            if (currentObject.get_parent() != null// here get_parent() will return null for treeview, thus if condition  
            //is not satisfied   
            { 
                s = currentObject.get_text() + "/" + s; // not entered    
            } 
            currentObject = currentObject.get_parent(); // returns null which takes us out of while loop   
        } 
 
        var tbPath = s; // returns the root node text   
 
        window.opener.parent.Form1['NewImageName'].value = tbPath; 
        window.close(); 
    } 
"NewImageName" is the Id of the Textbox that display the name of the new image.
this code is working but in this situation it didn't work.
I need to know how to get the NewImageName textbox.

Thank you.


2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 23 Apr 2010, 02:45 PM
Hi Amr,

I was able to get a reference to the NewImageName input from the child dialog using this line:

window.opener.document.getElementById('NewImageName').value = "test";


All the best,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Amr Saafan
Top achievements
Rank 2
answered on 23 Apr 2010, 02:50 PM
It is working, thank you for your help.
Tags
Editor
Asked by
Amr Saafan
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Amr Saafan
Top achievements
Rank 2
Share this question
or