Re: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions.

2006-02-17 Thread Alex Duffield
I solved this one so Ill answer my own question incase someone goes searching the same problem... you just need to add Behaviour.apply() after registering them.var tabrules = { '#tabs li a' : function(element){ element.> WCMS_tabs(this); } }}Behaviour.register(tabrules);Behaviour.apply(); _

Re: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions.

2006-02-17 Thread Alex Duffield
Cool. You wouldn't happen to know a solution to trying to register new Behaviour rules in the new .js file? I tryed var tabrules = { '#tabs li a' : function(element){ element.> alert("You clicked a tab") } }}Behaviour.register(tabrules);With no love. I would much prefer not to have to stick a b

RE: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions.

2006-02-17 Thread Ryan Gahl
Yep, I have all my _javascript_ in separate .js “class” files too (no spaghetti markup mixed with _javascript_).   In fact, I use the below script injection method in place of the XMLHTTP object completely. It’s faster and has a smaller memory footprint, plus absolutely no need for the s

RE: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions.

2006-02-17 Thread Ryan Gahl
Greg beat me to that one… sorry for the duplicate post =)   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Gregory Hill Sent: Friday, February 17, 2006 2:10 PM To: rails-spinoffs@lists.rubyonrails.org Subject: RE: [Rails-spinoffs] Ajax.Updater and loading new _jav

RE: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions.

2006-02-17 Thread Ryan Gahl
Also… with the evalScripts method, try assigning your functions differently so they stay in memory (assign them as variables)…   myalert = function(txt) {     alert(txt); };     Then you should be able to access them…   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTEC