Hi squared,

I think you're problem is not so complex, but switching to AJAX is not
transparent, and I personnally think that in much case it implies a
complete rewrite of the application ==> In you're case, you should
rewrite the logic of this 3 linked list fields because you can not use
the logic you choose (it does not work !).

What is the answer, the walter response is a good one.

--
david.

On 4 fév, 15:23, Walter Lee Davis <wa...@wdstudio.com> wrote:
> You could simply include it in your request. Try sending the entire  
> form, not just one field, and then filter to discover the first empty  
> or default select control to re-populate.
>
> function sendRequest() {
>         new Ajax.Request("descriptions.php",{
>                 parameters: $('your_form').serialize(),
>                 onComplete: showResponse
>         });}
>
> function showResponse(req){
>         var element = $('your_form).getInputs('select').find(function(elm){
>                 return $F(elm) == 'Your default value or none'}
>         );
>         if(element) element.innerHTML= req.responseText;
>
> }
>
> As others on this list have noted, you will probably have trouble in  
> at least one browser-shaped object with the notion of updating a  
> select through innerHTML. If you can get your server side to return a  
> JSON or other structured string instead of raw HTML, you will find it  
> pretty straightforward to iterate that with each() and build a new  
> picker using raw DOM commands or the new Element... construction. The  
> result will actually behave as a form element in all browsers, where  
> this technique may not.
>
> Walter
>
> On Feb 4, 2009, at 8:26 AM, Squared wrote:
>
> > How can I grab this value so I can use it in
> > my select statement or drop down 3? OR, am I going about this all
> > wrong and should take another approach?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to