Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Bongani T Mabunda
I would say first retrieve all the options into an array and then push the one one you want into the array there after push all of the array items into the select again as a dynamic select object Regards, Bongani T Mabunda... Thanks -Original Message- From: Phil Petree

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Phil Petree
I have it working... demo here: http://www.philpetree.com/json/ Where are ya'll posting the demo code? On Tue, Jun 7, 2011 at 4:45 PM, Bongani T Mabunda mabund...@gmail.comwrote: I would say first retrieve all the options into an array and then push the one one you want into the array there

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Walter Davis
JSbin is a popular way to show working examples. Gives you a persistent URL and you can edit it and demo it right in the browser. Walter On Jun 8, 2011, at 3:19 PM, Phil Petree wrote: Where are ya'll posting the demo code? -- You received this message because you are subscribed to the

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Phil Petree
I looked at jsbin earlier and have actually tested some snippets there... however you can't (to my knowledge) upload your php code there. I wanted to stick all the source modules up. On Wed, Jun 8, 2011 at 3:28 PM, Walter Davis wa...@wdstudio.com wrote: JSbin is a popular way to show working

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Walter Davis
That's true, that's generally not available as far as I know. That's why you put up a scratch server somewhere, and then you can upload and test whatever you want. But JSbin is excellent for making stand-alone test pages, since you are forced to put everything in one page, and you tend to

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Phil Petree
I have spare servers out the ying-yang... not a problem there... ever met one of those people that no matter how hard you try you just cant seem to understand them when there are similar people that you get from minute one? that's me and prototype! LOL I stuck .zip/.rar files on the demo page and

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
Your function is using add() to add an option to the end of the select, but I have never seen that work completely myself. Best to stick with the long-hand methods, they are at least known to work in most browsers: menu = $('mySelectList'); menu.options[menu.options.length] = new

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Phil Petree
thanks Walter... bottom line is that addOption works fine if called directly but only clears the select if called from the Ajax.updater onSuccess... even using static data! This works: select id='county' name='county' onclick=addOption('city', 'New Boca','New Boca')/selectbr/ This doesn't

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Matt Petrovic
try using Ajax.Request -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/QTllMU5xRkRZMllK. To post to this group, send email to

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
Try doing this inside an Ajax.Request, not an Updater. You can still update things, but you do it yourself, and I think you might not get these problems. My guess is that you are trying to update a picker that has been swapped out beneath you. If it works in a click, it will work in an

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Phil Petree
Matt Walter, You are both right... Ajax.Updater is, apparently, trying to update the select AFTER it calls onSuccess and since it is incapable of updating a select it was thereby overwritting my adds... no problem, once I figured that out, I just added in a div id='results' and let the updater

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
On Jun 7, 2011, at 9:00 PM, Phil Petree wrote: Matt Walter, You are both right... Ajax.Updater is, apparently, trying to update the select AFTER it calls onSuccess and since it is incapable of updating a select it was thereby overwritting my adds... no problem, once I figured that