Click here to Skip to main content
15,922,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In Button OnClientClicked am calling simple jquery following, for conformation message from user. If user press yes then it should do button click event, but it is not doing.

My java script Code:


JavaScript
function OnClientClicked_CheckConfirm(button, args) 
{
    var objhidConfirmMessage = document.getElementById(hidConfirmMessage);
    var objhidConfirmOKBtnText = document.getElementById(hidConfirmOKBtnText);
    var objhidConfirmCANCELBtnText = document.getElementById(hidConfirmCANCELBtnText);
    if (objhidConfirmMessage != null) 
    {
        button.set_autoPostBack(false);
        jConfirm(objhidConfirmMessage.value, 'Confirmation Dialog', objhidConfirmOKBtnText.value, objhidConfirmCANCELBtnText.value, function (r) {
            if (r) {
                __doPostBack(button.get_id(), "");
                blnConfirm = true;
            }
        });
    }


button source code

XML
<telerik:RadButton ID="tlkBtnQuickFormatCaptureDrive" runat="server" SkinID="btnGeneral"
                            OnClientLoad="OnClientLoad_HideTlkBtnToolTip" OnClientClicked="OnClientClicked_CheckConfirm" OnClick="OntlkBtnQuickFormatCaptureDrive_Click">
                            </telerik:RadButton>


Am I missing any thing in __doPostBack().

Needs to call button click event in pageload().

please help me.
Posted

use the attribute AutoPostBack="true"
 
Share this answer
 
just set AutopostBack=true..i think thats the reason your code is not working..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900