0
votes
1answer
123 views

Uncaught ReferenceError: X is not defined - declaring object on js file, making reference inside html button event

I want to define a Javascript object inside a js file and make it possible for users to create new instances of it on their HTML by calling the src on the head and then using "new". [maybe this is not ...
0
votes
0answers
33 views

Drilling down to Object({Fieldname:Value}) and replacing the value thru user interaction

I need to replace object fieldname values 'info_1' & 'info_2' through user interaction (select drop lists). After many hours trying variables and researching ways to use return, I've made no ...
0
votes
1answer
325 views

javascript onclick event call object [duplicate]

Possible Duplicate: How do I pass the this context into an event handler? I am doing a javascript related assignment and am required to make a calendar which is assocated with a particular ...
0
votes
0answers
68 views

Javascript classes and mouse events/for loops [closed]

I am trying to move three different cards on the screen using an object class/array. The three cards display to the canvas fine and so does the clicking and dragging, but when i do grab one of the ...
1
vote
1answer
121 views

How to move javascript functions within object and DRY?

In functions presented below are repeated the same operations. I'd like to move as much as possible to the object. Maybe it is possible directly from button once initialize right method in object? ...
1
vote
2answers
63 views

Adding event handlers on object creation doesn't work? JavaScript

I have the following: MycheckModal.__construct = function(element){ this.blackout = $("<div class='modal-backdrop'></div>") .attr("style", ...
0
votes
0answers
66 views

Detect event object in ie7

i've a little problem in ie7. In ie8+ i can detect the Event object with this code: event instanceof Event or event.constructor === Event but in ie7 i have no Event object, so the question is: ...
4
votes
3answers
203 views

JavaScript “this” referce to wrong object

Well, this doesn't really refer to the wrong object, but I do not know how to refer to the correct one. function someObj() { this.someMethod1 = function() { var elementBtn = ...
1
vote
0answers
385 views

Synchronous vs. asynchronous for publish subscribe communication between JavaScript objects

I implemented the publish subscribe pattern in a JavaScript module to be used by entirely client-side oriented JavaScript objects. This module has nothing to do with client-server communications in ...
1
vote
1answer
121 views

Better approach nulling variables, objects in javascript

I am building something for mobile and would like somehow to clear, null objects, variables to release a bit of memory. Here I have two quick examples, both are anonymous functions as I believe but ...
1
vote
1answer
711 views

object.watch(), getting new value

In Firefox, I've got several objects that I need to trigger an event when a particular property of each is changed. I'm using object.watch(), however when I return the value of the property that was ...
0
votes
1answer
38 views

How do you create a reference to an object from its name as a string?

window[objref] does not work self[objref] does not work either Here is jsfiddle. Here is the code: var bob = { n: {}, y: { somekey: 12, oo: 'yah', pop: { ...
1
vote
6answers
769 views

click() a button named 'submit' in Javascript

I have this HTML: <input type="submit" name="submit" value="Invoeren" accesskey="s" class="buttons"/> I'd like to click() it. I can not change anything on the HTML-side. When I do ...