[Proto-Scripty] Re: Class with Ajax and onclick event

2009-08-05 Thread Liviu Timar
, ColinFine colin.f...@pace.com wrote: On Aug 4, 2:24 pm, Liviu Timar mailti...@gmail.com wrote: var Dynamic = Class.create({         initialize: function(selector, container, script)         {                 this.selector  = selector;                 this.script    = script

[Proto-Scripty] Re: Class with Ajax and onclick event

2009-08-05 Thread Liviu Timar
Sorry, I forgot to specify. This is the code: getContent: function() { var dyn = this; new Ajax.Request(this.script, { onSuccess: function(req) { dyn.content =

[Proto-Scripty] Re: Class with Ajax and onclick event

2009-08-05 Thread Liviu Timar
I figured it out. I understand that the extra argument will be null because it doesn't exist when the link is being clicked. The solution I found was to make my own attribute count for the a element: a href= count=#number. This attribute can be read by using readAttribute in the changeContent

[Proto-Scripty] Class with Ajax and onclick event

2009-08-04 Thread Liviu Timar
Hello, This is my first post here. Thus, I'll like to say hello to everybody in this community and I want to appologize if this question was asked before. I am a web developer for a site that has 1mil+ visitors/month: www [dot] ziare [dot] ro, and I want to use the Prototype Framework to make an