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

radajaxmanager

5 Answers 23 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Webster Velasco
Top achievements
Rank 2
Webster Velasco asked on 25 Feb 2010, 02:48 PM
hi

i want to fire a click event of a button from code behind w/o making a post back using radajaxmanager..

here is what i want to do:

from my master page i open a pop up

then the pop up window on close will register some session which i want to retrieve..

at pop up close i want to fire the btn click event

w/o making post back

is thath possible?.

cn u provide me the code plz?

thanks in advance

regards
webster

5 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 25 Feb 2010, 03:24 PM
Hi Webster,

You can handle the window OnClientClose client-side event and there invoke the button click:

function OnClientClose(sender, eventArgs)
{
    $get("<%= MyButton.ClientID %>").click();
}

Another option is to use the _doPostBack() client method.

Sincerely yours,
Iana
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
Webster Velasco
Top achievements
Rank 2
answered on 26 Feb 2010, 01:16 PM
this will prevent postback?
0
Iana Tsolova
Telerik team
answered on 26 Feb 2010, 03:49 PM
Hello Webster,

This will fire the Button click event. As far as I understood from your description, this is what you wanted, to fire a Button click event on popup close, right?

All the best,
Iana
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
Webster Velasco
Top achievements
Rank 2
answered on 26 Feb 2010, 05:08 PM
yes but when the page do post back i loose the value of my textbox(which is in read only) that i get from this function:
         function OnClientClose(sender, args) { 
                //var arg = eventArgs.split("|") 
                 
                //alert("chiudo"); 
                // valori: 
                // 0 --> NomeSP 
                // 1 --> Codice Ritorno 
                // 2 --> Descrizione Ritorno 
                // 3 --> Quale Controllo da Valorizzare 
                 
                var arg = args.get_argument(); 
                var QualeControllo;  
                var QualeLabel; 
                                 
                if(arg != null){ 
                    var oArg = arg.Oggetto.split("|"); 
                    switch  (oArg[3]) 
                    { 
                        case "txtCOMUNE": 
                            QualeControllo = document.getElementById("<%= txtCOMUNE.ClientID %>"); 
                            QualeLabel = document.getElementById("<%= COMUNE_Descr.ClientID %>"); 
                            break; 
                        case "txtCOMUNENASCITA": 
                            QualeControllo = document.getElementById("<%= txtCOMUNENASCITA.ClientID %>"); 
                            QualeLabel = document.getElementById("<%= COMUNENASCITA_Descr.ClientID %>"); 
                            break; 
                    }    
                     
                    QualeControllo.value = oArg[1]; 
                    QualeLabel.value = oArg[2]; 
                    
                } 
            }  

0
Iana Tsolova
Telerik team
answered on 01 Mar 2010, 04:08 PM
Hi Webster,

Could you please send us a runnable sample illustrating your scenario and the issues you are facing? You can try opening a formal support ticket where you can attach the project files.
I could then debug it locally and find a proper resolution for you. Otherwise it would hard to determine the source of the problem based on the provided information.

Looking forward your reply,
Iana
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.
Tags
Ajax
Asked by
Webster Velasco
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Webster Velasco
Top achievements
Rank 2
Share this question
or