Tagged Questions
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 ...
0
votes
0answers
2 views
How can I make my custom progress bar for a YouTube embed animate smoothly?
I'm using custom controls for a YouTube embed and my progress bar is moving along in a jumpy manner rather than smoothly. Here's the code:
vidClock = setInterval(function() {
if (state == 1) {
...
0
votes
0answers
3 views
To invoke java function from velocity template during onclick event
Web application uses struts2 and velocity
1)
The velocity file has a link and when the link is clicked i want java function to be called.
productform.vm
<a href="javascript:void(0);" ...
0
votes
0answers
4 views
CSS rotate background of div only
I have volume slider in my custom htm5 player that i am doing and i have problem, when you drag this volume slider thumb, everything behind it should be blue, but background color is coming from ...
0
votes
0answers
6 views
How to call div tag in javascript function
<div id="cd-signup">
<!-- sign up form -->
<form name="joinform" class="cd-form" id="joinform" method="post">
<input type="hidden" name="act" ...
0
votes
0answers
10 views
Click to generate a sentence with random words
I'm trying to make a Wordpress webpage that will display random book suggestions to visitors, in a sentence that looks something like this:
Please read [Book 1] and [Book 2] and [Book 3].
Upon ...
0
votes
0answers
3 views
how to assign WebSocket communication to a javascript array
Consider the image of websocket communication above.
I want to assign all incoming and outgoing communication to a javascript array.
I have to use it in condition statement. Like when sever send ...
0
votes
0answers
3 views
Ionic FacebookConnectPlugin
I am trying to implement Facebook login in my ionic application. But when the user try to login to via Facebook at first, it says "Invalid hash key." following as below.
After this, I've check the ...
0
votes
0answers
7 views
Running Javascript+PHP Form Another File
How to execute javascript+php in another file in current.js file?
The scenario as follows:
another-file.js
function foo()
{
var a = <?php echo "Hello world !"; ?>
}
current.js
function ...
0
votes
0answers
6 views
How can I reorder/sort an array logically after a tile is moved in the layout?
I have an array called 'selectedTiles'
<div gridster>
<ul>
<li gridster-item="item" ng-repeat="tile in selectedTiles"></li>
</ul>
</div>
...
0
votes
1answer
7 views
Count number of elements in $resource.query() object
I'm trying to count the number of elements returned from $resouce.query() object, so that I can increment it and use it as the ID for the next object to be saved.
Following is a service to ...
2
votes
1answer
17 views
Pass params to function when using on() in jquery
A senior of mine advise me to always write using snytax 2, but I have some issue with passing parameters. If my function coloring has 2 params, how I pass them in?
//snytax 1
...
0
votes
0answers
4 views
How to change options of bootstrap datetimepicker after initialization?
I am using the bootstrap date time picker jQuery plugin by eonasdan: https://eonasdan.github.io/bootstrap-datetimepicker/
I initalize it like so:
$('#datetimepicker').datetimepicker({
...
0
votes
1answer
11 views
open html with css in ms word 2010
how can I open a html file like this one http://coolwanglu.github.io/pdf2htmlEX/demo/cheat.html in ms word 2010 keeping the same formatting and spacing? I tried taking out the images and javascript ...
-1
votes
1answer
8 views
Javascript Method to Inject CDATA wrapper inside specific XML tags
I've got an XML file and I want to mutate it so that every instance of a given tag gets its (complex) contents wrapped in ![CDATA[ ... ]]. I'm vaguely suspect the easiest way to do this is with a ...
0
votes
0answers
5 views
Resize polygon maintaining position - jQuery
So I have this svg that has multiple polygons inside, what I want to accomplish is to animate one polygon inside it (resize it with easing) such that it doesn't move from its place. Considering that ...
0
votes
0answers
8 views
How to get child iframe?
I have 3 iframe and now trying to access the last iframe.
I've tried the below code :
for parent way
window.parent.document
0
votes
0answers
8 views
Autofill 2 step login forms like google and yahoo by javasvript
I want to autofill google login form using jquery/javascript (chrome extension)
i am able to fill the email and click on Next button but password screen is not showing up for me
In background i can ...
0
votes
0answers
6 views
drag and drop get ids of multiple image in droppable
I'm new to jquery, there is no question on this, I wanted my submit button able to get ids of multiple images in droppable, anyone can help? please help me or guide me along... I need to get the ids ...
0
votes
0answers
2 views
ThreeJS TransformControl wrong mouse location
I have created an AR program that uses three.js. It is based on an example from jsARToolkit. The implementation of the THREE.TransformControl is the problem.
Example source - ...
-1
votes
0answers
12 views
Error When Add Value to Object Javacript
I need your help guys, I create an apps with javascript. I create an object called userdata, and afterthat, I try to add some value in this object in request.get function.
my code is like this :
...
1
vote
0answers
18 views
JavaScript: Need lower div (under absolute div) NOT to scroll
I have an issue with the layout of my website right now...
The layout:
It is a portfolio site and has 2 layers:
1. Top layer is position absolute over bottom div. (both at max-width:2800px). It has ...
0
votes
0answers
12 views
How to compute the difference between 2 time in jquery datetimepicker?
I'm using jquery datetimepicker, I want to get the difference between start time and end time.
How can I calculate it using javascript/jquery code?
I set up the start and end time in html like.
...
1
vote
0answers
7 views
Should a video that is not attached to the DOM autoplay?
Here are three scenarios: adoptNode, importNode and createElement+assign props. In each case the node is not attached to the DOM. Both the adoptNode and the createElement+assign props approaches ...
0
votes
0answers
24 views
Javascript Return Function got Undefined [duplicate]
This is my function
function getNamaKat(param1, param2) {
data = {
opt : param1,
id : param2
}
$.ajax({
type : ...
-1
votes
0answers
13 views
Prevent browser back button from functioning for only 5 seconds
I want to prevent mobile users from being able to immediately go back to the previous page on my website for only 5 seconds.
This script prevents the user from using the back button if the user is ...
0
votes
0answers
11 views
Creating remote methods on loopback vs a routes.js script
I´ve been reading the Loopback documentation and I have a question regarding when to use a remote method on loopback and when to create a routes.js file with a custom url. Which cases are best for ...
0
votes
0answers
5 views
shadow shows abnormal for MeshLambertMaterial in r76 version?
here are two examples, the only different is the threejs version,
one is r70, the shadow shows right, see:
(http://jsfiddle.net/shelben/ef4r5s76/2/)
the other is r76, the shadow is abnormal? ? ? ...
0
votes
2answers
15 views
Javascript slideshow background with images in order
I have the following code to rotate through some images. I need the images to go in order rather than be random. What do i need to change the code to in order to make that happen?
<div ...
0
votes
0answers
13 views
how to display model attribute in angular using Spring MVC
I am trying to switch from a pure javascript implementation to a approach using angular. I am kind of not able to figure how to use the model attribute with the form that is now using angular js .
...
0
votes
3answers
21 views
Can't get jQuery .off() to remove event handler
I can't seem to figure out why my .off('click') jQuery method isn't working considering I am removing the event binding from '.reveal-menu'. The first animation works fine as each div moves to its ...
0
votes
2answers
17 views
HTML Add value in textbox
I want to add value in text box. A text box is already created with default value equal 10, then a button use a function to adding
new text box with limit 4. therefore, i want to add value ...
0
votes
0answers
11 views
Splitter doesn't work until weird sequence of steps is performed
Trying to get this working: https://github.com/nathancahill/Split.js
For some reason, I have to disable the css height of my container, drag the splitter a random amount, and then re-enable the ...
0
votes
1answer
12 views
Spring Boot Static Resources
I am trying to create a Spring Boot with Mvc and AngularJs. I modified the View Resolver of my app so I can point my application to look on the "WEB-INF/pages/" folder for my static html files. Now on ...
1
vote
0answers
24 views
Upvote/Downvote structure problems
Im making a Forum, just like this. And right now im in the upvote downvote section... So first of this is my database Structure
Topics--
|__ TOPIC PushKey(Unique Identifier)---
...
-3
votes
2answers
20 views
index 0 in the second level javascript arrays
can I please know why if a second level entry in a multidimensional javascript Array is returned undefined if this level length is equal to 1 ?
example :
arr = Array(
Array(1)
)
the following ...
0
votes
0answers
6 views
Angular2 - sass unable to build on angular-cli
I'm trying to use SASS with angular-cli. I've read the docs and found other SO q/a's that talk about setting it up...but it keeps failing the build.
Here's my setup:
angular-cli-build.js
...
0
votes
0answers
4 views
angular datatables prevent consistently render
I use angular Data-tables.
and use .renderWith method int DTColumnBuilder but it is rendering consistently.
I don't want it.
How do I prevent it?
0
votes
0answers
21 views
Javascript Clock - Line break
This is the current code I'm using for my clock (from a tutorial), and I'm wondering if there is a way to make the time appear above the date?
function renderTime(){
// Date
var mydate = new ...
0
votes
0answers
14 views
Refused to set unsafe header [duplicate]
In the API docs I'm working with, it lists an example like the following as an example of how to make requests to their API
POST https://api.com/v1/reporting/ HTTP/1.1
Authorization: Bearer ...
0
votes
0answers
3 views
Authentication Credentials with the SendPulse API for Node
I'm using the SendPulse client library written in node for smtp. Here's a snippet from their example.js:
var API_USER_ID="USER_ID"
var API_SECRET="USER_SECRET"
var TOKEN_STORAGE="/tmp/"
...
0
votes
0answers
42 views
Calling a function in Javascript Syntax
This might be a simple question but for some reason I can't find the solution.
So I am new to Javascript and I had a lot of this code put on me to work on. So I am trying to call a function in a ...
0
votes
1answer
14 views
Problems Adding Commas To Numbers
I have implemented a comma for the roundNum of which I display the total which is being moved;
$.fn.digits = function(){
return this.each(function(){
$(this).text( ...
0
votes
0answers
9 views
Simplest angular2 setup with webpack
I'm working through egghead.io tutorials on Angular2, but they are still using the beta. I'm looking at the docs for Angular2 Quickstart which point to the more up-to-date release candidate, but I ...
0
votes
0answers
11 views
Rails - possible to render html view after ajax request?
I have a controller action that I am using with ajax.
controller
def action
.
.
respond_to do |format|
format.html
format.js
end
end
I know that this will look for a file called ...
0
votes
0answers
7 views
Node.js connect-multiparty catch Error: maximum file length exceeded
I want to limit file upload size and inform user about exceeding the limit, but I don't know where I should catch this error.
Limit setting:
var multipart = require('connect-multiparty');
var ...
0
votes
2answers
29 views
press radio button get two boxes
I'm looking for a way to have it so when you press this button <input type="radio" name="reise" value="reise">Tur/retur another box named "avreise"appears on the same page:
Here is my code ...
0
votes
0answers
25 views
How to assign Angular Service object to $scope object
I'll try to keep this as simple as possible.
I have a controller for State 1 that saves a form object(with several fields) to the Service array upon submit and then proceeds to the state 2.
On the ...
0
votes
0answers
16 views
Css or Javascript menu - (persistent page indicator) for Tumblr
Alas, quirky Tumblr.
Has anyone had success with CSS or JavaScript persistent page indicators that work on Tumblr? (Detail - on a single page "parallax" theme.)
Many elements that work fine elsewhere ...
1
vote
0answers
4 views
Trying to understand Maybe Monads using LiveScript
I am trying to understand monads better.
Is this minimal implementation of a Maybe Monad Correct ?
Maybe = (value) ->
@value = value
Maybe.prototype.ret = -> @value
Maybe.prototype.bind ...
0
votes
0answers
11 views
Calling Google drive picker api from inside Angularjs module in a Google web app page
I'm building a Google web app with angularjs, I have a button and I want to select a file from my google drive inside this we app
I already have it working without angulajs
the problem is that this
...