Tagged Questions
JavaScript is a dynamically-typed language commonly used for client-side scripting. Use this tag for questions regarding ECMAScript and its dialects/implementations (excluding ActionScript). Unless a tag for a framework/library is also included, a pure JavaScript answer is expected.
0
votes
0answers
4 views
How can I reset form datas that is at before current page
I have created one JSP page for insert user-information and for show inserted info:
To get my insert data page , I have a link eg: mysite/insertInfo
First , accept user informations and validate ...
0
votes
0answers
4 views
Image slider wont fade
I am trying to make a jquery image slider, but for some reason the fade in is not working. Here is my code:
function startSlider() {
count = $('#slider>a').size();
loop = ...
0
votes
0answers
6 views
how to keep an image(message and lock) inside the tag of input before pre difined name(user name and Password)
Please tell me how I can code the following input tags, but please please write me the code that how can I keep the message icon in front of the text (user name) and how can I keep that transparent ...
0
votes
0answers
14 views
html editable input case by case
I have a html field that only accepts numbers, I want when I put the focus at the beginning of the input which contains a digital number,I can modify this input without emptying it entirely but I want ...
1
vote
0answers
15 views
Contenteditable div Remove <font>
I have a contentEditable div with 14px as default font size. The default font size can be changed from a customization part (13-15px).
I added a button to change font size of selected text.
...
-1
votes
0answers
5 views
Google Maps: panTo location on click
I am working with elements outside of the map div, and I want it to pan to a location once a certain element is clicked.
Code:
for (i = 0; i < locations.length; i++) {
$.each(locations, ...
0
votes
1answer
23 views
Initialization and Assigning of 2D array in javascript
var array = [];
var arr = [];
var i;
for (i = 0; i < 2; i++) {
var temp = [];// using array[i] = new Array() works fine
array.push(temp);
arr.push(temp);
}
array[0].push(1);
...
0
votes
1answer
12 views
OnBeforeUnload should not run for some links and buttons
I am using the following JS for confirmation before leaving a page in an MVC application.
window.onbeforeunload = function() {
return 'Any Unsaved data will be lost !!';
}
This works fine, ...
-1
votes
1answer
22 views
how do i print the value of a constructor?
i want to print bob smith and his age, how do i do this? The example is part of a object oriented series on codecademy, any help would be much appreciated.
function Person(name, age) {
this.name ...
0
votes
0answers
5 views
Adding arrays to objects in Javascript creates undefined element
Ok, I've looked around and I can't seem to find anything about this, but I apologize if this is a duplicate. Basically, I'm trying to add arrays to an object as properties. When I create an object ...
1
vote
2answers
16 views
Increasement number not rising in for loop
I am trying to figure this out. I have 3 buttons id (test1, test2, test3) in my HTML! In my jQuery I have an click function in a for loop like this:
$(document).ready(function() {
for (var i = 0; ...
-1
votes
0answers
17 views
Operations involving two object with same but unknown properties
Say we have the objects :
var A = { x: 10, y: 20 },
B = { x: 35, y: 99 };
If I want to add them, for example, I can just do:
var C = { x: A.x + B.x, y: A.y + B.y };
Now let's say I want to ...
-1
votes
1answer
12 views
Display the uploaded file name via Javascript
I have the following HTML / JS code:
<div class="file_upload">
<input type="file" id="file_upload" name="file_upload" onchange="g();">
</div>
<script>
...
0
votes
1answer
17 views
How to solve jquery Twice script execution with dialogs?
I have a dialog ($('.dialog').show()), that writes a form ($.post('/form/xyz', null, function (data) { $('.dialog').html( data );} )). That form has an script (javascript/jquery) like this:
...
0
votes
0answers
6 views
node-orm2 instance lacks save method
I'm new to using node-orm2 and am getting caught by the following issue;
TypeError: Object [object Object] has no method 'save'
Full stack trace http://pastebin.com/cb9Lt9pB
This error is coming ...