Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-29 Thread donnek
On Sunday, 28 October 2012 22:06:35 UTC, Walter Lee Davis wrote: > > I use elm to stand for element, and evt to stand for event. It's just a > habit I have, to keep clear in my head what I am dealing with when I use an > observer or an iterator. > I see - that seems like a very good habit for

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread Walter Lee Davis
I use elm to stand for element, and evt to stand for event. It's just a habit I have, to keep clear in my head what I am dealing with when I use an observer or an iterator. If I am iterating over a collection of elements with each, I will usually write this: $$('.foo').each(function(elm){

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread donnek
On Sunday, 28 October 2012 20:32:34 UTC, Walter Lee Davis wrote: > > Okay, that means that 'this' inside the Ajax.Updater is not set to what > you think it is. Try this: > > Much cleaner and fewer global variables are massacred. > Hey, thanks! Both of those work. But I don't understand what "

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread Walter Lee Davis
Okay, that means that 'this' inside the Ajax.Updater is not set to what you think it is. Try this: function get_word(elm) { new Ajax.Updater ( 'output', 'mylist.php', { method: 'get', parameters: { word: $(elm).readAttribute("id") }

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread donnek
On Sunday, 28 October 2012 15:53:37 UTC, Walter Lee Davis wrote: > What does Firebug say your request looks like? What does your server > respond with? > TypeError: $(this).readAttribute is not a function parameters: { word: $(this).readAttribute("id") } There's no change to the calling pag

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread Walter Lee Davis
On Oct 28, 2012, at 12:05 PM, donnek wrote: > On Sunday, 28 October 2012 15:53:37 UTC, Walter Lee Davis wrote: > I'm pretty sure your problem is right here. There's no attr() method in > Prototype. Try readAttribute() instead, and you appear to have everything > right besides. > > Thanks, Wal

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread donnek
On Sunday, 28 October 2012 15:53:37 UTC, Walter Lee Davis wrote: > > I'm pretty sure your problem is right here. There's no attr() method in > Prototype. Try readAttribute() instead, and you appear to have everything > right besides. > Thanks, Walter, but unfortunately changing that line to:

Re: [Proto-Scripty] Attach Ajax.Updater to link

2012-10-28 Thread Walter Lee Davis
On Oct 28, 2012, at 4:15 AM, donnek wrote: > I'm new to Prototype, and I'm trying to use AJAX to update divs inthe > background, pulling data from a database. I've got Ajax.Updater to work with > the output of a form, but I'm having difficulty with adpting it for use with > a link. Basically