Hi to all,
I have one strange problem.
This is code I am using.
[CODE]// JavaScript Document
var IFrameDropDown = {
topLeftX : “0px”,
topLeftY : “0px”,
width : “100px”,
height : “200px”,
url : “mvm.php”,
inputField : Object,
init : function()
{
this.inputField = document.getElementById(“whiteplayer”);
this.addEvents(this.inputField, “change”);
},
addEvents : function(obj, e)
{
if(window.addEventListener){ // Mozilla, Netscape, Firefox
obj.addEventListener(e, this.alerter, false);
} else { // IE
obj.attachEvent(“on” + e, this.alerter);
}
},
alerter :function()
{
alert(“sdf”);
},
setTopLeftX:function(x)
{
this.topLeftX = x + “px”;
},
setTopLeftY:function(y)
{
this.topLeftY = y + “px”;
}
};
window.onload = IFrameDropDown.init;
I get this error message:
this.addEvents is not a function
in line
this.addEvents(this.inputField, “change”);
When I put IFrameDropDown instead of this it is working fine.
What I am doing wrong?
Thanks in advance.