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 dialects/implementations (excluding ActionScript). Unless a tag for a framework/library is also included, a pure JavaScript ...
0
votes
3answers
16 views
Unexpect token '(' on multiple expression statement
Was trying to do a mutliple expression if statement as shown on w3cschools here http://www.w3schools.com/js/js_comparisons.asp but my browser seems to throw a error Uncaught SyntaxError: Unexpected ...
0
votes
1answer
11 views
Object Literal: Dynamic DOM not accessible
I haven't fully grasp the fundamentals of Object Literal in Javascript, so here's an example of my issue. I have created an AJAX function post() that returns <div id="foo"></div> inside ...
0
votes
0answers
6 views
Yeoman generator overwriting Gruntfile.js variables
I have made a Yeoman Generator and am copying a folder with Grunt config inside. But the generator's variables are the same and thus Grunt is processing then and they are removed.
In the Yeoman ...
0
votes
0answers
10 views
Want image and text to change onmouseover on section
I am trying to make HTML code on my wordpress site to display text and change the picture I hover my mouse over when I go over a certain section.
I can see the section hyperlinked but I cannot get ...
-4
votes
4answers
19 views
jquery insert class='active' into <li>
i have a html:
<ul>
<li class="active"><<a href="" title="">jquey</a></li>
<li><<a href="" title="">jquey</a></li>
...
-1
votes
2answers
21 views
how to access a JSON object?
i have this JSON Object, and i wanna access to this > object.foda.forta.id or name.. in JAVASCRIPT
thanks
note: this json it's created by xml2js.Parser()
{
"object": {
"foda": [
{
...
1
vote
1answer
13 views
Shared Service in AngularJS
I have a button which triggers a custom modal (I used the modal from here http://codepen.io/m-e-conroy/pen/ALsdF)
The button resides in MainController controller.
MainController
...
0
votes
0answers
10 views
Jankiness with Chrome mobile's autohiding toolbar and full-height divs
I have a div that is resized to be at the full height of the viewport on load as well as on resize. The problem that I am having is that on Google Chrome for iOS (I haven't checked Android, but I can ...
0
votes
0answers
10 views
Integrating Stripe and ASP.NEt
I am building a website where users can login and top up their account using stripe.js. Building the web application in asp.net and C# is not a problem. I am looking to implement stripe.js for ...
0
votes
0answers
10 views
Image Zoom effect [Zoom in]
Here's My fiddle
How do i recreate this zoom effect?
And by zoom effect,i don't mean zoom just 1 image.
I need more like a zoom in.
Here's the plugin code that i have used:
...
0
votes
2answers
17 views
get $index of item within ngrepeat
<ul ng-repeat="item in items">
<li>{{item.name}}</li>
</ul>
js
$scope.item = [
{
"itemId": 1,
"name":"laptop"
}
];
I want to the $index of item to be my itemId so ...
1
vote
0answers
5 views
How does one write unit tests in Karma that interact with SVG graphics using Snap.svg?
I am working on a web app that uses SVG graphics for most of its display and interaction. I would like to use Karma to create unit tests that load an SVG asset, makes sure that certain groups/paths ...
1
vote
2answers
27 views
Move Cursor to next text Field pressing Enter
I have multiple text fields in my form and I want when user enters data in one text field and press enter that the cursor moves to another text-field which is next to current text field. I visited ...
0
votes
1answer
16 views
jQuery Progress animate to predefined width - Multiple Div
How can I animate multiple div width using animate, when a div has already a width defined in the css of html.
For example. If I have style="width:30%;" in the html, and I want to animate that div ...
0
votes
1answer
9 views
Checking for mobile browser in the angular run block rather than in directive
I have a directive that I use to detect for mobile browsers, and I currently add it to a directive. However, I typically need to check for mobile browsers in multiple spots in my app, and I was ...
0
votes
0answers
25 views
Search based on PHP array field
i am trying to do google search from my page and the search is based on specific set of strings.so the following code has a PHP array field with some values ..so if i need to use them when performing ...
0
votes
3answers
36 views
Apply JQuery to div's clicked
I am working on making a number list with each number on its individual div. So far I am able to remove the div with Javascript (on click), but I would like to enable JQuery so that I am able to add a ...
0
votes
1answer
25 views
Ajax reponse how to access
I got this reponse from ajax
{
"laborCostIndex":0.0,
"laborDailyWage":0.0,
"laborHourlyWage":0.0,
"laborMonthlyWage":0.0,
"laborLeave":0.0,
"laborBonus":0.0,
"laborSSS":0.0,
...
1
vote
0answers
20 views
Re-ordering the columns in a HTML Table using jquery
There is a html table in this fiddle which is created as
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>Sl.No</th>
...
0
votes
0answers
16 views
Form Validator isn''t working, but has worked before
I am pulling my hair out here. I have set this up on other sites and it worked fine. But now I am setting up on another and it simply won't even run the javascript code.
My Javascript which is ...
1
vote
2answers
12 views
How to remove all dropdown option and replace new option by only NAME attibute given?
need some help for jquery.
How can i remove all dropdown option and replace new option?
Note : Only Name attribute used, No ID attribute used in select tag.
<tr id="payment_currency_tr">
...
0
votes
2answers
16 views
JQuery finding the document with class and applying property on that class
I am dynamically loading html for my project using jQuery load. Now i want to find all the elements containing the particular class and apply property on that class.
something like this
...
0
votes
2answers
13 views
Checkbox label id increment within ngrepeat.
<div class="checkbox"><input type="checkbox" id="1"><label for="1"></label></div>
I want to style my checkbox, so there must be an id and a label, for the checkbox to ...
-1
votes
0answers
17 views
Social Security Number verification by javascript/php or web service
As part of my project, I am required to provide my client a functionality that can verify the input Social Security Number by using CBSV's web service. I've read the documents in CBSV's website, ...
0
votes
1answer
21 views
Only part of CSS is active
I need some help. For a school assignment, I'm supposed to highlight the row of a table which the user's mouse cursor is hovering over. I know you can easily do this with CSS, but the teacher ...
0
votes
4answers
15 views
jquery show hide the requested page
Problem is to show/hide requested specific page from among pages in the html. The code I tried is shown below. Can any one point me the right direction. I n the blow code I tried to show only ...
0
votes
1answer
12 views
Passing javascript valiables from HTML form to PayPal
I've done up a form with an auto calculation script on it but I can't seem to pass on the amount value to PayPal.
Is their a way to convert the java variable into a php variable or some other trick?
...
-1
votes
0answers
11 views
JavaScript: best way to cast a string into a type?
In JavaScript, how can I cast a string into a type safely?
I can only thought of the following approach.
eval('Date');
// Safer way
try {
eval('google.maps.Marker');
} catch(e) {
// TypeError ...
0
votes
0answers
9 views
Chrome and Firefox equivalent of IE's window.opener.functionName()
I am using window.opener.functionName() in IE to call the parent function from a child window, which is working perfectly fine. However, the same is not working in Chrome/Firefox.
I tried ...
0
votes
0answers
4 views
Sammy.js read route with &,?
Need to be route looks like
#/routeName/?param1=aaaa¶m2=bbb
added to sammy
#/routeName/:param1/:param2
and
#/routeName/?:param1&:param2
none of them works
1
vote
1answer
15 views
Stop Page Refreshing - Persist Page-Data After Page-Refresh
I am using the following code in my html file. I want to change an image after a time interval, it run successfully but when i refresh the page it run the initial page. what i want is the same image ...
0
votes
0answers
4 views
three.js leap.js - leapControls.js no longer gives expected behaviour with version R66, movement limited to Z axes
so im pretty new to Three.js and leap.js but im creating a small game using both. I have found the perfect controller (https://github.com/openleap/Three.leapControls) created by cabbibo. (im pretty ...
0
votes
0answers
14 views
HOW TO SELECT A ZEBRA DATE PICKER USING TAB KEY
When in a form, and I press the Tab key to move to the next input, and the focus reaches the date input, the date picker won’t show.
I tried doing something like this:
$(elem).focus(function () { ...
-3
votes
0answers
11 views
Hi I would like to know how to open a .txt file via javascript, then put all info from .txt file to put into a table in javascript
Hi I would like to know how to open a .txt file via javascript, then put all info from .txt file and insert into a table. I might be able to loop through the .txt file but I am not sure how to do it. ...
0
votes
1answer
5 views
Store Ms Access data into javascript dataset
I have a code that fetch all the data in MS Access database in php and its working.
$conn = odbc_connect('pivot_test','','') or die ("Error in connection");
$sql = "select * from empDetails";
$rs = ...
0
votes
0answers
25 views
Getting parent object in javascript
I'm working with modules, and am adding different methods to my main class via these modules.
I want to be able to access the parent class from within the child modules. My setup is like this.
...
1
vote
1answer
11 views
Angular js load progress bars on opening modal
I have the following angular js htmlapp:
<!DOCTYPE html>
<html ng-app="StudentProgram">
<head>
<title>Student Program Management</title>
<script ...
0
votes
3answers
18 views
Perform division with a loop
Someone asked me an interesting question today: "How would I use javascript to perform a division operation if javascript did not allow division with an operator." I wrote a function that uses the ...
0
votes
0answers
23 views
Sending a form request in Python
I am trying to simulate a button click in Python on a website, when that button is clicked it adds some stuff to the end of the URL and returns false. If I add the stuff to the end of the URL it takes ...
3
votes
5answers
38 views
How should I manage my code of if else condition to something else?
I've three methods for eg.:
function method1(){
console.log('method1');
}
function method2(){
console.log('method2');
}
function method3(){
console.log('method3');
}
Now I'm going to apply ...
2
votes
2answers
21 views
How to make an array of values that englobes other values?
I'm making a script in javascript and I have to do something that reads an array of numbers and returns a unique array that "englobes" values. The array I have looks like this: [100, 200, 500, 600, ...
0
votes
1answer
8 views
Definition list accordion with unordered list control
as i found it the simple accordion at JSFIDDLE
i want to add the control from the list menu, for example when i click the panel2 on unordered list, the Panel2 at dt is clicked (Expand too), any ...
1
vote
1answer
12 views
Prevent jQuery from unbinding events on element removal
TL/DR: Is there any way to prevent jQuery from automatically unbinding events when an element is removed from the DOM?
When you call remove() on an jQuery element, jQuery automatically unbinds all ...
0
votes
0answers
5 views
How to upload multiple files in uploadcare?
This is uploadcare question.
How to upload multiple files using uploadcare js api ?
I have this code but no luck
for (var x = 0; x < document.getElementById('files').files.length; x++) { ...
0
votes
1answer
13 views
js REGEX | Get the last two sets of Numbers in a string, How?
I have Strings in this format:
6b255c1c689e2e7ee88e6d5d8ab10e9b_307_17234.jpg
8b342878cb8d848608d422a2c02b5e32_7_240723.jpg
07e8e2376d12e2d20a1e4c2159569c43_243_141599.jpg
How do you ...
1
vote
0answers
13 views
Web Scraping - What's a robust and extensible approach?
I have some limited experience with web scraping using tools like Beautiful Soup and Nokogiri.
My approach thus far when looking for information is to first inspect the HTML elements and CSS tags, ...
2
votes
1answer
38 views
Why can't the console find my variable? [on hold]
So I know this code is long. Sorry, but I don't sacrifice space for readability. When I test this code the console gives me this error:
ReferenceError: Can't find variable: useranswer
doMath
...
1
vote
0answers
5 views
Jstree create node when its empty
I do not know whether if anybody realised that the jstree v3 is not a complete tree yet. I search through google and there are no direct solutions on the code.
When all the nodes been deleted from ...
0
votes
0answers
5 views
google maps javascript v3 api not working
I've tried all possible solutions but the map just isn't showing. My webview just shows blank.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; ...
0
votes
1answer
7 views
Is there a way to ask Apache Bench to test the response time of ALL resources served to a URL?
I am load testing a node.js website. The url I am testing gets its HTML, then also tries to get another x image resources. Is it possible to tell Apache Bench to load all of these resources as part of ...