JavaScript (not to be confused with Java) is a dynamically-typed language commonly used for client-side scripting. Use this tag for questions regarding ECMAScript and its various dialects/implementations (excluding ActionScript). Unless a tag for a framework/library is also included, a pure ...

learn more… | top users | synonyms (8) | javascript jobs

0
votes
0answers
4 views

Recursive polymer elements

I have a nested array of javascript objects like this: [ {id: 1, title: 'hello', parent: 0, children: [ {id: 3, title: 'hello', parent: 1, children: [ {id: 4, title: 'hello', ...
0
votes
0answers
4 views

Binding Handsontable cells to complex objects

I'm trying to use Handsontable for some basic editing and number formatting. The data, including formatting info is fetched from the server and would look similar to this: var data = [ [ { ...
0
votes
0answers
10 views

Cannot access to contact page in jquery mobile

I've found a strange behaviour that happens to my jquery mobile app. I don't know what happens because I put the default structure in the other page and I couldn't access to them. I made a little ...
0
votes
0answers
16 views

Ajax : What append to the Origin HTTP header?

It seems Google Chrome no longer send theOriginheader nor the customx-requested-with. with the following code: /* * Get the size of the file. * @Button the current button for downloading the video. ...
0
votes
0answers
5 views

Canjs changed event

Is there a way to detect list change in canjs and make the view redraw? I am changing the list but this is not shown on screen. At the moment i have view model TodosListViewModel = can.Map.extend({ ...
0
votes
0answers
3 views

JSZip-Utils + Downloading Remote Images

I'm trying to use JSZip and JSZip-Util in combination to enable users to download a zip file of their project pages. I tried doing the following: $('.detailView').each(function(index, value){ ...
0
votes
0answers
4 views

Gulp-filter in one stream not delivering all files for dest

In gulp I’m currently trying to batch copy, move and apply plugins to a bunch of src files for a build process.Trying to use gulp-filter to split the required files up for each step and applying the ...
0
votes
0answers
25 views

javascript doesn't load until page is refreshed

hello good people of the interwebs. i have some ad code that works just fine on one of my pages, but when i use it on another, it doesn't load unless i refresh my browser. i'm not a programmer but i ...
0
votes
3answers
29 views

How can I make this function more efficient?

I have this data structure of credit card types. It would be nice to make the hasTransFee more efficient. If I started adding storecards etc to this list it could get quite big so the faster it ...
0
votes
0answers
5 views

CoffeeScript: Stripe Error Validation Does Not Display

I am attempting to set up Stripe in a Rails application, however, it seems my code for validation seems to not be working. When I click my 'Place Order' button with an empty form, I get redirected to ...
-1
votes
0answers
17 views

select tag with invisible option

I want my select tag to be completely invisible, but still clickable, because I have a colored div representing the area that is clickable, and once clicked, the select options will be displayed. I ...
0
votes
0answers
13 views

How to disable button on submit and enabled on ASP.NET postback complete

I'm trying to disable two ASP.NET buttons on submit, and re-enabled them on postback complete. To disable the buttons I use this code: cmdFiltrar.Attributes.Add("onclick", "javascript:" + ...
-2
votes
1answer
25 views

Target div in parent of parent of parent

I am trying to target an image in the parent of the parent of the parent of my button. Tried : $(event.target).parents().eq(2).$("img").css( "opacity", .3 ); ...
0
votes
1answer
14 views

Angular - Break line text

I can't save break line text into my database, how to solve this issue? My save data suppose to be like this I want to ask something. Can I? Not like this I want to ask something. Can I? html ...
0
votes
0answers
15 views

Timeout Function to Prevent too many click animations

I have the below slide-in menu code I put together from scratch. I'm trying to add a timeout function to prevent too many slide-ins and slide-outs due to multiple clicking. Only one click per 200ms ...
0
votes
2answers
34 views

Why is my backend C# code getting executed when it should not be?

Geniuses, I have this Javascript function in my front end code and I am trying to push more client side validation steps there to relieve by backend from too much validation work. Here is the ...
0
votes
0answers
9 views

Fading in/out of images expands grid-view of images surrounding it

I have a grid of images and I'm planning on having them all fade random images in and out. I have the fading fine when it isn't in a grid using inline-block. But when I fade images in, the image that ...
-1
votes
2answers
17 views

My Javascript isn't changing className property

Here is the main part of my code attempting to toggle class on a p tag (info) on click of my button (btn). I'm not sure what i'm doing wrong. I have never used the className property before so I'm not ...
0
votes
0answers
9 views

Angular directive ui-show breaks ng-click

Issue ui-hide and ui-toggle randomly breaks binding of ng-click sometimes, only when the ng-click target is followed by the ui-show, and doesn't happen with all nodes (example with text instead of ...
0
votes
0answers
5 views

Why does moment.tz work different depending on how your import it?

This line works. console.log(moment(), moment().tz("America/New_York")); While this one fails. console.log(moment.tz("2014-06-01 12:00", "America/New_York")); They are right next to each other. ...
0
votes
1answer
13 views

jQuery for loop only running once despite condiiton

I've got a small jQuery script that I want to dynamically append divs to a section in my page, based on changes to three select elements. My php: <!DOCTYPE html> <head> <script ...
0
votes
0answers
11 views

Smooth fade effect on image change

I work on my shopify store and my code needs to be modified with some JS. On my product page I have a product with color variants. If I select a different color, the image change. How do I add a ...
1
vote
0answers
16 views

This jquery lookup is not working for some reason

$(".pagination.postpagination a").click(function(event) { // Populate the hidden page_number field and submit the search form. event.preventDefault(); var page = ...
-2
votes
1answer
23 views

Writing Functions

Learning how to write functions. This is probably juvenile but keep getting an error message my line reads: myfunction=function(number){output=2*number+1 return(output)} Error: unexpected symbol in ...
2
votes
2answers
16 views

Find list of elements leading up to selected element in jQuery

I'm trying to build an array of every element that leads up to, for example, a clicked piece of text in jquery. Say I have this html: <div class='foo'> <div class='bar'> <span ...
0
votes
1answer
13 views

Image animation without mouse events Jquery

I'm sorry if this is a weird or noob question. But I'm searching and searching and can't find an answer to what i'm looking for. So far, I have a website: Test Website Which is using the ...
0
votes
1answer
10 views

Not change value label on rails

jquery $(document).ready(function () { $('#test1').val(test)); }); Ruby <script src="/assets/application.js" type="text/javascript"></script> <%= f.label :test1, :test2, ...
1
vote
0answers
5 views

datatables | fnreloadajax() is not working properly

Im trying to reload the datatables from new ajax source. i mean on page load it loads from 1 source, but after some action on page, it needs to be loaded from another source. i am trying it through ...
0
votes
1answer
23 views

AJAX content type issue?

I have a form that looks like this (never mind the laravel syntax) <form action="{{ URL::route('user-refresh-message') }}" method="post" id="form-user-refresh-message"> ...
0
votes
0answers
5 views

Is there a way to make r.js make faster compilations?

I'm using require.js for modularization and gulp with r.js for build automation. I've being trying to speedup the build time of my modules, but I have no clue about how to make r.js build only the ...
-1
votes
0answers
9 views

How to use AJAX or Javascript to just change one frame/content [duplicate]

On my website everything is the same except for the content in the content box. On websites Ive seen scripts where when you go to a different page from the navigation, only the content changes and it ...
2
votes
4answers
25 views

Wildcard string comparison in Javascript

let's say I have an array with many Strings Called "birdBlue", "birdRed" and some other animals like "pig1", "pig2). Now I run a for loop that goes through the array and should return all birds. What ...
0
votes
0answers
10 views

Add commas to a number HTML DOM [duplicate]

I hope, I'm phrasing this right. I'm grabbing a value from a XML file, and I would like to add commas every thousands value (1234 -> 1,234 and 1234567 -> 1,234,567 and so on.) Here is the script I'm ...
0
votes
0answers
6 views

Salvattore fails processing g expression

Am getting an error from Salvattore in Chrome and Safari but is not like the one previously mentioned here this is now new. Am using Chrome 37. Error is: Uncaught TypeError: Cannot read property ...
-4
votes
1answer
14 views

how to delete data from a table

I have a table that dynamically loads the data according to the date of selection but not how to delete the data when you select another date
0
votes
1answer
8 views

Firefox CSS transitions with body overflow:hidden

CSS transitions stop working in FireFox when adding overflow: hidden to the <body> tag via JavaScript. (At least on FF32.0.3 running on OSX10.9.5) When adding the overflow via JavaScript, the ...
0
votes
2answers
19 views

Checking isset on session stops javascript

Hey I am checking if for existence of $_SESSION variable from javascript.. if (<?php echo isset($_SESSION["variable"]); ?>){ //alert ("lol"); } if it exists it ...
-1
votes
0answers
15 views

Php Survey Form With More Options

I created a form and a php code. This form has a question and has 4 answer with two options. If i don't select any answer, it's alerting, that's good. If i select more than 2 answers, it's alerting, ...
-4
votes
0answers
14 views

jquery can't be downloaded in windows7.showing message “can't be verified…” [on hold]

i tried to download jquery from "jquery.com". while saving a pop up message shows "The publisher of this program couldn't be verified". my operating system is windows 7. I can not run any html ...
0
votes
1answer
15 views

Bootstrap styling of glyph as a button

I'm building a page with a series of inputs. One of them is a select list of email addresses. I'm including a Plus glyph at the right end of the list as a button to invoke some javascript that will ...
0
votes
2answers
27 views

How to move a div up/down the dom on certain page width with Jquery

I'm fairly new to Jquery and this is a bit out of my league. I want to move a div to a different location, which I can accomplish with: $('#searchbar').insertAfter('.search-item'); Now what I want ...
0
votes
1answer
36 views

A javascript function that receives and returns functions

I have a JavaScript function: function oneOf() { return arguments[Math.floor(Math.random()*arguments.length)]; } It is designed to take in variable number of arguments and spit out a random ...
1
vote
0answers
14 views

Firefox DevTools: Automatically injecting jQuery

I'm doing quite a bit of work in the developer tools, and like to use jQuery in the console to run code snippets. To inject jQuery into the page (and the console), I'm pasting this into the devtools ...
0
votes
3answers
21 views

Animate list items on removal of an element?

I have implemented a scrolling list that works by removing the top element and appends it to the bottom. This gives it the effect of scrolling infinitely. The problem is that by removing the < li ...
0
votes
0answers
12 views

Ember data “no mapping” error, despite having a properly named model

Learning Ember, and I'm attempting to load a "blog post" from the server. I have the routes working, the REST request is made properly, and my server (node/express/mongoose) is returning the data ...
0
votes
1answer
38 views

Variable is not changing value

So, I'm designing a code that will enable the user to create pseudo-custom operations that one can use under a special eval() function (as JavaScript is not an extendable language). My problem is that ...
0
votes
0answers
9 views

video.js not playing some youtube videos

I am using videojs-youtube plugin with video.js plugin to play youtube videos. code is working fine but for some videos firebug shows error..."Error: The "error" method is not available on the ...
0
votes
0answers
5 views

js api providing location-based image background

I'm making this web app in which I would like to get a nice picture related to the client's current location. Eg, if the user is located in New York, I'ld need a picture of say, the skyline New York. ...
0
votes
1answer
13 views

Why are my two different angularjs services resolving to the same restful Java EE web service?

I have two angularjs services and they are supposed to call different restful services (the first one retrieves a single user and the second one returns an array of users). Why are they both calling ...
-4
votes
1answer
13 views

dynamic resizing of iframe for cross domain servers without access

My object is to remove the scrollbars of an iframe for cross domain servers, which I don't have access to. Page A has an iframe which displays contents of an external server The content is not ...