Hi again :-)

I forgot to mention that your code works in FF 3.0, and not 3.5. Sorry 
my mistake. Have you tried my code on pastie?

It will return you option element on change.

- Marko

speedpac...@gmail.com wrote:
> Hi Marko,
>
> Thanks again for this.
> I'm starting to lose my faith here, but this still hasn't been
> resolved...
>
> Basically, this is (still) my issue:
>
> THIS:
>
> alert(orderOptions.getValue());
>
> returns a CORRECT value, indicating that I do have an option under the
> combo that returns a good value...  So when TRYING to select the
> <option for that orderOptions combo like this:
>
> selectedItem = orderOptions.select('[value="' + orderOptions.getValue
> () + '"]');
>
> selectedItem is simply empty.
> I have gone through the code a dozen times, I have changed my code to
> use googleapis in stead of my own hosted version because I was afraid
> it may have been screwed, but still have NO result whatsoever.
>
> Anyone else have an idea?
> It used to work, but suddenly stopped working :(
>
> On 21 sep, 20:52, Marko <gm.ma...@gmail.com> wrote:
>   
>> Hi David,
>>
>> There is just one missing ) before the end }); but this code works for
>> me in FF 3.5 with prototype version 1.6.1.
>>
>> I've made pastie version of it and changed from alert to console.log for
>> Firebug.
>>
>> I've also made small function that returns selected option as I think it
>> should be done.
>>
>> Here is pastie:http://pastie.org/624937
>>
>> - Marko
>>
>> speedpac...@gmail.com wrote:
>>     
>>> Hi Marko,
>>>       
>>> This should do it, I believe:
>>> -----------------------------------------------
>>>       
>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
>>> TR/html4/strict.dtd">
>>> <html>
>>> <head>
>>> <!-- TODO: Obviously, change this if you're using a different encoding
>>> -->
>>> <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
>>> <title>Test Page</title>
>>> <script type='text/javascript' src='prototype.js'></script>
>>> <script type='text/javascript'>
>>> document.observe('dom:loaded', function() {
>>>       
>>>            // TODO: Delete this and the button below if you don't need them
>>>            // for what you're trying to replicate
>>>            orderOptions = $('orderOption[test.com]');
>>>       
>>>    orderOptions.observe('change', function(event) {
>>>            alert('Combobox selected: ' + orderOptions.identify());
>>>       
>>>            alert('Current value for the combo is ' + 
>>> orderOptions.getValue());
>>>       
>>>            alert('Selected Item: ' + orderOptions.down('[value="' +
>>> orderOptions.getValue() + '"]'));
>>>    }
>>> });
>>>       
>>> </script>
>>> </head>
>>> <body><div>
>>>       
>>> <select id="orderOption[test.com]" domain="test.com" name="orderOption
>>> [qsfqsfqsf.cn]">
>>> <option value="N100005" domain="test.com" prepaid_total="20.20 EUR"
>>> postpaid_total="25.25 EUR">Registreer voor 1 Jaar</option>
>>> <option value="N100006" domain="test.com" prepaid_total="39.60 EUR"
>>> postpaid_total="49.50 EUR">Registreer voor 2 Jaar</option>
>>> <option value="N100009" domain="test.com" prepaid_total="58.20 EUR"
>>> postpaid_total="72.75 EUR">Registreer voor 3 Jaar</option>
>>> <option value="N100007" domain="test.com" prepaid_total="95.00 EUR"
>>> postpaid_total="118.75 EUR">Registreer voor 5 Jaar</option>
>>> <option value="N100008" domain="test.com" prepaid_total="186.50 EUR"
>>> postpaid_total="233.00 EUR">Registreer voor 10 Jaar</option>
>>> </select>
>>>       
>>> </div></body>
>>> </html>
>>>       
>>> -----------------------------------------------
>>>       
>>> Just change the combo...
>>>       
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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