Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

events

Status
Not open for further replies.

kaliopix

Programmer
Joined
Jun 30, 2006
Messages
1
Location
CA
Hi everyone.

Has anyone ever experienced this.

some_class = function (params){
var self = this;
this.element.onmousedown = function(e){ return this.dosomething(self, e); }

some_class.prototype = {

dosomething : function(e) {
e=e||window.event;
e.xPos = some_value; // causes error e has no properties.
}

that is a rough idea of my code in a ext js file, and creating class in html file. i get the error: "e does not have any properties" not sure why? help pls?

much thanks
 
How is "dosomething" ever gettings called? You assign a mousedown event to a property that doesn't exist anywhere.

You should also avoid using variables with (potentially) reserved names, such as "self".

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top