Okay, I solved it... For anyone who needs the answer in the future I have updated the code below with the working javascript.
On Jul 7, 4:25 pm, Met00 - Met00Cigar <met00ci...@gmail.com> wrote: > Every time a radio button is pressed the system will grab certain data > and send it via ajax to the server (providing a click path). In test I > am loading the data to another div. I have been able to get everything > BUT the value (I am able to capture the hidden fields and serialize > all the data - and I am showing the current "date" in the test so I > can verify that it's working). > > Any help in getting the serialized button that was just clicked (or > just the value and I can create the serialized data from that) would > be appreciated. > > [sample code that works to a great degree at this point below.... ] > > <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script> > <script type="text/javascript" src="/js/jquery.countdown.min.js"></ > script> > <script type="text/javascript" src="/js/jquery.form.js"></script> > <script type="text/javascript"> // set up the form $(function () { var options = ''; $('#quizform').ajaxForm(options); }); // set up the radio buttons reporting $(function () { $("input:radio").click(function() { var curtim = new Date(); var qidraw = parseInt(this.name.split('_')[1]); var value = ''; $("input[name*=q_"+qidraw+"]").each(function() { if (this.checked == true) { value = '?qans='+$(this).val(); } }); var qid = 'qid='+parseInt(this.name.split('_')[1]); var querystring = qid+'&'+$('#quizform :hidden').fieldSerialize ()+value+' '+curtim; say(querystring); }); }); function say(text) { $('#testdisplay').append('<div>'+text+'<div>'); } > </script> > <form id="quizform"> > <input type=hidden id=sid name=sid value=1> > <input type=hidden id=starttime name=starttime value=090101102603> > <ol> > <li> Question area > <br align=center> > <input type=radio name=q_26 value=1> answer 1 > <input type=radio name=q_26 value=2> answer 2 > <input type=radio name=q_26 value=3> answer 3 > <input type=radio name=q_26 value=4> answer 4 > <input type=radio name=q_26 value=5> answer 5 > </br><p> > <li> Question area > <br align=center> > <input type=radio name=q_27 value=1> answer 1 > <input type=radio name=q_27 value=2> answer 2 > <input type=radio name=q_27 value=3> answer 3 > <input type=radio name=q_27 value=4> answer 4 > <input type=radio name=q_27 value=5> answer 5 > </br><p> > <li> Question area > <br align=center> > <input type=radio name=q_28 value=1> answer 1 > <input type=radio name=q_28 value=2> answer 2 > <input type=radio name=q_28 value=3> answer 3 > <input type=radio name=q_28 value=4> answer 4 > <input type=radio name=q_28 value=5> answer 5 > </br><p> > <li> Question area > <br align=center> > <input type=radio name=q_29 value=1> answer 1 > <input type=radio name=q_29 value=2> answer 2 > <input type=radio name=q_29 value=3> answer 3 > <input type=radio name=q_29 value=4> answer 4 > <input type=radio name=q_29 value=5> answer 5 > </br><p> > <li> Question area > <br align=center> > <input type=radio name=q_30 value=1> answer 1 > <input type=radio name=q_30 value=2> answer 2 > <input type=radio name=q_30 value=3> answer 3 > <input type=radio name=q_30 value=4> answer 4 > <input type=radio name=q_30 value=5> answer 5 > </br><p> > <li> Question area > <br align=center> > <input type=radio name=q_31 value=1> answer 1 > <input type=radio name=q_31 value=2> answer 2 > <input type=radio name=q_31 value=3> answer 3 > <input type=radio name=q_31 value=4> answer 4 > <input type=radio name=q_31 value=5> answer 5 > </br><p> > </ol> > </div> > <div id=testdisplay></div>