Is it possible to do the loadTextURL business without hitting the server?
My options list is a javascript variable (array) on the client. If I could just reference that it would avoid an unnecessary trip to my server. Perhaps just a "loadText" option? On Dec 13, 11:50 pm, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > Andy Koch a écrit : > > > But, I read in the Proto/Script book that the 'value' option is > > deprecated - so I'm thinking there must be a better way. > > Yes, I do say on p369 that the option has been deprecated, as it makes > no sense (and I explain why). However, it's still there, but indeed, it > would only work the first time around, as it isn't updated by later uses > of the control. > > The issue you're having here is that your control's text, post-edition, > is a "label" (plain text), while the matching to determine the selected > option is against the "value" (in your case, IDs). So you need to use > the same feature you would if you were displaying HTML but editing, say, > Textile: alternate text loading. > > You need to provide a loadTextURL (and possibly customize loadingText) > that will return the proper currently-selected ID. If you handle > multiple IPCE's, use the built-in editorId parameter that will be sent > to determine which one is calling you, and return just the corresponding > current "value" as a response: that is what will be matched against the > collection's values (i.e. IDs in your situation). > > 'HTH > > -- > Christophe Porteneuve aka TDD > [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
