Click here to Skip to main content
15,913,941 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Delete row not working Pin
Not Active3-Apr-12 2:09
mentorNot Active3-Apr-12 2:09 
QuestionCalling jquery method from another jquery method Pin
indian1432-Apr-12 15:08
indian1432-Apr-12 15:08 
AnswerRe: Calling jquery method from another jquery method Pin
Not Active2-Apr-12 15:57
mentorNot Active2-Apr-12 15:57 
GeneralRe: Calling jquery method from another jquery method Pin
indian1433-Apr-12 5:54
indian1433-Apr-12 5:54 
GeneralRe: Calling jquery method from another jquery method Pin
Not Active3-Apr-12 6:38
mentorNot Active3-Apr-12 6:38 
GeneralRe: Calling jquery method from another jquery method Pin
indian1433-Apr-12 6:58
indian1433-Apr-12 6:58 
AnswerRe: Calling jquery method from another jquery method Pin
jkirkerx3-Apr-12 14:21
professionaljkirkerx3-Apr-12 14:21 
AnswerRe: Calling jquery method from another jquery method Pin
jkirkerx3-May-12 9:01
professionaljkirkerx3-May-12 9:01 
Your current problems date back to this post.

Technically, Advanced JQuery does not require the use of an update panel. With advanced jquery, you just make small ajax json calls to a web service, that duplicates the behavior of the update panel.

[LESSON]
The update panel has nothing to do with the AjaxControlToolkit. It is a member of System.Web.Extensions. It's purpose is to make small partial postbacks to the server, of the contents of it's container.

To use the update panel correctly, you should create the update panel, and wrap the contents of the panel inside div tags, the update panel is the content container.

[ JQUERY inside a update panel ]

Your JQuery Code that you posted is not correct.

First you have to wait for the DOM
Now get the instance of the PageRequestManager, and assign a EndRequestHandler
Now you bind your functions to the EndRequestHandler

Then List your functions after that.

They will fire correctly now.

C#
$(document).ready(function () {
    initiateBinding();

    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

});

function EndRequestHandler(sender, args) {
    initiateBinding();
}

function initiateBinding() {

        $(document).ajaxStart(function () {
        $.blockUI({ css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
        });
    });

    $(document).ajaxStop(function () {
        $.unblockUI(); 
    });

    //Listen for the Credit Card Selected Change Event
    $('[id*="_ddl_SP_MakeSelection_Field"]').change(function () {
        var creditCard_Selected;
        creditCard_Selected = $('[id*="_ddl_SP_MakeSelection_Field"]').val();
        $('[id*="_txt_Preview_SecureCardID"]').val(creditCard_Selected);

        // You can call another Jquery function here, you collect data, call function
    });
        

}

// Now you write your functions here below, you can bind them to the DOM, or call them when needed
function collapse_CreditCard_Details(controlObj, panelObj) {

 $(document).ready(function () {
        $.blockUI({ css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
        });

        setTimeout($.unblockUI, 3000);
        
        // I'm calling another JQuery Function here
        intialize_Fields();

        $('[id*="_panel_Enter_CreditCard_Master_Container"]').animate({ height: "0px", opacity: 1 }, 1200).hide();

}

function AjaxSucceeded(result) {
    alert(result.d);
}

function AjaxFailed(result) {
    alert(result.status + " " + result.statusText);
}  


FYI

I don't use update panels anymore. After years of writing and testing, overall in the very end of collecting knowledge for them, plus looking far into the future, they have too many limitations in the end, and are not smooth and silky in operation, and will never be. They are clunky, and customers don't like them. They create mistakes in judgement by the user, in which they will keep clicking until something happens, producing double records.
QuestionHosting a WCF service in IIS 7.5 ? Pin
helloworld20202-Apr-12 13:28
helloworld20202-Apr-12 13:28 
Generalquestion???? Pin
pty311-Apr-12 22:04
pty311-Apr-12 22:04 
GeneralRe: question???? Pin
Dalek Dave1-Apr-12 22:13
professionalDalek Dave1-Apr-12 22:13 
GeneralRe: question???? Pin
Not Active2-Apr-12 1:58
mentorNot Active2-Apr-12 1:58 
GeneralRe: question???? Pin
vvashishta24-Apr-12 19:47
vvashishta24-Apr-12 19:47 
QuestionAsp.net Pin
Kalariya Bhargav1-Apr-12 19:06
Kalariya Bhargav1-Apr-12 19:06 
QuestionGridView Pin
gaurav.shukla1431-Mar-12 0:31
gaurav.shukla1431-Mar-12 0:31 
AnswerRe: GridView Pin
Gopal Rakhal31-Mar-12 16:39
Gopal Rakhal31-Mar-12 16:39 
AnswerRe: GridView Pin
Ali Al Omairi(Abu AlHassan)31-Mar-12 20:18
professionalAli Al Omairi(Abu AlHassan)31-Mar-12 20:18 
AnswerRe: GridView Pin
vvashishta24-Apr-12 19:48
vvashishta24-Apr-12 19:48 
Questionhow to deal with change and forgot password.... Pin
Member 784947730-Mar-12 3:31
Member 784947730-Mar-12 3:31 
AnswerRe: how to deal with change and forgot password.... Pin
Dalek Dave30-Mar-12 4:14
professionalDalek Dave30-Mar-12 4:14 
GeneralRe: how to deal with change and forgot password.... Pin
Member 784947730-Mar-12 4:17
Member 784947730-Mar-12 4:17 
AnswerRe: how to deal with change and forgot password.... Pin
ZurdoDev30-Mar-12 4:20
professionalZurdoDev30-Mar-12 4:20 
AnswerRe: how to deal with change and forgot password.... Pin
JacquesDP30-Mar-12 4:32
JacquesDP30-Mar-12 4:32 
Questionhot spot updates Pin
shinojtks30-Mar-12 0:53
shinojtks30-Mar-12 0:53 
AnswerRe: hot spot updates Pin
ZurdoDev30-Mar-12 4:21
professionalZurdoDev30-Mar-12 4:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.