new Ajax.Request
not
Ajax.Response

On May 21, 1:55 pm, gabriel1836 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to