Hi Friends,

Please help me here. I have a piece of code as follows.

window.addEvent('domready', function() {

    teamId = readCookie('teamId');
    $('curGameUpdtLnk').addEvent('click', showTeamGames());

});

var showTeamGames = function() {
    alert("Bingo");
}

I want to add the showTeamGames function to the element
"curGameUpdtLnk" as an onClick event. I will write the function body
later on. However, the function is being called every time I load the
page i.e. at the "domready" event and when I click the
"curGameUpdtLnk" element, I get following error
Error: condition is undefined
Source File: http://localhost/js/mootools.js
Line: 2029

What am I missing here? Any help would be greatly appreciated.

Thanks
Sudheer

Reply via email to