I'm probably missing something obvious, but I'm no javascript wizard (in fact total newbie) and after struggling with this problem for several hours I decided to ask and see if anyone here can help me, since I've now gotten stubborn about making this work
My problem is pretty simple - I have a form on a webpage that includes a variable number of checkboxes:
{foreach from=$data key=k2 item=products}
<tr>
<td width="15"><input type="checkbox" value="{$product.id}" name="items_checked[]" id="{$k2}"></td>
<td>{$products.name}</td>
<td>{$products.price}</td>
</tr>
{/foreach}
(I use the Smarty template system, hence the variables, but they should be pretty obvious, also the table setup is a quick mock-up to test the code, so don't blast me for using a clumsy solution there, please ).
My problem is that I need the user to be able to check off one or more of those checkboxes (the number of which may vary from day to day as new products are introduced or phased out), and I then want to open a floatbox iframe to enter additional details before submitting a final form to the server.
Now if it had been textboxes I could have used the example on the demopage easily enough, but the fact that checkboxes in a form return an array makes me lost on how to make the neccessary javascript to get the info from the parent page into the floatbox form...
I realize there are other ways I could work around this server-side, but firstly I've become stubborn and secondly I really want to learn how to make data transferable between floatbox(es) and the parent page, as this may come in handy later in the project as well.
I hope I can get some help and apologize in advance if my questions are stupid.