Having problems with the autocomplete on my linux box and firefox. When I use form tags it breaks, without form tags everything works fine. Exact copy of the example provided, but I added form tags.. The initial search and select works but then the box sort of "locks up" and I can''t change it at all, If I do try to type something nothing changes but a second later the whole page goes blank. -- Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice
I read somewhere that scriptaculous has some support for JSON. Can anyone point me to where this might be? Deco
On Wednesday 08 February 2006 06:48, Richard Thomas wrote:> Having problems with the autocomplete on my linux box and firefox. > > When I use form tags it breaks, without form tags everything works fine. > > Exact copy of the example provided, but I added form tags..sounds like you meant to attach something but there was no attachment :)> The initial > search and select works but then the box sort of "locks up" and I can''t > change it at all, If I do try to type something nothing changes but a > second later the whole page goes blank.weird... ;\ -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Sorry about that I attached the non working code below.. However all I had to do to get it to work is remove the <form> </form> tags. I did a bit of testing, its weird really.. I run linux, Firefox 1.0.7 as a user, did not work with form tags, as root it did work. Upgraded to 1.5 works fine now.. Also worked on my laptop, windows firefox 1.5 So it has something to do with running FireFox 1.0.7 as a non-root user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory to make sure it wasn''t a hosed pref file. With all that its most likely some weird FireFox/Linux issue. Hopefully no one can replicate Testing new Company Search<BR> <style> div.auto_complete { width: 350px; background: #fff; } div.auto_complete ul { border:1px solid #888; margin:0; padding:0; width:100%; list-style-type:none; } div.auto_complete ul li { margin:0; padding:3px; } div.auto_complete ul li.selected { background-color: #ffb; } div.auto_complete ul strong.highlight { color: #800; margin:0; padding:0; } </style> <form method=post name=none> <input autocomplete="off" id="contact_name" name="contact[name]" size="30" type="text" value="" /> <div class="auto_complete" id="contact_name_auto_complete"></div> <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', {})</script> <BR><BR><BR><BR><BR> <form> Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice Jeremy Kitchen wrote:> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: > >>Having problems with the autocomplete on my linux box and firefox. >> >>When I use form tags it breaks, without form tags everything works fine. >> >>Exact copy of the example provided, but I added form tags.. > > > sounds like you meant to attach something but there was no attachment :) > > >>The initial >>search and select works but then the box sort of "locks up" and I can''t >>change it at all, If I do try to type something nothing changes but a >>second later the whole page goes blank. > > > weird... ;\ > > -Jeremy > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hey dude I don''t think this problem has much to do with the form tags. Try removing the script from within the form - place it afterwards. I just noticed your last "</form>" is actually a "<form>" - not going to help. What doctype are you sending here? Either way it''s not going to validate. I sometimes find that writing valid code helps with squiffy JavaScript problems. -Rob Richard Thomas wrote:> Sorry about that I attached the non working code below.. However all I > had to do to get it to work is remove the <form> </form> tags. > > I did a bit of testing, its weird really.. I run linux, Firefox 1.0.7 > as a user, did not work with form tags, as root it did work. Upgraded > to 1.5 works fine now.. Also worked on my laptop, windows firefox 1.5 > > So it has something to do with running FireFox 1.0.7 as a non-root > user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory to > make sure it wasn''t a hosed pref file. > > With all that its most likely some weird FireFox/Linux issue. > Hopefully no one can replicate > > > Testing new Company Search<BR> > <style> div.auto_complete { > width: 350px; > background: #fff; > } > div.auto_complete ul { > border:1px solid #888; > margin:0; > padding:0; > width:100%; > list-style-type:none; > } > div.auto_complete ul li { > margin:0; > padding:3px; > } > div.auto_complete ul li.selected { > background-color: #ffb; > } > div.auto_complete ul strong.highlight { > color: #800; > margin:0; > padding:0; > } > </style> > > <form method=post name=none> > <input autocomplete="off" id="contact_name" name="contact[name]" > size="30" type="text" value="" /> > <div class="auto_complete" id="contact_name_auto_complete"></div> > > <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', > ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', > {})</script> > > <BR><BR><BR><BR><BR> > <form> > > > > Richard Thomas - CEO > Cyberlot Technologies Group Inc. > 507.398.4124 - Voice > > > Jeremy Kitchen wrote: >> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >> >>> Having problems with the autocomplete on my linux box and firefox. >>> >>> When I use form tags it breaks, without form tags everything works >>> fine. >>> >>> Exact copy of the example provided, but I added form tags.. >> >> >> sounds like you meant to attach something but there was no attachment :) >> >> >>> The initial search and select works but then the box sort of "locks >>> up" and I can''t >>> change it at all, If I do try to type something nothing changes but a >>> second later the whole page goes blank. >> >> >> weird... ;\ >> >> -Jeremy >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Doh.. Thanks for pointing that out. I changed that to <form method=post name=none> <input autocomplete="off" id="contact_name" name="contact[name]" size="30" type="text" value="" /> <div class="auto_complete" id="contact_name_auto_complete"></div> <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', {})</script> <BR><BR><BR><BR><BR> </form> Still no go in Firefox 1.0.7 on my linux box. With form tags I can still only do a single search and click, then the textfield "locks" up and a second later the page goes blank. Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice Robin Haswell wrote:> Hey dude > > I don''t think this problem has much to do with the form tags. Try > removing the script from within the form - place it afterwards. I just > noticed your last "</form>" is actually a "<form>" - not going to help. > > What doctype are you sending here? Either way it''s not going to > validate. I sometimes find that writing valid code helps with squiffy > JavaScript problems. > > -Rob > > Richard Thomas wrote: > >> Sorry about that I attached the non working code below.. However all I >> had to do to get it to work is remove the <form> </form> tags. >> >> I did a bit of testing, its weird really.. I run linux, Firefox 1.0.7 >> as a user, did not work with form tags, as root it did work. Upgraded >> to 1.5 works fine now.. Also worked on my laptop, windows firefox 1.5 >> >> So it has something to do with running FireFox 1.0.7 as a non-root >> user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory to >> make sure it wasn''t a hosed pref file. >> >> With all that its most likely some weird FireFox/Linux issue. >> Hopefully no one can replicate >> >> >> Testing new Company Search<BR> >> <style> div.auto_complete { >> width: 350px; >> background: #fff; >> } >> div.auto_complete ul { >> border:1px solid #888; >> margin:0; >> padding:0; >> width:100%; >> list-style-type:none; >> } >> div.auto_complete ul li { >> margin:0; >> padding:3px; >> } >> div.auto_complete ul li.selected { >> background-color: #ffb; >> } >> div.auto_complete ul strong.highlight { >> color: #800; >> margin:0; >> padding:0; >> } >> </style> >> >> <form method=post name=none> >> <input autocomplete="off" id="contact_name" name="contact[name]" >> size="30" type="text" value="" /> >> <div class="auto_complete" id="contact_name_auto_complete"></div> >> >> <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', >> ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', >> {})</script> >> >> <BR><BR><BR><BR><BR> >> <form> >> >> >> >> Richard Thomas - CEO >> Cyberlot Technologies Group Inc. >> 507.398.4124 - Voice >> >> >> Jeremy Kitchen wrote: >> >>> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >>> >>>> Having problems with the autocomplete on my linux box and firefox. >>>> >>>> When I use form tags it breaks, without form tags everything works >>>> fine. >>>> >>>> Exact copy of the example provided, but I added form tags.. >>> >>> >>> >>> sounds like you meant to attach something but there was no attachment :) >>> >>> >>>> The initial search and select works but then the box sort of "locks >>>> up" and I can''t >>>> change it at all, If I do try to type something nothing changes but a >>>> second later the whole page goes blank. >>> >>> >>> >>> weird... ;\ >>> >>> -Jeremy >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Try moving the script tags outside the form, or better, in a body onload. Richard Thomas wrote:> Doh.. Thanks for pointing that out. > > I changed that to > > <form method=post name=none> > <input autocomplete="off" id="contact_name" name="contact[name]" > size="30" type="text" value="" /> > <div class="auto_complete" id="contact_name_auto_complete"></div> > > <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', > ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', > {})</script> > > <BR><BR><BR><BR><BR> > </form> > > Still no go in Firefox 1.0.7 on my linux box. With form tags I can > still only do a single search and click, then the textfield "locks" up > and a second later the page goes blank. > > > Richard Thomas - CEO > Cyberlot Technologies Group Inc. > 507.398.4124 - Voice > > > Robin Haswell wrote: >> Hey dude >> >> I don''t think this problem has much to do with the form tags. Try >> removing the script from within the form - place it afterwards. I >> just noticed your last "</form>" is actually a "<form>" - not going >> to help. >> >> What doctype are you sending here? Either way it''s not going to >> validate. I sometimes find that writing valid code helps with squiffy >> JavaScript problems. >> >> -Rob >> >> Richard Thomas wrote: >> >>> Sorry about that I attached the non working code below.. However all >>> I had to do to get it to work is remove the <form> </form> tags. >>> >>> I did a bit of testing, its weird really.. I run linux, Firefox >>> 1.0.7 as a user, did not work with form tags, as root it did work. >>> Upgraded to 1.5 works fine now.. Also worked on my laptop, windows >>> firefox 1.5 >>> >>> So it has something to do with running FireFox 1.0.7 as a non-root >>> user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory to >>> make sure it wasn''t a hosed pref file. >>> >>> With all that its most likely some weird FireFox/Linux issue. >>> Hopefully no one can replicate >>> >>> >>> Testing new Company Search<BR> >>> <style> div.auto_complete { >>> width: 350px; >>> background: #fff; >>> } >>> div.auto_complete ul { >>> border:1px solid #888; >>> margin:0; >>> padding:0; >>> width:100%; >>> list-style-type:none; >>> } >>> div.auto_complete ul li { >>> margin:0; >>> padding:3px; >>> } >>> div.auto_complete ul li.selected { >>> background-color: #ffb; >>> } >>> div.auto_complete ul strong.highlight { >>> color: #800; >>> margin:0; >>> padding:0; >>> } >>> </style> >>> >>> <form method=post name=none> >>> <input autocomplete="off" id="contact_name" name="contact[name]" >>> size="30" type="text" value="" /> >>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>> >>> <script type="text/javascript">new >>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>> ''/event.php?method=autocomplete'', {})</script> >>> >>> <BR><BR><BR><BR><BR> >>> <form> >>> >>> >>> >>> Richard Thomas - CEO >>> Cyberlot Technologies Group Inc. >>> 507.398.4124 - Voice >>> >>> >>> Jeremy Kitchen wrote: >>> >>>> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >>>> >>>>> Having problems with the autocomplete on my linux box and firefox. >>>>> >>>>> When I use form tags it breaks, without form tags everything works >>>>> fine. >>>>> >>>>> Exact copy of the example provided, but I added form tags.. >>>> >>>> >>>> >>>> sounds like you meant to attach something but there was no >>>> attachment :) >>>> >>>> >>>>> The initial search and select works but then the box sort of >>>>> "locks up" and I can''t >>>>> change it at all, If I do try to type something nothing changes but a >>>>> second later the whole page goes blank. >>>> >>>> >>>> >>>> weird... ;\ >>>> >>>> -Jeremy >>>> >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Rails-spinoffs mailing list >>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I have attached the full html page with it onload, still no go with form tags on page Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice Robin Haswell wrote:> Try moving the script tags outside the form, or better, in a body onload. > > Richard Thomas wrote: > >> Doh.. Thanks for pointing that out. >> >> I changed that to >> >> <form method=post name=none> >> <input autocomplete="off" id="contact_name" name="contact[name]" >> size="30" type="text" value="" /> >> <div class="auto_complete" id="contact_name_auto_complete"></div> >> >> <script type="text/javascript">new Ajax.Autocompleter(''contact_name'', >> ''contact_name_auto_complete'', ''/event.php?method=autocomplete'', >> {})</script> >> >> <BR><BR><BR><BR><BR> >> </form> >> >> Still no go in Firefox 1.0.7 on my linux box. With form tags I can >> still only do a single search and click, then the textfield "locks" up >> and a second later the page goes blank. >> >> >> Richard Thomas - CEO >> Cyberlot Technologies Group Inc. >> 507.398.4124 - Voice >> >> >> Robin Haswell wrote: >> >>> Hey dude >>> >>> I don''t think this problem has much to do with the form tags. Try >>> removing the script from within the form - place it afterwards. I >>> just noticed your last "</form>" is actually a "<form>" - not going >>> to help. >>> >>> What doctype are you sending here? Either way it''s not going to >>> validate. I sometimes find that writing valid code helps with squiffy >>> JavaScript problems. >>> >>> -Rob >>> >>> Richard Thomas wrote: >>> >>>> Sorry about that I attached the non working code below.. However all >>>> I had to do to get it to work is remove the <form> </form> tags. >>>> >>>> I did a bit of testing, its weird really.. I run linux, Firefox >>>> 1.0.7 as a user, did not work with form tags, as root it did work. >>>> Upgraded to 1.5 works fine now.. Also worked on my laptop, windows >>>> firefox 1.5 >>>> >>>> So it has something to do with running FireFox 1.0.7 as a non-root >>>> user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory to >>>> make sure it wasn''t a hosed pref file. >>>> >>>> With all that its most likely some weird FireFox/Linux issue. >>>> Hopefully no one can replicate >>>> >>>> >>>> Testing new Company Search<BR> >>>> <style> div.auto_complete { >>>> width: 350px; >>>> background: #fff; >>>> } >>>> div.auto_complete ul { >>>> border:1px solid #888; >>>> margin:0; >>>> padding:0; >>>> width:100%; >>>> list-style-type:none; >>>> } >>>> div.auto_complete ul li { >>>> margin:0; >>>> padding:3px; >>>> } >>>> div.auto_complete ul li.selected { >>>> background-color: #ffb; >>>> } >>>> div.auto_complete ul strong.highlight { >>>> color: #800; >>>> margin:0; >>>> padding:0; >>>> } >>>> </style> >>>> >>>> <form method=post name=none> >>>> <input autocomplete="off" id="contact_name" name="contact[name]" >>>> size="30" type="text" value="" /> >>>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>>> >>>> <script type="text/javascript">new >>>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>>> ''/event.php?method=autocomplete'', {})</script> >>>> >>>> <BR><BR><BR><BR><BR> >>>> <form> >>>> >>>> >>>> >>>> Richard Thomas - CEO >>>> Cyberlot Technologies Group Inc. >>>> 507.398.4124 - Voice >>>> >>>> >>>> Jeremy Kitchen wrote: >>>> >>>>> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >>>>> >>>>>> Having problems with the autocomplete on my linux box and firefox. >>>>>> >>>>>> When I use form tags it breaks, without form tags everything works >>>>>> fine. >>>>>> >>>>>> Exact copy of the example provided, but I added form tags.. >>>>> >>>>> >>>>> >>>>> >>>>> sounds like you meant to attach something but there was no >>>>> attachment :) >>>>> >>>>> >>>>>> The initial search and select works but then the box sort of >>>>>> "locks up" and I can''t >>>>>> change it at all, If I do try to type something nothing changes but a >>>>>> second later the whole page goes blank. >>>>> >>>>> >>>>> >>>>> >>>>> weird... ;\ >>>>> >>>>> -Jeremy >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------ >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rails-spinoffs mailing list >>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>> >>>> >>>> _______________________________________________ >>>> Rails-spinoffs mailing list >>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hm no what you attached was a lot of billing information for either your company or one of your clients :-) You don''t happen to work for the Boston Globe do you? :-) Don''t worry, we won''t tell. -Rob Richard Thomas wrote:> I have attached the full html page with it onload, still no go with > form tags on page > > Richard Thomas - CEO > Cyberlot Technologies Group Inc. > 507.398.4124 - Voice > > > Robin Haswell wrote: >> Try moving the script tags outside the form, or better, in a body >> onload. >> >> Richard Thomas wrote: >> >>> Doh.. Thanks for pointing that out. >>> >>> I changed that to >>> >>> <form method=post name=none> >>> <input autocomplete="off" id="contact_name" name="contact[name]" >>> size="30" type="text" value="" /> >>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>> >>> <script type="text/javascript">new >>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>> ''/event.php?method=autocomplete'', {})</script> >>> >>> <BR><BR><BR><BR><BR> >>> </form> >>> >>> Still no go in Firefox 1.0.7 on my linux box. With form tags I can >>> still only do a single search and click, then the textfield "locks" >>> up and a second later the page goes blank. >>> >>> >>> Richard Thomas - CEO >>> Cyberlot Technologies Group Inc. >>> 507.398.4124 - Voice >>> >>> >>> Robin Haswell wrote: >>> >>>> Hey dude >>>> >>>> I don''t think this problem has much to do with the form tags. Try >>>> removing the script from within the form - place it afterwards. I >>>> just noticed your last "</form>" is actually a "<form>" - not going >>>> to help. >>>> >>>> What doctype are you sending here? Either way it''s not going to >>>> validate. I sometimes find that writing valid code helps with >>>> squiffy JavaScript problems. >>>> >>>> -Rob >>>> >>>> Richard Thomas wrote: >>>> >>>>> Sorry about that I attached the non working code below.. However >>>>> all I had to do to get it to work is remove the <form> </form> tags. >>>>> >>>>> I did a bit of testing, its weird really.. I run linux, Firefox >>>>> 1.0.7 as a user, did not work with form tags, as root it did work. >>>>> Upgraded to 1.5 works fine now.. Also worked on my laptop, windows >>>>> firefox 1.5 >>>>> >>>>> So it has something to do with running FireFox 1.0.7 as a non-root >>>>> user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory >>>>> to make sure it wasn''t a hosed pref file. >>>>> >>>>> With all that its most likely some weird FireFox/Linux issue. >>>>> Hopefully no one can replicate >>>>> >>>>> >>>>> Testing new Company Search<BR> >>>>> <style> div.auto_complete { >>>>> width: 350px; >>>>> background: #fff; >>>>> } >>>>> div.auto_complete ul { >>>>> border:1px solid #888; >>>>> margin:0; >>>>> padding:0; >>>>> width:100%; >>>>> list-style-type:none; >>>>> } >>>>> div.auto_complete ul li { >>>>> margin:0; >>>>> padding:3px; >>>>> } >>>>> div.auto_complete ul li.selected { >>>>> background-color: #ffb; >>>>> } >>>>> div.auto_complete ul strong.highlight { >>>>> color: #800; >>>>> margin:0; >>>>> padding:0; >>>>> } >>>>> </style> >>>>> >>>>> <form method=post name=none> >>>>> <input autocomplete="off" id="contact_name" name="contact[name]" >>>>> size="30" type="text" value="" /> >>>>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>>>> >>>>> <script type="text/javascript">new >>>>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>>>> ''/event.php?method=autocomplete'', {})</script> >>>>> >>>>> <BR><BR><BR><BR><BR> >>>>> <form> >>>>> >>>>> >>>>> >>>>> Richard Thomas - CEO >>>>> Cyberlot Technologies Group Inc. >>>>> 507.398.4124 - Voice >>>>> >>>>> >>>>> Jeremy Kitchen wrote: >>>>> >>>>>> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >>>>>> >>>>>>> Having problems with the autocomplete on my linux box and firefox. >>>>>>> >>>>>>> When I use form tags it breaks, without form tags everything >>>>>>> works fine. >>>>>>> >>>>>>> Exact copy of the example provided, but I added form tags.. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> sounds like you meant to attach something but there was no >>>>>> attachment :) >>>>>> >>>>>> >>>>>>> The initial search and select works but then the box sort of >>>>>>> "locks up" and I can''t >>>>>>> change it at all, If I do try to type something nothing changes >>>>>>> but a >>>>>>> second later the whole page goes blank. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> weird... ;\ >>>>>> >>>>>> -Jeremy >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------ >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rails-spinoffs mailing list >>>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rails-spinoffs mailing list >>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>> >>>> >>>> _______________________________________________ >>>> Rails-spinoffs mailing list >>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > ------------------------------------------------------------------------ > > ** TKO ** ( 02/06/06 ) > Service > Initial $99 > Recurring $99 Starting 02/06/06 Monthly > Commission Larry > Initial $148.5 > Recurring $10 Starting 03/06/06 Monthly > > ** Phisto ** ( 02/09/06 ) > Service > Initial $449.85 Qtr > Recurring $449.85 Starting 05/09/06 Qtr > Commission Larry > Initial $100 > Recurring $25 Starting 05/09/06 Monthly > > ** Decade, Inc. ** ( 02/12/06 ) > Service > Initial $75 > Recurring $75 Starting 03/12/06 Monthly > Commission Kari > Initial $112.5 > Recurring $6.25 Month Starting 03/12/07 > > ** Team Research Inc. ** ( 02/15/06 ) > Service > Initial $599.70 > Recurring $599.70 Semi 08/15/06 > Commission Rob > Initial $175 > Recurring $8.32 Month Starting 02/15/07 > > ** Caltec Computers ** ( 02/18/06 ) > Service > Initial $250 > Recurring $250 Annual 02/18/07 > Commission David > Initial $31.25 > Recurring $1.73 Month Starting 02/18/07 > > ** Minnesota Computers Corp.** ( 02/21/06 ) > Service > Initial $129 > Recurring $129 Starting 3/21/06 Monthly > Commission Larry > Initial $100 > Recurring $12.50 Starting 3/21/06 Monthly > > ** Claim it AB ** ( 02/24/06 ) > Service > Initial $75 > Recurring $75 Starting 3/24/06 Monthly > Commission Larry > Initial $100 > Recurring $6.25 Starting 2/24/07 Monthly > > ** Nordic Computer ** ( 02/27/06 ) > Service > Initial $495 > Recurring $495 Starting 10/27/06 Semi > Commission Rob > Initial $100 > Recurring $10 Starting 10/27/06 Monthly > > ** Ameta Computer A/S ** ( 03/02/06 ) > Service > Initial $129 > Recurring $129 starting 04/02/06 Monthly > Commission Daniel > Initial $129 > Recurring $12.50 Starting 04/06/06 Monthly > > ** Kimbrer Systems ** ( 03/05/06 ) > Service > Initial $1,150 > Recurring $129 Starting 4/05/07 Monthly > Commission Kristin > Initial $225 > Recurring $10 Starting 3/06/07 Monthly > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
here is the html, the last was test data, I started going through the autocomplete bit by bit trying to figure out exactly where it puts at in this case, Its after the new Ajax.Request in the getUpdatedChoices function. If I disable that request the freezup doesn''t happen. so it looks to be more a prototype issue then something to do directly with scriptaculous>> Robin Haswell wrote: >> >>> Try moving the script tags outside the form, or better, in a body >>> onload. >>> >>> Richard Thomas wrote: >>> >>>> Doh.. Thanks for pointing that out. >>>> >>>> I changed that to >>>> >>>> <form method=post name=none> >>>> <input autocomplete="off" id="contact_name" name="contact[name]" >>>> size="30" type="text" value="" /> >>>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>>> >>>> <script type="text/javascript">new >>>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>>> ''/event.php?method=autocomplete'', {})</script> >>>> >>>> <BR><BR><BR><BR><BR> >>>> </form> >>>> >>>> Still no go in Firefox 1.0.7 on my linux box. With form tags I can >>>> still only do a single search and click, then the textfield "locks" >>>> up and a second later the page goes blank. >>>> >>>> >>>> Richard Thomas - CEO >>>> Cyberlot Technologies Group Inc. >>>> 507.398.4124 - Voice >>>> >>>> >>>> Robin Haswell wrote: >>>> >>>>> Hey dude >>>>> >>>>> I don''t think this problem has much to do with the form tags. Try >>>>> removing the script from within the form - place it afterwards. I >>>>> just noticed your last "</form>" is actually a "<form>" - not going >>>>> to help. >>>>> >>>>> What doctype are you sending here? Either way it''s not going to >>>>> validate. I sometimes find that writing valid code helps with >>>>> squiffy JavaScript problems. >>>>> >>>>> -Rob >>>>> >>>>> Richard Thomas wrote: >>>>> >>>>>> Sorry about that I attached the non working code below.. However >>>>>> all I had to do to get it to work is remove the <form> </form> tags. >>>>>> >>>>>> I did a bit of testing, its weird really.. I run linux, Firefox >>>>>> 1.0.7 as a user, did not work with form tags, as root it did work. >>>>>> Upgraded to 1.5 works fine now.. Also worked on my laptop, windows >>>>>> firefox 1.5 >>>>>> >>>>>> So it has something to do with running FireFox 1.0.7 as a non-root >>>>>> user on linux ( Fedora Core 4 ).. I deleted my .mozilla directory >>>>>> to make sure it wasn''t a hosed pref file. >>>>>> >>>>>> With all that its most likely some weird FireFox/Linux issue. >>>>>> Hopefully no one can replicate >>>>>> >>>>>> >>>>>> Testing new Company Search<BR> >>>>>> <style> div.auto_complete { >>>>>> width: 350px; >>>>>> background: #fff; >>>>>> } >>>>>> div.auto_complete ul { >>>>>> border:1px solid #888; >>>>>> margin:0; >>>>>> padding:0; >>>>>> width:100%; >>>>>> list-style-type:none; >>>>>> } >>>>>> div.auto_complete ul li { >>>>>> margin:0; >>>>>> padding:3px; >>>>>> } >>>>>> div.auto_complete ul li.selected { >>>>>> background-color: #ffb; >>>>>> } >>>>>> div.auto_complete ul strong.highlight { >>>>>> color: #800; >>>>>> margin:0; >>>>>> padding:0; >>>>>> } >>>>>> </style> >>>>>> >>>>>> <form method=post name=none> >>>>>> <input autocomplete="off" id="contact_name" name="contact[name]" >>>>>> size="30" type="text" value="" /> >>>>>> <div class="auto_complete" id="contact_name_auto_complete"></div> >>>>>> >>>>>> <script type="text/javascript">new >>>>>> Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >>>>>> ''/event.php?method=autocomplete'', {})</script> >>>>>> >>>>>> <BR><BR><BR><BR><BR> >>>>>> <form> >>>>>> >>>>>> >>>>>> >>>>>> Richard Thomas - CEO >>>>>> Cyberlot Technologies Group Inc. >>>>>> 507.398.4124 - Voice >>>>>> >>>>>> >>>>>> Jeremy Kitchen wrote: >>>>>> >>>>>>> On Wednesday 08 February 2006 06:48, Richard Thomas wrote: >>>>>>> >>>>>>>> Having problems with the autocomplete on my linux box and firefox. >>>>>>>> >>>>>>>> When I use form tags it breaks, without form tags everything >>>>>>>> works fine. >>>>>>>> >>>>>>>> Exact copy of the example provided, but I added form tags.. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> sounds like you meant to attach something but there was no >>>>>>> attachment :) >>>>>>> >>>>>>> >>>>>>>> The initial search and select works but then the box sort of >>>>>>>> "locks up" and I can''t >>>>>>>> change it at all, If I do try to type something nothing changes >>>>>>>> but a >>>>>>>> second later the whole page goes blank. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> weird... ;\ >>>>>>> >>>>>>> -Jeremy >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rails-spinoffs mailing list >>>>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rails-spinoffs mailing list >>>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rails-spinoffs mailing list >>>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>>>> >>>> _______________________________________________ >>>> Rails-spinoffs mailing list >>>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >> ------------------------------------------------------------------------ >> >> ** TKO ** ( 02/06/06 ) >> Service >> Initial $99 >> Recurring $99 Starting 02/06/06 Monthly >> Commission Larry >> Initial $148.5 >> Recurring $10 Starting 03/06/06 Monthly >> ** Phisto ** ( 02/09/06 ) >> Service >> Initial $449.85 Qtr >> Recurring $449.85 Starting 05/09/06 Qtr >> Commission Larry >> Initial $100 >> Recurring $25 Starting 05/09/06 Monthly >> >> ** Decade, Inc. ** ( 02/12/06 ) >> Service >> Initial $75 >> Recurring $75 Starting 03/12/06 Monthly >> Commission Kari >> Initial $112.5 >> Recurring $6.25 Month Starting 03/12/07 >> >> ** Team Research Inc. ** ( 02/15/06 ) >> Service >> Initial $599.70 >> Recurring $599.70 Semi 08/15/06 >> Commission Rob >> Initial $175 >> Recurring $8.32 Month Starting 02/15/07 >> >> ** Caltec Computers ** ( 02/18/06 ) >> Service >> Initial $250 >> Recurring $250 Annual 02/18/07 >> Commission David >> Initial $31.25 >> Recurring $1.73 Month Starting 02/18/07 >> >> ** Minnesota Computers Corp.** ( 02/21/06 ) >> Service >> Initial $129 >> Recurring $129 Starting 3/21/06 Monthly >> Commission Larry >> Initial $100 >> Recurring $12.50 Starting 3/21/06 Monthly >> >> ** Claim it AB ** ( 02/24/06 ) >> Service >> Initial $75 >> Recurring $75 Starting 3/24/06 Monthly >> Commission Larry >> Initial $100 >> Recurring $6.25 Starting 2/24/07 Monthly >> >> ** Nordic Computer ** ( 02/27/06 ) >> Service >> Initial $495 >> Recurring $495 Starting 10/27/06 Semi >> Commission Rob >> Initial $100 >> Recurring $10 Starting 10/27/06 Monthly >> >> ** Ameta Computer A/S ** ( 03/02/06 ) >> Service >> Initial $129 >> Recurring $129 starting 04/02/06 Monthly >> Commission Daniel >> Initial $129 >> Recurring $12.50 Starting 04/06/06 Monthly >> >> ** Kimbrer Systems ** ( 03/05/06 ) >> Service >> Initial $1,150 >> Recurring $129 Starting 4/05/07 Monthly >> Commission Kristin >> Initial $225 >> Recurring $10 Starting 3/06/07 Monthly >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi guys, I am a newbie voor Ajax and web design. I am a programmer that only make all html work interactively. I don''t know much of javascript except for validating user inputs. As the following links. I want to be able to drag the square objects and also want to drag and drop the div''s inside those objects too. http://develop.thailife.nl/SLLists/test.html I have tried the code below but somehow it does not work. :-( Could anyone please help me out? Sorry for my bad English... <div id="nong1" style="width: 370px; padding: 0px; margin: 0px; float: left;"> <div id="x" class="list-item" style="border-color: #787530"> <div id="1" class="cnt">Item 1 from first list.</div> <div id="2" class="cnt">Item 2 from first list.</div> <div id="3"class="cnt">Item 3 from first list.</div> </div> <div id="y" class="list-item" style="border-color: #9A7530"> <div id="4"class="cnt">Item 1 from first list.</div> <div id="5"class="cnt">Item 2 from first list.</div> <div id="6"class="cnt">Item 3 from first list.</div> </div> <div id="z" class="list-item" style="border-color: #BC7530"> <div id="7"class="cnt">Item 1 from first list.</div> <div id="8"class="cnt">Item 2 from first list.</div> <div id="9"class="cnt">Item 3 from first list.</div> </div> </div> <script type="text/javascript" language="javascript"> // <![CDATA[ Sortable.create("nong1", {dropOnEmpty:true,tag:''div'',containment:["left","middle","right"],constraint:false, ghosting: true}); Sortable.create("x", {dropOnEmpty:true,tag:''div'',containment:["x","y","z"],constraint:false, ghosting: true}); Sortable.create("y", {dropOnEmpty:true,tag:''div'',containment:["x","y","z"],constraint:false, ghosting: true}); Sortable.create("z", {dropOnEmpty:true,tag:''div'',containment:["x","y","z"],constraint:false, ghosting: true});
At approximately Wed, Feb 08, 2006 at 08:03:20AM -0700, Deco Rior wrote:> I read somewhere that scriptaculous has some support for JSON. Can > anyone point me to where this might be?prototype.js has support. in prototype version 1.4.0, searching for "json" shows: line number class method -------------------------------------------------------------- 577, 581 Ajax.Responders dispatch 698, 700 Ajax.Request evalJSON 714, 720, 730, 731 Ajax.Request respondToReadyState James
Thanks, Does anybody know how this works? Deco On Feb 8, 2006, at 2:02 PM, James Marca wrote:> At approximately Wed, Feb 08, 2006 at 08:03:20AM -0700, Deco Rior > wrote: >> I read somewhere that scriptaculous has some support for JSON. Can >> anyone point me to where this might be? > > prototype.js has support. > in prototype version 1.4.0, searching for "json" shows: > > line number class method > -------------------------------------------------------------- > 577, 581 Ajax.Responders dispatch > 698, 700 Ajax.Request evalJSON > 714, 720, 730, 731 Ajax.Request respondToReadyState > > > James > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
First, the Client must call Ajax.Request Then, the server must set an HTTP Header called "X-JSON" -- this will contain your json string. Then, the client's Ajax Callback will contain a 2nd parameter container the JSON object. Ex: new Ajax.Request("json_folders.asp?p=" + escape(fullPath), {onSuccess: DoSomething}); function DoSomething(ar, json) { yourJsonObject = json.yourJsonObject } On 2/8/06, Deco Rior <decorior@tennissource.net> wrote:> > Thanks, > > Does anybody know how this works? > > Deco > On Feb 8, 2006, at 2:02 PM, James Marca wrote: > > > At approximately Wed, Feb 08, 2006 at 08:03:20AM -0700, Deco Rior > > wrote: > >> I read somewhere that scriptaculous has some support for JSON. Can > >> anyone point me to where this might be? > > > > prototype.js has support. > > in prototype version 1.4.0, searching for "json" shows: > > > > line number class method > > -------------------------------------------------------------- > > 577, 581 Ajax.Responders dispatch > > 698, 700 Ajax.Request evalJSON > > 714, 720, 730, 731 Ajax.Request respondToReadyState > > > > > > James > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
So the data is returned in an object that can be handled rather than use strain response.text? Is there a library that allows JSON data object manipulation ? Deco On Feb 8, 2006, at 2:30 PM, Ed C. wrote:> First, the Client must call Ajax.Request > > Then, the server must set an HTTP Header called "X-JSON" -- this > will contain your json string. > > Then, the client''s Ajax Callback will contain a 2nd parameter > container the JSON object. > > Ex: > > new Ajax.Request("json_folders.asp?p=" + escape(fullPath), > {onSuccess: DoSomething}); > > function DoSomething(ar, json) { > yourJsonObject = json.yourJsonObject > } > > > On 2/8/06, Deco Rior <decorior-w9xKMqPX1QdNhnlO7+U8Og@public.gmane.org> wrote: > Thanks, > > Does anybody know how this works? > > Deco > On Feb 8, 2006, at 2:02 PM, James Marca wrote: > > > At approximately Wed, Feb 08, 2006 at 08:03:20AM -0700, Deco Rior > > wrote: > >> I read somewhere that scriptaculous has some support for JSON. Can > >> anyone point me to where this might be? > > > > prototype.js has support. > > in prototype version 1.4.0, searching for "json" shows: > > > > line number class method > > -------------------------------------------------------------- > > 577, 581 Ajax.Responders dispatch > > 698, 700 Ajax.Request evalJSON > > 714, 720, 730, 731 Ajax.Request respondToReadyState > > > > > > James > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 2/8/06, Richard Thomas <lists-i00VYEHud1Hk1uMJSBkQmQ@public.gmane.org> wrote:> here is the html, the last was test data, I started going through the > autocomplete bit by bit trying to figure out exactly where it puts at in > this case, Its after the new Ajax.Request in the getUpdatedChoices > function. If I disable that request the freezup doesn''t happen. > > > so it looks to be more a prototype issue then something to do directly > with scriptaculousIs there a live site we can play with? I''m running Firefox 1.0.7 on Ubuntu 5.10.
No sorry its all internal test data right now. I think its a edge case where my firefox wasn''t playing well with the OS because as root user it worked. I also had issues where after time if I hit cntrl-f firefox would go crazy. Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice Todd Ross wrote:> On 2/8/06, Richard Thomas <lists-i00VYEHud1Hk1uMJSBkQmQ@public.gmane.org> wrote: > >>here is the html, the last was test data, I started going through the >>autocomplete bit by bit trying to figure out exactly where it puts at in >>this case, Its after the new Ajax.Request in the getUpdatedChoices >>function. If I disable that request the freezup doesn''t happen. >> >> >> so it looks to be more a prototype issue then something to do directly >>with scriptaculous > > > Is there a live site we can play with? > > I''m running Firefox 1.0.7 on Ubuntu 5.10. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On 2/8/06, Deco Rior <decorior-w9xKMqPX1QdNhnlO7+U8Og@public.gmane.org> wrote:> So the data is returned in an object that can be handled rather than use > strain response.text? > > > Is there a library that allows JSON data object manipulation ?The callback function is no longer working with JSON { first_name: ''Todd'', last_name: ''Ross'', favorite_movies: [''Office Space'', ''Serenity''] } ... it''s a native JavaScript object. You work with the object by: function theCallback(transport, json) { alert(json.first_name + "''s absolute favorite movie is " + json.favorite_movies[0]); } One such library for working with JavaScript objects would be ... Prototype.
I was thinking of data manipulation libraries. sorts, inserts, etc. I have not used prototype for this since it seemed more like div manipulation, etc. I will have to read the docs a little more! Deco On Feb 8, 2006, at 3:01 PM, Todd Ross wrote:> On 2/8/06, Deco Rior <decorior-w9xKMqPX1QdNhnlO7+U8Og@public.gmane.org> wrote: >> So the data is returned in an object that can be handled rather >> than use >> strain response.text? >> >> >> Is there a library that allows JSON data object manipulation ? > > The callback function is no longer working with JSON > > { > first_name: ''Todd'', > last_name: ''Ross'', > favorite_movies: [''Office Space'', ''Serenity''] > } > > ... it''s a native JavaScript object. You work with the object by: > > function theCallback(transport, json) { > alert(json.first_name + "''s absolute favorite movie is " + > json.favorite_movies[0]); > } > > One such library for working with JavaScript objects would be ... > Prototype. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On Wednesday 08 February 2006 14:36, Deco Rior wrote:> I was thinking of data manipulation libraries. > > sorts, inserts, etc. I have not used prototype for this since it > seemed more like div manipulation, etc. I will have to read the docs > a little more!JSON = JavaScript Object Notation you manipulate it using whatever javascript method you would like :) Todd gave you a nice example of using the JSON object returned in a callback function from prototype. -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On Wednesday 08 February 2006 13:02, James Marca wrote:> At approximately Wed, Feb 08, 2006 at 08:03:20AM -0700, Deco Rior wrote: > > I read somewhere that scriptaculous has some support for JSON. Can > > anyone point me to where this might be? > > prototype.js has support. > in prototype version 1.4.0, searching for "json" shows: > > line number class method > -------------------------------------------------------------- > 577, 581 Ajax.Responders dispatch > 698, 700 Ajax.Request evalJSON > 714, 720, 730, 731 Ajax.Request respondToReadyStatewhat magic wand did you wave to generate that output? Or was this something you manually formatted? :) -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
OK, I think I get it now... But I still am thinking that there must be some libraries out there that help me more. For example, on mochikit I can sort a table so.... is there a nice library that has something like... a.sort(''firstName'',''ascend''); where a is my object, etc. or am I still missing it? Of course I can do it myself...but :-) Deco On Feb 8, 2006, at 5:20 PM, Jeremy Kitchen wrote:> On Wednesday 08 February 2006 14:36, Deco Rior wrote: >> I was thinking of data manipulation libraries. >> >> sorts, inserts, etc. I have not used prototype for this since it >> seemed more like div manipulation, etc. I will have to read the docs >> a little more! > > JSON = JavaScript Object Notation > > you manipulate it using whatever javascript method you would like :) > > Todd gave you a nice example of using the JSON object returned in a > callback > function from prototype. > > -Jeremy > > -- > Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org > > In the beginning was The Word and The Word was Content-type: text/ > plain > -- The Word of Bob. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi everyone, On 2/8/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote:> On 2/8/06, Deco Rior <decorior-w9xKMqPX1QdNhnlO7+U8Og@public.gmane.org> wrote: > > So the data is returned in an object that can be handled rather than use > > strain response.text? > > > > > > Is there a library that allows JSON data object manipulation ? > > The callback function is no longer working with JSON > > { > first_name: ''Todd'', > last_name: ''Ross'', > favorite_movies: [''Office Space'', ''Serenity''] > } > > ... it''s a native JavaScript object. You work with the object by: > > function theCallback(transport, json) { > alert(json.first_name + "''s absolute favorite movie is " + > json.favorite_movies[0]); > }I can''t seem to get this to work at all. My JSON object is undefined, even though there''s plenty of data in it. Yes, I''m returning a X-JSON header with the JSON data in it. Here''s my code: function testajax() { var make = ''ford''; var url = ''/util/model_select_response''; var pars = ''make='' + make; var myAjax = new Ajax.Request( url, { method: ''get'', parameters: pars, onComplete: buildModel }); } function buildModel(originalRequest, json_data) { alert(json_data); //returns ''null'' } I''ve also tried sending the data as "text/javascript" in the responseText and then using the eval statement like: function buildModel(originalRequest) { var json_data = originalRequest.responseText //printing json_data shows the data, so I know Ajax.Request is fetching the correct data. myObj = eval(json_data); alert(myObj); //I never get an alert box from this } but it never "creates" my object. I''ve even tried passing the data into the $H() function, but no luck. I''m pulling my hair out with this as I''m coding this by the book and none of it''s working. I thought surely this would work as I''m trying to take the data for the select lists I''ve been posting about this week and just build them via the DOM, but I can''t seem get the data back via JSON into an object. I''m using prototype 1.4.0 final. Any help is greatly appreciated! -- Kevin Old kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using prototype 1.4.0 final. > > Any help is greatly appreciated!I''d be happy to look at a live website. Todd
Hi Todd, On 2/10/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote:> On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m using prototype 1.4.0 final. > > > > Any help is greatly appreciated! > > I''d be happy to look at a live website. >Here''s the page: http://kold.homelinux.com/prototype/testajax2.html Thanks for any help, Kevin -- Kevin Old kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here''s the page: http://kold.homelinux.com/prototype/testajax2.htmlI was hoping to be able to play with your X-JSON approach because that seems to be what you wanted originally. The latest iteration works for me in Firefox, and I''d imagine will work for you (in IE?) if you change the eval to be: var myObj = eval(''('' + json_data + '')''); //Nothing seems to happen alert(''myObj.thunderbird: '' + myObj.thunderbird); //Nothing is "alerted" Todd
On 2/10/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote:> On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Here''s the page: http://kold.homelinux.com/prototype/testajax2.html > > I was hoping to be able to play with your X-JSON approach because that > seems to be what you wanted originally. The latest iteration works > for me in Firefox, and I''d imagine will work for you (in IE?) if you > change the eval to be: > > var myObj = eval(''('' + json_data + '')''); //Nothing seems to happen > alert(''myObj.thunderbird: '' + myObj.thunderbird); //Nothing is "alerted" >I have no idea how this is working for you. I''m running Firefox 1.5.0.1 and get nothing alerted for myObj.thunderbird. I''m just trying to get one way (this happens to be the text/javascript way) to work. There must be something wrong with my version of Firefox or something... I''ll be in #prototype in irc.freenode.net, or my AIM id is Kevsurf10 if you want to chat about this. Thanks for taking the time to look at this. Kevin -- Kevin Old kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 2/10/06, Todd Ross <rails-spinoffs-25kFIyuv2iRiLUuM0BA3LQ@public.gmane.org> wrote: > > On 2/10/06, Kevin Old <kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Here''s the page: http://kold.homelinux.com/prototype/testajax2.html > > > > I was hoping to be able to play with your X-JSON approach because that > > seems to be what you wanted originally. The latest iteration works > > for me in Firefox, and I''d imagine will work for you (in IE?) if you > > change the eval to be: > > > > var myObj = eval(''('' + json_data + '')''); //Nothing seems to happen > > alert(''myObj.thunderbird: '' + myObj.thunderbird); //Nothing is "alerted" > > > > I have no idea how this is working for you. I''m running Firefox > 1.5.0.1 and get nothing alerted for myObj.thunderbird. I''m just > trying to get one way (this happens to be the text/javascript way) to > work.For the archives, thanks to Todd''s help we got the X-JSON and text/javascript ways working via the patch at the ticket below. http://dev.rubyonrails.org/ticket/3293 Thanks again Todd for your help, Kevin -- Kevin Old kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Just include the ( and ) parens in your X-JSON header string. On 2/10/06, Kevin Old <kevinold@gmail.com> wrote:> On 2/10/06, Kevin Old <kevinold@gmail.com> wrote: > > On 2/10/06, Todd Ross <rails-spinoffs@brainsick.com> wrote: > > > On 2/10/06, Kevin Old <kevinold@gmail.com> wrote: > > > > Here's the page: http://kold.homelinux.com/prototype/testajax2.html > > > > > > I was hoping to be able to play with your X-JSON approach because that > > > seems to be what you wanted originally. The latest iteration works > > > for me in Firefox, and I'd imagine will work for you (in IE?) if you > > > change the eval to be: > > > > > > var myObj = eval('(' + json_data + ')'); //Nothing seems to happen > > > alert('myObj.thunderbird: ' + myObj.thunderbird); //Nothing is "alerted" > > > > > > > I have no idea how this is working for you. I'm running Firefox > > 1.5.0.1 and get nothing alerted for myObj.thunderbird. I'm just > > trying to get one way (this happens to be the text/javascript way) to > > work. > > For the archives, thanks to Todd's help we got the X-JSON and > text/javascript ways working via the patch at the ticket below. > > http://dev.rubyonrails.org/ticket/3293 > > Thanks again Todd for your help, > Kevin > -- > Kevin Old > kevinold@gmail.com > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ed, On 2/11/06, Ed C. <defeated2k4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Just include the ( and ) parens in your X-JSON header string.Yes, that will work, but it''s a hack. Looking a all of the documentation for the definition of JSON data, the parens are no where to be seen. Kevin -- Kevin Old kevinold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org