[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread Marko
No problem. I'm glad I have helped you. speedpac...@gmail.com wrote: > My hero! > Let's hope prototype just creates function to get the option from a > combo :) > > Thanks so much for this - it drove me MAD! > > On 28 sep, 17:28, Marko wrote: > >> I have both 3.0 and 3.5 installed and som

[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread speedpac...@gmail.com
My hero! Let's hope prototype just creates function to get the option from a combo :) Thanks so much for this - it drove me MAD! On 28 sep, 17:28, Marko wrote: > I have both 3.0 and 3.5 installed and sometimes I start 3.0 instead of > 3.5 :-). > > I've wrote workaround function: > >  /* >  

[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread Marko
I have both 3.0 and 3.5 installed and sometimes I start 3.0 instead of 3.5 :-). I've wrote workaround function: /* * Function retuns selected option for given select element. * As options are stored as array on select element, and we can get * selected element as select.selectedInde

[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread speedpac...@gmail.com
OMG - I have been tesing on 3.5 for ages now LOL How did you find out? Is there gonna be a patch soon? How can I go around this? Your code doesn't work on 3.5 either, does it? David. On 28 sep, 17:19, Marko wrote: > Hi again :-) > > I forgot to mention that your code works in FF 3.0, and not

[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread Marko
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 t

[Proto-Scripty] Re: .select on a combo

2009-09-28 Thread speedpac...@gmail.com
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

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread Marko
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 don

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread speedpac...@gmail.com
Hi Marko, This should do it, I believe: --- http://www.w3.org/ TR/html4/strict.dtd"> Test Page document.observe('dom:loaded', function() { // TODO: Delete this and the button below if you don't need them // for what you're tryin

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread Marko
Hi, Before you go totally crazy please create self-contained-test-page and I will return you working version. - Marko speedpac...@gmail.com wrote: > Hi again! > > Thanks for the feedback. It's very much appreciated! (what would we > a

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread speedpac...@gmail.com
Hi again! Thanks for the feedback. It's very much appreciated! (what would we all do without those around here giving their spare time to help others out... I hope one day I'll be able to help some people out on this fantastic list!) Nevertheless, I tried doing what you suggested, but I'm goin

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread Daniel Rubin
speedpac...@gmail.com wrote: > Hi Federico, > > > the readattroibute isn't giving the issues; that works fine, and the > alert does indeed return the expected value. > The line in the code no longer working is > > selectedItem = orderOptions.select('[value="' + orderOptions.getValue > () + '"]'

[Proto-Scripty] Re: .select on a combo

2009-09-21 Thread speedpac...@gmail.com
Hi, Does noboday know what I should do to have this fixed? I don't understand what is wrong with the code - if anything really... :( Once again thanks to all for your kind assistance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Proto-Scripty] Re: .select on a combo

2009-09-20 Thread speedpac...@gmail.com
Hi Federico, the readattroibute isn't giving the issues; that works fine, and the alert does indeed return the expected value. The line in the code no longer working is selectedItem = orderOptions.select('[value="' + orderOptions.getValue () + '"]'); where orderOptions is the combo, and the se

[Proto-Scripty] Re: .select on a combo

2009-09-20 Thread jacknife
hi, have you tried to use the Element class methods readAttribute/ writeAttribute instead that ordinary getAttribute/setAttribute? i recently experienced some issues using getAttribute to retrieve setted parameters. Federico On Sep 18, 7:33 pm, "speedpac...@gmail.com" wrote: > Hi Marko, > > G

[Proto-Scripty] Re: .select on a combo

2009-09-18 Thread speedpac...@gmail.com
Hi Marko, Great idea on combining the different attributes into one value attribute with the pipe character. I'll consider it for a later version, because this obviously also requires changes on the serverside as we'll end up with other values being sent to the server... The class tihngy I knew

[Proto-Scripty] Re: .select on a combo

2009-09-18 Thread Marko
Hi, Instead of adding attributes on element you can rewrite it like this: Registreer voor 1 Jaar => Registreer voor 1 Jaar => Registreer voor 1 Jaar You can get value like this: selectedItem = orderOptions.select('[value="' + orderOptions.getValue() + '"]'); => As this is equal to

[Proto-Scripty] Re: .select on a combo

2009-09-18 Thread speedpac...@gmail.com
Hi, First and foremost - thanks for the feedback! It's MUCH appreciated! To test, you can go to www.flexin.be Once arrived on that site, log in using t...@speedpacket.com / test123 (top right) Then go to http://flexin.be/site/en/ProductSubscriptionDomain/addToCart/index.html (it will return a

[Proto-Scripty] Re: .select on a combo

2009-09-18 Thread david
Hi speedpacket, > this is the javascript that worked up until a few weeks ago when I > upgraded to the new release of prototype: I've tested with with prototype v1.6.0.2 and 1.6.1 and both does not return anything. But I'm not sure, because I have to modify the code you give. Please, send us a li