Hi! I have tried the demo code from http://www.prototypejs.org/api/timedObserver and get a "Null value" error in Safari and a "element has no properties" (line 2753) error in Firefox. I use prototype version 1.5.1.1 My html code looks like that ... <html> <head> <title>Test</title> <script src="prototype.js" type="text/javascript"></script> </head> <body> <script type="text/javascript"> //<![CDATA[ new Form.Element.Observer(''test'', 0.2, function(el, value) { alert(''New value: '' + value) } ) //]]> </script> <form action="#" method="post"> <input type="text" name="test" value="" id="test"> <input type="submit" value="Continue →"> </form> </body> </html> What wrong? TIA, Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You''re trying to create the observer before the field has loaded. Either put the "new Form.Element.Observer ..." inside an onload observer, or move the script to the bottom of the file. TAG On Aug 15, 2007, at 12:38 PM, Mike Heininger wrote:> > Hi! > > I have tried the demo code from http://www.prototypejs.org/api/ > timedObserver > and get a "Null value" error in Safari and a "element has no > properties" (line 2753) error in Firefox. > > I use prototype version 1.5.1.1 > > My html code looks like that ... > > <html> > <head> > <title>Test</title> > <script src="prototype.js" type="text/javascript"></script> > </head> > <body> > > <script type="text/javascript"> > //<![CDATA[ > new Form.Element.Observer(''test'', 0.2, function(el, value) > { alert(''New value: '' + value) } ) > //]]> > </script> > > <form action="#" method="post"> > <input type="text" name="test" value="" id="test"> > <input type="submit" value="Continue →"> > </form> > > </body> > </html> > > What wrong? > > TIA, > Mike > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
oh thats just.... so procedural programming oriented lol thanks again Tom and thank you Mike; I literally, right now, implemented this into a page i am working on. On 8/15/07, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote:> > > You''re trying to create the observer before the field has loaded. > Either put the "new Form.Element.Observer ..." inside an onload > observer, or move the script to the bottom of the file. > > > TAG > > On Aug 15, 2007, at 12:38 PM, Mike Heininger wrote: > > > > > Hi! > > > > I have tried the demo code from http://www.prototypejs.org/api/ > > timedObserver > > and get a "Null value" error in Safari and a "element has no > > properties" (line 2753) error in Firefox. > > > > I use prototype version 1.5.1.1 > > > > My html code looks like that ... > > > > <html> > > <head> > > <title>Test</title> > > <script src="prototype.js" > type="text/javascript"></script> > > </head> > > <body> > > > > <script type="text/javascript"> > > //<![CDATA[ > > new Form.Element.Observer(''test'', 0.2, function(el, > value) > > { alert(''New value: '' + value) } ) > > //]]> > > </script> > > > > <form action="#" method="post"> > > <input type="text" name="test" value="" id="test"> > > <input type="submit" value="Continue →"> > > </form> > > > > </body> > > </html> > > > > What wrong? > > > > TIA, > > Mike > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Aug 15, 9:31 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> You''re trying to create the observer before the field has loaded. > Either put the "new Form.Element.Observer ..." inside an onload > observer, or move the script to the bottom of the file.Arrgh ;-) Thanks for your fast reply ... this fixed the problem ... Cheers, Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Aug 15, 9:45 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> oh thats just.... > > so procedural programming oriented lolThat''s true ;-) Cheers, Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---