Stephen Major
2005-Sep-01 00:17 UTC
[Rails-spinoffs] FW: externalControl for in-place editing Browser in-compatibility
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Anyone have any ideas on this one, it appears that that $() is not working to get object by id in Mozilla based browsers. Does anyone know how to fix this? I am a n00b to javascript. Is this a bug or am I doing something wrong? Can someone please confirm this. - -----Original Message----- From: Stephen Major [mailto:smajor@gmail.com] Sent: Wednesday, August 31, 2005 5:32 PM To: ''rails-spinoffs@lists.rubyonrails.org'' Subject: externalControl for in-place editing Browser in-compatibility I am not sure if this is a bug or my syntax is wrong but when specifying an external control for the inplace editor, this works fine in IE but not in firefox or netscape. The error that returns in the javascript console on mozilla based browsers is edit_50 is not defined. <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', ''mypage.php'', {rows:8,cols:40,externalControl:edit_50}); </script> If someone knows how to correct this issue please let me know I really need to get this done and cannot wait for the final release. Btw I am using 1.5 pre3 -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.0.1 (Build 2185) iQEVAwUBQxaMiKKXvLS903/FAQqmbQgAqC3iPvFqbdMdzSVVdzDRDn6qnundeL1G 4FETMPA5uwlsuDsXvsB/sjr84Nhbm8zlC/shJ97/6UOEOgm8QFMyDZaIpXfyNqF1 RmXcjfe4m4YLjIhz2ZF5U/sv9LTz64Yh/STIPm/AVMbetGtevXwzXNoEnr/C+5d+ 1pYC3H+OJ3Qf1YXTxZB4SIDpIfUGwSL3gpkC38sI49Ee/gGioDaViXhAxDOUYVf6 +VEmjcWn1DrBDOLa+WJ9y324BK9INKvCrZ4izDjs10GTV3hVTNIlPGIXs2b6CSIl /tBPekGlAlLjGoK2+1KzYj8JXE0oCCwEAtZZAWuWyc+tk7FowZM/Pw==4t81 -----END PGP SIGNATURE-----
Jon Tirsen
2005-Sep-01 00:49 UTC
[Rails-spinoffs] FW: externalControl for in-place editing Browser in-compatibility
> Anyone have any ideas on this one, it appears that that $() is not working > to get object by id in Mozilla based browsers.It seems you''re not quoting the element id name (it''s supposed to be a string). Replace this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:edit_50}); </script>With this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:''edit_50''}); </script>or this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:$(''edit_50'')}); </script>Note the quotes around edit_50, they can be single or double quotes, doesn''t matter. Hope this helps.
Stephen Major
2005-Sep-01 02:17 UTC
[Rails-spinoffs] FW: externalControl for in-place editing Browserin-compatibility
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 That worked, Love when I overlook the small things :/ Thank you very much. Respectfully, Stephen - -----Original Message----- From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of Jon Tirsen Sent: Wednesday, August 31, 2005 10:42 PM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] FW: externalControl for in-place editing Browserin-compatibility> Anyone have any ideas on this one, it appears that that $() is not working > to get object by id in Mozilla based browsers.It seems you''re not quoting the element id name (it''s supposed to be a string). Replace this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:edit_50}); </script>With this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:''edit_50''}); </script>or this:> <script language="JavaScript"> new Ajax.InPlaceEditor(''cmt_50'', > ''mypage.php'', {rows:8,cols:40,externalControl:$(''edit_50'')}); </script>Note the quotes around edit_50, they can be single or double quotes, doesn''t matter. Hope this helps. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.0.1 (Build 2185) iQEVAwUBQxapMqKXvLS903/FAQqQ3wf+Ku1IZqoBrbhJc0wmHFsY6lHl/F3YRhYE MGDbK7+PJKnd4TRw3zIvLhuVE01R/QXuin21g9BEvauGfk4ZHC0ZPc6McQO0H72V dfycnVqHmw2kOAd1dh9E7IIB0gtbDUhhlSy2MNm2adFBet33YRL4RsWr4uAwmYay iGVs3qRPtSeOb4fgV1Tb4eRjZlLrYyq5NsPTBmbGog1MZ7spj9F9SpMA/XeZc9Um pNPPgAJzCPLMnbBNg0ugMN7MU9DnwH2cRd9iO0kSulKjQOVWIp6mienDVZTTN0aT beuG74w9QY6X00r2tNE6M9pIsE4MdCegIcc1xnLwI6guj9bGk5BN5Q==NwCV -----END PGP SIGNATURE-----