JavaScript (not to be confused with Java) is a dynamic, weakly-typed language used for client-side as well as server-side scripting. Use this tag for questions regarding ECMAScript and its various dialects/implementations (excluding ActionScript and Google-Apps-Script). Unless another tag for a ...

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

0
votes
0answers
2 views

jquery multiple select shows and hide google map markers

I have a filterfunction for google maps markers first it worked perfectly but than I wanted to have an multiple select box and than the function was not working anymore because the output is an Array ...
0
votes
0answers
8 views

Shortcut for making arrow function snippet in sublime

I use Typescript for my ionic projects. I would like to know if there is shortcut for inserting arrow function in sublime. ie, (x) => {} somethings like typing [ar]+tab inserts this.
-1
votes
0answers
11 views

How do online advertisers load their ads through javascript?

Okay so I have googled a lot and have not found how they do it. Examples 1: Here is a sample Code of PropellerAdsMedia: <script type="text/javascript" src="//go.oclaserver.com/apu.php?zoneid='...
-1
votes
0answers
24 views

How to restrict key input on a prompt? [duplicate]

I want to have the space key restricted from typing in a promt. This is what I've got in the JavaScript: var name = prompt('Enter your name'); How can I do this?
0
votes
1answer
14 views

Force the use of a factory

I have a class where I want a simple factory method: class GTree{ public static createNode(){ return new GNode(); } } This means that I don't want to allow the consumer to ...
0
votes
0answers
5 views

change flash embbed youtube into object embedd

