Hi, I have a form with: - Simple fields like: <input type="text" /> - Files: <input type="file" /> When I submit my form, I want to toggle input file and display a progress bar. So - I submit my form to an hidden IFrame - I display progress bar (a div) To update progress bar I start a PeriodicalExecuter then send a JSON request to get field status. But It doesn''t works ! :-( I think my file are sent from the current page to the server (even if the response will be displayed in IFrame). So my Ajax request is freezed and wait end of upload. What should I do ? Can i ask my Iframe to send ajax request instead of current page ? Should I use a third IFrame to handle progress ? Best Regards, Jp -- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15 Do it Once, Use it Twice ~ Do it Twice, Make It Once
Leon Chevalier
2006-Aug-11 16:01 UTC
Sortable.serialize for a tree: how to identify parent of nested items?
Hi all, In Scriptaculous for, say, the following tree: ac_page_content_1 ac_page_content_2 -> ac_page_content3 Once serialised and posted to the server (PHP) the $_POST array looks like this: Array ( [0] => ac_page_content_1 [1] => Array ( [0] => ac_page_content_3 ) ) This means that I have no way of knowing what the parent of ac_page_content_3 is. The work-around I found was to change Sortable._constructIndex to; if (node.id) index = ''['' + node.id + ''|'' + node.position + '']'' + index; So the resulting array is: Array ( [ac_page_content_1|0] => ac_page_content_1 [ac_page_content_2|1] => Array ( [[ac_page_content_3|0] => ac_page_content_3 ) ) So at least I can tell from the key what the parent is. Was wondering is anyone else had run into this, and what solutions you had found? Cheers, Leon