-1
votes
1answer
55 views

Objects, methods, functions and more

Ok, trying to get this to work correctly. Having a few issues. Trying to load a user input from an html page into what I have here: var button = document.getElementById("addButton"); button.onclick ...
0
votes
1answer
47 views

Methods, Objects to create currency converter in javascript

This is going to be a long one. I have an assignment I have been working on and I have been having issues. I have a ton of code and I am not quite sure how to get it to function properly if at all ...
3
votes
1answer
37 views

JavaScript clustered methods in sub-objects

Here is an example : var Bidule = function() { this.value = 8 ; this.calc = { plus : function(x) { return this.value + x ; }, minus : function(x) { return this.value - x ; }, ...
2
votes
4answers
100 views

Javascript Prototypes,objects,constructor??i am confused

I have gone through plenty of Stack Overflow question that had description but I seriously found them very confusing. What I want is a simple explanation,please don't refer a link. I'm totally ...
0
votes
0answers
75 views

Why doesn't setTimeout work when it's called multipule times in JavaScript?

I have a programming question, not too advanced. For some reason, when I execute the following code, the setTimeout method only creates a pause when it's called the first time. When it's called again, ...
0
votes
1answer
26 views

Node.JS Sandbox include certain methods and libraries

I am running Sandbox module in my Node.JS application which runs dynamic scripts from my database. By default Sandbox blocks access to Node methods and anything else in the Master process. I am trying ...
3
votes
3answers
28 views

Uncaught typeerror: Object #<object> has no method 'method'

So here's the object 'playerTurnObj' function playerTurnObj(set_turn) { this.playerTurn=set_turn; function setTurn(turnToSet) { this.playerTurn=turnToSet; } function getTurn() ...
0
votes
2answers
28 views

self-deleting method instance in javascript

I tried to create a method which can delete itself while instantiating. After several failed attempt I ended up writing this evil rem() var g = function () { this.rem = function () { var ...
1
vote
3answers
48 views

Is there an accepted way to omit a parameter from a function/method?

Let's say (hypothetically) I have an object constructor MyObj, which has a method like this: MyObj.prototype.method = function(x, y){ x = x || this.x; //default value y = y || this.y; } ...
0
votes
1answer
35 views

Some questions about OOP

I have an object called clock. I have a method of said object called time. If I used this.propertyName inside my time method, this will give the property to my clock object, right? But what if there ...
1
vote
2answers
26 views

JavaScript calls to methods from within constructors

I was reading the re-introduction to JavaScript on MDN website and came across this in the Custom Objects section: function personFullName() { return this.first + ' ' + this.last; } function ...
-4
votes
1answer
54 views

How do you use public methods (jquery) [closed]

Just a quick question, How do you use public methods from a JavaScript, I cant seem to work anything out. Im trying to use the ones from here: https://github.com/georgepaterson/jquery-videobackground ...
3
votes
2answers
38 views

Obtain property name within anonymous function in Javascript

Is it possible to get the name of the property that called the anonymous function in javascript? Example var obj = { WhoAmI: function() { //Obtain the name WhoAmI } }
2
votes
2answers
66 views

can you add properties on to functions in Dart?

Can you add properties on to functions in dart? I tried this: void main(){ fn(){ //DoSomething }; fn.id = 1; //Exception NoSuchMethod } Only to get a NoSuchMethod exception ...
-2
votes
2answers
100 views

.after() jQuery method in native JavaScript? [duplicate]

I need to write the following jQuery code in native Javascript: $("a[href $= pdf]").after("<img src='images/small_pdf_icon.gif' align='center' />"); And here's my HTML : <ul ...

1 2 3 4 5 25
15 30 50 per page