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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---