gabriel1836
2008-May-21 17:28 UTC
this.initialize has no properties error in Prototype Code
Hi All,
I''m a super newbie with Prototype and am trying to implement my first
solution using it.
This is my code:
var span = ''totalViews'' + video_id;
var params = ''video_id='' + video_id;
Ajax.Response(''trackVideo.php'',
{
method: ''post'',
parameters: params,
onSuccess: function(transport)
{
var count = transport.responseText;
$(''span'').innerHTML = count;
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
},
onFailure: function()
{
alert(''I Fudged Things.'');
}
}
);
However, when I try to execute the code I get this error
"this.initialize has no properties". It appears to be related to this
function call this.initialize.apply(this, arguments); at line 48 in
Prototype.js.
Any help offered would be greatly appreciated.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
blechler
2008-May-21 17:36 UTC
Re: this.initialize has no properties error in Prototype Code
var span = ''totalViews'' + video_id;
var params = {''video_id'' : video_id);
new Ajax.Request(''trackVideo.php'', {
method: ''post'',
parameters: params,
onSuccess: function(transport) {
var count = transport.responseText;
$(''span'').innerHTML = count;
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
},
onFailure: function() {
alert(''I Fudged Things.'');
}
});
Try that.
On May 21, 1:28 pm, gabriel1836
<goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi All,
>
> I''m a super newbie with Prototype and am trying to implement my
first
> solution using it.
>
> This is my code:
>
> var span = ''totalViews'' + video_id;
> var params = ''video_id='' + video_id;
>
> Ajax.Response(''trackVideo.php'',
> {
> method: ''post'',
> parameters: params,
> onSuccess: function(transport)
> {
> var count =
transport.responseText;
>
>
$(''span'').innerHTML = count;
>
> Mediabox.open(video_url,
'''', ''mediabox[480 380]'');
> },
> onFailure: function()
> {
> alert(''I Fudged
Things.'');
> }
> }
> );
>
> However, when I try to execute the code I get this error
> "this.initialize has no properties". It appears to be related to
this
> function call this.initialize.apply(this, arguments); at line 48 in
> Prototype.js.
>
> Any help offered would be greatly appreciated.
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
blechler
2008-May-21 17:38 UTC
Re: this.initialize has no properties error in Prototype Code
$(''span'').innerHTML = count;
should be
$(span).innerHTML = count;
unless you have an element with and id of ''span''
On May 21, 1:36 pm, blechler
<lech...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> var span = ''totalViews'' + video_id;
> var params = {''video_id'' : video_id);
>
> new Ajax.Request(''trackVideo.php'', {
> method: ''post'',
> parameters: params,
> onSuccess: function(transport) {
> var count = transport.responseText;
> $(''span'').innerHTML = count;
> Mediabox.open(video_url, '''', ''mediabox[480
380]'');
> },
> onFailure: function() {
> alert(''I Fudged Things.'');
> }
>
> });
>
> Try that.
>
> On May 21, 1:28 pm, gabriel1836
<goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Hi All,
>
> > I''m a super newbie with Prototype and am trying to implement
my first
> > solution using it.
>
> > This is my code:
>
> > var span = ''totalViews'' + video_id;
> > var params = ''video_id='' + video_id;
>
> > Ajax.Response(''trackVideo.php'',
> > {
> > method:
''post'',
> > parameters: params,
> > onSuccess: function(transport)
> > {
> > var count =
transport.responseText;
>
> >
$(''span'').innerHTML = count;
>
> >
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
> > },
> > onFailure: function()
> > {
> > alert(''I
Fudged Things.'');
> > }
> > }
> > );
>
> > However, when I try to execute the code I get this error
> > "this.initialize has no properties". It appears to be
related to this
> > function call this.initialize.apply(this, arguments); at line 48 in
> > Prototype.js.
>
> > Any help offered would be greatly appreciated.
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
gabriel1836
2008-May-21 17:53 UTC
Re: this.initialize has no properties error in Prototype Code
Here''s the new code:
var span = ''totalViews'' + video_id;
var params = {''video_id'': video_id};
Ajax.Response(''ajaxHandler.php'',
{
method: ''post'',
parameters: params,
onSuccess: function(transport)
{
var count = transport.responseText;
$(''totalViews'' + video_id).innerHTML = count;
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
},
onFailure: function()
{
alert(''I Fudged Things.'');
}
}
);
However, it still returns the same error. I''m stumped.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
gabriel1836
2008-May-21 17:55 UTC
Re: this.initialize has no properties error in Prototype Code
Here''s the new code:
var span = ''totalViews'' + video_id;
var params = {''video_id'': video_id};
Ajax.Response(''ajaxHandler.php'',
{
method: ''post'',
parameters: params,
onSuccess: function(transport)
{
var count = transport.responseText;
$(''totalViews'' + video_id).innerHTML = count;
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
},
onFailure: function()
{
alert(''I Fudged Things.'');
}
}
);
Still returns the same this.initialize has no properties error. Any
other ideas?
On May 21, 11:36 am, blechler
<lech...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> var span = ''totalViews'' + video_id;
> var params = {''video_id'' : video_id);
>
> new Ajax.Request(''trackVideo.php'', {
> method: ''post'',
> parameters: params,
> onSuccess: function(transport) {
> var count = transport.responseText;
> $(''span'').innerHTML = count;
> Mediabox.open(video_url, '''', ''mediabox[480
380]'');
> },
> onFailure: function() {
> alert(''I Fudged Things.'');
> }
>
> });
>
> Try that.
>
> On May 21, 1:28 pm, gabriel1836
<goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Hi All,
>
> > I''m a super newbie with Prototype and am trying to implement
my first
> > solution using it.
>
> > This is my code:
>
> > var span = ''totalViews'' + video_id;
> > var params = ''video_id='' + video_id;
>
> > Ajax.Response(''trackVideo.php'',
> > {
> > method:
''post'',
> > parameters: params,
> > onSuccess: function(transport)
> > {
> > var count =
transport.responseText;
>
> >
$(''span'').innerHTML = count;
>
> >
Mediabox.open(video_url, '''', ''mediabox[480
380]'');
> > },
> > onFailure: function()
> > {
> > alert(''I
Fudged Things.'');
> > }
> > }
> > );
>
> > However, when I try to execute the code I get this error
> > "this.initialize has no properties". It appears to be
related to this
> > function call this.initialize.apply(this, arguments); at line 48 in
> > Prototype.js.
>
> > Any help offered would be greatly appreciated.
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
blechler
2008-May-21 19:08 UTC
Re: this.initialize has no properties error in Prototype Code
new Ajax.Request not Ajax.Response On May 21, 1:55 pm, gabriel1836 <goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here''s the new code: > > var span = ''totalViews'' + video_id; > var params = {''video_id'': video_id}; > > Ajax.Response(''ajaxHandler.php'', > { > method: ''post'', > parameters: params, > onSuccess: function(transport) > { > var count = transport.responseText; > > $(''totalViews'' + video_id).innerHTML = count; > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > }, > onFailure: function() > { > alert(''I Fudged Things.''); > } > } > ); > > Still returns the same this.initialize has no properties error. Any > other ideas? > > On May 21, 11:36 am, blechler <lech...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > var span = ''totalViews'' + video_id; > > var params = {''video_id'' : video_id); > > > new Ajax.Request(''trackVideo.php'', { > > method: ''post'', > > parameters: params, > > onSuccess: function(transport) { > > var count = transport.responseText; > > $(''span'').innerHTML = count; > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > > }, > > onFailure: function() { > > alert(''I Fudged Things.''); > > } > > > }); > > > Try that. > > > On May 21, 1:28 pm, gabriel1836 <goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi All, > > > > I''m a super newbie with Prototype and am trying to implement my first > > > solution using it. > > > > This is my code: > > > > var span = ''totalViews'' + video_id; > > > var params = ''video_id='' + video_id; > > > > Ajax.Response(''trackVideo.php'', > > > { > > > method: ''post'', > > > parameters: params, > > > onSuccess: function(transport) > > > { > > > var count = transport.responseText; > > > > $(''span'').innerHTML = count; > > > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > > > }, > > > onFailure: function() > > > { > > > alert(''I Fudged Things.''); > > > } > > > } > > > ); > > > > However, when I try to execute the code I get this error > > > "this.initialize has no properties". It appears to be related to this > > > function call this.initialize.apply(this, arguments); at line 48 in > > > Prototype.js. > > > > Any help offered would be greatly appreciated. > > > > Thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
gabriel1836
2008-May-21 19:21 UTC
Re: this.initialize has no properties error in Prototype Code
thanks. sorry i missed that the first time. Now I just have to figure out why I''m getting a failure response. :P On May 21, 1:08 pm, blechler <lech...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> new Ajax.Request > not > Ajax.Response > > On May 21, 1:55 pm, gabriel1836 <goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Here''s the new code: > > > var span = ''totalViews'' + video_id; > > var params = {''video_id'': video_id}; > > > Ajax.Response(''ajaxHandler.php'', > > { > > method: ''post'', > > parameters: params, > > onSuccess: function(transport) > > { > > var count = transport.responseText; > > > $(''totalViews'' + video_id).innerHTML = count; > > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > > }, > > onFailure: function() > > { > > alert(''I Fudged Things.''); > > } > > } > > ); > > > Still returns the same this.initialize has no properties error. Any > > other ideas? > > > On May 21, 11:36 am, blechler <lech...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > var span = ''totalViews'' + video_id; > > > var params = {''video_id'' : video_id); > > > > new Ajax.Request(''trackVideo.php'', { > > > method: ''post'', > > > parameters: params, > > > onSuccess: function(transport) { > > > var count = transport.responseText; > > > $(''span'').innerHTML = count; > > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > > > }, > > > onFailure: function() { > > > alert(''I Fudged Things.''); > > > } > > > > }); > > > > Try that. > > > > On May 21, 1:28 pm, gabriel1836 <goodrich.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi All, > > > > > I''m a super newbie with Prototype and am trying to implement my first > > > > solution using it. > > > > > This is my code: > > > > > var span = ''totalViews'' + video_id; > > > > var params = ''video_id='' + video_id; > > > > > Ajax.Response(''trackVideo.php'', > > > > { > > > > method: ''post'', > > > > parameters: params, > > > > onSuccess: function(transport) > > > > { > > > > var count = transport.responseText; > > > > > $(''span'').innerHTML = count; > > > > > Mediabox.open(video_url, '''', ''mediabox[480 380]''); > > > > }, > > > > onFailure: function() > > > > { > > > > alert(''I Fudged Things.''); > > > > } > > > > } > > > > ); > > > > > However, when I try to execute the code I get this error > > > > "this.initialize has no properties". It appears to be related to this > > > > function call this.initialize.apply(this, arguments); at line 48 in > > > > Prototype.js. > > > > > Any help offered would be greatly appreciated. > > > > > Thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---