0

my mootools code not work

var requestHTMLData = new Request.HTML ({
            url: 'index.php?option=com_abc$task=display&myvote='+votes+ '&id=' +id,
            update: $('contains' + id)
        }).send();

hi a am trying to sent data to this page by mootools 1.12 in joomla 1.5

can you help me ?

it give me this error

Error: Request is not defined
  • What is the exact problem? Do you receive any JS errors? Is the http request being done? You can use Firebug (Console and Net tabs) or similar tool to get these details if you haven't done so. – AJJ Dec 31 '11 at 11:31
  • thanks sir.. it gives me Error: Request is not defined –  Dec 31 '11 at 11:38
  • in 1.1x, Request was called 'Ajax' and had a slightly different API. just read the docs??? http://docs111.mootools.net/Remote/Ajax.js - or better yet, upgrade... – Dimitar Christoff Dec 31 '11 at 12:21

1 Answers1

-1

I think that can only mean that either the mootools script is not being loaded or you are using this code BEFORE the script is loaded.

In Firebug, check under the Net tab that the mootools.js file is being loaded correctly. And also in Firebug, under Console, insert some simple testing code like:

var test = new Request();
test;

And you should get:

Object { $chain=[0], $events={...}, options={...}, more...}
AJJ
  • 7,365
  • 7
  • 31
  • 34
  • i got this problem, the problem is joomla load default mootols 1.12 and i use this code from mootools 1.2 –  Dec 31 '11 at 12:09
  • Well, I don't completely agree with the downvote: I didn't know the version of Mootools being used when I posted my anwser and the latest versions of Joomla 1.5 do come with Mootools 1.2. – AJJ Dec 31 '11 at 17:19
  • fair enough, I did say he should upgrade (so perhaps the downvote is harsh) - but as it stands, he uses 1.12 :) – Dimitar Christoff Jan 01 '12 at 17:14