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

Rad Prompt Help

2 Answers 83 Views
Window
This is a migrated thread and some comments may be shown as answers.
Eric Penetar
Top achievements
Rank 1
Eric Penetar asked on 18 Jul 2008, 03:37 PM
I have read through the documentation for the rad prompt and am wondering if there is any way to get the object specified in the call to rad prompt out?

For example, here is the function declaration from the documentation:
radprompt(text, callBackFn, oWidth, oHeight, callerObj, oTitle, defaultValue)

Can I get the callerObj information anyway inside of the call back function? I see the callback function only takes 1 argument, which is what the user types in.

We want to do this so that when the user clicks on a data grid cell, the data inside of that cell is passed to the javascript function, along with what the user entered in, so we can save this cell to a database with the specified name type in by the user.

Thanks

Eric

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 21 Jul 2008, 11:13 AM
Hi Eric,

I suggest to define the radprompt's callback function in the function which calls the prompt dialog as shown below:

function CallPrompt()  
        {  
            var callerObject = "test";  
                function callBackFn(arg)  
            {  
                if(arg)  
                  {  
                    alert(callerObject);  
                  }  
            }  
       
           radprompt('text', callBackFn, 400, 400, callerObject, 'Title''defaultValue');  
        } 


Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Eric Penetar
Top achievements
Rank 1
answered on 21 Jul 2008, 12:50 PM
great, that works. Thanks.

Eric
Tags
Window
Asked by
Eric Penetar
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Eric Penetar
Top achievements
Rank 1
Share this question
or