jQuery form with .load()ed elements ignores them -
thanks reading.
i have form few elements in it. inside form div.graph
. when form submitted, div .load()
'd result, includes additional form elements, such page selector. form submitted repeatedly part of updated each time via .load()
.
it's submitted so:
/* ... */ // build form info necessary. formaction = './stats_chart.php?cb='+math.random(); formdatajson = $('#frmstats').serializearray(); // hide current report, , blank out div. chartitem.find('.graph').load(formaction, formdatajson, function(){/* etc... */});
the results so:
/* ... bunch of crap */ <select id='pageselector' name='pageselector'> <option value='1'>1</option> </select>
the problem if submit form, .load()
results, , submit again, elements .load()
'd aren't present in either formdatajson
, or form post. seems not recognized serializearray()
.
any ideas what's going on? have name attribs of elements, div inside form tags, , exploring dom firebug shows should be.
thanks!
edit:
i made workaround adding hidden element in main form , having select update before submission, working, still love know why elements weren't being seen.
oddly, if log console in firefox, shows it's own root, not attached body @ all. normally, see /html/body/form/div/etc...
, in case, it's /select
.
Comments
Post a Comment