Tagged Questions
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 ...
0
votes
0answers
4 views
Have element on top of canvas without pushing canvas down -Javascript
So I have a simple javascript that bounces a ball up and down on a canvas that takes up the whole screen. I want to add simple value sliders in at the top of the screen. The problem is when I create ...
0
votes
0answers
5 views
is there any multi user based realtime sync spreadsheet in meteorjs
i just created a demo of multiple user (included cell locking) real time sync spreadsheet using spreadjs, a basic demo available at templater
is there any similar online demo that using meteorjs and ...
1
vote
1answer
6 views
angular protractor: driver.wait and .then taking allScriptsTimeout time to return
I am trying to test an xmpp chat application, and having some difficulties testing the results of asynchronous operations. The test is trying to remove a contact from your roster (contact list), and ...
0
votes
1answer
15 views
menu when hovered moves other menu to the right
so i have this menu setup everything is working but the problem is when i hover on the menu it should only drop the menu but what happens to me is that the menu drops down and the menu that i was ...
0
votes
0answers
6 views
FancyTree: Node object is incorrect when dragged to root level
I am trying to define the new parent id for a node after a dragdrop event.
This function works fine assuming you drag a node to any level other than root
dragDrop: function(node, data) {
...
0
votes
0answers
4 views
Access MediaElement.js Player Attributes
I need to access the properties of a MediaElementPlayer object, how can I do this? The website mentions you can access properties like currentTime and paused from the MediaElement object, but doesn't ...
1
vote
0answers
12 views
angularjs $httpProvider interceptor documentation
I am new to angular (and programming), here is a seemingly simple question but I could not figure it out.
some tutorials suggests using $httpProvider.interceptors.push('interceptorName') to ...
0
votes
2answers
17 views
How can I convert the string of a javascript object literal to a javscript object literal?
How can I convert the string...
"{ name: 'John' }"
...to an actual javascript object literal that will allow me to access the data using its keys (i.e. varname["name"] == "John")? I can't use ...
0
votes
0answers
9 views
How to get Anchor tag (which works with JS function call) to work using rightClick > open in new tab?
I'm using an anchor tag
<a href="#" onClick="javascriptMethod();">asdasdasd</a>
This javascript function dynamically decides on the page to open. Works all right on click.
But when I ...
0
votes
2answers
16 views
Text input as variable for array with a while loop on javascript
I am trying to figure out how to make a text box number reflect the number on the array i am trying to show. My code in attached. I am trying to make it that if i type "4" then 4 of my skills would ...
0
votes
0answers
9 views
Can I use a strict filter in angularjs to search in all pages?
I've got a problem while developing a pagination div and trying to search using strict data. What I want to do is to search across all the pages, not only the actual one. Sorry if my english is bad, ...
0
votes
2answers
16 views
Adding up inputs doesn't change javascript
I am trying to add up 3 input elements of type number. This doesn't work for some reason. When I take out the if statements, it works, but only after I change the first one (score1). When I change ...
0
votes
1answer
13 views
Javascript: How to use an object's attribute if I have it like text [duplicate]
I have a path to an objects attribute in text, and I need to set some value on that path, but on the real object
Example:
var path = 'object.children.child[0].id';
var id = 1;
And I need ...
0
votes
0answers
4 views
Python Django: Pass json from view to javascript in template
I am new to django.
From my findings, I tried this way, but didn't work.
<script type="text/javascript" >
var data = {{json}}
</script>
I am trying to use data table from this ...
0
votes
1answer
2 views
Three.js won't load blender model
I am new to Blender (using 2.70a) and I made a mesh from a bezier curve. [File: http://ivybaumgarten.com/3d/models/wiggler5.blend ]
Exporting it to three.js format gives just a shell of an export ...
0
votes
0answers
20 views
Making a try it yourself html and css program
I am making a try it yourself html and css program, like you would see on w3schools or other websites. I was wondering if there was a way to make another button that would just display the html and ...
0
votes
1answer
18 views
How to use an image as a frame, and scroll inside? Simulating a phone on a website
I'm not sure what this is called, but how do developers accomplish being able to have, say a hollow image of a Nexus phone, and then scroll content inside of it? It's an ingenious way to simulate how ...
0
votes
0answers
4 views
TinyMCE 4 : How to loop through elements in tinymce editor
I want to loop through all elements in a tinymce editor on content load, and I am having issues. Here is my best attempt to date:
editor.on('LoadContent', function(e) {
var rootEl = e.element;
...
0
votes
0answers
17 views
Aren't there any faster algorithms to solve cubic equations?
I'm looking for a fast algorithm which solves cubic equation. Complex roots are not needed.
Currently, I'm using the algorithm written in the following URL. Aren't there any faster ones?
...
0
votes
2answers
22 views
Make a JavaScript button print a value
Hey guys I am trying to create a JavaScipt function that when called will print the value created by the claclBMI() function. I feel that having the first function do the calculations for the BMI is ...
0
votes
1answer
19 views
Move div with window scroll not consistent
I need my sidebar to scroll up and down with the window but stop when the div is at its top or bottom. The code below works when the page is first loaded and scrolled down or when the page is scrolled ...
0
votes
0answers
7 views
MGWT: How does MGWT Work with Super Dev Mode on GWT 2.7?
When using MGWT you can use SuperDevMode very easy as it was explained here: http://blog.daniel-kurka.de/2012/07/mgwt-super-dev-mode.html
gwt.xml config ist:
<add-linker name="xsiframe"/>
...
0
votes
0answers
5 views
RequireJs bundling with modules
I recently saw an example of how requirejs bundles work(http://vimeo.com/97519516) and got excited. So I'm trying to get the bundling feature to work with my setup and am banging my head on the wall.
...
0
votes
1answer
14 views
rewriting _.each function in Javascript not returning
Im trying to sharpen my skills in JS and rewriting the underscore.js utility functions. I'm stuck on the first one: each. This is what I have so far but when I run it in node, nothing is returned from ...
0
votes
0answers
9 views
smoother lineWidth changes in canvas lineTo
so i'm trying to create a drawing tool in HTML5 canvas where the weight of the stroke increases the faster you move the mouse and decreases the slower you move. I'm using ctx.lineTo() but on my first ...
0
votes
1answer
17 views
Class-wide object instantiated from constructor
With someAPI in the following, it requires credentials that I would like to assign dynamically in the constructor. Then I would like to use someAPI throughout the class. Is that possible with ...
1
vote
1answer
24 views
add “x” icon that hides the current open accordion
jQuery is still a learning process for me, but I have an accordion script here and I am looking to add a close icon to each toggle menu that will close the toggle once it has been opened, however I ...
0
votes
1answer
42 views
Java script variable check
i want to know what value passing
<script type="text/javascript">
$(function() {
var $countryGrid = $(".countries").grid();
var $cityGrid = ...
1
vote
0answers
7 views
Store override, adding error check with server response
I'm trying to append some logic to all the stores. I want this logic to execute before the one that is defined all through the app's stores
Basically, I want one chunk of code to look at the response ...
0
votes
1answer
26 views
Appending CSS to a randomly generated class name via JS — is a callback needed?
I am working on browser extension, and part of the functionality needs to add random class names to elements that I am targeting, and apply CSS to those elements.. particularly the CSS pseudo-selector ...
1
vote
2answers
14 views
Creating a form entry calculator with jQuery
I am trying to build a calculator using form entries as the figures to be calculated and returned to corresponding form fields in another field set. I am fairly new to jQuery and I am following the ...
1
vote
2answers
13 views
Can't get namspaced element
I have a string with a namespaced XML document:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:zapi="http://zotero.org/ns/api">
...
0
votes
2answers
17 views
Shorthand for calling a function with an argument more than once in JavaScript/jQuery?
I have a function with an argument, e.g:
function doThisThing(toThis){
// some function
}
So far I've been calling the function multiple times with different arguments like this:
doThisThing ( ...
0
votes
1answer
24 views
jQuery - slide div into screen
I have a div that I am trying to slide into the screen when the user scrolls to a specific point on the page.
I don't want to use scrollDown / scrollUp because it "draws" as it appears.
I need ...
0
votes
0answers
3 views
How to create a button through the press of another button in Titanium Appcelerator?
My question was phrased horribly, I'm sorry.
So what I wanna do is to go into the createNewCourseScreen, enter the name and set the color and press the create button, and the button created will pop ...
0
votes
0answers
2 views
bsmselect to preselect items during page load and cannot control order
I am using bsmselect (https://github.com/vicb/bsmSelect) and have the following javascript in-place to preselect items when a page loads. I'm using web2py and {{=fill_messages_saved}} returns an array ...
0
votes
1answer
5 views
Simple IME chrome extension doesn't do anything
I'm a noob to Chrome extensions and thought an easy way to start would be with a simple example, provided by google, with full source code. So I'm trying this:
...
-1
votes
2answers
17 views
using location== for specifying multiple URLs
I'm hiding content based on specific URLs.
I have done this declaring one specific URL and it worked fine, but I am trying to declare multiple; the below attempt didn't work, even with a comma ...
0
votes
0answers
13 views
PHP Curl wrong redirect
I used to get some information in a website, using curl to login and show the information, but now the website is using cloudflare. The problem is I can't follow the redirect because the website uses ...
-1
votes
0answers
12 views
Nodejs - how to do jQuery like post or get submission?
In jQuery we can do the POST submit as below. But in NodeJS how do i do GET or POST submit? (as native as possible without involving extra modules and take dependencies risk for server)
...
-2
votes
1answer
20 views
Best practice for Single-Page Application (SPA) with JSON-API [on hold]
I'm developing a Single-Page Application (SPA) with PHP and JavaScript.
The application gets all data from a JSON API.
What is the best practice to realize a SPA site?
Load the base site ...
0
votes
3answers
18 views
How to find the indexOf the first paramater in the URL.Javascript
I have a url: '#tests/12345678/lists'
and Im looking to return only the value of the 'id' here which is '12345678'.
i tried:
getIdLocation = $(location).attr("href");
userid = ...
0
votes
0answers
23 views
jQuery Post works asynchronously, but not synchronously
I am attempting to post some JSON to a web server. Why does jQuery alter the request header depending on whether I make a synchronous vs asynchronous POST?
More specifically, how can I get jQuery to ...
0
votes
1answer
10 views
More Efficiently replace escaped unicode characters on a page?
I have a page which includes escaped Unicode characters. (For example the characters 漢字 are escaped as \u6F22\u5B57). This page shows how you can use the unescape() method to convert the escaped ...
0
votes
1answer
9 views
Getting a href links inside an element and name of links inside an element
<li class="bottom">
<a role="menuitem" aria-haspopups="true" href="/myshop.php">Your Shops</a> »
<ul role="menu" class="menu-dropdown" id="menu-sub-shops">
...
0
votes
0answers
3 views
Jasmine spec asserting two different radio buttons are both checked
This spec passes:
it('is disabled when generic email radio is chosen', function(){
this.view.$('input[type="radio"][name="service[type]"][value="generic_email"]:checked').click();
...
1
vote
3answers
41 views
How might the syntax `foo(a)(b)` be useful?
Today I have found a strange way of adding 2 numbers in javascript:
Basically the call of the method looks this way: add(5)(6) and the declaration of the method is:
function add(x) {
return ...
0
votes
1answer
10 views
Access-Control-Allow-Origin not present for localhost
I'm using the Instagram api and have successfully retrieved an access_token, along with using HTML5 geolocation to retrieve a user's location. This data is then used to construct the string to access ...
0
votes
1answer
10 views
Hiding the parent after clicking a specific element : Jquery troubles
We are on the last step of a project and we can't get rid of this problem.
Basically, the page we are working on is a form to create chapters within a video. For each chapter created, a small "card" ...
0
votes
0answers
25 views
Javascript is not getting the correct html form value
I have a javascript autocomplete. The autocomplete function works. I have a php script where it pulls 'subtypes; from a 'type' in mysql and results correctly. but i can't seem to get javascript to ...