Click here to Skip to main content
15,883,901 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionConverting an URL to JSON encoded format Pin
jasonalien9-Sep-14 3:32
jasonalien9-Sep-14 3:32 
AnswerRe: Converting an URL to JSON encoded format Pin
Dennis E White9-Sep-14 5:00
professionalDennis E White9-Sep-14 5:00 
GeneralRe: Converting an URL to JSON encoded format Pin
jasonalien9-Sep-14 20:24
jasonalien9-Sep-14 20:24 
AnswerRe: Converting an URL to JSON encoded format Pin
MIG77711-Oct-14 6:48
MIG77711-Oct-14 6:48 
QuestionValidate and submit a form containing data and a file using ajax/jquery Pin
Member 109499861-Sep-14 10:41
Member 109499861-Sep-14 10:41 
AnswerRe: Validate and submit a form containing data and a file using ajax/jquery Pin
Dennis E White3-Sep-14 4:38
professionalDennis E White3-Sep-14 4:38 
GeneralRe: Validate and submit a form containing data and a file using ajax/jquery Pin
Sunasara Imdadhusen3-Sep-14 21:03
professionalSunasara Imdadhusen3-Sep-14 21:03 
AnswerRe: Validate and submit a form containing data and a file using ajax/jquery Pin
jkirkerx16-Sep-14 11:35
professionaljkirkerx16-Sep-14 11:35 
I just happen to be writing this at the moment, you can use it as a template or to simply get some ideas

.onClientClick = load_template; return false;

function load_template() {
    
    var
    txtFocus,
    txtError,
    m_secureToken,
    m_template,
    m_filePath;
    
    var vFlag = true;
    txtFocus = $('[id*="_txt_Focus_Field"]').val();
    txtError = $('[id*="_txt_Error_Field"]').val();
    m_secureToken = $('[id*="_txt_Secure_Token_Field"]').val();
    m_template = $('[id*="_ddl_CE_FI_Template_Field"] option:selected').text();
    m_filePath = $('[id*="_ddl_CE_FI_Template_Field"]').val();

    if (m_filePath === '--') {
        $('[id*="_ddl_CE_FI_Template_Field"]').css('background-color', txtError);
        $('[id*="_img_CE_FI_Template_Error"]').css('display', 'inline-block');
        vFlag = false;
    }
    else {
        $('[id*="_ddl_CE_FI_Template_Field"]').css('background-color', txtFocus);
        $('[id*="_img_CE_FI_Template_Error"]').css('display', 'none');
    }

    if (true === vFlag) {

        var send_Data =
        "{" +
        "\"p_secureToken\" : \"" + m_secureToken + "\", " +
        "\"p_template\" : \"" + escape(m_template) + "\", " +
        "\"p_filePath\" : \"" + escape(m_filePath) + "\"  " +
        "}";

        alert(send_Data);

        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "broadcastEditor.asmx/preview_Template",
            data: send_Data,
            dataType: "json",
            error: function (xhr, status, error) {
                exitCode = 2;
                $('[id*="_updateProgress_Unified"]').fadeOut('fast', function () {
                    alert(xhr.responseText);
                });
            },
            success: function (responseText) {
                var objB = jQuery.parseJSON(responseText.d);
                exitCode = objB.exitCode;
                var p_Stream = unescape(objB.p_Stream.replace(/\+/g, " "));

                $('[id*="_panel_CE_Container_XHTML"]').append(p_Stream);
                $('[id*="_updateProgress_Unified"]').fadeOut('fast');
                $('[id*="_panel_CE_Container_XHTML"]').fadeIn('normal');
                         
            }
        });

    }

}

QuestionFiltering search results the Google's way Pin
Member 1103422329-Aug-14 19:45
Member 1103422329-Aug-14 19:45 
AnswerRe: Filtering search results the Google's way Pin
Richard MacCutchan29-Aug-14 23:04
mveRichard MacCutchan29-Aug-14 23:04 
GeneralRe: Filtering search results the Google's way Pin
Member 1103422330-Aug-14 3:07
Member 1103422330-Aug-14 3:07 
GeneralRe: Filtering search results the Google's way Pin
Richard Deeming1-Sep-14 2:10
mveRichard Deeming1-Sep-14 2:10 
GeneralRe: Filtering search results the Google's way Pin
Simon_Whale1-Sep-14 3:14
Simon_Whale1-Sep-14 3:14 
AnswerRe: Filtering search results the Google's way Pin
Sibeesh KV23-Sep-14 19:13
professionalSibeesh KV23-Sep-14 19:13 
Questionfancy box popup Pin
beginerbuddy28-Aug-14 9:18
beginerbuddy28-Aug-14 9:18 
QuestionRe: fancy box popup Pin
ZurdoDev28-Aug-14 9:46
professionalZurdoDev28-Aug-14 9:46 
AnswerRe: fancy box popup Pin
ZurdoDev28-Aug-14 9:47
professionalZurdoDev28-Aug-14 9:47 
GeneralRe: fancy box popup Pin
Sunasara Imdadhusen3-Sep-14 21:06
professionalSunasara Imdadhusen3-Sep-14 21:06 
AnswerRe: fancy box popup Pin
Sibeesh KV23-Sep-14 19:16
professionalSibeesh KV23-Sep-14 19:16 
QuestionCode I don't understand. Pin
ChicagoBobT28-Aug-14 7:54
ChicagoBobT28-Aug-14 7:54 
AnswerRe: Code I don't understand. Pin
Graham Breach28-Aug-14 8:58
Graham Breach28-Aug-14 8:58 
GeneralRe: Code I don't understand. Pin
ChicagoBobT28-Aug-14 11:08
ChicagoBobT28-Aug-14 11:08 
GeneralRe: Code I don't understand. Pin
Sunasara Imdadhusen3-Sep-14 21:08
professionalSunasara Imdadhusen3-Sep-14 21:08 
GeneralRe: Code I don't understand. Pin
Sibeesh KV23-Sep-14 19:17
professionalSibeesh KV23-Sep-14 19:17 
AnswerRe: Code I don't understand. Pin
Anlige2-Sep-14 21:01
Anlige2-Sep-14 21:01 

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.