Ok so I just discovered this player does not work on mobile devices... (I think it might be because its a flash player) $('a.youtube-video').click(function(e) { e.preventDefault(); var ...
0
votes
0answers
16 views

How to make constant indentation in javascript regardless of initial word length?

Family Fun Center US Good House Excellent The Rainbow Machine Popcorn Bad As you can see, good, excellent, bad all line up regardless how long the intial columns ...
0
votes
0answers
4 views

Meteor Tracker for varible

I have a tracker in one of my classes, this class imports a variable from another class that does some computations and returns a array of objects. I am then trying to populate a table with this data. ...
0
votes
0answers
7 views

How to convert zip code into GeoJSON

I have an array of users containing their zip codes and i would like to display their location based on their zipcode on Google Maps but i cannot turn my zipcode into a GeoJSON format. Help me
0
votes
0answers
13 views

retain active content upon browser refresh

So, I have a website I'm working on using javascript / jquery. It acts similar to an accordion, but for the whole site.. Links are positioned on the left side of the screen and when you click on one (...
0
votes
0answers
8 views

record.js exportWav file size always 44 bytes

I try to record microphone to file and send it to server using ajax. But file size is always 44 bytes. While microphone is recording i visualize voice using canvas. Here is my js script: var ...
0
votes
0answers
3 views

Google Maps API: Using overrideStyle in a map.data.forEach() loop?

I'm creating an map with some filters for exploring the data and I'm trying to do something where a user clicks a button and I loop through the data layer and hide markers that don't match the filter. ...
0
votes
1answer
21 views

onClick event for Div content

Here is my simple xPage: <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:div style="border-color:rgb(255,0,0);border-style:solid;...
1
vote
0answers
21 views

How can I handle html code sent by Json?

I have this data from a json, it's html code, how can I print it like html because it only seems to print it as a String: "content": "Más pruebas\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv class=...
0
votes
0answers
9 views

How to create a hyperlink in Google Sheets

I'm trying to create a hyperlink in Google Sheets Script Editor without inserting that hyperlink into text anywhere. For context, I'm using a script to send out automated emails with unique links. Is ...
0
votes
0answers
3 views

Cocos2D-X JavaScript DistanceJoint not working

I installed Cocos2D-X JS and I am having issues regarding the DistanceJoint which I just can not create because I always get "Assertion Failed" at the line with world.CreateJoint(joint). In project....
0
votes
1answer
9 views

Ruby on Rails - Javascript/jQuery to Haml

I'm trying to implement this in my Ruby on Rails application. The only thing what doesn't work is the Javascript code. I already tried %script and :javascript. But for some reason it doesn't load. ...
1
vote
1answer
8 views

Simple User-Interface with ZinoUI within HTML/PHP

I would like to create an user friendly interface on my site where from a php restrictred area of the site I can add a simple HTML to another open page of the site. The simple HTML (below "BASIC HTML"...
0
votes
0answers
10 views

Bootstrap select dropdown does not open menu on Windows machines - IE, Chrome and Firefox

Building atop Silvio Moreto's Bootstrap Select I have a custom dropdown with no issues in Chrome, Firefox and Safari on Mac, iOS and Android (private browsing or not). Windows In Windows the select ...
-1
votes
1answer
21 views

How to make a js fullscreen toggle

I want to make a button that will toggle my website to go full screen. I am not sure about how to?
0
votes
0answers
21 views

“for” attribute not working inside button for Firefox

I want to customize the input element by changing the text to "Choose file ..." and hide the file's name. Also if a user click the button a window is opened for user to choose file. The code is <...
0
votes
0answers
6 views

Split entire graph to parts of some time period

let me explain my problem on made up example. Lets say I have a manufacture for clothing and I am monitoring how my business is productive through the day. So I am collecting how many T-shirts and ...
-3
votes
3answers
48 views

convert a number to 100 percentage

well, i'm trying to write my own audio player, already i got duration time and current time, now i want to show current duration in percentage with a div width. i think no need to put all my player ...
0
votes
0answers
8 views

Why isn't audio player UI displayed on this page?

I'm writing a web app, which is supposed to display following things on a certain page: AudioJS player Feedback panel (grade and comment) I want the player to appear before the feedback panel. If I ...
0
votes
0answers
12 views

Filter results in HTML table by multiple filters in multiple filter categories

I am developing an e-commerce website for a mobile phone seller where I receive a few results when searching a product. There is no way to control or filter the receiving results from the server side. ...
0
votes
3answers
26 views

I want an input field to auto capitalize the first teller of each word while forcing the rest to be lowercase

Like the title says, I have multiple input fields that obtain a city. I would like while the user is inputing the city name that the first letter of each word to auto capitalize, while the rest of the ...
-2
votes
0answers
19 views

JavaScript Slider Direction

I am translating a site into arabian, and I have to reverse slider direction, but i have no idea how to do it. This is the code: $(function() { $(".slider.gems").slider({ range: "max", min: ...
-1
votes
0answers
12 views

Node JS Express - message is not defined - error.ejs

http://localhost:3000/buyersearch/buyersearch - what I search enter image description here - This the error I get, what's the issue? All my other routes work except this one. The route is getting an ...
0
votes
0answers
14 views

set option style on load for select element

I have the following on load of my web page: <script> function updateStateSelectColor(){ var elm = document.getElementById("state"); elm.style.color="black"; } </script> <...
1
vote
1answer
17 views

Extracting valid date from a string

I need to extract a valid date from a list of random strings. The date can be present in any date format("01/25/16", "25/01/2016", "20-01-2016", "3-Nov-2016" etc) with different kind of separators. ...
3
votes
2answers
14 views

How to define type of decorator to prevent losing type info of decorated function?

Given the following: // @flow function a(s: string): ?string { return s === '' ? null : s } function decorate(f: Function): Function { return f } const b = decorate(a) a(12) b(12) flow ...
-6
votes
0answers
13 views

Jquery how to get draggablee to same X position but different Y position

So if i have like this <div id="draggableHelper" style="display:inline-block; background: #000; margin-top: 80px; margin-left: 80px; overflow: hidden;"> <img id="image" src="http://...
0
votes
2answers
21 views

Navigating to other part of the web page

When user click on some data/button which is in tab1, the user control should go to tab2 and tab2 should open. Please suggest how can i navigate from tab1 to tab2 on click on button which is in tab1. ...
0
votes
0answers
8 views

Replace text in third-party iframe with separate JS file

I have a site that uses content from a third-party displayed in an iframe. The third-party allows the upload of CSS or JS files in the head of their site, so I am able to change the look of the ...
0
votes
1answer
11 views

Inspector-style string representation of DOM node

With JavaScript, how can I get a string representation of a DOM node similar to what the Chrome and WebKit inspectors display? tag#id.class1.class2 A real example would look something like these: ...
0
votes
0answers
22 views

Javascript validation - Changing javascript pages dynamically

I've re-made a HTML site using JavaScript, I've completed one page and have two others. I want to have some validation to ensure that before the new JavaScript page is called with button click that ...
-1
votes
1answer
19 views

Need assitance with data element passing JSON

Can anyone tell me why this code wont work? It works for anything else but for some reason when I use img in front it doesnt work. Only works with p tags etc. Also im using JSON and this data element ...
0
votes
3answers
24 views

Put Duplicates under Common Element

I have the following code. <ul id="listOne"> <li class="columnItem>John</li> <li class="columnItem>James</li> <li class="columnItem>Mary</li> <...
0
votes
0answers
10 views

Launching Python script from Google Apps Script

I've been searching for some time, and, as I couldn't find an answer, I'm asking this one. My issue is quite simple: I have a form linked to a sheet. Bound to this sheet, I have a script running, ...
0
votes
0answers
20 views

Access Chrome extension from another computer

I coded a little app for Chrome, it's a privacy extension and I want to be able to access it from outside my computer. I read a lot of thing about contents scripts but I don't know if is the way to go....
0
votes
0answers
6 views

Inserting html into a cytoscape node

Is there any way to insert html in a cytoscape node? (similar to foreign objects in D3) I am trying to see if there is a way to build something like the image below with cytoscape. It will also have ...
-3
votes
1answer
25 views

Generate a pdf completely offline with javascript

I am creating a course that will be taken completely offline. I need the clients to be able to save a pdf document that was populated with variables within the course---such as their name and date. ...
-1
votes
0answers
36 views

How to make the back button to update the div?

There div, the content therein is updated using the $(document).on('click', '#start', function() { $("#refresh").load(location.href+" #refresh>*",""); }); <button id="start">Next<...
0
votes
1answer
4 views

Google Apps Script, GMail, Spreadsheets

What I'm trying to achieve: Pull emails from gmail account as they come in that match a particular criteria "subject:contains this text" within label "label/sub label", and appends the subject of that ...
0
votes
0answers
6 views

Advantages and Disadvantages of using positionalParams in Ember components

I was wondering what are the advantages and disadvantages of using the property positionalParams in Ember components. I thought my components were clear to read, because I was using positionalParams ...
0
votes
0answers
21 views

Select option to enable another select after doing SQL statement

How can I select option from (select) and after that doing SQL statement based on "id" and after that showing new list in new (select) based on old (select). Here is my first (select): <?php ...
0
votes
0answers
6 views

Disable Search Field For Non-logged in Users in an Angular 2 App

I've set up a login component and view, and it's working as expected in terms of preventing users from visiting AuthGuard protected routes when they're not logged in. However, I also have a search bar ...
0
votes
1answer
11 views

a.map is not a function error nvd3 with ng-repeat

I'm trying to use my data object along with ng-repeat with nvd3 to dynamically create multiple charts. In my controller, my data for my $scope looks like this: $scope.data_costByScn = [ { "...
0
votes
1answer
12 views

Bootstrap datetimepicker with multiple versions of jQuery

The project I'm working on has several version of jQuery being used. I am including the bootstrap-datetimepicker module, and it seems to be automatically associating itself with one of the older ...
1
vote
2answers
38 views

Why does this javascript regex replace break this jQuery code?

I need this javascript to run when the page is loaded: document.body.innerHTML = document.body.innerHTML.replace(/\} \}/g, '}}'); I also need this jQuery to run when the page is loaded (handles my ...