Click here to Skip to main content
12,399,799 members (46,490 online)

JavaScript

 
Newsurdu Pin
sania habib8-Aug-12 15:47
membersania habib8-Aug-12 15:47 
GeneralRe: urdu Pin
Richard MacCutchan8-Aug-12 21:28
mvpRichard MacCutchan8-Aug-12 21:28 
AnswerRe: urdu Pin
Rahul Rajat Singh22-Aug-12 1:24
memberRahul Rajat Singh22-Aug-12 1:24 
GeneralRe: urdu Pin
Sandip.Nascar22-Aug-12 11:03
memberSandip.Nascar22-Aug-12 11:03 
QuestionLooping through elements, to find textbox, and get values Pin
jkirkerx8-Aug-12 13:12
memberjkirkerx8-Aug-12 13:12 
AnswerRe: Looping through elements, to find textbox, and get values Pin
jkirkerx8-Aug-12 18:13
memberjkirkerx8-Aug-12 18:13 
GeneralRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 4:41
memberAndrei Straut9-Aug-12 4:41 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 6:27
memberjkirkerx9-Aug-12 6:27 
Yeah that was a mind bender. I wanted to use ID, but it was hard to compose in jquery, and then I wanted to use my original array, and tossed that out the window as well.

Finding help on the subject only led to simple basic information.

Ended up with this, including the new array, so I can package the data to send to a web service, and create the xml for it on the server. Can't give myself a 5, but thanks for verifying my code. I appreciate you critiquing my save function.

var elements = [];
 
var nameCount = parseInt($("._name_Field").length);
var codeCount = parseInt($("._code_Field").length);
 
// 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 <= nameCount - 1; i++) {
  if ((nameArray[i] != "") && (codeArray[i] != "")) {
     elements[jdx] = [];
     elements[jdx]["name"] = nameArray[i];
     elements[jdx]["code"] = codeArray[i].toUpperCase();
     
     jdx++;
  }
}

AnswerRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 9:37
memberAndrei Straut9-Aug-12 9:37 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 10:18
memberjkirkerx9-Aug-12 10:18 
GeneralRe: Looping through elements, to find textbox, and get values Pin
Andrei Straut9-Aug-12 10:35
memberAndrei Straut9-Aug-12 10:35 
AnswerRe: Looping through elements, to find textbox, and get values Pin
Andy Brummer9-Aug-12 10:26
sitebuilderAndy Brummer9-Aug-12 10:26 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx9-Aug-12 16:54
memberjkirkerx9-Aug-12 16:54 
GeneralRe: Looping through elements, to find textbox, and get values Pin
Andy Brummer10-Aug-12 4:56
sitebuilderAndy Brummer10-Aug-12 4:56 
GeneralRe: Looping through elements, to find textbox, and get values Pin
jkirkerx10-Aug-12 6:31
memberjkirkerx10-Aug-12 6:31 
QuestionGet value from textbox created with createElement Pin
jkirkerx6-Aug-12 15:48
memberjkirkerx6-Aug-12 15:48 
AnswerRe: Get value from textbox created with createElement Pin
BobJanova7-Aug-12 0:12
memberBobJanova7-Aug-12 0:12 
GeneralRe: Get value from textbox created with createElement Pin
jkirkerx7-Aug-12 6:24
memberjkirkerx7-Aug-12 6:24 
AnswerRe: Get value from textbox created with createElement Pin
twseitex7-Aug-12 8:25
membertwseitex7-Aug-12 8:25 
GeneralRe: Get value from textbox created with createElement Pin
jkirkerx8-Aug-12 10:54
memberjkirkerx8-Aug-12 10:54 
Questionadapt datatable jquery to jee application Pin
ahmadiss4-Aug-12 23:34
memberahmadiss4-Aug-12 23:34 
AnswerRe: adapt datatable jquery to jee application Pin
Richard MacCutchan5-Aug-12 1:24
mvpRichard MacCutchan5-Aug-12 1:24 
Questionshowmodaldialog return value undefined across domain Pin
Amr M. K.4-Aug-12 23:24
memberAmr M. K.4-Aug-12 23:24 
AnswerRe: showmodaldialog return value undefined across domain Pin
jkirkerx5-Aug-12 11:05
memberjkirkerx5-Aug-12 11:05 
GeneralRe: showmodaldialog return value undefined across domain Pin
Amr M. K.6-Aug-12 22:05
memberAmr M. K.6-Aug-12 22:05 

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 | Mobile
Web02 | 2.8.160721.1 | Last Updated 25 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid