[TriLUG] Javascript ( and jQuery ) questions
Lance A. Brown via TriLUG
trilug at trilug.org
Mon Apr 20 10:01:40 EDT 2015
On 2015-04-19 11:25 am, Brian McCullough via TriLUG wrote:
>
> What I am trying to send to the server is the value ( id, whatever ) of
> the "selected" accordion item.
You probably want something like this:
// Get id of selected accordion
var sel_accordian_id = jQuery('Whatever to select selected
accordion').attr('id');
// create object with accordian_id in it
var json_obj = { accordion_id = sel_accordian_id };
// create json string
var json_str = JSON.stringify(json_obj);
// Send json_str to server in AJAX call
--[Lance]
More information about the TriLUG
mailing list