Hi, As you suggested I selected Prototype to create the functions I need for a webpage. Please have a look at this page: http://el.webnova.ro/js_fwork/add_article/index.html Here you can see some input boxes which can be sorted, added new ones and delete these ones. The input fields have autocomplete torned on. So far so good but I can''t figure out how can I solve some problems. 1. Move the input text with red border upper. Now try to enter a text and the autocomplete div will pop up. The problem is that the z-index is changed and the autocomplete suggestions are behind the other form elements. How can this be solved? 2. For deleting an element from the sort list I used new Effect.DropOut(this.parentNode). This will delete visually the line but when the sorted elements are serialised the deleted elements are present too. (delete one element and then sort the list to display the serialised string). How can I remove for good the element from the sort list? 3. When somebody select an item from the autocomplete list I would like to set somewhere that in that input text field an item from the database was selected (store an id). Once the user leaves the input field (lost focus) then I should check against the database if that entry exists and if not then change the style to look like the red one in my example. Further I''m going to add a message next to the box. Can anybody give some hints or samples how can be done? Once this is functional I''ll like to contribute with this sample to the list maybee others will find it usefull too. (if somebody can host it I''ll send the sources) Thank you very much, -Peter ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter Csaba wrote:> Please have a look at this page: > http://el.webnova.ro/js_fwork/add_article/index.html > > Here you can see some input boxes which can be sorted, added new ones > and delete these ones. The input fields have autocomplete torned on. > > So far so good but I can''t figure out how can I solve some problems. > [1...3] > Can anybody give some hints or samples how can be done?Check out the source of this sample: http://people.n0i.net/altblue/webbie/webnova/ You will easily find out the fixes for all those three problems. cheers. - -- Marius Feraru -----BEGIN PGP SIGNATURE----- iD4DBQFFZmkctZHp/AYZiNkRAv1xAJY3rr2VmvllvEP9U5qGkDZTKOzuAJ9S9BRP EvFlLtf0vafr8Jw8ZR17CQ==rgxu -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hello, With the help of Marius (thank you!) I suceed to advance with the sortable, autocomplete, add and remove new lines. Still there are some issues remaining and maybee somebody can help. We have 2 versions but none of them is working corectly in both Firefox and IE(7). 1. Version I http://el.webnova.ro/js_fwork/add_article/index_altblue.htm Works corectly in Firefox, but won''t work in IE. var input = $T(''input'', {id: ''input_'' + id, name: ''nova'', type: ''text''});>>>> input.observe(''blur'', checkValue.bind(input));IE will stop at this line. Can this be fixed in order to function correctly in both of the browsers? 2. Version II http://el.webnova.ro/js_fwork/add_article/index.html This version works in both IE and FF but here are other problems. a)The dynamically added new lines new Insertion.Bottom(''list'', ''<li id= ...... can''t be deleted. They are not seens as existing elements (li). The original ones which are present as HTML code are removeable without error. b) The z-index issue was fixed by the patch from Marius function fixEntry(li) { li.setStyle({''z-index'': ''auto''}); }; BUT works only in FF and not IE7. Do you have any ideea how this can be fixed? Thank you, Peter Csaba ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter Csaba wrote:> We have 2 versions but none of them is working corectly in both > Firefox and IE(7).I''ve updated that toy to work with IE7 too. Refresh, same URL.> Works corectly in Firefox, but won''t work in IE. var input > $T(''input'', {id: ''input_'' + id, name: ''nova'', type: ''text''}); >>>>> input.observe(''blur'', checkValue.bind(input));script.aculo.us'' Builder.node() doesn''t upgrade created elements (OK, in fact it''s a Prototype issue on IE). I wrote a wrapper for it (the same $T()) which will upgrade all returned elements (and more).> a)The dynamically added new lines new Insertion.Bottom(''list'', ''<li > id= ...... can''t be deleted. They are not seens as existing elements > (li). The original ones which are present as HTML code are removeable > without error.Looks like you cannot (currently) add inline event handlers (a...onclick) with Insertion.> b) The z-index issue was fixed by the patch from Marius function > fixEntry(li) { li.setStyle({''z-index'': ''auto''}); }; > BUT works only in FF and not IE7. Do you have any ideea how this can > be fixed?Yes, that really is a workaround that would work only in standards compliant browsers. IE''s support for "z-index" is still broken (it doesn''t even support values like "auto" or "inherit", not to mention all its stacking problems). Nevertheless, there is a simple workaround that works even in IE: moving "autocomplete" DIVs outside those Draggables (trusting script.aculo.us to position them where they should be - it does its job fair enough). ;-) cheers - -- Marius Feraru -----BEGIN PGP SIGNATURE----- iD8DBQFFZwxstZHp/AYZiNkRAhpDAJ43aPPFSKdFF0g/xoAXtswZ4BtNvQCdFL1a USDO4TpaAH6wkg2F6GVsx+Q=yJJi -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Works perfectly! Thank you Marius. http://www.dhtmlgoodies.com/scripts/ajax-poller/ajax-poller.html Peter ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---