Click here to Skip to main content
15,881,840 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev25-Mar-15 10:55
QuickBooksDev25-Mar-15 10:55 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
F-ES Sitecore25-Mar-15 11:17
professionalF-ES Sitecore25-Mar-15 11:17 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev26-Mar-15 2:30
QuickBooksDev26-Mar-15 2:30 
AnswerRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx24-Mar-15 9:39
professionaljkirkerx24-Mar-15 9:39 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev25-Mar-15 10:53
QuickBooksDev25-Mar-15 10:53 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx26-Mar-15 10:28
professionaljkirkerx26-Mar-15 10:28 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev26-Mar-15 10:38
QuickBooksDev26-Mar-15 10:38 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx26-Mar-15 11:06
professionaljkirkerx26-Mar-15 11:06 
I make windows applications, so I know that the messagebox stops the message pump running in the Windows OS.

The thing here is, your working with HTTP protocol, and you have to obey the rules of it.
On top of that, your working with HTML, which are elements, and not objects, sorry for the correction.

So with the HTTP protocol, it's pretty much get and post, get a page, post a page back to the server.
It would be a waste of time to keep submitting the form back for each piece of data transmitted, to show detailed progress.
So you use a client script, that runs on the browser, to transmit each piece of data in the background, and change the DOM.

The DOM is the collection of HTML that is downloaded from the server making up a web page.
You can alter the HTML elements, delete, append, change text by manipulating the DOM using Javascript or JQuery.

A working example here, that switches address input to progress, fetches the address, populates the textboxes, switches back to address input.

I would experiment, or just write code that gets each line of data on your form, and run the AJAX call to web service in a loop, creating new HTML for each record processed. So instead a progress, they just see the data uploading, and new HTML records created.
This would fool or give the illusion of progress, without having a bar or wheel. I suppose a fake progress sort of message box could be made with an HTML div that expands in witdh, colored green or blue.

If you look at my Tip, I wrote a filmstrip that just loops, until the end is reached. The same principal could apply for your solution, in which 1 function just calls another function, until the end is reached.

The primary function collects the data, the child function posts the data, and prints a result.

If you need help on this, you can private message me.

Display Advertising Filmstrip[^]

function Selected_Shipping_Address_Load(m_Data1) {

    var panel_CardInfo = $('[id*="_panel_MP_CardInfo_Container"]');
    var panel_Progress = $('[id*="_panel_MP_Progress_Container"]');    

    if (panel_CardInfo.css('display') === 'inline-block') {
        panel_CardInfo.css('display', 'none');
        panel_Progress.css('display', 'inline-block');
    }
    else {
        panel_CardInfo.css('display', 'none');
        panel_Progress.css('display', 'inline-block');
    }

    var m_secureToken = $('[id*="_txt_Secure_Token_Field"]').val();
    var m_localization = parseInt($('[id*="_txt_Localization_Field"]').val());
    
    // Package the Data to Transmit
    var send_Data =
    "{" +
    "\"m_Data1\" : \"" + m_Data1 + "\", " +
    "\"m_Localization\" : " + m_localization + "," +
    "\"m_secureToken\" : \"" + m_secureToken + "\" " +
    "}";

    //alert(send_Data);

    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "MakePayment.asmx/load_ShippingAddress",
        data: send_Data,
        dataType: "json",
        error: function (xhr, status, error) {
            exitCode = 2;
            alert(xhr.responseText);
        },
        success: function (responseText) {
            //alert(responseText.d);
            var objB = jQuery.parseJSON(responseText.d);
            exitCode = objB.exit_Code;

            if (exitCode > 0) {
                alert('Error Occured');
            }
            else {

                var address_ID = objB.address_ID;
                var address_Attention = unescape(objB.address_Attention.replace(/\+/g, " "));
                var address_CompanyName = unescape(objB.address_CompanyName.replace(/\+/g, " "));
                var address_Streetline1 = unescape(objB.address_Streetline1.replace(/\+/g, " "));
                var address_Streetline2 = unescape(objB.address_Streetline2.replace(/\+/g, " "));
                var address_City = unescape(objB.address_City.replace(/\+/g, " "));
                var address_State = unescape(objB.address_State.replace(/\+/g, " "));
                var address_Postal = unescape(objB.address_Postal.replace(/\+/g, " "));
                var address_Country = unescape(objB.address_Country.replace(/\+/g, " "));
                var address_Phone = unescape(objB.address_Phone.replace(/\+/g, " "));
                var address_Residental = objB.address_Residential;
                var address_ShippingIsBilling = objB.address_ShippingIsBilling;

                // Insert the Selected Shipping Address into the form                
                $('[id*="_txt_MP_CompanyName_Field"]').val(address_CompanyName);
                $('[id*="_txt_MP_StreetAddress1_Field"]').val(address_Streetline1);
                $('[id*="_txt_MP_StreetAddress2_Field"]').val(address_Streetline2);
                $('[id*="_txt_MP_City_Field"]').val(address_City);
                $('[id*="_ddl_MP_CountryCode_Field"]').val(address_Country);

                switch (address_Country) {
                    case 'US':
                        load_States_US(address_State);
                        break;
                    case 'CA':
                        load_States_CA(address_State);
                        break;
                    case 'MX':
                        load_States_CA(address_State);
                        break;
                }

                $('[id*="_ddl_MP_StateCode_Field"]').val(address_State);
                $('[id*="_txt_MP_PostalCode_Field"]').val(address_Postal);
                $('[id*="_txt_MP_Phone_Field"]').val(address_Phone);
                
                panel_Progress.css('display', 'none');
                panel_CardInfo.css('display', 'inline-block');
            }
        }
    });

}

GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev27-Mar-15 3:54
QuickBooksDev27-Mar-15 3:54 
QuestionWrong count is also accepting in Jquery and accepting keywords any where Pin
venu.rayapati24-Mar-15 2:02
professionalvenu.rayapati24-Mar-15 2:02 
Questiongive me solution plzzzzzzzzzz Pin
Member 1149988323-Mar-15 19:08
Member 1149988323-Mar-15 19:08 
SuggestionRe: give me solution plzzzzzzzzzz Pin
Richard MacCutchan23-Mar-15 22:30
mveRichard MacCutchan23-Mar-15 22:30 
AnswerRe: give me solution plzzzzzzzzzz Pin
F-ES Sitecore23-Mar-15 22:38
professionalF-ES Sitecore23-Mar-15 22:38 
AnswerRe: give me solution plzzzzzzzzzz Pin
ZurdoDev24-Mar-15 8:53
professionalZurdoDev24-Mar-15 8:53 
GeneralRe: give me solution plzzzzzzzzzz Pin
Member 467887925-Mar-15 4:49
Member 467887925-Mar-15 4:49 
QuestionHow to Insert Update And Delete Record for html table in asp.net without gridview ? Pin
fateparakiran21-Mar-15 9:32
fateparakiran21-Mar-15 9:32 
AnswerRe: How to Insert Update And Delete Record for html table in asp.net without gridview ? Pin
Ali Al Omairi(Abu AlHassan)22-Mar-15 22:52
professionalAli Al Omairi(Abu AlHassan)22-Mar-15 22:52 
QuestionMemberhip.CreateUser() is given an exception !! Pin
fahd95121-Mar-15 5:57
fahd95121-Mar-15 5:57 
AnswerRe: Memberhip.CreateUser() is given an exception !! Pin
Matt U.24-Mar-15 9:47
Matt U.24-Mar-15 9:47 
Questionget logged in user name Pin
Praveen Kandari20-Mar-15 0:53
Praveen Kandari20-Mar-15 0:53 
AnswerRe: get logged in user name Pin
Afzaal Ahmad Zeeshan20-Mar-15 1:14
professionalAfzaal Ahmad Zeeshan20-Mar-15 1:14 
QuestionInterview Question -Why Validation in Update Panel is not working properly? Pin
Rajesh waran19-Mar-15 19:37
professionalRajesh waran19-Mar-15 19:37 
AnswerRe: Interview Question -Why Validation in Update Panel is not working properly? Pin
F-ES Sitecore19-Mar-15 22:36
professionalF-ES Sitecore19-Mar-15 22:36 
AnswerRe: Interview Question -Why Validation in Update Panel is not working properly? Pin
Rajesh waran19-Mar-15 23:59
professionalRajesh waran19-Mar-15 23:59 
Questioncheck data exist or not? Pin
Praveen Kandari19-Mar-15 0:00
Praveen Kandari19-Mar-15 0:00 

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.