First some tips:

Looks like you are using Mootools 1.1, consider using 1.2:
http://mootools.net/docs/

Another point is that you shouldn't be using the same id attribute on more
than one item, it should be unique on your document.
A more correct way would be to use "odds" as the class and select the tds
using "td.odds".


Try using jsfiddle.net so we can help you better.
I've made a jsfiddle, take a look:

http://jsfiddle.net/VCZPD/3/

I've changed a little the code, and im using a url thats provided by
jsfiddle, take a look at the "testing ajax requests" tab there to understand
it better.

I haven't answered your question but i hope you can show your problem in a
clear way now.

Cheers,

--
Fábio Miranda Costa
*twitter:* @fabiomiranda
*github:* fabiomcosta



On Sun, Aug 29, 2010 at 11:59 AM, maersk <[email protected]> wrote:

> Hi,
>
> I am new to javascript and mootools. Here is my js code:
> window.addEvent('domready', function() {
>        $$('td[id=odds]').addEvent('click', function(e) {
>                var value = $(this).get('text');
>
>                var url =
> "index.php?option=com_tippster&task=ajax&format=raw";
>                new Ajax(url, {
>                        data: {'odds' :value},
>                        method: 'post',
>                        update: $('time')
>                }).request();
>        });
> });
> My current js code gives back the value of the clicked item in the
> table.
> So this works fine. My question is how can i get other item values at
> the same time from the same row on witch it has been clicked on but
> different column ?

Reply via email to