|
Jsonlint.com is your friend. Whenever I get a JSON/JQuery error I first
validate that I am passing correct data with jsonlint.com
Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com
On 12/15/2010 1:01 PM, Kevin Turner wrote:
Strange forum for a JSON/jQuery question - but anyhow, the JSON you haveposted is syntactically incorrect. Is that just a typo?
explain a bit more fully what you are trying to do.
Can you post all the significant code please, rather than a snippet, and
On Behalf Of Mike Wills
Thanks
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
Sent: 15 December 2010 19:30dropdown
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] Navigating JSON sub-arrays dynamically
I am using JSON and jQuery to dynamically populate a parent/child
lists. I have it working to fill the parent drop down and have the childsub
drop down filling with the same parent data. How do I loop through the
array of the selected value from the parent?POLICE/FIRE",},{"Id":"04","Title":"VACATION"},{"Id":"62","Title":"VACATION
My "each" line (key is the value from my parent DDL:
var key = $(this).prev("input").val();
$.each(jsondata.Id[key].HourTypeCodes, function(i, item) {
My JSON
[{"Id":1,"Title":"Vacation","HourTypeCodes":[{"Id":"05","Title":"VAC
HOURS PURCHASED"},{"Id":"60","Title":"VACATION SELL BACK"}]},{"Id":2,"Title":"Holiday""HourTypeCodes":[{"Id":"08","Title":"HOLIDAY"}]},
{"Id":3,"Title":"Floatingby CoralTree Systems Ltd for the use of the named individuals or entity to
Holiday","HourTypeCodes":[{"Id":"09","Title":"FLOATING HOLIDAY"]}]
What am I doing wrong?
--
Mike Wills
http://mikewills.me
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
NOTICE: The information in this electronic mail transmission is intended
which it is directed and may contain information that is privileged or
otherwise confidential. If you have received this electronic mail
transmission in error, please delete it from your system without copying or
forwarding it, and notify the sender of the error by reply email or by
telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
--
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.