Hello, how can i test if a object is in the dom without a js alert for example $("filter_sum").value; in my example sometimes ''filter_sum'' is missed and i must check it ____________ Virus checked by G DATA AntiVirusKit Version: AVK 17.8024 from 22.09.2007 Virus news: www.antiviruslab.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 -~----------~----~----~----~------~----~------~--~---
hi,> how can i test if a object is in the dom without a js alert> > for example > > $("filter_sum").value;if you use firebug in firefox, you can use console.log($("filter_sum").value); as described on [1]. hope this helps. greez . caillou links: [1] http://www.getfirebug.com/console.html --~--~---------~--~----~------------~-------~--~----~ 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 should mention that you have to have Firebug installed before you can use console.log sent from iPhone On Sep 22, 2007, at 3:58 PM, Pierre Spring <caillou-OI3hZJvNYWs@public.gmane.org> wrote:> > hi, > >> how can i test if a object is in the dom without a js alert>> >> for example >> >> $("filter_sum").value; > > if you use firebug in firefox, you can use > > console.log($("filter_sum").value); > > as described on [1]. > > hope this helps. > > greez . caillou > > links: > [1] http://www.getfirebug.com/console.html > > >--~--~---------~--~----~------------~-------~--~----~ 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 9/22/07, retacom-Mmb7MZpHnFY@public.gmane.org <retacom-Mmb7MZpHnFY@public.gmane.org> wrote:> > Hello, > > how can i test if a object is in the dom without a js alert> > for example > > $("filter_sum").value; > > in my example sometimes ''filter_sum'' is missed and i must check it >var f = $(''filter_sum''); if (f) { // "filter_sum" exists f.value; } else { // "filter_sum" dosn''t exist } Yours, Nicolas --~--~---------~--~----~------------~-------~--~----~ 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, its not for debugging. It can happen on live mode> hi, > >> how can i test if a object is in the dom without a js alert>> >> for example >> >> $("filter_sum").value; > > if you use firebug in firefox, you can use > > console.log($("filter_sum").value); >____________ Virus checked by G DATA AntiVirusKit Version: AVK 17.8057 from 23.09.2007 Virus news: www.antiviruslab.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 -~----------~----~----~----~------~----~------~--~---
Hello, thats thows an error Error: $("filter_suchwort") has no properties my code is: var filter = $("filter").value;> > var f = $(''filter_sum''); > if (f) { > // "filter_sum" exists > f.value; > } else { > // "filter_sum" dosn''t exist > }____________ Virus checked by G DATA AntiVirusKit Version: AVK 17.8057 from 23.09.2007 Virus news: www.antiviruslab.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 -~----------~----~----~----~------~----~------~--~---
if $(''filter_sum'') does not exist than the value can not either.. in the original sample sample provided, they tested for $ (''filter_sum'') befor trying to read $(''filter_sum'').value this will not throw an error if ($(''filter_sum'')) { // "filter_sum" exists alert($(''filter_sum'').value); } else { // "filter_sum" dosn''t exist } but this would.... if ($(''filter_sum'').value) { // "filter_sum" exists alert($(''filter_sum'').value); } else { // "filter_sum" dosn''t exist } ______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 23-Sep-07, at 5:06 AM, retacom-Mmb7MZpHnFY@public.gmane.org wrote:> > Hello, > > thats thows an error > > Error: $("filter_suchwort") has no properties > > my code is: > > var filter = $("filter").value; > > >> >> var f = $(''filter_sum''); >> if (f) { >> // "filter_sum" exists >> f.value; >> } else { >> // "filter_sum" dosn''t exist >> } > > > > ____________ > Virus checked by G DATA AntiVirusKit > Version: AVK 17.8057 from 23.09.2007 > Virus news: www.antiviruslab.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 -~----------~----~----~----~------~----~------~--~---
On 9/23/07, retacom-Mmb7MZpHnFY@public.gmane.org <retacom-Mmb7MZpHnFY@public.gmane.org> wrote:> > Hello, > > thats thows an error > > Error: $("filter_suchwort") has no properties > > my code is: > > var filter = $("filter").value; > > > > > > var f = $(''filter_sum''); > > if (f) { > > // "filter_sum" exists > > f.value; > > } else { > > // "filter_sum" dosn''t exist > > } > > >I do not see the link between the code I''ve suggested and the error you''re reporting... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---