Click here to Skip to main content
13,251,998 members (56,980 online)

JavaScript

 
QuestionDisplay Values Pin
lakshmiblp15-Aug-12 11:29
memberlakshmiblp15-Aug-12 11:29 
Questionhow to get default signature in outlook using Javascript Pin
anurag34879-Aug-12 3:20
memberanurag34879-Aug-12 3:20 
AnswerRe: how to get default signature in outlook using Javascript Pin
Pete O'Hanlon9-Aug-12 4:52
protectorPete O'Hanlon9-Aug-12 4:52 
AnswerRe: how to get default signature in outlook using Javascript Pin
BobJanova9-Aug-12 4:56
memberBobJanova9-Aug-12 4:56 
Newsurdu Pin
sania habib8-Aug-12 16:47
membersania habib8-Aug-12 16:47 
GeneralRe: urdu Pin
Richard MacCutchan8-Aug-12 22:28
mvpRichard MacCutchan8-Aug-12 22:28 
AnswerRe: urdu Pin
Rahul Rajat Singh22-Aug-12 2:24
memberRahul Rajat Singh22-Aug-12 2:24 
GeneralRe: urdu Pin
Sandip.Nascar22-Aug-12 12:03
memberSandip.Nascar22-Aug-12 12:03 
QuestionLooping through elements, to find textbox, and get values Pin
jkirkerx8-Aug-12 14:12
memberjkirkerx8-Aug-12 14:12 
AnswerRe: Looping through elements, to find textbox, and get values Pin
jkirkerx8-Aug-12 19:13
memberjkirkerx8-Aug-12 19:13 
GeneralRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 5:41
memberAndrei Straut9-Aug-12 5:41 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 7:27
memberjkirkerx9-Aug-12 7:27 
AnswerRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 10:37
memberAndrei Straut9-Aug-12 10:37 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 11:18
memberjkirkerx9-Aug-12 11:18 
Your right, you have to tighten up the code to allow for input errors, been bit by the space before.

Just like in c++, you have to conserve resources, so I dumped the namecount, I thought about it, just didn't do it.

Glad the code is readable, know anything about consuming the eArray in a Web Service?, I posted it in the asp.net disscussion

// Create Arrays to hold the values
    var nameArray = [];
    $("._name_Field").each(function () { nameArray.push($(this).val()) });
 
    var codeArray = [];
    $("._code_Field").each(function () { codeArray.push($(this).val()) });
 
    // Gather the Data from the Element Containers from valid elements
    var jdx = 0
    for (i = 0; i <= parseInt($("._name_Field").length) - 1; i++) {
        // Only collect populated containers via jdx
        if ((nameArray[i].trim() != "") && (codeArray[i].trim() != "")) {
            elements[jdx] = [];
            elements[jdx]["name"] = nameArray[i].trim();
            elements[jdx]["code"] = codeArray[i].trim().toUpperCase();
            jdx++;
        }
    }
 
    var eArray = "";
    for (e = 0; e <= elements.length - 1; e++) {
        eArray = eArray + "{\"name\" : \"" + elements[e].name + "\", \"code\" : \"" + elements[e].code + "\"}";
        if (e <= elements.length - 2) { eArray = eArray + "," };
    }                               
 
    // Build the JSON Array
    var send_Data =
    "{" +
    "\"template_Name\" : \"" + template_Name + "\", " +
    "\"template_Array\" : [" + eArray + "]" +
    "}";
 
    alert(send_Data);
 
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "productEditor.asmx/create_DynamicCart_Template",
        data: send_Data,
        dataType: "json",
        error: function (xhr, status, error) {
 
            exitCode = 2;
            alert(xhr.responseText);
 
        },
        success: function (responseText) {
 
            try {
                eval('(' + responseText.d + ')');
            }
            catch (err) {
 
            }
 
            alert(responseText.d);
 
            var objB = jQuery.parseJSON(responseText.d);
            exitCode = objB.template_ExitCode;
 
        }
    });
 
});

GeneralRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 11:35
memberAndrei Straut9-Aug-12 11:35 
AnswerRe: Looping through elements, to find textbox, and get values Pin
Andy Brummer9-Aug-12 11:26
sitebuilderAndy Brummer9-Aug-12 11:26 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 17:54
memberjkirkerx9-Aug-12 17:54 
GeneralRe: Looping through elements, to find textbox, and get values Pin
Andy Brummer10-Aug-12 5:56
sitebuilderAndy Brummer10-Aug-12 5:56 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx10-Aug-12 7:31
memberjkirkerx10-Aug-12 7:31 
QuestionGet value from textbox created with createElement Pin
jkirkerx6-Aug-12 16:48
memberjkirkerx6-Aug-12 16:48 
AnswerRe: Get value from textbox created with createElement Pin
BobJanova7-Aug-12 1:12
memberBobJanova7-Aug-12 1:12 
GeneralRe: Get value from textbox created with createElement Pin
jkirkerx7-Aug-12 7:24
memberjkirkerx7-Aug-12 7:24 
AnswerRe: Get value from textbox created with createElement Pin
twseitex7-Aug-12 9:25
membertwseitex7-Aug-12 9:25 
GeneralRe: Get value from textbox created with createElement Pin
jkirkerx8-Aug-12 11:54
memberjkirkerx8-Aug-12 11:54 
Questionadapt datatable jquery to jee application Pin
ahmadiss5-Aug-12 0:34
memberahmadiss5-Aug-12 0:34 
AnswerRe: adapt datatable jquery to jee application Pin
Richard MacCutchan5-Aug-12 2:24
mvpRichard MacCutchan5-Aug-12 2:24 
Questionshowmodaldialog return value undefined across domain Pin
Amr M. K.5-Aug-12 0:24
memberAmr M. K.5-Aug-12 0:24 
AnswerRe: showmodaldialog return value undefined across domain Pin
jkirkerx5-Aug-12 12:05
memberjkirkerx5-Aug-12 12:05 
GeneralRe: showmodaldialog return value undefined across domain Pin
Amr M. K.6-Aug-12 23:05
memberAmr M. K.6-Aug-12 23:05 
AnswerRe: showmodaldialog return value undefined across domain Pin
BobJanova6-Aug-12 0:43
memberBobJanova6-Aug-12 0:43 
GeneralRe: showmodaldialog return value undefined across domain Pin
Amr M. K.6-Aug-12 22:26
memberAmr M. K.6-Aug-12 22:26 
QuestionEvalulating and passing RGB values from keydown Pin
jkirkerx2-Aug-12 9:12
memberjkirkerx2-Aug-12 9:12 
AnswerRe: Evalulating and passing RGB values from keydown Pin
enhzflep2-Aug-12 10:58
memberenhzflep2-Aug-12 10:58 
GeneralRe: Evalulating and passing RGB values from keydown Pin
jkirkerx2-Aug-12 12:54
memberjkirkerx2-Aug-12 12:54 
AnswerRe: Evalulating and passing RGB values from keydown Pin
BobJanova6-Aug-12 0:31
memberBobJanova6-Aug-12 0:31 
GeneralRe: Evalulating and passing RGB values from keydown Pin
jkirkerx6-Aug-12 8:22
memberjkirkerx6-Aug-12 8:22 
GeneralRe: Evalulating and passing RGB values from keydown Pin
BobJanova7-Aug-12 1:11
memberBobJanova7-Aug-12 1:11 
GeneralInstalling Pygame Pin
johtnkucz30-Jul-12 5:36
memberjohtnkucz30-Jul-12 5:36 
GeneralRe: Installing Pygame Pin
johtnkucz30-Jul-12 5:45
memberjohtnkucz30-Jul-12 5:45 
QuestionRe: Installing Pygame Pin
Richard MacCutchan30-Jul-12 7:14
mvpRichard MacCutchan30-Jul-12 7:14 
AnswerRe: Installing Pygame Pin
Sandeep Mewara31-Jul-12 9:56
mvpSandeep Mewara31-Jul-12 9:56 
GeneralRe: Installing Pygame Pin
Richard MacCutchan31-Jul-12 23:32
mvpRichard MacCutchan31-Jul-12 23:32 
QuestionAnalysing an obfuscated malware script Pin
Bernhard Hiller29-Jul-12 22:48
memberBernhard Hiller29-Jul-12 22:48 
AnswerRe: Analysing an obfuscated malware script Pin
Richard MacCutchan29-Jul-12 23:00
mvpRichard MacCutchan29-Jul-12 23:00 
GeneralRe: Analysing an obfuscated malware script Pin
enhzflep30-Jul-12 2:43
memberenhzflep30-Jul-12 2:43 
GeneralRe: Analysing an obfuscated malware script Pin
Bernhard Hiller30-Jul-12 5:48
memberBernhard Hiller30-Jul-12 5:48 
GeneralRe: Analysing an obfuscated malware script Pin
enhzflep31-Jul-12 0:41
memberenhzflep31-Jul-12 0:41 
GeneralRe: Analysing an obfuscated malware script Pin
Bernhard Hiller31-Jul-12 3:26
memberBernhard Hiller31-Jul-12 3:26 
GeneralRe: Analysing an obfuscated malware script [edit] Pin
Jacek Gajek1-Jun-13 5:10
memberJacek Gajek1-Jun-13 5:10 
GeneralRe: Analysing an obfuscated malware script Pin
jkirkerx30-Jul-12 12:19
memberjkirkerx30-Jul-12 12:19 

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.


Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 20 Nov 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid