http://stackoverflow.com/a/29078291
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29077953
has body: in the draw function you call the init function 4x in the init function you pass all 4 conditions

http://stackoverflow.com/comment/111587787
type: Comment
has text: word boundaries are underappreciated
comment on: http://stackoverflow.com/a/29214289
score: 1
type: AnswerComment

recursion
tags question: http://stackoverflow.com/q/29145802
type: Tag
tags question: http://stackoverflow.com/q/29177566
tag name: recursion
tags question: http://stackoverflow.com/q/29080509
tags question: http://stackoverflow.com/q/29134961
tags question: http://stackoverflow.com/q/29130969
tags question: http://stackoverflow.com/q/29063490
tags question: http://stackoverflow.com/q/29091876
tags question: http://stackoverflow.com/q/29118699
tags question: http://stackoverflow.com/q/29175692
tags question: http://stackoverflow.com/q/29137218

http://stackoverflow.com/a/29152973
has comment: http://stackoverflow.com/comment/46527335
has comment: http://stackoverflow.com/comment/46527205
score: 1
has body: How about an one-liner: settings = _(templates).map(_.values).flatten().pluck('settings').value() var templates = { "category": { "findByName": { "method": "generic", "settings": { "baseURL": "some2" } } }, "product": { "findByPartNumber": { "method": "generic", "settings": { "baseURL": "some1" } }, "findByUniqueId": { "method": "generic", "settings": { "baseURL": "some1" } } } }; settings = _(templates).map(_.values).flatten().pluck('settings').value() document.write("&lt;pre&gt;" + JSON.stringify(settings,0,3)); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.5.0/lodash.js"&gt;&lt;/script&gt;
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29152422
accepted answer of: http://stackoverflow.com/q/29152422
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46448949
score: 0
has text: I'm generating them with the classes inside the tags
type: Comment
comment on: http://stackoverflow.com/q/29109493
type: QuestionComment

http://stackoverflow.com/q/29133438
has comment: http://stackoverflow.com/comment/46492639
tagged with: wordpress
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29133539
score: 0
has title: Add css Class on html element using JavaScript in WordPress
tagged with: css
has answer: http://stackoverflow.com/a/29133607
has body: I'm working on a theme in WordPress I want to add a new class to an element without removing existing class in this theme there is a place to add javascript code in theme option with my new class this button will toggle to a form here is the code that I want to add my new class into it. ّFORM
type: UnansweredQuestion

http://stackoverflow.com/comment/46539612
has text: similar to what i managed to figure... find the multiplier and iterate through, creating evenly spaced probabilities. i posted my answer the same time you did:) marked yours as correct for your time. thanks for the effort!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29159843
type: AnswerComment

http://stackoverflow.com/comment/46573858
comment on: http://stackoverflow.com/q/29178106
score: 0
has text: Well, right. Thats the problem I was running into. Unfortunately I can't modify the css classes, one of the roadblocks I was hitting. I tried creating a two dimensional array of the pairs ([[a1,a2], [b1, b2]]) and then iterating through that, and it worked perfectly to find the higher of the two pairs and perform an action based on the result. But the problem with that was then, like you mentioned, trying to guess what element the action was supposed to apply to.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46444408
type: Comment
has text: updated now with MutationObserver now updates the $scope.result
comment on: http://stackoverflow.com/a/29105550
type: AnswerComment
score: 0

http://stackoverflow.com/a/29141750
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29141673
has body: you can take a look at yeoman It's a scaffolding tool for generating web sites, web apps.. there are many "generators" available.

http://stackoverflow.com/a/29144814
has body: You should pass the element to the function, not the value. Then You can obtain the value within the function. Something like that: var nombre = $('input#ID_nombre'); var email = $('input#ID_email'); if(validaForm(nombre, email)) .... function validaForm(nombre,email){ var nombre_value = nombre.val().trim(); var email_value = email.val().trim(); .......
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29144602
type: Answer
has comment: http://stackoverflow.com/comment/46514989
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46514816
answers question: http://stackoverflow.com/q/29144602

http://stackoverflow.com/a/29122041
upvote count: 2
answers question: http://stackoverflow.com/q/29121999
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46470692
has comment: http://stackoverflow.com/comment/46471422
type: Answer
has body: You need to include your Myops service as following: MyApp.controller("psCtrls",['$scope', 'Myops',function($scope,Myops) { myops = Myops.GET() console.log(myops); }]); Based on your updated question: it seems like you didn't include ngResource in your application, it didn't come with AngularJs. So, you need to manually include it: &lt;script src="angular-resource.js"&gt; Using: Google CDN e.g. //ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-resource.js Bower bower install angular-resource Then, inject it in your app: angular.module('app', ['ngResource']);
has comment: http://stackoverflow.com/comment/46471655

http://stackoverflow.com/q/29129046
has comment: http://stackoverflow.com/comment/46486762
has comment: http://stackoverflow.com/comment/46484446
has answer: http://stackoverflow.com/a/29129581
has comment: http://stackoverflow.com/comment/46484332
has answer: http://stackoverflow.com/a/29129343
has comment: http://stackoverflow.com/comment/46484407
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46484276
tagged with: css
has answer: http://stackoverflow.com/a/29129566
accepted answer: http://stackoverflow.com/a/29130316
type: AnsweredQuestion
has title: How to show/hide content based on a css class
upvote count: 2
score: 0
has comment: http://stackoverflow.com/comment/46484542
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/46486096
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29129345
has answer: http://stackoverflow.com/a/29129479
has answer: http://stackoverflow.com/a/29130316
has comment: http://stackoverflow.com/comment/46484503
has answer: http://stackoverflow.com/a/29130375
answer count: 7
has body: HTML: one two three four five one content two content three content four content five content CSS: .hideContent { display: none; } JQuery: $(document).ready(function() { $(".tfSPHT").on("click", "body", function() { $(".tfSPHT1").removeClass("hideContent"); }); $(".tfSPOPT").on("click", "body", function() { $(".tfSPOPT1").removeClass("hideContent"); }); $(".tfSPAT").on("click", "body", function() { $(".tfSPAT1").removeClass("hideContent"); }); $(".tfSPPT").on("click", "body", function() { $(".tfSPPT1").removeClass("hideContent"); }); $(".tfSPCT").on("click", "body", function() { $(".tfSPCT1").removeClass("hideContent"); }); }); How can I modify my JQuery so depending on the link that is clicked, show only the content for the corresponding class with a 1 at the end and make that link the current id.
favorite count: 0
possible better answer: http://stackoverflow.com/a/29129581

http://stackoverflow.com/q/29065228
answer count: 1
has answer: http://stackoverflow.com/a/29065252
favorite count: 0
has body: Take the following example: var obj = {}; obj.test1 = 'string'; // string obj['test2'] = 'string'; // string obj['test3'] = ['string']; // array var key = 'test4'; //obj.key = 'string' // not working var key = 'test5'; obj[key] = 'string'; // working console.log(obj); Fiddle Why is it possible to access an object property using array notation (square brackets): obj['test2'] = 'string';? Why does the example at test4 using dot notation fails, but works using array notation at test5?
type: UnansweredQuestion
upvote count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/4968406
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46366365
duplicate of: http://stackoverflow.com/q/4968406
has title: Why can an object be accessed using array notation? Why is array notation needed when property name is in variable?

http://stackoverflow.com/comment/46700580
type: Comment
comment on: http://stackoverflow.com/a/29158748
score: 0
type: AnswerComment
has text: I am curious about one thing that why you have made select in forech can not you have it differnt code will be eazily managle in that case. Is there any specific reason for that.

http://stackoverflow.com/q/29207527
has answer: http://stackoverflow.com/a/29207962
answer count: 1
has comment: http://stackoverflow.com/comment/46625600
linked to: http://stackoverflow.com/q/16507222
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46627084
has body: I have a page php with this code: &lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"&gt;&lt;/script&gt; &lt;script src="http://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=drawing,geometry"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; console.log(" cap in &lt;?php print $_POST['CAP'] ?&gt;"); var v_lat_to = '&lt;?php print $_POST['LAT_TO'].$_GET['LAT_TO'] ?&gt;'; var v_lng_to = '&lt;?php print $_POST['LNG_TO'].$_GET['LNG_TO'] ?&gt;'; var v_lat_from = '&lt;?php print $_POST['LAT_FROM'].$_GET['LAT_FROM'] ?&gt;'; var v_lng_from = '&lt;?php print $_POST['LNG_FROM'].$_GET['LNG_FROM'] ?&gt;'; var v_cap_from = '&lt;?php print $_POST['CAP'].$_GET['CAP'] ?&gt;'; var v_npax = '&lt;?php print $_POST['N_PAX'].$_GET['N_PAX'] ?&gt;'; var v_ora = '&lt;?php print $_POST['ORA'].$_GET['ORA'] ?&gt;'; var v_min = '&lt;?php print $_POST['MIN'].$_GET['MIN'] ?&gt;'; var v_price = 0; var v_result = "OK"; if(v_lat_to == '' &amp;&amp; v_lng_to == ''){ v_result = "KO - Coordinate di destinazione non valorizzate"; console.log("KO - Coordinate di destinazione non valorizzate"); } else if(v_cap_from == "" &amp;&amp; v_lat_from == "" &amp;&amp; v_lng_from == ""){ v_result = "KO - Coordinate di partenza non valorizzate"; console.log("KO - Coordinate di partenza non valorizzate"); } /* * ... * ... * others code with logic javascript * */ // return the output with object json var jsonObj = []; var item = {}; item["price"]=v_price; item["result"]=v_result; jsonObj.push(item); document.write(JSON.stringify(jsonObj)); &lt;/script&gt; When I call this php page, I dont find in output the object json, but there is the full code javascript. Is's correct how create the json from javascript?
type: Question
has comment: http://stackoverflow.com/comment/46625482
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has title: how return output json from javascript
score: 0

http://stackoverflow.com/comment/131729780
has text: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/74599068
type: Comment

http://stackoverflow.com/q/29207075
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29207187
score: 0
tagged with: qunit
type: UnansweredQuestion
type: Question
has body: Hy i wrote some QUnit test's for an old JS-File (an specific Date-calculation-JS). Question: It works very well on Firefox and Chrome but i got this Error on IE: Died on test #1 undefined: Der Wert der Eigenschaft "jQuery" ist Null oder undefiniert, kein Function-Objekt and on IE8: Died on test #1 undefined: Object expected Specs: You can take a look at my Javascript Code. I used this minimal QUnit HTML pattern. JQuery version: 2.1.3 QUnit version: 1.17.1
has title: QUnit test error with IE (Internet Explorer)

http://stackoverflow.com/a/29135432
upvote count: 0
has body: You are using a chrome extension; Since I am using FireFox I do not see the pin it button at all. Most likely the problem you are experiencing is just the chrome extension itself (maybe a bug), nothing to do with the WordPress theme.
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/29132941
score: -1

http://stackoverflow.com/comment/76808775
has text: @Relic https://jsfiddle.net/w3jx07vt/2/ I couldn't get that working, care to lend a hand and I'll update my post? :)
comment on: http://stackoverflow.com/a/41540381
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29124455
answer count: 2
tagged with: xml-parsing
accepted answer: http://stackoverflow.com/a/29124870
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: I have scoured through numerous posts that try and explain how to achieve this, however none have helped me solve the problem. I have a HTML file which contains an XML parsing JavaScript function which in turn renders the XSLT file. The issue is, I have multiple 'records' in my XML file and I only want a single XSLT to render each of records (instead of a separate XSLT file per record). Based on the code below, please could someone advise on how I can pass a parameter from JavaScript containing the record id (in each XML record in my XML file) so that the 'single' XSLT can parse the layout with the correct data sourced from the parameter. HTML Weather App XML File <?xml version="1.0" encoding="UTF-8" ?> Lon London 11 13 4 17/03/2015 Man Manchester 07 08 2 17/03/2015 Gla Glasgow 05 06 1 17/03/2015 XSLT File <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="locations/location[cityname='London']"> <xsl:value-of select="cityname"/> (<xsl:value-of select="cityid"/>) Temp: <xsl:value-of select="temperature"/> High: <xsl:value-of select="high"/> Low: <xsl:value-of select="low"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
upvote count: 2
has title: How to pass parameter to XSLT from Javascript function
tagged with: xslt
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/29124859
has answer: http://stackoverflow.com/a/29124859
has answer: http://stackoverflow.com/a/29124870
type: Question

http://stackoverflow.com/comment/46505825
has text: You might want to look at the http://www.w3schools.com/cssref/css3_pr_transform.asp transform around the y axis. with two absolutely positioned divs in a relative div and shifting the z index when they are at 90 degree angle.
comment on: http://stackoverflow.com/q/29141036
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29092193
has comment: http://stackoverflow.com/comment/46416691
linked to: http://stackoverflow.com/q/14202601
answer count: 4
has answer: http://stackoverflow.com/a/29092250
downvote count: 2
accepted answer: http://stackoverflow.com/a/29092219
has comment: http://stackoverflow.com/comment/46416376
score: 13
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46416593
has answer: http://stackoverflow.com/a/29092378
has answer: http://stackoverflow.com/a/29092219
has body: How would I count how many objects there are inside an array? The array looking like: [ {id: 1}, {id: 2}, ...] I assume I could use count() if it was PHP, but what about NodeJS/Javascript? Edit: if (offer.items_to_receive.length &gt; 0) { console.log("items: " + offer.items_to_receive.length); for(var i = 0; i &lt; offer.items_to_receive.length; i++) { usersInRound.push(offer.steamid_other); } } logData('Accepted trade offer from ' + offer.steamid_other + '. (tradeofferid: ' + offer.tradeofferid + ')\nWorth ' + offer.items_to_receive.length + ' tickets. '); How come it can read the "worth X tickets", but not the other part?
type: Question
upvote count: 15
has comment: http://stackoverflow.com/comment/46416630
tagged with: javascript
has answer: http://stackoverflow.com/a/78838346
favorite count: 0
has comment: http://stackoverflow.com/comment/46416472
possible better answer: http://stackoverflow.com/a/29092378
has comment: http://stackoverflow.com/comment/46416412
has title: NodeJS Count how many objects in array?

http://stackoverflow.com/comment/46367511
type: AnswerComment
has text: ok in the above example its working fine..thats why i asked for your final html ^_^
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29065923

http://stackoverflow.com/comment/46436718
has text: Im not sure the width has anything with mobile presentation of multiple-select, also not sure if user-agent is enough, that's why I asked this question. I hope someone had same problem and solved it. (At the end I shall test it on Android, iPhone and Windows phone quickly, just thinking this may be a good Q/A).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29103152

http://stackoverflow.com/comment/48109302
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29168723
type: Comment
has text: can you jsfiddle a more complete example?

http://stackoverflow.com/comment/46483639
type: Comment
type: QuestionComment
has text: he gain a point for every share
comment on: http://stackoverflow.com/q/29127689
score: 0

http://stackoverflow.com/q/29113507
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46455923
tagged with: twitter-bootstrap
score: 0
accepted answer: http://stackoverflow.com/a/29113784
type: Question
has title: Express.js can't get my CSS files
tagged with: javascript
tagged with: express
answer count: 1
has answer: http://stackoverflow.com/a/29113784
has body: app.use(express.static(path.join(__dirname, '/public'))); I can't get my CSS files using Express.js but it works using the links. html head title Welcome link(rel='stylesheet' src='/css/bootstrap.css') link(rel='stylesheet' src='/css/bootstrap-theme.css') script(type='text/javascript' src='/javascripts/jquery.js') script(type='text/javascript' src='/javascripts/bootstrap.js') body div(class='container') input(type='submit' class='btn btn-success') h1 Users - each name in names p= 'Username: ' + name.name
tagged with: css

http://stackoverflow.com/comment/46470894
comment on: http://stackoverflow.com/q/29122244
score: 0
has text: which property do you check? There are properties which doesn't update.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/74627481
has text: This answer is 2 years old! ;) Things change.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29151264

http://stackoverflow.com/comment/46465004
type: Comment
comment on: http://stackoverflow.com/a/29115889
has text: I finally understood my problem that i don't get the fact of what "this" keyword is. Now I do have understood that you mean by context thanks alot for all your help community I have to do some testing and reading now regarding this cause it seems i understood it some other way. Love ya and have a nice day
score: 0
type: AnswerComment

http://stackoverflow.com/q/29137480
has answer: http://stackoverflow.com/a/29137614
has title: Get value/attr of clicked button as event.data with .on("click"...)
has body: I need to get the value or any other attr of a clicked button to use it as event.data within a function. Here is the setting: got 26 buttons with value/text from "A" to "Z" as control for a list by alphabet. each button has same class="byalpha" each button starts the same ajax-search-function which gets json-data from sql to make a list by clicking a button of class="byname" the unique value (e.g. "B") should be delivered as event.data.letter to the function I could get that working with other controls of the function using radio-inputs and stuff: $( "input[name=selectdept]" ).on ("click", { searchdept: function (){ return $( "input[name=selectdept]:checked" ).val()}}, startsearch ); So as you see, clicking the input fires the function(startsearch) and gets the value of the input as event.data.searchdept to be used inside the function. Everything working fine. But trying that with the buttons is driving me crazy. I tried everything I could only imagine. Since I have to get the button by class and not by unique name or id I can't use way like with the radio-input. I tried to get any attr by using $(this). But just comes up with "undefined". Some of my approaches: $(".byname").on ("click", {letter: $(this).attr('value')}, searchdept ); or $(".byname").on ("click", {letter: function(){ return $(this).attr("value")}}, searchdept ); or any type of .val() // .attr() // .text() // .html() .... you name it Somewhere here I found that "event.target.value" that would deliver the right value (e.g. "B" for button B) but is not a good solution in the context of my function, since there are in total 3 different ways (26 Buttons / 4 radio-inputs / text-input ) to start the function and the delivered values would make it complicated.
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: button
tagged with: events
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29137614
tagged with: attr
has comment: http://stackoverflow.com/comment/46500132
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46500155
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46499576
has comment: http://stackoverflow.com/comment/46499460
type: Question

http://stackoverflow.com/q/29153528
tagged with: ajax
has title: Phonegap + JQuery does not connect to internet
upvote count: 1
has comment: http://stackoverflow.com/comment/46556598
answer count: 1
has answer: http://stackoverflow.com/a/29153683
has body: I have been unable to successfully figure out why $.ajax refuses to connect to the Internet in Phonegap. The same code runs well in a standard HTML file. Access Origin is set to *. Originally I thought Phonegap was refusing a connection to the Internet. However, it loads JQuery and JQuery Mobile remotely (by link tag). JQuery continues to return an error. Tested in JBoss Developer Studio (PG 4.1.2) and PG by commandline 4.3. The error returned by stringifying the error object error: {"readyStaate":4,"responseText":"{\n \"code\": \"ENOTFOUND\",\n \"errno\":\"ENOTFOUND\",\n \"syscall\":\:getaddrinfo\"\n}","responseJSON":{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo"},"status":500,"statusText":"error"} The Javscript used: var app = { // Application Constructor initialize: function() { this.bindEvents(); }, bindEvents: function() { document.addEventListener('load', this.onDeviceLoad, false); document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceLoad: function() { window.isAndroid = navigator.userAgent.match(/(android)/gi) != null; }, onlineEvent: function() { }, offlineEvent: function() { }, onDeviceReady: function() { app.receivedEvent('deviceready'); // online/offline must be set in onDeviceReady document.addEventListener('online', this.onlineEvent , false); document.addEventListener('offline', this.offlineEvent , false); $.ajax({ method: "POST", url: "http://www.someserver/server.php", data: { name: "John", location: "Boston" } }) .done(function( msg ) { alert( "Data Saved: " + msg.posts ); console.log('NETWORK' + msg.posts); }) .fail(function(error) { alert("error: " + JSON.stringify(error)); }); }, receivedEvent: function(id) { } }; app.initialize(); Edit: I am aware of what the 500 error is. I have tested the server. It works fine with HTML5 and the same JQuery AJAX call. My hunch is that there is something with Phonegap; between the JQuery Client call and the server that is causing the error. Edit2: The server name is pr…
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46529551
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29150249
answer count: 3
tagged with: google-maps
tagged with: google-maps-markers
linked to: http://stackoverflow.com/q/20081324
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/29150436
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46522769
type: Question
has answer: http://stackoverflow.com/a/29150879
score: -1
has title: Why i dont have marker in Google map API
has body: I am a beginner to HTML and JavaScript . I read a text file which contains longitude and Latitude. I read that text file and store it in 3 arrays. One contains longitude, One latitude and one contains ID. Text file is like this: (you can store it for debugging purpose with my code below) ID LONGITUDE LATITUDE 0 77.139305 28.795975 2 77.308929 28.486877 4 73.820680 18.464110 6 75.588783 26.599820 12 77.193575 28.559693 I read it and stored the column 1 , 2 and in col1, col2, col3 respectively. Now the problem is the code below show me the marker on map only when I put the long lat manually but when I use the my column arrays it don't show me any marker whereas it shows map. What i have in mind is to run this for loop in my code and it should render all the marker in the given map.(Yes it's true that i have stored all the Long and Lat and Id i can see on debugging). My code is : for (var i = 0; i &lt;= array.length - 1; i++) { col1[j] = array[i]; col2[j] = array[i + 1]; col3[j] = array[i + 2]; var myLatlng = new google.maps.LatLng(col3[j], col2[j]); var mapOptions = { zoom: 4, center: myLatlng } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Hello World!' }); j++; };
has answer: http://stackoverflow.com/a/29150343

http://stackoverflow.com/a/29164295
type: AcceptedAnswer
downvote count: 0
has body: $scope.rental = { tab: $scope.rental.tab, This assigns a new object to $scope.rental which has no association to state.rental. angular.copy($scope.rental) Does essentially nothing. You need to assign back the changes: angular.copy($scope.rental, state.rental); The cleaner solution, of course, would be to have a state.clearRental method that is called by the controller. EDIT As for the cleaner solution: clearRental: function() { var now = new moment().startOf('hour').add(1, 'h'); var rental = { ...}; angular.copy(rental, this.rental); $scope.clear = function() { state.clearRental(); };
answers question: http://stackoverflow.com/q/29163866
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46548705
accepted answer of: http://stackoverflow.com/q/29163866

http://stackoverflow.com/comment/46478294
comment on: http://stackoverflow.com/q/29124665
score: 0
has text: the `variables` variable in the global javascript scope. Maybe you should define a map of variables for your components, like `variables[#{cc.clientId}].formid = #{cc.clientId}`
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29218238
has comment: http://stackoverflow.com/comment/46723605
score: 0
answers question: http://stackoverflow.com/q/29204210
has body: Unfortunately for you, the way to do this is to go to each role and disable the standard/uncustomized forms. That's the best practice.
type: Answer
has comment: http://stackoverflow.com/comment/46694729
has comment: http://stackoverflow.com/comment/46777316

http://stackoverflow.com/a/29088023
score: 1
type: Answer
answers question: http://stackoverflow.com/q/29087892
has comment: http://stackoverflow.com/comment/46409040
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29087892
has comment: http://stackoverflow.com/comment/46409112
has body: Yes, AJAX calls are asynchronous. $.ajax returns a promise that you can use to control sequence. First, return the promise from dateChange: function dateChange(dateInput, nGuests, vName){ return $.ajax({ //... }); } Then when you call it: dateChange(current, "", 0).then(function() { //make table responsive var switched = false; //.... } That will make sure the AJAX call completes before you make the table responsive. If you have multiple AJAX calls, you'll have to store the promises in an array and use $.when: var promises = []; $('.whatever').each(function() { var promise = $.ajax({ /*...*/ }); promises.push(promise); }); $.when.apply($, promises).done(function() { console.log('all done'); // do work.... }); Note we have to use Function.prototype.apply because $.when treats an array of promises like a single promise.
has comment: http://stackoverflow.com/comment/46438334
has comment: http://stackoverflow.com/comment/46409719
has comment: http://stackoverflow.com/comment/46409028
has comment: http://stackoverflow.com/comment/46409134
has comment: http://stackoverflow.com/comment/46409009
has comment: http://stackoverflow.com/comment/46409056
has comment: http://stackoverflow.com/comment/46408957
has comment: http://stackoverflow.com/comment/46409691
has comment: http://stackoverflow.com/comment/46409812
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46409067

http://stackoverflow.com/a/29159094
has body: Getting Started With PubNub
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29158470

intellij-idea
tags question: http://stackoverflow.com/q/29109659
tags question: http://stackoverflow.com/q/29112451
type: Tag
tag name: intellij-idea
tags question: http://stackoverflow.com/q/29109468
tags question: http://stackoverflow.com/q/29170515

http://stackoverflow.com/q/29156308
score: 1
tagged with: forms
linked to: http://stackoverflow.com/q/630453
type: Question
has title: Upload a file with PUT on nodeJS problems
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46533734
tagged with: ajax
has comment: http://stackoverflow.com/comment/46533899
favorite count: 0
has body: I can't understand why this code doesn't work with PUT method and only works with POST $.ajax({ xhr: function(){ var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function(evt){ uploadProgress(evt); }, false); xhr.addEventListener("progress", function(evt){ console.log('down'); }, false); return xhr; }, url : 'upload', type: 'PUT', data: data, cache: false, dataType: 'json', processData: false, contentType: false, success: function(data, textStatus, jqXHR){ console.log(textStatus); }, error: function(jqXHR, exception){ alert("error --'"); } }); When on type I have POST, uploading works, but it's doesn't works with PUT :X And there is a way to upload file via PUT without submitting a form? Because code like that doesn't works: $('#file-input').on('change', prepareUpload); var files; function prepareUpload(event){ files = event.target.files; $.each(files, function(key, value){ data.append(key, value); }); $.put( $(this).parent().attr('action'), data, onAjaxSuccess_s ) }
has comment: http://stackoverflow.com/comment/46534070
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46551796
upvote count: 1
has comment: http://stackoverflow.com/comment/46551025
tagged with: node.js

attributes
tags question: http://stackoverflow.com/q/29155756
tags question: http://stackoverflow.com/q/29074077
tag name: attributes
tags question: http://stackoverflow.com/q/29070441
type: Tag
tags question: http://stackoverflow.com/q/29105791
tags question: http://stackoverflow.com/q/29211201
tags question: http://stackoverflow.com/q/29206934
tags question: http://stackoverflow.com/q/29142396

http://stackoverflow.com/q/29080433
has comment: http://stackoverflow.com/comment/46394270
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/29080699
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29080811
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46395432
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/46394145
has comment: http://stackoverflow.com/comment/46394320
has comment: http://stackoverflow.com/comment/46394730
score: 1
has answer: http://stackoverflow.com/a/29081258
type: Question
upvote count: 1
has title: jQuery.inArray(), returns -1 even if it contains the value in the array
has comment: http://stackoverflow.com/comment/46394159
has comment: http://stackoverflow.com/comment/46394144
has body: The inarray function returns -1 even if it has the value in my array for eg. if I have ['3','7','43','44','45','46'] in my array, when I select a value 3 or 7 it shows correct answer and then when I select other values it returns -1. my jQuery coding: $(document).on("change", '#level',function() { var valu = $('#level').val(); $.each(filterResults, function(index, item) { if(jQuery.inArray(valu , item.id)!==-1){ //item.id has all array values //my functions } } }); then my HTML coding Select Level Pre Test Level 1 Level 2 Level 3 Level 4 Level 5 console.log(valu,item.id) returns 44 3 44 7 44 43 44 44 44 45 44 46
downvote count: 0
has comment: http://stackoverflow.com/comment/46396054

javascript
tags question: http://stackoverflow.com/q/29216003
tags question: http://stackoverflow.com/q/29120531
tags question: http://stackoverflow.com/q/29149556
tags question: http://stackoverflow.com/q/29217385
tags question: http://stackoverflow.com/q/29135047
tags question: http://stackoverflow.com/q/29202877
tags question: http://stackoverflow.com/q/29085197
tags question: http://stackoverflow.com/q/29132659
tags question: http://stackoverflow.com/q/29168689
tags question: http://stackoverflow.com/q/29172894
tags question: http://stackoverflow.com/q/29090331
tags question: http://stackoverflow.com/q/29100674
tags question: http://stackoverflow.com/q/29180284
tags question: http://stackoverflow.com/q/29182828
tags question: http://stackoverflow.com/q/29166214
tags question: http://stackoverflow.com/q/29102729
tags question: http://stackoverflow.com/q/29108220
tags question: http://stackoverflow.com/q/29177958
tags question: http://stackoverflow.com/q/29155179
tags question: http://stackoverflow.com/q/29214865
tags question: http://stackoverflow.com/q/29130729
tags question: http://stackoverflow.com/q/29086530
tags question: http://stackoverflow.com/q/29155434
tags question: http://stackoverflow.com/q/29155198
tags question: http://stackoverflow.com/q/29129752
tags question: http://stackoverflow.com/q/29216928
tags question: http://stackoverflow.com/q/29167750
tags question: http://stackoverflow.com/q/29102891
tags question: http://stackoverflow.com/q/29095091
tags question: http://stackoverflow.com/q/29084072
tags question: http://stackoverflow.com/q/29204910
tags question: http://stackoverflow.com/q/29142669
tags question: http://stackoverflow.com/q/29165732
tags question: http://stackoverflow.com/q/29092865
tags question: http://stackoverflow.com/q/29160608
tags question: http://stackoverflow.com/q/29088803
tags question: http://stackoverflow.com/q/29165408
tags question: http://stackoverflow.com/q/29082441
tags question: http://stackoverflow.com/q/29193511
tags question: http://stackoverflow.com/q/29066858
tags question: http://stackoverflow.com/q/29116593
tags question: http://stackoverflow.com/q/29152676
tags question: http://stackoverflow.com/q/29093108
tags question: http://stackoverflow.com/q/29080144
tags question: http://stackoverflow.com/q/29090206
tags question: http://stackoverflow.com/q/29118543
tags question: http://stackoverflow.com/q/29165739
tags question: http://stackoverflow.com/q/29172829
tags question: http://stackoverflow.com/q/29134935
tags question: http://stackoverflow.com/q/29174632
tags question: http://stackoverflow.com/q/29169872
tags question: http://stackoverflow.com/q/29092811
tags question: http://stackoverflow.com/q/29110432
tags question: http://stackoverflow.com/q/29185078
tags question: http://stackoverflow.com/q/29187124
tags question: http://stackoverflow.com/q/29093295
tags question: http://stackoverflow.com/q/29129188
tags question: http://stackoverflow.com/q/29209647
tags question: http://stackoverflow.com/q/29207450
tags question: http://stackoverflow.com/q/29063252
tags question: http://stackoverflow.com/q/29143142
tags question: http://stackoverflow.com/q/29126755
tags question: http://stackoverflow.com/q/29132240
tags question: http://stackoverflow.com/q/29122557
tags question: http://stackoverflow.com/q/29212452
tags question: http://stackoverflow.com/q/29080540
tags question: http://stackoverflow.com/q/29203545
tags question: http://stackoverflow.com/q/29165034
tags question: http://stackoverflow.com/q/29180396
tags question: http://stackoverflow.com/q/29114588
tags question: http://stackoverflow.com/q/29096031
tags question: http://stackoverflow.com/q/29120323
tags question: http://stackoverflow.com/q/29191467
tags question: http://stackoverflow.com/q/29080433
tags question: http://stackoverflow.com/q/29132881
tags question: http://stackoverflow.com/q/29217772
tags question: http://stackoverflow.com/q/29092023
tags question: http://stackoverflow.com/q/29145505
tags question: http://stackoverflow.com/q/29192367
tags question: http://stackoverflow.com/q/29179224

http://stackoverflow.com/q/29128917
has comment: http://stackoverflow.com/comment/46483816
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29129047
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46483796
has body: Our web app uses Angular JS and it's built in $http module. Javascript promises are great... but we need to support a kiosk display running Android 4.2 which doesn't support promises (according to this). Are there shims to make these newer libraries compatible with browsers that don't support promises?
type: Question
score: 3
tagged with: android
tagged with: cross-browser
tagged with: promise
accepted answer: http://stackoverflow.com/a/29129047
has comment: http://stackoverflow.com/comment/46483738
tagged with: angularjs
upvote count: 3
has title: Fallback support for javascript promises
has comment: http://stackoverflow.com/comment/46483824
answer count: 1

hover
tags question: http://stackoverflow.com/q/29142034
tags question: http://stackoverflow.com/q/29146277
tags question: http://stackoverflow.com/q/29178649
tags question: http://stackoverflow.com/q/29181415
tags question: http://stackoverflow.com/q/29183975
type: Tag
tag name: hover

http://stackoverflow.com/q/29097126
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29097868
has title: How to add a Widget to another Widget in DOJO?
tagged with: dojo
score: 1
type: Question
tagged with: javascript
has body: When User click a button, I need to add a WidgetB to WidgetA (I suppose using WidgetA containerNode ). I have tried in the button event listener the following but with no success: var item = registry.byId('wA'); item.containerNode.innerHTML = '' parser.instantiate(['wB']); I would need a working example, thanks. http://jsbin.com/johixagebo/1/
upvote count: 1

http://stackoverflow.com/comment/46613009
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29199422
has text: @BlackHatSamurai I posted code below to show you that it is in fact possible to achieve what the OP was showing

http://stackoverflow.com/comment/46648704
has text: Okay, so yes. My bad. I took you very literally and used your original code as-is (`return Promise.resolve()`). As soon as I return `Promise.resolve([])`, I do get to `.spread()`.
comment on: http://stackoverflow.com/q/29196864
score: 0
type: Comment
type: QuestionComment

node-request
tags question: http://stackoverflow.com/q/29167166
type: Tag
tag name: node-request

http://stackoverflow.com/a/29083766
answers question: http://stackoverflow.com/q/29083567
type: Answer
upvote count: 1
score: 1
has body: You are trying to modify iterate over and modifying $scope.productStuff too. As soon as you write: $scope.productStuff = [item]; only one item remains in it. try creating a new array and once done assign it to $scope.productStuff $scope.update = function(val) { var tempArray = []; angular.forEach($scope.productStuff, function(item){ if( item.s2 === val.toUpperCase()){ tempArray.push(item); } }); $scope.productStuff = tempArray; }
downvote count: 0

http://stackoverflow.com/q/29077792
score: -4
has comment: http://stackoverflow.com/comment/46388956
has comment: http://stackoverflow.com/comment/46388882
has title: the first jquery code is not working.....is it because of jQuery conflict
has answer: http://stackoverflow.com/a/29077981
has comment: http://stackoverflow.com/comment/46389268
has comment: http://stackoverflow.com/comment/46389216
has comment: http://stackoverflow.com/comment/46388940
type: Question
downvote count: 4
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46389021
has body: Between these two jQuerys which i have written the second one is not working. I suppose it is the case of jQuery conflict. Please help.... &lt;script&gt; //this is the first jQuery code jQuery( document ).ready(function( $ ) { $(function() { $(document).ready(function(){ $('.rm option').each(function(){ if($(this).text()==$('div#disp').text()) $(this).attr('selected','selected'); }); }); //this is the second jQuery code $(function() { $( "#dialog" ).dialog({ autoOpen: false, show: { effect: "blind", duration: 800 }, hide: { effect: "blind", duration: 500 } }); $( "#opener" ).click(function() { $( "#dialog" ).dialog( "open" ); }); }); $(function () { $('#dialog').dialog({ keyboard: true })}); &lt;/script&gt;
answer count: 1
has comment: http://stackoverflow.com/comment/46388915
favorite count: 0
upvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46623800
type: Comment
comment on: http://stackoverflow.com/q/29206525
type: QuestionComment
has text: http://jsfiddle.net/SJ7bJ/98/
score: 0

http://stackoverflow.com/comment/46787291
comment on: http://stackoverflow.com/a/29114871
type: AnswerComment
has text: please check the updated answer only javascript part is updated
score: 0
type: Comment

http://stackoverflow.com/q/29217805
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46779215
has comment: http://stackoverflow.com/comment/46779178
answer count: 1
has title: Change data periodicity in Highcharts time series?
has comment: http://stackoverflow.com/comment/46790167
has comment: http://stackoverflow.com/comment/46666536
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46645431
has answer: http://stackoverflow.com/a/29297514
has comment: http://stackoverflow.com/comment/46649906
tagged with: highcharts
has body: I'm using the wonderful Highcharts, and I was wondering if there was a config option to change the data periodicity of a time series. Like the chart on this page - letting you switch from monthly to quarterly to yearly intervals. I can add client-side code to do it if not, but since Highcharts is so powerful, I just wondered if it was a built-in option. I can't see anything in the docs, but I'm not sure if "periodicity" is the right word for what I need!

http://stackoverflow.com/a/54045023
upvote count: 1
has body: I am not sure what renderer are you using, the default 2D renderer uses beziers between the angles: https://github.com/processing/p5.js/blob/0.6.1/src/core/p5.Renderer2D.js#L430 So, there is no way to increase the arc resolution... I would recommend you to use sin and cosine to draw the arcs: function setup(){ createCanvas(200, 100); customArc(20, 50, 20, 20, 0, PI, PI/2); customArc(60, 50, 20, 20, 0, PI, PI/4); customArc(100, 50, 20, 20, 0, PI, PI/10); } function customArc(x, y, w, h, start, stop, resolution){ beginShape(); for(var i = start; i &lt; stop; i += resolution){ vertex(x + sin(i) * w, y + cos(i) * h); } endShape(); } &lt;script src="https://github.com/processing/p5.js/releases/download/0.7.2/p5.min.js"&gt;&lt;/script&gt;
answers question: http://stackoverflow.com/q/29107502
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/46533933
score: 1
comment on: http://stackoverflow.com/q/29156619
has text: or try JSON.parse(data) before that
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29217195
type: Question
answer count: 1
has title: Jquery, Chosen : How can I get the value that was removed
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46645605
score: 0
has body: I am using Chosen Jquery, and I want to get the value that was deselected from the multi select list. Somehow I am not getting it. What I am doing wrong? $("#teachingOptions").chosen().change(function (evt, params) { if (params.selected) { var value = $("#teachingOptions option:selected").val(); // This is working fine alert(value) return;} else{ var value = $("#teachingOptions option:selected").val(); //Problem lies here, This Does not returns the correct value. alert value; return; } So when someone selects its working fine, but if someone deselects from the list of alreay selectd, it does not return the value, it says Undefined.
has comment: http://stackoverflow.com/comment/46645084
has answer: http://stackoverflow.com/a/29217701
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18627643

http://stackoverflow.com/q/29148791
downvote count: 4
has comment: http://stackoverflow.com/comment/46520010
has answer: http://stackoverflow.com/a/29148910
answer count: 2
has comment: http://stackoverflow.com/comment/46521899
tagged with: arrays
tagged with: javascript
tagged with: sorting
favorite count: 0
has title: Why "Did not wish to reply" appears before "African" in Alphabetical order?
has body: A bit odd one here: I am sorting these strings in JavaScript: "African" "French" "Did not wish to reply" "Spanish" "Gujerati" "Bengali" To do so, I am using this chunk of code, where nonPriorityLanguages is the var [] that contains the strings: nonPriorityLanguages.sort(function (o1, o2) { return o1.description &gt; o2.description; }); For some unknown reason for me, the first one in the list is "Did not wish to reply". That doesn't respect the alphabetical order, because the result should be: "African" "Bengali" "Did not wish to reply" "French" "Gujerati" "Spanish"
has comment: http://stackoverflow.com/comment/46520524
has comment: http://stackoverflow.com/comment/46521615
has comment: http://stackoverflow.com/comment/46520067
has comment: http://stackoverflow.com/comment/46521496
has comment: http://stackoverflow.com/comment/46520168
has comment: http://stackoverflow.com/comment/46523699
possible better answer: http://stackoverflow.com/a/29148950
has comment: http://stackoverflow.com/comment/46521487
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46520036
has comment: http://stackoverflow.com/comment/46519961
has comment: http://stackoverflow.com/comment/46521562
type: Question
accepted answer: http://stackoverflow.com/a/29148910
has comment: http://stackoverflow.com/comment/46521435
has comment: http://stackoverflow.com/comment/46521698
score: -1
has answer: http://stackoverflow.com/a/29148950
has comment: http://stackoverflow.com/comment/46520561
upvote count: 3

http://stackoverflow.com/q/29187511
linked to: http://stackoverflow.com/q/5802467
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 4
accepted answer: http://stackoverflow.com/a/29188066
has title: how to prevent scrolling through fixed element
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/28053277
has answer: http://stackoverflow.com/a/29188066
favorite count: 0
upvote count: 4
tagged with: css
possible better answer: http://stackoverflow.com/a/29187636
has answer: http://stackoverflow.com/a/29187636
type: AnsweredQuestion
downvote count: 0
has body: I've this html setup... body .top .content top is fixed fullscreen popup with some other content in it. However, while scrolling reaches to an end in the .top>ul the background item starts to scroll. Which is very nauseating and makes site all slowish on tablets. On tablets, even when i add overflow hidden to body using jquery it doesn't prevents it for some reason from scrolling the background even sometimes when it's not reached end. I want no scrolling of background page when popup is on top of the page. It's suppose to be a new slide. What can i do preferable structure wise, then css, and lastly js. Demo http://jsfiddle.net/techsin/0bv9g31k/ * {padding: 0; margin: 0;} .top { position: fixed; background-color: rgba(0,0,0,.3); height: 100%; width: 100%; overflow: auto; } ul { text-align: center; background-color: rgba(23,44,134,.8); color: #fff; box-sizing: border-box; overflow: auto; height: 300px; width: 50%; margin: auto; position: absolute; top: 0; bottom: 0; left:0; right:0; overflow: hidden; } .cont { width: 400px; margin: auto; }

angularjs
tags question: http://stackoverflow.com/q/29170694
tags question: http://stackoverflow.com/q/29197586
tags question: http://stackoverflow.com/q/29200943
tags question: http://stackoverflow.com/q/29069762
tags question: http://stackoverflow.com/q/29209565
tags question: http://stackoverflow.com/q/29067263
tags question: http://stackoverflow.com/q/29173878
tags question: http://stackoverflow.com/q/29116598
tags question: http://stackoverflow.com/q/29213287
tags question: http://stackoverflow.com/q/29110618
tags question: http://stackoverflow.com/q/29081486
tags question: http://stackoverflow.com/q/29084718
tags question: http://stackoverflow.com/q/29125201
tags question: http://stackoverflow.com/q/29106344
tags question: http://stackoverflow.com/q/29078653
tags question: http://stackoverflow.com/q/29159911
tags question: http://stackoverflow.com/q/29144493
tags question: http://stackoverflow.com/q/29141766
tags question: http://stackoverflow.com/q/29206695
tags question: http://stackoverflow.com/q/29167176
tags question: http://stackoverflow.com/q/29090202
tags question: http://stackoverflow.com/q/29130227
tags question: http://stackoverflow.com/q/29143376
tags question: http://stackoverflow.com/q/29086299
tags question: http://stackoverflow.com/q/29108858
tags question: http://stackoverflow.com/q/29170970
tags question: http://stackoverflow.com/q/29080564
tags question: http://stackoverflow.com/q/29084917
tags question: http://stackoverflow.com/q/29141855
tags question: http://stackoverflow.com/q/29107177
tags question: http://stackoverflow.com/q/29112542
tags question: http://stackoverflow.com/q/29171286
tags question: http://stackoverflow.com/q/29157572
tags question: http://stackoverflow.com/q/29143304
tags question: http://stackoverflow.com/q/29126213
tags question: http://stackoverflow.com/q/29197655
tags question: http://stackoverflow.com/q/29191429
tags question: http://stackoverflow.com/q/29201570
tags question: http://stackoverflow.com/q/29130731
tags question: http://stackoverflow.com/q/29130721
tags question: http://stackoverflow.com/q/29088892
tags question: http://stackoverflow.com/q/29140487
tags question: http://stackoverflow.com/q/29150933
tags question: http://stackoverflow.com/q/29160374
tags question: http://stackoverflow.com/q/29131688
tags question: http://stackoverflow.com/q/29111521
tags question: http://stackoverflow.com/q/29142338
tags question: http://stackoverflow.com/q/29094857
tags question: http://stackoverflow.com/q/29165735
tags question: http://stackoverflow.com/q/29201302
tags question: http://stackoverflow.com/q/29166025
tags question: http://stackoverflow.com/q/29071785
tags question: http://stackoverflow.com/q/29176393
tags question: http://stackoverflow.com/q/29184737
tags question: http://stackoverflow.com/q/29130853
tags question: http://stackoverflow.com/q/29201149
tags question: http://stackoverflow.com/q/29128821
tags question: http://stackoverflow.com/q/29062563
tags question: http://stackoverflow.com/q/29130369
tags question: http://stackoverflow.com/q/29101856
tags question: http://stackoverflow.com/q/29125514
tags question: http://stackoverflow.com/q/29120841
tags question: http://stackoverflow.com/q/29180321
tags question: http://stackoverflow.com/q/29095875
tags question: http://stackoverflow.com/q/29191887
tags question: http://stackoverflow.com/q/29068296
tags question: http://stackoverflow.com/q/29199341
tags question: http://stackoverflow.com/q/29091562
tags question: http://stackoverflow.com/q/29192063
tags question: http://stackoverflow.com/q/29164667
tags question: http://stackoverflow.com/q/29079348
tags question: http://stackoverflow.com/q/29106509
tags question: http://stackoverflow.com/q/29206729
tags question: http://stackoverflow.com/q/29185428
tags question: http://stackoverflow.com/q/29125211
tags question: http://stackoverflow.com/q/29099277
tags question: http://stackoverflow.com/q/29099765
tags question: http://stackoverflow.com/q/29203289
tags question: http://stackoverflow.com/q/29074885
tags question: http://stackoverflow.com/q/29080458

http://stackoverflow.com/comment/46633114
comment on: http://stackoverflow.com/q/29211426
score: 0
type: Comment
type: QuestionComment
has text: is your server returning that error?

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/29128681
tags question: http://stackoverflow.com/q/29161361
type: Tag

http://stackoverflow.com/q/29130900
has comment: http://stackoverflow.com/comment/46487634
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29131038
has comment: http://stackoverflow.com/comment/46487650
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29131029
score: 1
has body: Third time is a charm! This is what I am trying to achive.. I would like to use data.name to populate a divs ID name. I would like the &lt;div id="date.name"/&gt; to show on click, below is what I have tried. click: function(event, data) { $('#clicked-state') // .text('You clicked: '+data.name); .show($("&lt;div id='" + data.name + "'/&gt;" )); // .parent().effect('highlight', {color: '#C7F464'}, 2000); } }); In this case data.name holds abbreviations from all 50 US states. Once a state is clicked, eg. 'California' data.name will be assigned 'CA'. I want to use this to show div with id 'CA'. I want to use this to display divs that I have inline with the same name. Update: based on suggestions, div did not show onclick of state. Recent Attempt css &lt;style&gt; #va { display:none;} &lt;/style&gt; js click: function(event, data) { $('#clicked-state') $('#' + data.name).toggle(); } }); html &lt;div id="va"&gt; this is virginia. &lt;/div&gt; I am using this plugin for states data.name generated and map. http://newsignature.github.io/us-map/
has title: show a div based on data.name
upvote count: 2
accepted answer: http://stackoverflow.com/a/29131029
has answer: http://stackoverflow.com/a/29131081
has answer: http://stackoverflow.com/a/29132453
downvote count: 1
has answer: http://stackoverflow.com/a/29131038
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/29161127
has comment: http://stackoverflow.com/comment/46597247
tagged with: google-maps
tagged with: javascript
has body: Good morning friends, am working on a project, an android project using map v3 on an android webview. I noticed that sometimes my street view doesn't work correctly. It shows blank sometimes. I also noticed that my street view doesn't show panorama pictures for this address "Arsenal,london borough of Islington,United Kingdom", and from there on words, any address typed does not show street view panorama pictures. I also noticed that the same address shows in other application I have tested it in. Finally does JavaScript alert work in android webview, my own is not working. Here is my code below. function initialize() { geocoder = new google.maps.Geocoder(); var fenway = new google.maps.LatLng(42.345573, -71.098326); var mapOptions = { center: fenway, zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: true, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.TOP_LEFT, mapTypeIds: [ google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.TERRAIN, google.maps.MapTypeId.HYBRID ] } }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var panoramaOptions = { position: fenway, pov: { heading: 34, pitch: 10 } }; panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'), panoramaOptions); map.setStreetView(panorama); google.maps.event.addListener(panorama, 'status_changed', function() { document.getElementById("loading1").style.display = "none"; }); google.maps.event.addListener(map, 'tilesloaded', function() { document.getElementById("loading").style.display = "none"; }); document.getElementById( "cancel" ).onclick = function() { document.getElementById("autocomplete").value = ""; }; google.maps.event.addListener(map, 'center_changed', function() { document.getElementById("loading1").style.display = "none"; }); } function codeAddress() { var address = document.getElementById('autocomplete').v…
tagged with: google-maps-api-3
score: 0
tagged with: android
answer count: 0
type: UnansweredQuestion
has title: My map v3 street view panorama acts in a strange way
has comment: http://stackoverflow.com/comment/46560633
type: Question

http://stackoverflow.com/a/29126546
score: 1
has body: This isn't a great answer and I would love to see a better one. But it should work if you have a fairly static fullcalendar. Essentially, start with the FC outside of the visible-print, render it, then move it in. $('#calendar2').fullCalendar({}); $('#calendar2').fullCalendar('render'); $('#calendar2').appendTo(".visible-print"); Plunker Note that every time you make a change to it, it will need to be moved out and rendered again.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29106780
answers question: http://stackoverflow.com/q/29106780

http://stackoverflow.com/comment/47070405
score: 0
comment on: http://stackoverflow.com/q/29174227
type: Comment
type: QuestionComment
has text: are you sure to have `#` in `gvPresentations.ClientID`? if not change `getElementById('<%=` to `getElementById('#<%=`

http://stackoverflow.com/comment/46429178
comment on: http://stackoverflow.com/q/29099385
has text: Try using the submit method: http://api.jquery.com/submit/
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46480897
score: 0
comment on: http://stackoverflow.com/q/29127362
type: Comment
has text: It looks like you are appending the iframe to the document body. Shouldn't it be a child of your popup element ?
type: QuestionComment

http://stackoverflow.com/comment/46383463
comment on: http://stackoverflow.com/a/29072145
score: 0
type: AnswerComment
has text: @Ehsan-Sajjad This is the answer you are looking for
type: Comment

http://stackoverflow.com/comment/46377415
has text: Yes, backbone undefined, I told you i am using backbone. yes you write here to replace with window. See demo here in page source. http://html5.gingerhost.com/new-york
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29071251

http://stackoverflow.com/comment/46429264
has text: $('body').on("submit", "form", function(e) {} try this, or i wrong understand ur problem?
comment on: http://stackoverflow.com/q/29099385
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/a/29264547
score: 6
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46754810
upvote count: 6
answers question: http://stackoverflow.com/q/29206832
has body: To use CSS only, the best way would to use Chrome or FireFox's developer tools and find the various style you want to overwrite. The for each of the style you find that need adjusting then use the !important modifier. .newClass { color:red !important; } Another way would be to write unique css class names and again use !important if you need. The real trick here is in specificity. If an identifier is more specific the rule will be applied. 6.4.1 Cascading order 6.4.1.4 Finally, sort by order specified: if two declarations have the same weight, origin and specificity, the latter specified wins. Declarations in imported style sheets are considered to be before any declarations in the style sheet itself. Most awesome link .my-most-awesome-link.its-really-cool { text-decoration:none !important; color:red !important; } If you are desperate you could use javascript to remove the unwanted css. See this JSBin for a working example. I found this interesting technique
has comment: http://stackoverflow.com/comment/46762813

http://stackoverflow.com/q/29084275
score: 0
tagged with: arrays
tagged with: javascript
has title: Get object from array on javascript
has comment: http://stackoverflow.com/comment/46401574
has body: Json gives me the tag "image" as array or object, and I just want a new array that contains: The frist object of the array when "image" is an array( "image": [..). The object when "image" is an object( "image": {..). ¿Is it possible on javascript? This is a sample of my json { "results": { "collection1": [ { "date": [ { "href": "", "text": "Feb" }, { "href": "", "text": "25" }, { "href": "", "text": "2015" } ], "image": { "alt": "", "src": "http://img.rlsbb.com/images/uAJisteKNw.jpg", "text": "" } }, { "date": [ { "href": "", "text": "Feb" }, { "href": "", "text": "18" }, { "href": "", "text": "2015" } ], "image": [ { "alt": "", "src": "http://img.rlsbb.com/images/uAJosteUNw.jpg", "text": "" }, { "alt": "", "src": "http://1.bp.blogspot.com/-VdJQw_nXO0k/UoAwpBL8yjI/AAAAAAAAABU/H_fKtjG8H5Y/s1600/Online.jpg", "text": "" } ] }}
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46401567
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/46472183
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29122913
has text: Thanks a lot.......................................... I was scratching my head from morning
score: 0

http://stackoverflow.com/q/29195885
possible better answer: http://stackoverflow.com/a/29196198
has answer: http://stackoverflow.com/a/29196198
type: Question
tagged with: reactjs
answer count: 2
accepted answer: http://stackoverflow.com/a/29198875
has comment: http://stackoverflow.com/comment/46604974
tagged with: javascript
tagged with: reactjs-flux
has body: I'm learning React. I'd like to create a game with a basic tile-board (like here http://richard.to/projects/beersweeper/ but where tiles can have two states ('available' or 'already clicked'). In terms of speed, React looks interesting as with its virtual DOM/diffs, I could only adjust the css and text inside tiles that have been clicked (so that they visually differ form those still not clicked by anyone). My goal (and personal challenge haha) is to make this game playable by 1000 simultaneous players who can click where they want on a 100,000-tiles board.(distribution among clients in real time of tile status would be done with Firebase) Should I use basic standard React and its built-in features (onclick events,ts listeners...) or is it impossible with only-React to enable that many events/listeners for 1000 people on 100K tiles in real time with any user being able to click anywhere (on available tiles) ? Should I use alternative/complentary tools and techniques such as canvas, React Art, GPU acceleration, webgl, texture atlases....?
score: 0
has title: Use React to create a 100K multi-player tile game
has comment: http://stackoverflow.com/comment/46606822
tagged with: firebase
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29198875

http://stackoverflow.com/comment/46475812
has text: I don't want to include the newline.
type: Comment
comment on: http://stackoverflow.com/a/29124721
score: 0
type: AnswerComment

http://stackoverflow.com/q/29171009
has body: I'm currently working on an interface for the web which uses 3D-transforms as a method for zooming. The zooming is done with an API called impress.js which simply put moves a camera closer or further away with 3D-transforms. Problem I need to create a square overlay for a bunch of divs and because they can be far away I need to calculate the amount of pixels they actually take up on the screen. I figured that since I can get how many pixels from the div that the camera currently is, I should be able to determine the apparent pixel size of the far away elements. I have tried estimating it with angular sizes, looking at here. However it does not work when you move too close, too far or an object is too thin or wide. Code What I currently do looks something like this: var div = $("#target"), camera = $("#camera"), angularSize = camera.z &lt; 0 ? Math.tan(div.offsetWidth / camera.z) : 1; return { width: div.offsetWidth * angularSize, height: div.offsetHeight * angularSize, } But it only works for certain elements, and not perfectly either. What I Have: Actual width/height of each element The amount of pixels in Z-index that I am looking at my elements from. What I need Amount of pixels the far-away elements actually take up on my screen. If someone knows how I can calculate this I would love some help
has title: Width/Height in pixels for far away transformed elements
answer count: 1
tagged with: css
type: AnsweredQuestion
tagged with: impress.js
tagged with: pixel
type: Question
tagged with: transform
tagged with: javascript
has answer: http://stackoverflow.com/a/29213866
accepted answer: http://stackoverflow.com/a/29213866
score: 0

http://stackoverflow.com/comment/46533971
comment on: http://stackoverflow.com/a/29132275
type: Comment
has text: I had to make one small tweak, it errors unless I pass the table to the format function. But otherwise, it now works! Destroying and recreating the table makes sense now instead of showing and hiding.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46531731
type: Comment
has text: I guess I would say: 1. You data should't live in the DOM. You should have your data (models, stores, collections etc.) live outside of the DOM. 2. You have to deal with this in any language, whether it's asynchronous (via callbacks or promises) or via threads. If you want to want to deal with the most current data you need to:
comment on: http://stackoverflow.com/a/29136531
type: AnswerComment
score: 0

http://stackoverflow.com/a/29092378
upvote count: 10
downvote count: 0
type: Answer
has body: list = //YOUR OBJECT DATA count= Object.keys(list).length; Object.keys() gives the count of keys That should give proper count
answers question: http://stackoverflow.com/q/29092193
score: 10

http://stackoverflow.com/a/29074342
accepted answer of: http://stackoverflow.com/q/29074200
has comment: http://stackoverflow.com/comment/46382952
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46383020
has body: The console is giving you the result of your mathematical operation, not storing it anywhere. So you start with memory containing the value 0. To make that 5, you need to add 5, and then store the result back in memory. memory = memory + 5; There is a shorthand for that: memory += 5; And also a shorthand for just adding 1 (because it's a very common task): ++memory; although this is not considered best practise. Regarding the textBox.value version, where you are doing this, the value property of a textBox is a string, not a numeric value. Even though 1234 looks like a number, it is actually the characters '1', '2', '3' and '4'. You could happily include 'a' or 'z'. To get a numeric value out that you can use in a mathematical expression, you need to parse the string: Either enteredValueInt = parseInt(textBox.value); // or enteredValueFloat = parseFloat(textBox.value); depending on whether you expect the textBox to have a whole number or a floating point value in. Demo here: http://jsbin.com/yijezifowu/1/edit?html,js,output EDIT: Re 'very strange problem': You have a spurious call to emptyBox at the top of the mathStuff function in your pastebin code: function mathStuff(operator) { emptyBox(); //... stuff with operators } So you're beginning by clearing the textbox before attempting to retrieve the numbers.
has comment: http://stackoverflow.com/comment/46383631
has comment: http://stackoverflow.com/comment/46383092
has comment: http://stackoverflow.com/comment/46382661
downvote count: 0
score: 6
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/46382728
answers question: http://stackoverflow.com/q/29074200
has comment: http://stackoverflow.com/comment/46383172

http://stackoverflow.com/comment/46409282
type: Comment
score: 0
has text: [This article](http://www.nczonline.net/blog/2012/10/09/ecmascript-6-collections-part-2-maps/) claims they're ordered, but gives no citation. But it's Nicholas Zakas, who's usually very clued into JS stuff.
type: AnswerComment
comment on: http://stackoverflow.com/a/29087887

http://stackoverflow.com/q/29105923
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29106000
has answer: http://stackoverflow.com/a/29106120
has title: Return values in JavaScript functions
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29106012
upvote count: 1
has body: I was reviewing variable accessibility in functions vs. the global scope and came across something new and wondered if the following is correct: function foo (){ message='Hi' } alert(message); //ReferenceError: message is not defined This returns an error because foo hasn't been called anywhere yet, but once you do, it's available in the global space. Got it. However I read somewhere besides explicitly making functions return a value (i.e. using the return keyword) we use them for their side-effects (e.g. imagine I put that alert function inside foo I just referenced). So is the above somehow returning the value the same way it would when using the return keyword? UPDATE I am getting a lot of feedback but perhaps I should restate the question. Is the mere fact of calling the function putting it in the global scope. Like what is happening behind the scenes...? I think some people may think (as I did) by simply omitting the var, it's in the global scope. Actually, for those who don't know, you have to call the function first. THANKS!
has comment: http://stackoverflow.com/comment/46441762
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29106017
has answer: http://stackoverflow.com/a/29106017
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46441786
has answer: http://stackoverflow.com/a/29106000
score: -2

http://stackoverflow.com/comment/46630663
type: Comment
has text: @Questifer may be i found issue . in html you give class name which start with caps "Machinery","Equipment","property" and in show hide code you use in in small letter. check will apply same name
comment on: http://stackoverflow.com/a/29182168
type: AnswerComment
score: 0

http://stackoverflow.com/a/29172871
score: 0
type: Answer
has body: You should be able to add a button, say to the header or some such, that calls a function on your viewmodel. If the viewmodel is bound to a remote json source, then simply calling .read() on your dataSource would cause it to re-fetch the data. If you are manually fetching the data, you would need to re-fetch the data manually, and then call .read() on your dataSource. Here is a quick sample that uses a method to add an item to the source (to fake like there is a new data item), and then calls read on the dataSource. http://jsbin.com/kuyoxu/1/edit?js,console,output
answers question: http://stackoverflow.com/q/29171390
has comment: http://stackoverflow.com/comment/46572032

http://stackoverflow.com/q/29091441
has answer: http://stackoverflow.com/a/29101585
score: 0
answer count: 1
has title: dojo dom manipulation after page load
type: UnansweredQuestion
tagged with: dojo
has body: I think this question is asked, but I am surprised to see that dojo is not behaving as per the docs. I want some div to be changed with particular class. So I decided to use dojo.ready(function(){ }); But that was running before the page was completely loaded. Then I used addonload() function. That too gave the same result. Finally I ended up doing something like this require(["dojo/domReady"], function(domReady) { domReady(function () { setTimeout(function(){ setAfrobeat(); },500); }); }); That is working fine, but some times I see a blink as there is delay, and very a few times this also doesn't work. If I increase that timeout to 1000 it works always, but user can see the content modification. Any perfect way like I used to do in jquery's document.ready Regards Aadam
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29143509
answers question: http://stackoverflow.com/q/29140538
upvote count: 2
has comment: http://stackoverflow.com/comment/46548269
type: Answer
has body: Yes, you can center your image with canvas.centerObject() function. Example: var canvas = new fabric.Canvas('myCanvas'); var src = "http://fabricjs.com/lib/pug.jpg"; fabric.Image.fromURL(src, function(oImg) { oImg.set({ width: 300, height: 200, }); canvas.add(oImg); canvas.centerObject(oImg); canvas.renderAll(); }); Check this fiddle: http://jsfiddle.net/ckqk2Lzs/8/ I hope this help.
score: 2
has comment: http://stackoverflow.com/comment/46575551
has comment: http://stackoverflow.com/comment/46538620
downvote count: 0

http://stackoverflow.com/comment/98732438
comment on: http://stackoverflow.com/a/53461519
type: AnswerComment
type: Comment
has text: @SatThiru An array of tuples is the customary representation of `Map`s, it goes well with the constructor and iterator. Also it is the only sensible representation of maps that have non-string keys, and object would not work there.
score: 13

http://stackoverflow.com/a/29104688
accepted answer of: http://stackoverflow.com/q/29104372
type: Answer
has body: I think the path of your dependancies are not correct, some time you ahve it relative, sometime not. Try to put the absolutes one in relative? eg replace to
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29104372
score: 0

http://stackoverflow.com/a/29116060
score: 1
has body: Use a function for the setTimeout callback instead of an eval string and place the timeout after the alert instead of as an alert argument. function iniciar() { var value = 0; var clase; var nombre; var validate = "ATS1"; nombre = prompt("Digite su primer nombre"); clase = prompt("Digite su codigo de seccion de clase (letras en mayuscula)"); if (clase === validate) { value = 3; } if (value == 3) { alert("Ingreso exitoso, presione Aceptar."); var pag = "formulario.html" alert("Aceptado \nPulse Aceptar y sera redireccionado en 2 segundos."); setTimeout(function() { alert('redirect'); window.location.href = pag; }, 2000) } else { alert("Lo sentimos mucho, usted no tiene acceso a la pagina. Usted pertenece a otro curso, adios."); close(); } } document.querySelector('[type="button"]').onclick = iniciar; &lt;input type="button" name="Entrar" value=" Ingresar " &gt;
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29115792
answers question: http://stackoverflow.com/q/29115792
has comment: http://stackoverflow.com/comment/46482787
upvote count: 1

http://stackoverflow.com/q/29064028
has answer: http://stackoverflow.com/a/29064109
has comment: http://stackoverflow.com/comment/46364180
tagged with: javascript
upvote count: 2
answer count: 2
tagged with: unicode
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29064120
score: 2
linked to: http://stackoverflow.com/q/12114477
downvote count: 0
has body: help me pls. In Unicode symbol &amp; = "&amp;" + "#38;" If I add it to HTML like this &lt;div id="div" title="&amp;#38;"&gt;&lt;/div&gt; ALL OK! I create symbol in title, like this div id="div" title="&amp;"&gt;&lt;/div&gt; But, when I add Unicode in HTML via JavaScript: var div = document.getElementById('div'); div.setAttribute('title', "&amp;#38;"); I have a bad result: &lt;div id="div" title="&amp;#38;"&gt;&lt;/div&gt; How I can add Unicode in html attribute via JavaScript and get the correct result like it: &lt;div id="div" title="&amp;"&gt;&lt;/div&gt; Thanks for help! AND IF I do it: var code = 26; div.setAttribute('title', "\x" + code); I have a error. How I can fix it?
has title: How to add Unicode to HTML?
duplicate of: http://stackoverflow.com/q/12114477
type: Question

http://stackoverflow.com/comment/46528265
score: 0
has text: and your question is?
comment on: http://stackoverflow.com/q/29153533
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46419271
has text: I'm personally not 100% that using eval() for such things is actually good practice.
comment on: http://stackoverflow.com/q/29093700
type: Comment
type: QuestionComment
score: 0

loops
tags question: http://stackoverflow.com/q/29114343
tags question: http://stackoverflow.com/q/29130969
tags question: http://stackoverflow.com/q/29209090
tags question: http://stackoverflow.com/q/29093211
tags question: http://stackoverflow.com/q/29097809
tags question: http://stackoverflow.com/q/29158723
tags question: http://stackoverflow.com/q/29216977
tags question: http://stackoverflow.com/q/29125815
tags question: http://stackoverflow.com/q/29170548
tags question: http://stackoverflow.com/q/29138736
tags question: http://stackoverflow.com/q/29096818
type: Tag
tags question: http://stackoverflow.com/q/29099401
tags question: http://stackoverflow.com/q/29188406
tags question: http://stackoverflow.com/q/29065519
tags question: http://stackoverflow.com/q/29115117
tags question: http://stackoverflow.com/q/29062633
tags question: http://stackoverflow.com/q/29146220
tags question: http://stackoverflow.com/q/29163255
tags question: http://stackoverflow.com/q/29080509
tags question: http://stackoverflow.com/q/29217770
tag name: loops
tags question: http://stackoverflow.com/q/29177566
tags question: http://stackoverflow.com/q/29118745
tags question: http://stackoverflow.com/q/29198460
tags question: http://stackoverflow.com/q/29137152
tags question: http://stackoverflow.com/q/29134039
tags question: http://stackoverflow.com/q/29137992
tags question: http://stackoverflow.com/q/29137333
tags question: http://stackoverflow.com/q/29137123

http://stackoverflow.com/q/29139498
score: 0
has comment: http://stackoverflow.com/comment/46503030
has title: Passing ID in PHP function which has multiple value
has comment: http://stackoverflow.com/comment/46502914
has comment: http://stackoverflow.com/comment/46503067
has comment: http://stackoverflow.com/comment/46503025
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29140165
has comment: http://stackoverflow.com/comment/46503177
tagged with: php
type: Question
answer count: 2
tagged with: function
has comment: http://stackoverflow.com/comment/46504261
has comment: http://stackoverflow.com/comment/46503234
tagged with: javascript
has comment: http://stackoverflow.com/comment/46503226
has answer: http://stackoverflow.com/a/29143619
has comment: http://stackoverflow.com/comment/46502975
has comment: http://stackoverflow.com/comment/46503077
has body: $id=$_GET['id']; // this result has values like `1,2,3..multiple` I used this to pass from function some($id); in PHP code. In JS file: fucntion some(cid){ // I have check it with alert(cid); } But it takes or holds only one value here. Why does this happen? Please help. I want all ids in single value (i.e., suppose there are 1,2,3,4, then they should all be in cid).

http://stackoverflow.com/q/29078039
tagged with: google-maps
upvote count: 0
answer count: 1
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46390520
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/46389481
downvote count: 3
has body: I have faced an issue with my Google Map API while getting nearest places. Code: var headers = { 'Access-Control-Allow-Origin' : '*', 'Content-Type': 'application/json' }; var req = { method: 'GET', url: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&amp;radius=500&amp;types=food&amp;name=cruise&amp;key=AIzaSyCLf2OhSgKKOju1hpUBirFtZ-W26zObyVI?sensor=false', headers: headers } $http(req).success(function(d) { alert(d) }); Error: XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8…=food&amp;name=cruise&amp;key=AIzaSyCLf2OhSgKKOju1hpUBirFtZ-W26zObyVI?sensor=false. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The response had HTTP status code 405.
type: Question
has title: Want to use Google map api on localhost
tagged with: javascript
has answer: http://stackoverflow.com/a/29078350
tagged with: ionic-framework

http://stackoverflow.com/q/29117764
upvote count: 1
has answer: http://stackoverflow.com/a/29117809
favorite count: 0
has body: How can I read the session data set in PHP from Javascript. I tried the following code, but it doesn't work. &lt;?php session_start(); $_SESSION['test'] ="orange"; ?&gt; &lt;script&gt; var username = '&lt;%= Session["test"] %&gt;'; alert(username ); &lt;/script&gt; Thanks for your help.
has answer: http://stackoverflow.com/a/29117817
accepted answer: http://stackoverflow.com/a/29117817
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/29117809
type: Question
has title: Reading session var in Javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/29118354
has comment: http://stackoverflow.com/comment/46463319
answer count: 3

http://stackoverflow.com/q/29133412
has comment: http://stackoverflow.com/comment/46492715
has answer: http://stackoverflow.com/a/29133590
accepted answer: http://stackoverflow.com/a/29133509
tagged with: jquery
has comment: http://stackoverflow.com/comment/46492605
has answer: http://stackoverflow.com/a/29133626
has comment: http://stackoverflow.com/comment/46492927
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3348355
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29133509
has title: html radiobutton won't fire event
type: Question
has body: I'm constructing this webpage and i want to change the label and mas of an input depending on the radio button selected by the user. I have read all the posts from people with the same problem, like jQuery .focus() and .blur() not working in Chrome or Safari or http://juristr.com/blog/2008/06/attaching-client-side-event-handler-to/ but the solutions proposed don't seem to be working! Here's the javascript: $(document).ready(function() { $("#cep").mask("99999-999"); $("#jur", "#fis").click(function() { docProcess(this.value); }); function docProcess(value) { alert("hi"); if (value == "jur") { $("#docLabel").value = "CNPJ: "; $("#docLabel").mask("99.999.999/9999-99"); } else { $("#docLabel").value = "CPF: "; $("#docLabel").mask("999.999.999-80"); } } }); and here is the html: Tipo de cliente: Jurídico Físico CNPJ: Any help?
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/29133590
answer count: 3

jquery
tags question: http://stackoverflow.com/q/29181615
tags question: http://stackoverflow.com/q/29174685
tags question: http://stackoverflow.com/q/29133368
tags question: http://stackoverflow.com/q/29063896
tags question: http://stackoverflow.com/q/29170361
tags question: http://stackoverflow.com/q/29154661
tags question: http://stackoverflow.com/q/29191319
tags question: http://stackoverflow.com/q/29080499
tags question: http://stackoverflow.com/q/29063142
tags question: http://stackoverflow.com/q/29117240
tags question: http://stackoverflow.com/q/29091112
tags question: http://stackoverflow.com/q/29072902
tags question: http://stackoverflow.com/q/29099123
tags question: http://stackoverflow.com/q/29172632
tags question: http://stackoverflow.com/q/29161839
tags question: http://stackoverflow.com/q/29114657
tags question: http://stackoverflow.com/q/29092682
tags question: http://stackoverflow.com/q/29112895
tags question: http://stackoverflow.com/q/29142418
tags question: http://stackoverflow.com/q/29210400
tags question: http://stackoverflow.com/q/29140207
tags question: http://stackoverflow.com/q/29137995
tags question: http://stackoverflow.com/q/29158413
tags question: http://stackoverflow.com/q/29187920
tags question: http://stackoverflow.com/q/29138963
tags question: http://stackoverflow.com/q/29200711
tags question: http://stackoverflow.com/q/29185015
tags question: http://stackoverflow.com/q/29172456
tags question: http://stackoverflow.com/q/29171630
tags question: http://stackoverflow.com/q/29118241
tags question: http://stackoverflow.com/q/29069731
tags question: http://stackoverflow.com/q/29075564
tags question: http://stackoverflow.com/q/29122415
tags question: http://stackoverflow.com/q/29078446
tags question: http://stackoverflow.com/q/29161561
tags question: http://stackoverflow.com/q/29135995
tags question: http://stackoverflow.com/q/29118769
tags question: http://stackoverflow.com/q/29097262
tags question: http://stackoverflow.com/q/29126765
tags question: http://stackoverflow.com/q/29128638
tags question: http://stackoverflow.com/q/29098263
tags question: http://stackoverflow.com/q/29195923
tags question: http://stackoverflow.com/q/29183541
tags question: http://stackoverflow.com/q/29207907
tags question: http://stackoverflow.com/q/29149169
tags question: http://stackoverflow.com/q/29137109
tags question: http://stackoverflow.com/q/29093991
tags question: http://stackoverflow.com/q/29197126
tags question: http://stackoverflow.com/q/29078503
tags question: http://stackoverflow.com/q/29166752
tags question: http://stackoverflow.com/q/29078385
tags question: http://stackoverflow.com/q/29102606
tags question: http://stackoverflow.com/q/29089737
tags question: http://stackoverflow.com/q/29197386
tags question: http://stackoverflow.com/q/29085955
tags question: http://stackoverflow.com/q/29138994
tags question: http://stackoverflow.com/q/29118727
tags question: http://stackoverflow.com/q/29212450
tags question: http://stackoverflow.com/q/29182251
tags question: http://stackoverflow.com/q/29151202
tags question: http://stackoverflow.com/q/29062581
tags question: http://stackoverflow.com/q/29106028
tags question: http://stackoverflow.com/q/29205216
tags question: http://stackoverflow.com/q/29156139
tags question: http://stackoverflow.com/q/29147094
tags question: http://stackoverflow.com/q/29127576
tags question: http://stackoverflow.com/q/29144602
tags question: http://stackoverflow.com/q/29087925
tags question: http://stackoverflow.com/q/29157206
tags question: http://stackoverflow.com/q/29128890
tags question: http://stackoverflow.com/q/29212779
tags question: http://stackoverflow.com/q/29199519
tags question: http://stackoverflow.com/q/29179967
tags question: http://stackoverflow.com/q/29079104
tags question: http://stackoverflow.com/q/29208952
tags question: http://stackoverflow.com/q/29183717
tags question: http://stackoverflow.com/q/29165735
tags question: http://stackoverflow.com/q/29143220
tags question: http://stackoverflow.com/q/29143661
tags question: http://stackoverflow.com/q/29131542

http://stackoverflow.com/q/29071990
has answer: http://stackoverflow.com/a/29093801
score: 0
has comment: http://stackoverflow.com/comment/46395326
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
tagged with: ajax
has comment: http://stackoverflow.com/comment/46417790
type: UnansweredQuestion
has body: I am trying to do something like updatepanel in asp.net. Page A display stuff and a div that partial render another view (Page B) with 2 buttons in it. Depend on which the button, the partial view (Page B) will re-update it content. The 1st time the page load, the partial view display correct. When a button click in the page B, only the view of B is display, Page A is lost. Page A: @{ DemoMVC.Models.FlashADrugModel displayDrug = null; int drugIndex = 0; Session["drugIndex"] = drugIndex; if (Session["userDrugArray"] != null) { DemoMVC.Classes.Drug[] myDrugArray = (DemoMVC.Classes.Drug[])Session["userDrugArray"]; if(myDrugArray.Length&gt;0) { displayDrug = new FlashADrugModel { displayDrug = myDrugArray[drugIndex], nullAble = false }; } } } @using (Ajax.BeginForm("FlashACard", "FlashCard", null, new AjaxOptions() { UpdateTargetId = "updateRegion", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })) { @Html.AntiForgeryToken() &lt;div id="updateRegion"&gt; @Html.Partial("_FlashACard", @displayDrug) &lt;/div&gt; &lt;input type="submit" value="Previous" name="ButtonType"&gt;&lt;input type="submit" value="Next" name="ButtonType"&gt; } .... Page B: &lt;dl class="dl-horizontal"&gt; &lt;dd&gt; @Html.DisplayFor(model =&gt; model.displayDrug.DrugBrand) &lt;/dd&gt; &lt;/dl&gt; ..... Controller: public ActionResult Index() { //List&lt;Drug&gt; myDrugList = this.cardRepository.GetAllDrugs(); List&lt;Drug&gt; myDrugList = new DrugCardsRepository().GetAllDrugs(); Session["userDrugArray"] = myDrugList.ToArray(); return View(); } public PartialViewResult FlashACard(FlashADrugModel drugModel, string ButtonType) { if(!drugModel.nullAble.HasValue) { if (Session["userDrugArray"] != null) { Drug[] myDrugArray = (Drug[])Session["userDrugArray"]; //Default drug index 0 int drugIndex = 0; if (Session["drugIndex"] != null) { drugIndex = (int)Session["drugIndex"]; } if (ButtonType == "Next") { if(drugIndex &lt; myDrugArray.Length -2) { drugIndex++; } } if (ButtonType == "Previous") { …
type: Question
has title: ajax.beginform() not updating partial view mvc
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/46415155

http://stackoverflow.com/comment/46530618
type: QuestionComment
type: Comment
has text: @WiredPrairie I include a jQuery.min.js that comes with foundation.
score: 0
comment on: http://stackoverflow.com/q/29152002

http://stackoverflow.com/q/29205242
upvote count: 2
accepted answer: http://stackoverflow.com/a/29205262
has body: Can you please take a look at this example and let me know how I can use jquery to enable all inputs existing in the same row as Clicked "Edit" button .btn-edit class? js: $(".btn-edit").on("click", function(){ $(this).attr("disabled", true); }); and HTML Col 1 Col 2 Col 4 Col 4 Col 5 Col 3 Update Remove Edit Update Remove Edit Update Remove Edit
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29205267
possible better answer: http://stackoverflow.com/a/29205266
has answer: http://stackoverflow.com/a/29205266
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29205338
has answer: http://stackoverflow.com/a/29205262
has title: How To Enable all Inputs In a Table Row With An Edit Button
answer count: 4
type: AnsweredQuestion
score: 2

dynamic
tags question: http://stackoverflow.com/q/29065928
tag name: dynamic
tags question: http://stackoverflow.com/q/29157797
tags question: http://stackoverflow.com/q/29188777
tags question: http://stackoverflow.com/q/29113252
tags question: http://stackoverflow.com/q/29125018
tags question: http://stackoverflow.com/q/29125159
tags question: http://stackoverflow.com/q/29114803
type: Tag
tags question: http://stackoverflow.com/q/29108288
tags question: http://stackoverflow.com/q/29156592

http://stackoverflow.com/a/35286031
score: 0
answers question: http://stackoverflow.com/q/29198242
type: Answer
has body: I have given a detailed answer at https://stackoverflow.com/a/35285968/936494. It shows passing custom options and how to use that to instantiate EpicEditor. Please have a look at it and try using the code given. I am sure it will be helpful.

http://stackoverflow.com/comment/46527953
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29150701
has text: You have control over the `checkbox` properties though? Like, `id`,`class`, `name`, `data`, etc?

http://stackoverflow.com/a/29092755
has body: change overflow-y:hide and height is 150px like data data data data data data data data Link: http://plnkr.co/edit/dFE0HX7W5hWsUztc37La?p=preview
has comment: http://stackoverflow.com/comment/46419320
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29092082

http://stackoverflow.com/comment/46429394
type: QuestionComment
has text: @rafaelcastrocouto I know, but the question is how to do it with CSS and SVG. :) Not sure how this could work with rounded corners only.
comment on: http://stackoverflow.com/q/29099216
score: 0
type: Comment

http://stackoverflow.com/q/29122009
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/29123687
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
has title: Append extra row to jqueryui autocomplete (even if autocomplete doesn't have any matches)
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29123687
has body: How should an extra row be added to the jQueryUI Autocomplete results? I've implemented Add additional link to jquery ui autocomplete list as shown below, but it will not display the extra row if autocomplete doesn't have any matches. What I have tried... To append an extra row to the jQueryUI autocomplete results, I came up with the below script. The extra row is added using the following: open: function( event, ui ) { $(' Add New ') .on('click', function(event) {$("#dialog-add-new").dialog("open");}) .appendTo('ul.ui-autocomplete'); } I have three problems with my implementation: If no results match the selected text, the new row isn't displayed. Type "On" in the input and you will see it. Type "xx" in the input and it isn't displayed. I suppose I could just have the server populate it, but seems like a waste, and would rather do it client-side. Maybe problems if I have two ul.ui-autocomplete on the page? The added row doesn't have the same appearance as the autocomplete rows. The first item is the most critical. How should an extra row be added to the jQueryUI Autocomplete results even if Autocomplete doesn't have any results? Please see http://jsbin.com/quyexu/1/ for a live demo of the below script. You could ignore the part regarding the dialog as it seems to be working. Thank you Testing
has comment: http://stackoverflow.com/comment/46470992
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/29125024
linked to: http://stackoverflow.com/q/8598098
upvote count: 1
type: Question

http://stackoverflow.com/comment/46623584
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29205572
type: Comment
has text: Was hoping for a better answer... but I guess I just shouldn't allow this situation to occur

http://stackoverflow.com/comment/46449386
comment on: http://stackoverflow.com/a/29103419
type: Comment
type: AnswerComment
has text: Your example is flagging every use of `l` as not existing in current context, and the last 2 parameters simply come up as `; expected`. Are you meaning this to be in the Controller or on the View? My Controller for `Location` is currently the following: `ViewBag.Location_Id = new SelectList(db.INV_Locations, "Id", "location_room", iNV_Assets.Location_Id);`
score: 0

http://stackoverflow.com/q/29076393
has comment: http://stackoverflow.com/comment/46386486
type: Question
has comment: http://stackoverflow.com/comment/46387174
has comment: http://stackoverflow.com/comment/46387324
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46387032
has comment: http://stackoverflow.com/comment/46387853
answer count: 1
has answer: http://stackoverflow.com/a/29077272
has title: How to get the right index for a delayed trigger?
has comment: http://stackoverflow.com/comment/46386810
accepted answer: http://stackoverflow.com/a/29077272
has body: Following problem: I have an angular module with $http.get to get some google coordinates. This function triggers another function. This function again triggers another function. It will all make sense in a moment. Angular Module: var myApp = angular.module('wmw', []); myApp.controller('MainCtrl', function ($scope, $http) { //Angular Method $scope.getTargetCords = function (data) { $http.get(data).success(function (response) { $(document).triggerHandler('my_func:data-received', [response]); }); }; }); onSucess: var onSuccess = function(position) { currentLat = position.coords.latitude ; currentLng = position.coords.longitude; for(i = 0; i&lt;locations.length;i++){ var destUrl = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' + locations[i][ 'street' ] + ',' + locations[i][ 'city' ] + ',Deutschland' + '&amp;sensor=true'; var MyAngularScope = angular.element($("#MainCtrlId")).scope(); MyAngularScope.getTargetCords('http://maps.googleapis.com/maps/api/geocode/xml?address=' + locations[i][ 'street' ] + ',' + locations[i][ 'city' ] + ',Deutschland' + '&amp;sensor=true'); } }; navigator.geolocation.getCurrentPosition(onSuccess, onError); The two triggers: $(document).on('my_func:data-received', function(event, response) { map[s] = response; s++; if(s === locations.length){ $(document).triggerHandler('allData'); } }); $(document).on('allData', function(){ var thecoords = []; var distance = []; $('#filter-list').empty(); for(var i = 0; i &lt; locations.length; i++){ thecoords[0] = $(map[i]).find('lat').first().text(); thecoords[1] = $(map[i]).find('lng').first().text(); distance[i] = calculateDistance(currentLat, currentLng, thecoords[0], thecoords[1]); locations[i]['distance'] = distance[i]; } locations.sort(function(a,b) { return a.distance - b.distance;} ); for(var i = 0;i &lt; locations.length; i++){ distance[i] = locations[i]['distance'].toFixed(2); distance[i] += ' KM'; locations[i]['distance'] = distance[i]; } $('.loading').hide(); for(var i = 0; i&lt;=5; …
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46387566

http://stackoverflow.com/a/29136962
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/65730119
answers question: http://stackoverflow.com/q/29136916
upvote count: 3
has body: On line 445 of chessboard-0.3.0.js, it says cfg.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png'; If you change it to: cfg.pieceTheme = '/static/img/chesspieces/wikipedia/{piece}.png'; does that fix your problem? You might have to play around with the exact path to reflect your complete directory structure (or use a relative path) but this is the place where it needs to be changed.
score: 3
accepted answer of: http://stackoverflow.com/q/29136916
type: AcceptedAnswer

http://stackoverflow.com/comment/46601260
comment on: http://stackoverflow.com/q/29181358
score: 0
has text: I think the question is clear : I am asking the way to change the layout based on orientation for android app build using apache cordova.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29178418
favorite count: 0
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/29178574
score: 2
type: AnsweredQuestion
has title: Angular dynamically adding directive
type: Question
tagged with: slimscroll
has comment: http://stackoverflow.com/comment/46574271
has comment: http://stackoverflow.com/comment/46574307
tagged with: javascript
linked to: http://stackoverflow.com/q/29164542
accepted answer: http://stackoverflow.com/a/29178574
answer count: 1
downvote count: 0
has body: I want to dynamically use angular-slimscroll in my webpage. The directive looks something like this: Scroll Content How can I dynamically add slimscroll="{slimscrollOption: value}" into #scroll div and have it functioning with angular-slimscroll?

http://stackoverflow.com/q/29207559
answer count: 2
tagged with: key-events
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46625586
tagged with: keydown
has answer: http://stackoverflow.com/a/29207597
tagged with: keyevent
has answer: http://stackoverflow.com/a/29207620
has body: You can get the keyCode of a key pressed in jQuery: $('#myField').keydown(function(event) { console.log(event.which); }); How do I compare that to a letter? I could, of course, find out the keyCode of that letter, but I don't know ahead of time what that letter is. So I could convert every letter to a keyCode and look that up in an object. I have to imagine there's an easier way for this common situation? Does myLetter.charCodeAt(0) always give me the same number as event.which for the same letter?
linked to: http://stackoverflow.com/q/1846599
type: Question
tagged with: javascript
tagged with: jquery
has title: Simple way to compare a key pressed to a character in jQuery?
score: 0

http://stackoverflow.com/a/29084822
answers question: http://stackoverflow.com/q/29084703
has body: You have to set overflow-x, overflow-y property value to auto. html, body { width: 100%; height: 100%; margin: 0; } #container { width: 100%; height: 100%; background: blue; overflow-x: auto; white-space: nowrap; } .inner { display: inline-block; width: 200px; height: 158px; margin: 10px; overflow-y: auto; background: orange; white-space: normal; } Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat vo…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29084703
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/46630730
has text: Maybe don't include `angular-route.js` twice?
comment on: http://stackoverflow.com/q/29210454
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46507812
comment on: http://stackoverflow.com/a/29141849
score: 0
type: AnswerComment
has text: Have you seen that?@Leprichaun
type: Comment

http://stackoverflow.com/comment/46361729
has text: @TomekBuszewski I think you're misunderstanding substr then.
comment on: http://stackoverflow.com/a/29062825
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29073167
downvote count: 0
answer count: 0
score: 1
tagged with: codeigniter
tagged with: mysql
type: Question
tagged with: javascript
tagged with: jquery
has title: Codeigniter display results in group by daily, weekly or annually
upvote count: 1
has comment: http://stackoverflow.com/comment/46381087
favorite count: 0
has body: i have codeigniter framework, and i want to displaying my message data as group by daily, weekly, monthly or annually with this sample of UI: Message= Yesterday: text1 text2 Last week: text3 text4 text5 Last Month: Last Years: And for now, i done for just display normal style of message with this code controller $total = count($this-&gt;query-&gt;get( "message", array("count"=&gt;1, "order"=&gt;$this-&gt;tableMessage.".msg_id desc", "group"=&gt;$this-&gt;tableMessage.".msg_code", "where"=&gt;array($this-&gt;tableMessage.".msg_from"=&gt;getSessionUser(),$this-&gt;tableMessage.".msg_owner"=&gt;getSessionUser())) ) ); $config['total_rows'] = $total; $config['per_page'] = 8; $config['num_links'] = 3; $config['page_query_string'] = TRUE; $config['query_string_segment'] = 'page'; $this-&gt;pagination-&gt;initialize($config); $data['pagination'] = $this-&gt;pagination-&gt;create_links(); $offset = $this-&gt;input-&gt;get("page"); if(empty($offset) || $offset == 0){ $offset = 0; } $data['subjectFor'] = "sent"; $data['title'] = 'Sent'; $data['message'] = $this-&gt;query-&gt;get( "message", array("limit"=&gt;$config['per_page'], "offset"=&gt;$offset, "order"=&gt;$this-&gt;tableMessage.".msg_id desc", "group"=&gt;$this-&gt;tableMessage.".msg_subject", "where"=&gt;array($this-&gt;tableMessage.".msg_from"=&gt;getSessionUser(),$this-&gt;tableMessage.".msg_owner"=&gt;getSessionUser())), array("user"=&gt;"msg_from") ); $this-&gt;load-&gt;view('user/message',$data); But how can i display the message by group as i want? Thankyou
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/comment/47090759
comment on: http://stackoverflow.com/q/29207313
score: 0
has text: if you want sync behavior, you can kill the Object.observe and use a getter/setter instead, something less old-fashioned but similar to http://jsfiddle.net/g35orqrq/
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46529089
comment on: http://stackoverflow.com/q/29149381
score: 0
has text: All attributes are OK, but you can execute `$("#rma_material_cost").prop("readonly", true)` in the console to make input readonly without changing attribute. Probably some strange CSS which will applied do this. I recommend you to comment different parts of your code (like I described above) and CSS included on the page. I'm sure that in the way you will find the reason.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46376254
has text: document.location.href="http://www.google.com"; try using this
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29070770
score: 0

http://stackoverflow.com/comment/46616860
comment on: http://stackoverflow.com/q/29202498
score: 0
type: Comment
type: QuestionComment
has text: Does `fetch_from_server()` return a promise? Are you using `$q`?

http://stackoverflow.com/q/29207281
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46625256
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29251140
has body: I work on a symfony dynamic form, with Ajax. I try to populate dropdownlist dynamically, i-e I want to display results in the second select the results form the firts. And the same for my third select. Indeed, the first dropdown allow users to choose a parc, when they choose a parc, the second select is populated with the results of Ensembles.php belong to the parc, then users can choose in the third dropdown a batiments belong to Ensembles.php. This an example This form is displayed when I want to add a Zonestechnique. Here are the relation between my entities: Parcsimmobilier.php <= ManyToOne Ensembles.php <= ManyToOne Batiments.php <= ManyToOne Zonestechnique.php this is my form ZonestechniqueType.php : use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Doctrine\ORM\ParcsimmobilierRepository; use Doctrine\ORM\EnsemblesRepository; use Doctrine\ORM\BatimentsRepository; class ZonestechniqueType extends AbstractType { /* @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('parcsimmobilier', 'entity', array( 'mapped' => false, 'class' => 'MySpaceDatabaseBundle:Parcsimmobilier', 'property' => 'nom', 'empty_value' => '-- choose a parc parc --', 'label' => 'choose a parc immobilier : ', 'multiple' => false, )) ->add('ensembles', 'entity', array( 'mapped' => false, 'multiple' => false, 'class' => 'MySpaceDatabaseBundle:Ensembles', 'property' => 'nom', 'empty_value' => '-- choose an ensemble --', 'label' => 'choose an ensemble : ', )) ->add('batiments','entity', array( 'class' => 'MySpaceDatabaseBundle:Batiments', 'property' => 'nom', 'empty_value' => '-- choose a batiment --', 'label' => 'choose a batiment : ', )) ->add('categorieszonestechnique') ->add('nom') ->add('localisation') ->add('commentaire') ; } /** * @param OptionsResolverInterface $resolver */ public fun…
tagged with: symfony
has comment: http://stackoverflow.com/comment/46626109
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/46625334
has answer: http://stackoverflow.com/a/29251140
tagged with: populate
has comment: http://stackoverflow.com/comment/46625535
has comment: http://stackoverflow.com/comment/46628245
has title: Symfony2.6: make a dynamic ajax form to populate dropdownlist dynamically
answer count: 1

http://stackoverflow.com/comment/46418990
type: Comment
comment on: http://stackoverflow.com/a/29093773
score: 0
type: AnswerComment
has text: and my listing shows only one element ` ` that is `Wading River, NY` when it should show all.

http://stackoverflow.com/comment/46392445
has text: Have you tried `return false;` instead of `preventDefault();` ?
type: QuestionComment
comment on: http://stackoverflow.com/q/29079539
type: Comment
score: 1

angular-services
tags question: http://stackoverflow.com/q/29190863
tags question: http://stackoverflow.com/q/29099929
tag name: angular-services
type: Tag

http://stackoverflow.com/q/29070641
has body: I'm trying to learn react.js and found a tutorial online. I was following a react/rails tutorial from http://rny.io/rails/react/2014/07/31/reactjs-and-rails.html The all the code was working fine until I got to the last step implementing the Comment Form. After following all the instructions, I get an error in my chrome console pointing to this line of code var commentNodes = this.props.comments.map(function (comment, index) { saying its "Uncaught TypeError: undefined is not a function". The form shows up and accepts input but nothing is displayed after I submit. Also, the tutorial is a bit dated, it is still using React.renderComponent, I changed it to React.render after reading the docs. Is there some more deprecated code I missed? or Can anyone help me or tell me what I did wrong? Thanks in Advance var Comment = React.createClass({ render: function () { return ( {this.props.author} {this.props.comment} ); } }); var CommentList = React.createClass({ render: function () { var commentNodes = this.props.comments.map(function (comment, index) { return ( <Comment author={comment.author} comment={comment.comment} key={index} /> ); }); return ( {commentNodes} ); } }); var CommentBox = React.createClass({ getInitialState: function () { return {comments: []}; }, componentDidMount: function () { this.loadCommentsFromServer(); }, loadCommentsFromServer: function () { $.ajax({ url: this.props.url, dataType: 'json', success: function (comments) { this.setState({comments: comments}); }.bind(this), error: function (xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }); }, handleCommentSubmit: function(comment) { var comments = this.state.comments; var newComments = comments.concat([comment]); this.setState({comments: newComments}); $.ajax({ url: this.props.url, dataType: 'json', type: 'POST', data: {"comment": comment}, success: function(data) { this.loadCommentsFromServer(); }.bind(this), error: function(xhr, status, err) { console.error(thi…
has answer: http://stackoverflow.com/a/29081159
upvote count: 3
type: UnansweredQuestion
tagged with: ruby-on-rails
score: 3
has title: React.js : Uncaught TypeError: undefined is not a function
has comment: http://stackoverflow.com/comment/46411986
has comment: http://stackoverflow.com/comment/46394456
type: Question
tagged with: reactjs
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29076727
has comment: http://stackoverflow.com/comment/46388517
has body: As the elements are getting appended, initially the DOM won't have the elements. Use on event handler. Syntax: .on('event', 'selector', fn); Plus using "this" keyword, you can fetch the element which you have just clicked. $("a").on("click",function(){ console.log($(this).html()); }); Have appended the elements required and added an event handler in the following fiddle.
answers question: http://stackoverflow.com/q/29076380
accepted answer of: http://stackoverflow.com/q/29076380
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46414861

http://stackoverflow.com/q/29169702
tagged with: node.js
has title: urlencoded Vs form-data in Node.Js
type: AnsweredQuestion
tagged with: urlencode
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29169774
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/46557947
accepted answer: http://stackoverflow.com/a/29169774
tagged with: express
favorite count: 0
tagged with: multipart
has body: Is there any quick way to determine whether passing data is urlencoded or form-data (multiparty) data in Node.JS?

http://stackoverflow.com/comment/46421290
type: QuestionComment
has text: Tbh I have never done it before so probably making all sorts of mistakes, I tried adding it as it was, which like you commented caused it to break (lesson one learned) Tried adding it like but this did not work (I have the script saved as leg_hover.js). Should I be referencing this file using something like echo ' ' ; ??
comment on: http://stackoverflow.com/q/29094915
score: 0
type: Comment

http://stackoverflow.com/q/29068562
favorite count: 0
has answer: http://stackoverflow.com/a/29068978
has title: Is a form necessary on .ajaxSubmit() if calling it from the file input button?
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: ajaxform
score: 1
has body: I'm following examples from the jquery form plugin to asynchronously upload a image to my server. I have only one button, 'Add Photos' that gets pressed to select a photo. Then the post to my server occurs to save the image and refreshes the images below in a thumbnail gallery. Do I even need a form here? It seems like I don't because I'm not using a submit button, I'm submitting after I add the photo. Will this trip me up when I have to display all images and refresh the page with new images? Just curious for feedback. Here is my html form. Output Div (#output2): AJAX response will replace this content. Here is my javascript. $("#pictureupload").click(function () { document.getElementById('selectedFile').click(); }); $('#selectedFile').change(function() { var uploadImageUrl = $('#imageform').data('url'); var options = { target: '#output', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback // other available options: url: '/ManageSpaces/UploadImage', //uploadImageUrl, //'/ManageSpaces/UploadImage', // override for form's 'action' attribute type: 'post' // 'get' or 'post', override for form's 'method' attribute //dataType: null // 'xml', 'script', or 'json' (expected server response type) //clearForm: true // clear all form fields after successful submit //resetForm: true // reset the form after successful submit // $.ajax options can be used here too, for example: //timeout: 3000 }; // bind to the form's submit event //$('#imageform').submit(function () { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit $(this).ajaxSubmit(options); // !!! Important !!! // always return false to prevent standard browser submit and page navigation //return false; //}); });
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: jquery
tagged with: file-upload

http://stackoverflow.com/q/29063385
tagged with: javascript
has comment: http://stackoverflow.com/comment/46362688
favorite count: 0
has comment: http://stackoverflow.com/comment/46362701
has title: javascript: Could not add two text inputs
answer count: 1
has comment: http://stackoverflow.com/comment/46362705
has answer: http://stackoverflow.com/a/29063409
score: -4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29063409
has comment: http://stackoverflow.com/comment/46362812
type: Question
downvote count: 4
has body: This does not add the numbers instead gives NaN &lt;html&gt; &lt;body&gt; &lt;script&gt; function checkit() { x = document.getElementById("a"); x1 = parseInt(x); y = document.getElementById("b"); y1 = parseInt(y); alert("Answer is" + (x1 + y1)); } &lt;/script&gt; &lt;input type="text" id="a"&gt; &lt;input type="text" id="b"&gt; &lt;input type="button" onclick="checkit()"&gt; &lt;/body&gt; &lt;/html&gt; Even tried document.getElementById("a").value; Still gives NaN
upvote count: 0

http://stackoverflow.com/q/29083827
tagged with: angular-ui-router
tagged with: javascript
score: 4
has body: I have a $rootScope.$on("$stateChangeStart") event that changes title, and description. And I have to use an $rootScope object that is created after $http request, in my event. Problem is that when the $stateChangeStart event runs, my object is undefined. I have tried to use resolve on my ui-router states. But it only works for the controller, not event. Could you help me to come up with a solution, that will run my service (with the $http request) before routing starts (and $stateChangeStart event runs), AND it won't run this service again after state changes.
answer count: 1
tagged with: asynchronous
has title: Send $http request before initialize routing?
favorite count: 0
has answer: http://stackoverflow.com/a/29087334
accepted answer: http://stackoverflow.com/a/29087334
tagged with: angularjs
tagged with: angular-promise
upvote count: 4
has comment: http://stackoverflow.com/comment/46401548
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46403143
has comment: http://stackoverflow.com/comment/46401871
type: Question

http://stackoverflow.com/comment/46385001
score: 0
comment on: http://stackoverflow.com/q/29075534
type: Comment
type: QuestionComment
has text: Depends a little how you cache your data in the store. At some point you would want to filter the data with your searchTerm. You can either do it in the component, let the store know which searchTerm is searched for, or send it as a parameter when fetching data. I am a fan of not sending to much information to the components which they do not need. So filtering as early as possible is an approach I have used, but can not say what is the best approach. If the dataset is small and you really do not need to cache the data, the component filtering would be ok.

http://stackoverflow.com/comment/46551832
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29163239
type: Comment
has text: @user3520363 , you need to start reading the docs, for multi select you have to provide different arguments for the `yadcf.exFilterColumn` function , copy paste from docs: `yadcf.exFilterColumn(oTable, [[0, ['Some Data 1','Some Data 2']]]); // for pre filtering multi select filter you should use array with values (or an array with single value)`

http://stackoverflow.com/q/29064343
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: 1
upvote count: 1
type: Question
has body: What I want to be able to is on button click I want to check a Server-Side directory for the existence of certain files. If they exist I wish to display a checkbox corresponding to that file. So far I have managed to use PHP and AJAX to check if the files exist or not and write to and array: 1 if the file exists, and a 0 if not. Now...what I need to do at this stage is call upon this array, from my PHP file, or write this array to a div on my main HTML page. However when I go to echo it navigates away from my Main.html, opening a new page and writing on that. Big question is can I write the array on my main html page from my PHP_Function.php file. I have the following HTML code: &lt;form action="PHP_Function.php"&gt; &lt;input type="submit" class="learnButton" name="insert" value="Find Available Evidence" /&gt; &lt;/form&gt; &lt;form action="available_evidence"&gt; &lt;input type="checkbox" name="vehicle" value="Bike"&gt; Facebook&lt;br&gt; &lt;input type="checkbox" name="vehicle" value="Car" checked&gt; Facebook Messenger&lt;br&gt; &lt;input type="checkbox" name="vehicle" value="Bike"&gt; Twitter&lt;br&gt; &lt;/form&gt; With the following array within PHP_function.php file: if(in_array("Facebook.xml", $dirArray)){ $IfPresentArray[0]="1"; }else { $IfPresentArray[0]="0"; } foreach ($IfPresentArray as $value) { echo "$value&lt;br /&gt;\n"; } I am very new to PHP and HTML, and I have been banging my head off the wall with this for a while now. Any help would be greatly appreciated.
tagged with: arrays
has answer: http://stackoverflow.com/a/29064423
has answer: http://stackoverflow.com/a/29064419
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
linked to: http://stackoverflow.com/q/2306159
favorite count: 0
has title: Pass PHP array to HTML Page.
type: UnansweredQuestion

scope
tags question: http://stackoverflow.com/q/29145454
tags question: http://stackoverflow.com/q/29113797
tags question: http://stackoverflow.com/q/29105858
tags question: http://stackoverflow.com/q/29200161
tags question: http://stackoverflow.com/q/29101459
tags question: http://stackoverflow.com/q/29071825
tag name: scope
tags question: http://stackoverflow.com/q/29188640
type: Tag
tags question: http://stackoverflow.com/q/29171616
tags question: http://stackoverflow.com/q/29205597
tags question: http://stackoverflow.com/q/29065901

http://stackoverflow.com/q/29194621
has comment: http://stackoverflow.com/comment/46602313
type: Question
tagged with: javascript
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46603957
score: 0
answer count: 0
has body: There is link on a webpage, clicking on the link opens a asp.net page. Inspecting that element, i can see the onclick event of the link says "_ctl00_ql.newWorkItem("Our Case");return false;" I don't understand what this means and how it calls a that webpage. I know that its ClientIDMode is auto as it start with prefix ct100. UPDATE: I am trying to open the site in WebBrowser Control and want to redirect to the page which is triggered by that link. Since I can not call the page directly as it contains a unique GUID every time page is opened. How can I achieve this.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46602347
tagged with: c#
has title: How this onclick event works and what it mean?

http://stackoverflow.com/q/29104228
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to use the mentions plugin to add a hidden user id so I can parse the user correctly. When I mention someone here is how it needs to look like Hello [Mention User], This is just a test to do that, I had to override the insert method within the plugin like this insert: function(data){ return '&lt;div style="display: inline;"&gt;' + '&lt;span class="mentionedUser"&gt;[' + data.name + ']&lt;/span&gt;&lt;div class="hiddenMentionUserID" style="display:none;"&gt;'+data.id+'&lt;/div&gt;' + '&lt;/div&gt;'; } The problem with the above code is that is does not show the text on the same line as I am expecting. Rather, here is how is the text being displayed Hello [Mention User] , This is just a test How can I tweak my html/css code to make the mention name appears on the same line as the text along with the hidden user id?
favorite count: 0
has title: How to show hidden div in the same line as the paragraph text?
has comment: http://stackoverflow.com/comment/46438513
has answer: http://stackoverflow.com/a/29104321
accepted answer: http://stackoverflow.com/a/29104321
tagged with: css
type: AnsweredQuestion
score: -1
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46603381
type: AnswerComment
comment on: http://stackoverflow.com/a/29189243
type: Comment
has text: @BenjaminGruenbaum Actually, in both approaches it was calling `Promise.coroutine` on every request. Now it calls only once. Thanks for comment! Also I added remark about future versions of express.
score: 0

http://stackoverflow.com/comment/46518602
comment on: http://stackoverflow.com/a/29147762
type: Comment
has text: Instead of using `.css()` for showing/hiding, you can just use `.hide()` and `.show()`
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46432484
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29086742
has text: @MihaiP. Point taken. and yes, I realized that later, I used Object.keys as suggested by dsfq. Thanks for your time
type: Comment

http://stackoverflow.com/comment/46424900
score: 1
has text: Include a link to your JSFiddle code. Note: Your example HTML code you posted here is missing two closing div tags. If you are going to redact portions of your code, still make sure that it is properly formatted.
comment on: http://stackoverflow.com/q/29096930
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29157863
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29175787
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/29158002
linked to: http://stackoverflow.com/q/22719542
favorite count: 0
has answer: http://stackoverflow.com/a/36540583
has answer: http://stackoverflow.com/a/29177109
tagged with: cordova
accepted answer: http://stackoverflow.com/a/29177109
tagged with: android
has title: Phonegap - Android 4.4 - html5 audio wrong length (javascript and media plugin)
upvote count: 1
has body: I want to play a single audio file (mp3) and my only problem is media length. It works just fine on Android 5.0.1, but on 4.4.2/4.4.4 it doesn't work! With native implementation I get a value but it's incorrect and if I use the Media plugin API (from Phonegap) the media.duration is undefined and media.getDuration() returns -1. I'm trying to get duration only after loadedmetadata event is fired, so this could not be the problem. The native implementation is done through js with new Audio(), no DOM element involved. The file is stored on sdcard, and src looks like file:///storage/sdcard/audio.mp3. Everything else regarding html5 audio api works, but duration. Are there any solutions to fix this?
answer count: 4
tagged with: audio
has answer: http://stackoverflow.com/a/29175787
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/29129186
has comment: http://stackoverflow.com/comment/46484772
tagged with: selenium-webdriver
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46484973
has title: How to use browser.getCurrentUrl() in a protractor test?
possible better answer: http://stackoverflow.com/a/44523736
has answer: http://stackoverflow.com/a/44523736
tagged with: selenium
has body: I have been struggling with these lines of Protractor code today: element(by.linkText("People")).click(); browser.waitForAngular(); var url = browser.getCurrentUrl(); ... It appears that getCurrentUrl always fails when placed after a waitForAngular() statement. The error output is too vague: UnknownError: javascript error: document unloaded while waiting for result So, what is the correct way to click on a hyperlink and check the new url? Here are my tests: If I getCurrentUrl() before the link is clicked, it('can visit people page', function () { var url = browser.getCurrentUrl(); element(by.linkText("People")).click(); expect(true).toBe(true); }); The test will pass. If I getCurrentUrl() after the link is clicked, it('can visit people page', function () { var url = browser.getCurrentUrl(); element(by.linkText("People")).click(); expect(true).toBe(true); url = browser.getCurrentUrl(); }); An error is thrown in Protractor with the UnknownError output above. What went wrong?
has comment: http://stackoverflow.com/comment/46484728
type: Question
has comment: http://stackoverflow.com/comment/46484630
tagged with: protractor
has answer: http://stackoverflow.com/a/29130668
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46484862
answer count: 2
score: 5
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29130668
tagged with: angularjs

http://stackoverflow.com/q/29162621
has comment: http://stackoverflow.com/comment/46544705
tagged with: onclick
has comment: http://stackoverflow.com/comment/46544596
type: Question
has comment: http://stackoverflow.com/comment/46544712
has comment: http://stackoverflow.com/comment/46544636
answer count: 2
has title: Show advertisement on link click, before redirecting to link href
has answer: http://stackoverflow.com/a/29162726
tagged with: javascript
has comment: http://stackoverflow.com/comment/46544920
downvote count: 4
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/46544641
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/46544672
has answer: http://stackoverflow.com/a/29162690
has body: i want to add on-click function with this a-href tag to display my advertisement link i tried below codings &lt;a href="&lt;?php the_permalink() ?&gt;" onlick="javascript:return func();" title="&lt;?php the_title(); ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt; this one with the function func() { window.open("xxxxx.html"); return false; } but it dint work for me so please help me.. i want to display my advertisement when user click the link at the same time it goes to the _permalink in wordpress this is the help i need. is there is any other way kindly help me

http://stackoverflow.com/comment/46614426
type: Comment
comment on: http://stackoverflow.com/a/29183416
has text: I'm glad you've got it working, whatever 'it' is, in context. If you didn't use a posed answer, it would be interesting to see your own answer to your problem.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46578872
type: Comment
score: 1
has text: @joerideg That does look cleaner. SagarVimal, if Joe's solution works for you, you should use that one instead, it's cleaner than mine.
type: AnswerComment
comment on: http://stackoverflow.com/a/29180493

http://stackoverflow.com/comment/46382862
type: Comment
comment on: http://stackoverflow.com/a/29074471
score: 3
has text: The first `if` statement can be `if( $("#Prefix, #Infix").length > 1 )`
type: AnswerComment

http://stackoverflow.com/q/29164577
type: Question
has answer: http://stackoverflow.com/a/29164810
has title: Passing values from a DIV element to an input
answer count: 6
accepted answer: http://stackoverflow.com/a/29164962
score: 0
possible better answer: http://stackoverflow.com/a/29164714
has answer: http://stackoverflow.com/a/29164817
has answer: http://stackoverflow.com/a/29164714
has body: I have a PHP calendar form (generated from http://style-vs-substance.com/code/calendar-class-php/ as a base, but heavily customised and updated) which outputs two month at a time - 30/31 days, in a tabular format. What I am trying to create is a booking form for business meetings, whereby the client user can click on a date on the HTML calendar and the value of the date as in the whole date value - not just the day is passed to the input field. I would like to achieve something like (pseudo code): (calendar month of March 2015) 13 On clicking this date box, the JQuery rule is fired and the value is passed to the input which is further down the page and formatted into something like: My initial issue is, can I take a unseen value from a DIV (rather than innerHTML) using jQuery and pass it to the input (with appropriate formatting)? Part 1 - How to get JQuery to take a value from the DIV, I can place values into the input - that's easy, but I would need a unique ID for each div in the table (60+) and I'm not going to write out 60+ JQuery rules, one for each div id, there must be a better more dynamic way of doing this. Part 2 - Once I have a value selected, how would I go about formatting the value to make it a full date rather than the code date identifier? Something similar to PHP date() function. So, What would be the best JQuery way of achieving this? I am wary of generating a custom JQuery Var for each day as that's 60+ days on each page load, seems quite inefficient. I am currently using JQuery 1.11.1 for other things on the page, and would be looking to use this rather than JQuery 2. EDIT: Could I take the DIV id value - so : 13 And somehow use the id string of 13032015 to become the date string in the input?
tagged with: javascript
linked to: http://stackoverflow.com/q/4735342
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3127429
has answer: http://stackoverflow.com/a/29164962
tagged with: jquery
has answer: http://stackoverflow.com/a/29164863
has answer: http://stackoverflow.com/a/29164912

http://stackoverflow.com/a/47897057
answers question: http://stackoverflow.com/q/29130776
score: 0
type: Answer

http://stackoverflow.com/q/29087854
answer count: 2
accepted answer: http://stackoverflow.com/a/29087887
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46418529
favorite count: 0
has comment: http://stackoverflow.com/comment/46408707
tagged with: object-literal
has comment: http://stackoverflow.com/comment/46408722
type: AnsweredQuestion
has body: Is there a way to bulk set associative array keys and values in JavaScript, similar to PHP's shorthand array declaration below? $array = [ 'foo' =&gt; 'val1', 'bar' =&gt; 'val2', 'baz' =&gt; 'val3' ]; The only way I can think of to declare associative arrays in JS is something like this: var newArray = new Array(); newArray['foo'] = 'val1'; newArray['bar'] = 'val2'; newArray['baz'] = 'val3'; Or something like this: var newArray = new Array(), keys = ['foo', 'bar', 'baz'], vals = ['val1', 'val2', 'val3']; for(var i = 0; i &lt; keys.length; i++) { newArray[ keys[i] ] = vals[i]; } That last one can cause a mess in certain cases, but I wanted to list it since it's doable. If there isn't a way like that top example, then that's fine. It would've been nice. I tried using a JS object literal already with jQuery like this: var myObject = { foo: $('foo'), bar: $(this.foo).find('bar'), baz: $(this.bar).data('baz') } Unfortunately it seems that JS object literals don't allow evaluating code to set values for their properties. If I turned those properties into methods that returned values instead of permanently storing the values/references in the properties, then they would have to run every time they're called; I really don't want to do that if possible. Thanks in advance.
linked to: http://stackoverflow.com/q/4616202
score: 1
has title: Bulk Declare JavaScript Associative Array
upvote count: 1
possible better answer: http://stackoverflow.com/a/29087894
has answer: http://stackoverflow.com/a/29087887
type: Question
has answer: http://stackoverflow.com/a/29087894
tagged with: arrays
tagged with: associative-array
tagged with: javascript

http://stackoverflow.com/comment/46554120
score: 0
type: Comment
has text: Thanks for your update. I'm at Angular 1.2 because we need to support IE8. I do not know how much Angular 1.3 really breaks IE8 functionality but maybe I need to start investigate it... Thanks for pointing me in the right direction. I will upgrade to 1.3 and see if I can reproduce the error
type: AnswerComment
comment on: http://stackoverflow.com/a/29167785

http://stackoverflow.com/a/29115188
has comment: http://stackoverflow.com/comment/46458672
type: Answer
has comment: http://stackoverflow.com/comment/46458969
downvote count: 0
score: 1
has body: I'm not sure whether I get your question right, but shouldn't the following work? select with jquery by ID var myInputObject = $("#1"); alert(myInputObject.val()); $("#1") returns your field with the id 1 or select by class var myInputObjects = $(".item"); $(".item") returns all field's with the attribute class=item jQuery selectors API-Documentation CREATE: &lt;div id="chart" /&gt; &lt;script type="text/javascript"&gt; for(var i = 1;i&lt;10;i++){ $('&lt;input/&gt;', { id: i, class: "item", type: "text" }).appendTo('#myFields'); { &lt;/script&gt; --> Creates 10 input elements and append it to &lt;div id="chart" /&gt; Create a post request: var postData = $(this).serializeArray(); $.ajax({ type:"POST", url: "something.php", cache:0, data : postData, success:function(data, textStatus, jqXHR) { //data: return data from server }, error: function(jqXHR, textStatus, errorThrown) { //if fails } }); -> sends your form as a POST request to something.php... there you can get your values by $_POST["1"]
answers question: http://stackoverflow.com/q/29115117
has comment: http://stackoverflow.com/comment/46459372
has comment: http://stackoverflow.com/comment/46459022
accepted answer of: http://stackoverflow.com/q/29115117
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46544325
type: Comment
comment on: http://stackoverflow.com/a/29157500
score: 0
type: AnswerComment
has text: BTW: [Made a sample using SVG for texture](http://jsfiddle.net/greggman/wjoh38f3/). Chrome, Firefox, and Safari seemed to work, at least on OSX

http://stackoverflow.com/q/29080289
tagged with: javascript
tagged with: pi
has answer: http://stackoverflow.com/a/29080853
has title: Canvas animating a pie chart
has body: I'm trying to animate a pie chart without using any plugins. With below code I can get pretty close to it, but not quite. There are gaps between each segments because the incremental value is set to ++. Can anyone suggest a clean solution to my problem? Here's my code var canv2 = document.getElementById("canvas2"); var ctx2 = canv2.getContext("2d"); var r = 60, sAngle = 0, angle = 0, eAngle = 0; var interval2 = setInterval(function() { if (angle == 0) { ctx2.beginPath(); sAngle = 0; } else if (angle == 90) { ctx2.beginPath(); sAngle = Math.PI*0.5; } else if (angle == 180) { ctx2.beginPath(); sAngle = Math.PI; } else if (angle == 270) { ctx2.beginPath(); sAngle = Math.PI*1.5; } else if (angle == 360) { ctx2.beginPath(); sAngle = Math.PI*2; } else { if (angle &gt; 0 &amp;&amp; angle &lt; 90) { ctx2.arc(200, 80, r, sAngle, eAngle); ctx2.lineTo(200, 80); ctx2.fillStyle = "red"; ctx2.fill(); } else if (angle &gt; 90 &amp;&amp; angle &lt; 180) { ctx2.arc(200, 80, r, sAngle, eAngle); ctx2.lineTo(200, 80); ctx2.fillStyle = "green"; ctx2.fill(); } else if (angle &gt; 180 &amp;&amp; angle &lt; 270) { ctx2.arc(200, 80, r, sAngle, eAngle); ctx2.lineTo(200, 80); ctx2.fillStyle = "orange"; ctx2.fill(); } else if (angle &gt; 270 &amp;&amp; angle &lt; 360) { ctx2.arc(200, 80, r, sAngle, eAngle); ctx2.lineTo(200, 80); ctx2.fillStyle = "blue"; ctx2.fill(); } else { clearInterval(interval2); } } angle++; eAngle = angle*Math.PI/180; }, 10)
has comment: http://stackoverflow.com/comment/46395346
downvote count: 0
has answer: http://stackoverflow.com/a/29081272
favorite count: 0
possible better answer: http://stackoverflow.com/a/29081272
accepted answer: http://stackoverflow.com/a/29080853
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
tagged with: canvas
tagged with: pie-chart

http://stackoverflow.com/q/29187322
favorite count: 0
has title: Advanced "Like" system with defense from click fraud
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29187928
tagged with: cookies
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/29187928
tagged with: javascript
score: 0
has body: I am not professional so doesnt kick me so hard for these questions:) You can still kick me for my perfect English (* sarcasm *) I want to realize "like" system on my site. The main problem there is no registration. Thats mean likes has no limits on clicks. As I understand I can make likes click-filter by IP, writing IPs liked selected ID in mySQL. But its not really good idea for users with same IP. I can make cookie file and write there ids of likes. It protects from noobs, but it is not problem to off cookie or clear it and start click fraud again. And the last thing how to prevent manual script executing of like increase? For example my script called "addlike.php". It is not so hard to send direct POST requests, requests, requests. Like this "http://example.com/addlike.php?id=2" n-times, for example changing IDs. Thank you all!
upvote count: 1
downvote count: 1
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/46587183
type: QuestionComment
has text: There's no negative lookbehind in js
comment on: http://stackoverflow.com/q/29185843
score: 0
type: Comment

http://stackoverflow.com/a/29128966
answers question: http://stackoverflow.com/q/29128825
score: 1
upvote count: 1
downvote count: 0
has body: Maybe use indexOf(): var count = 0; for (var i = 0; i &lt; arr1.length; i++) { if (arr2.indexOf(arr1[i]) != -1) { count++; // if you just need a value to be present in both arrays to add it // to the new array, then you can do it here // arr1[i] will be in both arrays if you enter this if clause } } if (count == arr1.length) { // all array 1 values are present in array 2 } else { // some or all values of array 1 are not present in array 2 }
type: Answer

higher-order-functions
tags question: http://stackoverflow.com/q/29180936
tag name: higher-order-functions
type: Tag
tags question: http://stackoverflow.com/q/29133968

http://stackoverflow.com/q/29183199
has comment: http://stackoverflow.com/comment/46582952
linked to: http://stackoverflow.com/q/15757750
has title: Calling a php function in a separate file using AJAX
upvote count: 1
has comment: http://stackoverflow.com/comment/46583193
downvote count: 1
type: Question
has body: I've been writing a currency converter and need to use jQuery and AJAX to send the to and from currencies, and the value to convert to a PHP files, which will return the converted value. My solution is based off of: How can I call PHP functions by JavaScript? however it doesn't seem to work. jQuery code: &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; function exchange(from, to, amount){ alert("got to here"); //this alert shows jQuery.ajax({ type: "POST", url: 'exchange_caller.php', dataType: 'json', data: {functionname: 'exchange_rate_convert', arguments:["USD", "EUR", 1]}, //dummy pass values success: function (obj, textstatus){ if( !('error' in obj)){ answer = obj.result; alert(answer); //neither of these alerts show alert('anything'); } else{ console.log(obj.error); alert("got an error"); //this alert doesn't show } } }); alert("passed the block"); //this alert shows return false; //return false so the page doesn't refresh }&lt;/script&gt; The code in the php file 'exchange_caller.php' (set up as a dummy). &lt;?php header('Content-Type: application/json'); $aResult = array(); if(!isset($_POST['functionname'])){ $aResult['error'] = 'No function name!'; } if(!isset($_POST['arguments'])){ $aResult['error'] = 'No function arguments'; } if(!isset($aResult['error'])){ switch($_POST['functionname']){ case 'exchange_rate_convert': if(!is_array($_POST['arguments']) || (count($_POST['arguments']) &lt; 3)){ $aResult['error'] = 'Error in arguments!'; } else{ $aResult['result'] = exchange_rate_convert($_POST['arguments'][0], $_POST['arguments'][1], $_POST['arguments'][2]); } break; default: $aResult['error'] = 'Not found function '.$_POST['functionname'].'!'; break; } } echo json_encode($aResult); function exchange_rate_convert($from, $to, $amount){ //function to run //dummy code, just return 2 for now $value = 2; return $value; }?&gt; When this runs I receive the 'got to here' and 'passed the block' error message…
has comment: http://stackoverflow.com/comment/46583801
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46582526
favorite count: 0
has answer: http://stackoverflow.com/a/29184003
has comment: http://stackoverflow.com/comment/46582620
has comment: http://stackoverflow.com/comment/46582513
accepted answer: http://stackoverflow.com/a/29184003
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/comment/46612416
score: 0
type: Comment
has text: A better example would be if you instead had one large array of temperatures and wanted to find the highest. You could let the function split the array in two and call the function for each part. That would qickly divide the work in smaller and smaller parts until it was a matter of comparing just two values, which would be trivial. A good recursive algorithm turns complex work into trivial parts, and doesn't make deep chains of calls even for large quantities of data.
type: AnswerComment
comment on: http://stackoverflow.com/a/29177777

http://stackoverflow.com/q/29103792
has title: Asp.net Redirect from page to another page
type: Question
upvote count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: I have Main page and popup page in asp.net Main Page Onload Page.ClientScript.RegisterStartupScript(GetType(), "MyKey", "openPopup();", true); Main Page Html: &lt;input type="text" id="txtName" readonly="readonly" /&gt; Main Page Javascript: function openPopup() { // In order to open popup var popup; popup = window.open("BilgiPopupYenileme.aspx", "Popup", "width=900, height=400,status= 1, resizable= no, scrollbars=yes, toolbar=no,location=1,menubar=no"); popup.focus(); } Popup Page HTML (BilgiPopupYenileme.aspx) &lt;a href="#" id="customerNo" onclick="GetCustomerNo()"&gt;&lt;%#Eval("customer_ID")%&gt;&lt;/a&gt; Popup Page Javascript: function GetCustomerNo() { if (window.opener != null &amp;&amp; !window.opener.closed) { var customerNo = document.getElementById("customerNo").text; var customerName = window.opener.document.getElementById("txtName"); // I set customerno to txtName input which is inside of Main Page. customerName.value = customerNo; }} Question: CustomerName.Value gets Customer Number without any problem (No problem till here). After i get CustomerName.Value in Main Page , i need to post/redirect to another page how can i do this? I tried to use setinterval however this did not work for me %100.How can i solve the problem after i set value to textbox in Main Page than redirect to another page ? Thanks
tagged with: asp.net
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: http-redirect
downvote count: 0
score: 1

http://stackoverflow.com/a/29143064
downvote count: 0
score: 1
has body: One approach you can take is to modifying your followSchema to have the following field as an array and use the concept of population: var mongoose = require('mongoose') , Schema = mongoose.Schema var userSchema = Schema({ _id: Number, name: String, age: Number, followers: [{ type: Schema.Types.ObjectId, ref: 'Follow' }] }); var followSchema = Schema({ _user: { type: Number, ref: 'User' }, following: [{ type: Number, ref: 'User' }] }); var Follow = mongoose.model('Follow', followSchema); var User = mongoose.model('User', userSchema); which you can then query with the some sample users. As an example guide (untested): var user1_id = 1, user2_id = 2, user3_id = 3, user1_following = [], user2_following = []; var user1 = new User({ _id: user1_id, name: 'User1', age: 31 }); var user2 = new User({ _id: user2_id, name: 'User2', age: 32 }); var user3 = new User({ _id: user3_id, name: 'User3', age: 32 }); user3.save(function (err) { if (err) return handleError(err); }) user1.save(function (err) { if (err) return handleError(err); var follower3 = new Follow({ _user: user3_id }); follower3.save(function (err) { if (err) return handleError(err); // thats it! }); }) user2.save(function (err) { if (err) return handleError(err); var follower3 = new Follow({ _user: user3_id }); follower3.save(function (err) { if (err) return handleError(err); // thats it! }); }) Follow .find({ _user: user1_id }) .exec(function (err, following) { if (err) return handleError(err); user1_following = following; }) Follow .find({ _user: user2_id }) .exec(function (err, following) { if (err) return handleError(err); user2_following = following; }) You can then use Underscore's intersection() which will give you a list of values present in both arrays. var commonFollowings = _.intersection(user1_following, user2_following); // In the example above, commonFollowings =&gt; [3]
has comment: http://stackoverflow.com/comment/46518369
has comment: http://stackoverflow.com/comment/46517943
upvote count: 1
has comment: http://stackoverflow.com/comment/46512072
answers question: http://stackoverflow.com/q/29142359
has comment: http://stackoverflow.com/comment/46510875
type: Answer

http://stackoverflow.com/comment/46412910
type: QuestionComment
comment on: http://stackoverflow.com/q/29090243
has text: The answer highly depends on which webserver (e.g. Apache, IIS, ...) you are using. You need to send the correct http headers there. Alternatively you can work around this by using any scripting language which sends correct headers for download (`Content-Disposition: attachment; filename="Resume.jpg" `) and then reads and outputs the image raw data.
score: 0
type: Comment

http://stackoverflow.com/comment/46525377
type: AnswerComment
has text: As far as I am aware, there isn't a way to do that. As you have discovered, the `console` object just gives us a mechanism to send data to the browser's debugging console. But the browser itself doesn't use the `console` object; it can interact with the debugging console directly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29133965

http://stackoverflow.com/a/29157227
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/114853362
answers question: http://stackoverflow.com/q/29149488
score: 2
accepted answer of: http://stackoverflow.com/q/29149488
downvote count: 0
upvote count: 2
has body: new Date('YOUR DATE STRING') Also checkout moment.js, You can use moment('YOUR DATE STRING') moment will try to interpret the String according to standard formats, if not it will fall back to Javascript's native Date() constructor. This should work for standard ISO format or a variety of commonly seen date formats. Obviously it is not magic and will not understand all possible permutations of YYYY MM and DD
has comment: http://stackoverflow.com/comment/62648803

http://stackoverflow.com/a/29147499
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29146814
has comment: http://stackoverflow.com/comment/46526153
upvote count: 5
has body: One aspect is performance: if you write a component to display the date like you did above, you can mark it with PureRenderMixin, as the rendered output relies only on the the props. This might speed up the rendering a bit, as the formatting only needs to be done when the date changes. From clean code point of view, I would either write a component or use a non-react utility function that just formats the date to a string - no need to couple the date formatting and dom elements. Something like: function formatDate(dateValue){ if(dateValue == null) return "" return new Date(dateValue).toLocaleDateString() }

http://stackoverflow.com/comment/46577968
has text: Where is your current javascript code??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29180744

http://stackoverflow.com/q/29192034
accepted answer: http://stackoverflow.com/a/29192097
tagged with: javascript
has title: How to populate a SELECT with OPTIONS from a JS object?
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/46598170
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46598199
favorite count: 0
tagged with: ajax
score: -2
has answer: http://stackoverflow.com/a/29192097
has body: I have the following object: JAVASCRIPT var data = "[{"id":0,"class_arb":"آخر","class_eng":"Other"}, {"id":1,"class_arb":"الإداريين","class_eng":"Management"}, {"id":2,"class_arb":"المهندسين","class_eng":"Engineers"}]"; And I have a SELECT control in my HTML as follows HTML &lt;SELECT id='class_id'&gt;&lt;/select&gt; Here is what I tried to populate the combo box: JQUERY $.each(data, function (id, class_arb, class_eng) { $('#class_id') .append($("&lt;option&gt;&lt;/option&gt;") .attr("value", id) .text(class_arb)); }); The result I got is a combo box filled with 3 values, all of which display the text [Object object] and not the expected English or Arabic text as desired.. What am I doing wrong? PS: the variable data can not be changed, since it is received from the server through an ajax call back.
has comment: http://stackoverflow.com/comment/46597952
has comment: http://stackoverflow.com/comment/46598116
downvote count: 2
has comment: http://stackoverflow.com/comment/46597895
has comment: http://stackoverflow.com/comment/46598143
type: AnsweredQuestion

http://stackoverflow.com/comment/46362997
score: 0
type: Comment
type: QuestionComment
has text: see also [Handling multiple catches in promise chain](http://stackoverflow.com/q/26076511/1048572)
comment on: http://stackoverflow.com/q/29063252

http://stackoverflow.com/a/29191823
has comment: http://stackoverflow.com/comment/46597670
type: AcceptedAnswer
downvote count: 0
has body: Updated based on comment As you're out of angular scope and changing the value in Jquery. You must use $scope.$apply() after the jquery statement which sets the value. $('#set-article .element').click(function(){ var articleElement = $(this); var articleTitle = articleElement.text(); $('#theme-layout .element').removeClass('current'); articleElement.addClass('current'); articleElement.closest('.form-elements').find('.article-title').val(articleTitle); $scope.$apply(); }); Assuming you're doing it in link function of directive or inside the controller. If you're completely out of angular scope, then use var scope = angular.element(document.querySelector(".feature.box")).scope(); scope.$apply(); // change the selector based on your controller So your code will be: $('#set-article .element').click(function(){ var articleElement = $(this); var articleTitle = articleElement.text(); $('#theme-layout .element').removeClass('current'); articleElement.addClass('current'); articleElement.closest('.form-elements').find('.article-title').val(articleTitle); var scope = angular.element(document.querySelector(".feature.box")).scope(); scope.$apply(); });
has comment: http://stackoverflow.com/comment/46597988
has comment: http://stackoverflow.com/comment/46598290
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46598275
has comment: http://stackoverflow.com/comment/46598206
has comment: http://stackoverflow.com/comment/46597779
score: 1
has comment: http://stackoverflow.com/comment/46598077
answers question: http://stackoverflow.com/q/29191784
accepted answer of: http://stackoverflow.com/q/29191784
has comment: http://stackoverflow.com/comment/46598356
has comment: http://stackoverflow.com/comment/46598219
has comment: http://stackoverflow.com/comment/46597702

http://stackoverflow.com/q/29079407
accepted answer: http://stackoverflow.com/a/29079842
tagged with: css
has comment: http://stackoverflow.com/comment/46392209
has body: Here is the codepen: http://codepen.io/anon/pen/WbYjOW When you add an interest in the right box (thus causing the right div to grow), the dropdown list moves with it, at least in Firefox and Chrome. How can this unwanted movement be prevented? Here is the code pasted (same as codepen): HTML /*Adder*/ $(document).ready(function() { var i = 0; for (i = 0; i < localStorage.length; i++) { var taskID = "task-" + i; $('#taskList').append(" " + localStorage.getItem(taskID) + " "); } $('#clear').click(function() { localStorage.clear(); }); $('#taskEntryForm').submit(function() { if ($('#taskInput').val() !== "") { var taskID = "task-" + i; var taskMessage = $('#taskInput').val(); localStorage.setItem(taskID, taskMessage); $('#taskList').append(" " + taskMessage + " "); var task = $('#' + taskID); task.css('display', 'none'); task.slideDown(); $('#taskInput').val(""); i++; } return false; }); $('#taskList').on("click", "li", function(event) { self = $(this); taskID = self.attr('id'); localStorage.removeItem(taskID); self.slideUp('slow', function() { self.remove(); }); }); }); /*EasyDropDown*/ /* * EASYDROPDOWN - A Drop-down Builder for Styleable Inputs and Menus * Version: 2.0.4 * License: Creative Commons Attribution 3.0 Unported - CC BY 3.0 * http://creativecommons.org/licenses/by/3.0/ * This software may be used freely on commercial and non-commercial projects with attribution to the author/copyright holder. * Author: Patrick Kunka * Copyright 2013 Patrick Kunka, All Rights Reserved */ (function(d) { function e() { this.isField = !0; this.keyboardMode = this.hasLabel = this.cutOff = this.inFocus = this.down = !1; this.nativeTouch = !0; this.wrapperClass = "dropdown"; this.onSelect = null } function f(a, c) { var b = new e; b.init(a, c); b.instances.push(b) } e.prototype = { constructor: e, instances: [], init: function(a, c) { var b = this; d.extend(b, c); b.$select = d(a); b.options = []; b.$options = b.$select.find("option"); b.isTouch = "ontouchend" in document; b.$se…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46392643
type: Question
answer count: 1
has title: How do I stop one div from moving the other but still keep them vertically aligned?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46392344
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29079842

http://stackoverflow.com/a/29131386
has comment: http://stackoverflow.com/comment/46490177
has comment: http://stackoverflow.com/comment/46489553
type: Answer
has comment: http://stackoverflow.com/comment/46489794
has body: Try looking into jQuery's AJAX function. Upon submission of the login form, send the username and password combo to http://universe.tc.uvu.edu/cs2550/assignments/PasswordCheck/check.php as follows. User Name: Password: This effectively validates your form submission. I prefer using the jQuery library as opposed to raw JS. You should look into it too. It's also worth noting that forms must ALWAYS be validated on the server side as well. Because a client could always just disable JavaScript in their browser to bypass your front end validation. As mentioned by someone who commented on your question, your method of backend validation is pretty insecure. Raw values of passwords should never be stored. Rather, it's good to use an sha1 hash of the password so that if an unwanted user somehow hacks into your DB he/she doesn't have all of the passwords stored in there. Also, username/password combination validation works a lot smoother on the backend if you just do something like // Connect to the DB $con = mysqli_connect('localhost', 'user', 'pass', 'db'); // Escape the form values or user prepared statements $username = mysqli_real_escape_string($con, $username); $password = mysqli_real_escape_string($con, $password); $sql = "SELECT * FROM users WHERE username = '".$username." AND password = '".$password."'"; $result = mysqli_query($con, $sql); $count = mysqli_num_rows($result); if($count == 1) { echo "Success"; } else { echo "Fail"; } instead of using a static list.
has comment: http://stackoverflow.com/comment/46489375
accepted answer of: http://stackoverflow.com/q/29131150
answers question: http://stackoverflow.com/q/29131150
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46488621
has comment: http://stackoverflow.com/comment/46489872
score: 4

http://stackoverflow.com/comment/46587505
comment on: http://stackoverflow.com/q/29186121
type: QuestionComment
type: Comment
has text: Use `#tussenstand` instead of `.tussenstand` as selector.
score: 1

http://stackoverflow.com/comment/46562218
has text: have tried unbinding, off and so on...strange is the fact, that sometimes it works...othertimes it takes 2 clicks to get .one to work, sometimes three...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29171964

http://stackoverflow.com/comment/46367159
comment on: http://stackoverflow.com/q/29065752
score: 0
type: QuestionComment
has text: would you please provide a final full html of your application ?
type: Comment

http://stackoverflow.com/comment/46611914
comment on: http://stackoverflow.com/a/29199554
type: Comment
has text: Yes this is exactly what I wanted. Thanks a lot Artur!
score: 1
type: AnswerComment

pandas
tags question: http://stackoverflow.com/q/29136362
type: Tag
tag name: pandas

http://stackoverflow.com/a/29189843
has comment: http://stackoverflow.com/comment/46594404
answers question: http://stackoverflow.com/q/29189547
accepted answer of: http://stackoverflow.com/q/29189547
has body: Combining dandavis and my comments, here is a shim with a little error handling (function () { var ev; try { ev = new KeyboardEvent('keydown'); if (!('key' in ev)) { if (!('keyCode' in ev)) if (console &amp;&amp; console.warn) console.warn('Someting went wrong setting up keyboardEvent.key; no keyboardEvent.keyCode'); Object.defineProperty( KeyboardEvent.prototype, 'key', {get: function () {return this.keyCode;}} ); } } catch (e) { if (console &amp;&amp; console.warn) console.warn('Someting went wrong setting up keyboardEvent.key; an error was thrown'); } }());
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46607695
type: Comment
score: 2
has text: It's false, the hyphen can be after a range or a shorthand character class without to be escaped: `[a-z-2]` is allowed like `[\w-2]`. `[^]` is an old syntax that is not supported by all javascript implementations.
type: AnswerComment
comment on: http://stackoverflow.com/a/29197424

http://stackoverflow.com/q/29151365
accepted answer: http://stackoverflow.com/a/29152067
type: AnsweredQuestion
downvote count: 0
has title: Protractor - get text of a child element in ng-repeat
tagged with: javascript
favorite count: 0
type: Question
has body: I'm using Protractor to test an angular page. This page has a table populated by ng-repeat and I would like to extra the text within that table. Here is the HTML code: &lt;div class="data-group ng-scope" ng-repeat="group in tableData | filter: filterText | orderBy: getValueToOrderByGroup() : sortingCriteria.descending" ng-show="filtered.length &gt; 0"&gt; &lt;div class="data-row group-header"&gt; &lt;div class="col-md-6"&gt; &lt;i ng-click="group.hideRows = !group.hideRows" ng-class="{'rotate-down': group.hideRows}" class="fa fa-fw fa-chevron-right"&gt;&lt;/i&gt; &lt;strong class="text-capitalize ng-binding" ng-click="group.hideRows = !group.hideRows"&gt; HEADER TEXT &lt;/strong&gt; &lt;/div&gt; &lt;/div&gt; &lt;div collapse="group.hideRows" class="collapse in" style="height: auto;"&gt; &lt;div class="data-row child-row ng-scope" ng-repeat="thing in filtered = (group.data | filter: filterStuff | filter: filterText | orderBy: getValueToOrderByChild() : sortingCriteria.descending)"&gt; &lt;div class="col-md-3 cell-data child-row-indent text-capitalize"&gt; &lt;span class="clickable-element ng-binding"&gt;CHILD ONE&lt;/span&gt;&amp;nbsp;&lt;br&gt; &lt;/div&gt; &lt;div class="col-md-2 child-row-indent-responsive"&gt; &lt;span class="visible-xs visible-sm"&gt;Status:&amp;nbsp;&lt;/span&gt;&lt;span class="ng-binding"&gt; CHILD TWO &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; And these are my statements to extract the text: var headerText = element.all(by.repeater('group in tableData')).get(0).all(by.tagName('div')).get(0).element(by.css('div &gt; strong')).getText(); var childOne = element.all(by.repeater('group in tableData')).get(0).all(by.tagName('div')).get(1).element(by.css('div &gt; div:nth-child(1) &gt; span').getText(); When I ran this, it returned a whole block of all the functions but not the actual text. Any help would be appreciated.
score: 1
tagged with: jasmine
tagged with: angularjs
has answer: http://stackoverflow.com/a/29152067
upvote count: 1
answer count: 1
tagged with: protractor

http://stackoverflow.com/comment/46634719
has text: @SteveJobs: No, since that would also alert `deleted` if `myProp` didn't exist on `myOb` in the first place.
comment on: http://stackoverflow.com/q/29212359
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46534525
score: 0
type: Comment
type: QuestionComment
has text: You can add an `if` statement before you append to the `selector` that will check if it is populated ( you can see if the string ` ` exists) and then you can iterate over the `option` tags and use the `remove()` function to remove each option before adding the new ones.
comment on: http://stackoverflow.com/q/29156947

http://stackoverflow.com/comment/46646668
comment on: http://stackoverflow.com/q/29216116
type: QuestionComment
has text: What does 'working regex' mean? Do you search or replace?
score: 0
type: Comment

http://stackoverflow.com/q/29203825
has comment: http://stackoverflow.com/comment/46619077
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46619128
upvote count: 2
has answer: http://stackoverflow.com/a/29229495
has answer: http://stackoverflow.com/a/29226887
has comment: http://stackoverflow.com/comment/46622148
type: Question
has answer: http://stackoverflow.com/a/29204122
has comment: http://stackoverflow.com/comment/46658618
has comment: http://stackoverflow.com/comment/46620644
has comment: http://stackoverflow.com/comment/46619728
tagged with: javascript
has comment: http://stackoverflow.com/comment/46661083
possible better answer: http://stackoverflow.com/a/29204122
accepted answer: http://stackoverflow.com/a/29229495
answer count: 3
has comment: http://stackoverflow.com/comment/46620298
has body: I am working on an app which is built on AngularJS. i want to remove a button when the filter is on. Can any one please check the below code for me ? &lt;input type="text" placeholder="Filter/Search" ng-model="mtgFilter"&gt; &lt;div ng-repeat="items in elements | filter:mtgFilter"&gt; {{items.name}} &lt;/div&gt; &lt;input type="Button" value="Save" ng-show="mtgFilter == ''" /&gt; Regards, Fresher
has comment: http://stackoverflow.com/comment/46661894
downvote count: 0
has comment: http://stackoverflow.com/comment/46623349
has comment: http://stackoverflow.com/comment/46660862
favorite count: 0
has comment: http://stackoverflow.com/comment/46661667
has comment: http://stackoverflow.com/comment/46659424
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46619155
has comment: http://stackoverflow.com/comment/46621233
has comment: http://stackoverflow.com/comment/46619342
has title: How to show or hide when filter is on in angularJS?

http://stackoverflow.com/q/29218121
has answer: http://stackoverflow.com/a/29218904
has comment: http://stackoverflow.com/comment/46655365
type: Question
tagged with: javascript
has body: Clearinterval is not clearing the interval set. The program is stuck looping waiting for a click. How do I make it clear interval once it detects a click? var timerID; function waitForClick() { timerID = setInterval(listen(), 1000); } function listen() { document.getElementById("graphic").onclick = function stopListen() { alert("clicky"); clearInterval(timerID); } }; waitForClick(); return;
accepted answer: http://stackoverflow.com/a/29218904
has comment: http://stackoverflow.com/comment/46645777
score: 0
answer count: 1
tagged with: setinterval
tagged with: suspend
tagged with: click
tagged with: clearinterval
has title: clearInterval not working when clicked
type: AnsweredQuestion

http://stackoverflow.com/comment/46630530
type: Comment
comment on: http://stackoverflow.com/a/29196952
type: AnswerComment
score: 0
has text: yes sir change event, but i also tried it and it did not work. $('#txtQuantity').on('change', function (event) { if(event.which === 13){ var quantity = parseFloat($(this).val()) || 0; var amount = parseFloat($('#txtAmount').val()); var evt = (amount * quantity); $('#txttotal').val(evt); } });

http://stackoverflow.com/comment/46446365
has text: see edit.... still nothing
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29107783

http://stackoverflow.com/q/29164368
downvote count: 0
tagged with: javascript
tagged with: event-handling
accepted answer: http://stackoverflow.com/a/29164459
favorite count: 0
tagged with: listener
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46548774
has body: In building an extended input field (a complex date picker), I need to use two key event listeners. One is attached to the input field, and launches the interface. This is easy. The second is attached to document, in order to close the complex overlay. Click on the overlay, and it does nothing. Click outside: the overlay disappears and the input field's value is updated. It also needs to remove the event listener from the document. This would all be straightforward… if it weren't based on object structures. I am not calling a stand-alone function. I am calling a child function of the data object associated with the field (which the field then has no way of referencing back to). __DateField.prototype.activate = function () { … var t = this; window.setTimeout(function () { document.addEventListener("click", function (ev) { t.closeDateSelector(ev) }, false); }, 0); … } (I haven't figured out why that event attachment needs to be nested within the setTimeout, but if I don''t do it that way, it calls itself immediately.) Anyhow, the problem is then that I cannot successfully call document.removeEventListener() because I it's not the same initial function. Also, I can't approach it by attaching the function as a stand-alone, because I need the reference to the related __DateField object. How can I remove that function from document? I have looked at the various threads that say there is no way to inspect event listeners added via 'addEventListener`, though wonder if they may be out of date, as Firebug can list them…
score: 1
has answer: http://stackoverflow.com/a/29164459
has comment: http://stackoverflow.com/comment/46549172
has title: Removing child-function event listeners
type: Question
answer count: 1

http://stackoverflow.com/q/29205177
has answer: http://stackoverflow.com/a/29218339
tagged with: javascript
score: 0
answer count: 2
has body: I use suitescript user event to add tab and some field belong to that tab when open a sale order. However, whenever I save the the information in that field, I can't see the information I manually input and save when i go back to that document. It seems like I miss the step loading data for custom field. Any suggestion on how to fix that problem? Thanks!!!
tagged with: netsuite
has title: SuiteScript: how to have a custom data field to load infomation from database
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29225068
type: Question

http://stackoverflow.com/comment/46551258
comment on: http://stackoverflow.com/q/29166310
has text: @AyyanarG if you are not sure, please don't misguide :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46791328
score: 0
type: Comment
type: QuestionComment
has text: The selectors are the same and I have made some selectors even more specific just to make sure I'm just targeting the ones I need. So all that is good.
comment on: http://stackoverflow.com/q/29206832

http://stackoverflow.com/q/29206583
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has title: jQuery DatePicker + TimePicker in Joomla
tagged with: css
has comment: http://stackoverflow.com/comment/46624828
has comment: http://stackoverflow.com/comment/46624783
tagged with: joomla3.3
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46624727
has body: Has anybody used a time picker in this link? http://trentrichardson.com/examples/timepicker/ I have already followed the steps in the link, I added the add-on.js file to my component and the css file inside, but when i change this code var x = jQuery(this).attr("size"); jQuery(this).datepicker({ minDate:"0"-120, maxDate: "0"-x,dateFormat:"yy-mm-dd" }); to this : var x = jQuery(this).attr("size"); jQuery(this).datetimepicker({ minDate:"0"-120, maxDate: "0"-x,dateFormat:"yy-mm-dd" }); nothing happens. I just want to add a timepicker to the datepicker I used from JqueryUI. Does joomla have something to do with this? I used this code to load the javascript files from the link that I provided above : $doc-&gt;addScript(JUri::base().'/components/com_subscription/media/js/jquery-ui-timepicker-addon.js'); $doc-&gt;addStyleSheet(JUri::base().'/components/com_subscription/media/css/jquery-ui-timepicker-addon.css'); here is a screenshot of the error when the page loads: I was confused because from the link that I am following, it just used the .datetimepicker then it works, but when I use mine, it's not functioning. The screenshot also displays $.ui is undefined, but that code came from the js file which was from the link I am following.
has comment: http://stackoverflow.com/comment/46625036
type: Question
has comment: http://stackoverflow.com/comment/46624880

http://stackoverflow.com/comment/46483295
has text: so what type of arbitrary values i should store ? let say that i need to show a dialog box when the user clicks on the above input field, and i want the dialog to have a dynamic title, so is it semantically valid to have another arbitrary values inside my input field named data-dialogtitle="this is my title!!"??
comment on: http://stackoverflow.com/a/29128663
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46512870
has text: @mplungjanonly one more question...sorry! why the prevSibling is returning a text nodeType...as I see the prevSibling of the button will be adjacent Thanks!
comment on: http://stackoverflow.com/a/29126756
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29116801
type: UnansweredQuestion
tagged with: jmpress
linked to: http://stackoverflow.com/q/31826838
tagged with: javascript
type: Question
tagged with: jquery-plugins
score: 0
has body: I've a site using jmpress.js, while scrolling on page it automatically moved to next slide. I want to stop stepped into next slide instead it should scroll down the page.
answer count: 1
has answer: http://stackoverflow.com/a/29128177
tagged with: jquery
has comment: http://stackoverflow.com/comment/66750500
has title: jmpress stop step into next slide on scroll

http://stackoverflow.com/comment/46441332
score: 0
comment on: http://stackoverflow.com/q/29103933
type: Comment
type: QuestionComment
has text: What do you mean by online link? The error only references to my .aspx mark up that I posted. As far as the script src goes, this has been used twice on two separate pages. I tried removing one of the jquery.min.us src links but that didn't solve the issue.

http://stackoverflow.com/a/56150320
has comment: http://stackoverflow.com/comment/133375520
has comment: http://stackoverflow.com/comment/133398162
has comment: http://stackoverflow.com/comment/133409777
has comment: http://stackoverflow.com/comment/133422318
has comment: http://stackoverflow.com/comment/133398206
has comment: http://stackoverflow.com/comment/126472852
score: 487
has comment: http://stackoverflow.com/comment/133410189
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/113676915
has comment: http://stackoverflow.com/comment/133424694
has comment: http://stackoverflow.com/comment/130855632
has comment: http://stackoverflow.com/comment/129203529
has comment: http://stackoverflow.com/comment/133398034
has comment: http://stackoverflow.com/comment/133424889
has comment: http://stackoverflow.com/comment/116545089
answers question: http://stackoverflow.com/q/29085197
type: Answer
upvote count: 488
has comment: http://stackoverflow.com/comment/136587909
accepted answer of: http://stackoverflow.com/q/29085197
has body: Both JSON.stringify and JSON.parse support a second argument. replacer and reviver respectively. With replacer and reviver below it's possible to add support for native Map object, including deeply nested values function replacer(key, value) { if(value instanceof Map) { return { dataType: 'Map', value: Array.from(value.entries()), // or with spread: value: [...value] }; } else { return value; } } function reviver(key, value) { if(typeof value === 'object' &amp;&amp; value !== null) { if (value.dataType === 'Map') { return new Map(value.value); } } return value; } Usage: const originalValue = new Map('a', 1); const str = JSON.stringify(originalValue, replacer); const newValue = JSON.parse(str, reviver); console.log(originalValue, newValue); Deep nesting with combination of Arrays, Objects and Maps const originalValue = [ new Map([['a', { b: { c: new Map('d', 'text') } }]]) ]; const str = JSON.stringify(originalValue, replacer); const newValue = JSON.parse(str, reviver); console.log(originalValue, newValue);
has comment: http://stackoverflow.com/comment/122029263
has comment: http://stackoverflow.com/comment/133410390
has comment: http://stackoverflow.com/comment/130855514
has comment: http://stackoverflow.com/comment/120884130
has comment: http://stackoverflow.com/comment/132704442
has comment: http://stackoverflow.com/comment/116392279
has comment: http://stackoverflow.com/comment/113681310

http://stackoverflow.com/comment/46545588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29160899
has text: you need to check height of each div's content take, compare them and assign height to each accordingly
score: 0

http://stackoverflow.com/q/29107653
has answer: http://stackoverflow.com/a/29107969
has comment: http://stackoverflow.com/comment/46445776
tagged with: javascript
has title: Get filename from input file in Javascript
has comment: http://stackoverflow.com/comment/46445107
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46445229
accepted answer: http://stackoverflow.com/a/29107969
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46445014
tagged with: regex
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/46445038
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29108163
score: 0
has body: I have noticed that bootstrap is able to parse out and display the top level filename from a file input field when the user selects a file. &lt;input type="file" id="exampleFile"&gt; JSFiddle: http://jsfiddle.net/na4j7n6y/ My question: Is this functionality exposed for me to use in my own javascript code? Or do I have to parse out the filename once again using my own technique? I have tried retrieving the filename like so: $('#exampleFile').val() // Resolves to 'C:\fakepath\FILENAME' instead of 'FILENAME'
linked to: http://stackoverflow.com/q/423376
possible better answer: http://stackoverflow.com/a/29108163

http://stackoverflow.com/comment/46385990
comment on: http://stackoverflow.com/a/29076138
type: Comment
has text: It won't write the output to my canvas. I've set the function exactly out the same way you did and then just referenced the underscore variable and got nothing
score: 0
type: AnswerComment

http://stackoverflow.com/q/29156452
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29156533
type: Question
has title: CasperJS screenshot is only a small part of page
score: 4
tagged with: casperjs
answer count: 1
has answer: http://stackoverflow.com/a/29156533
upvote count: 4
has body: The CasperJS documentation for captureSelector() does not say anything about how to set the size of the screenshot. The default (at least on my system using webkit, Windows 8) seems to be to take a tiny screenshot of the top left portion of the page. Am I looking in the wrong place? I found viewportSize. I assume this is what I need, but does anyone have code that can set this to a sensible default (like 100%)? FYI this.viewport('100%', '100%'); just hangs, so I assume it doesn't take %. Do I have to inject code that will return the window width and height into the page and pass that back to extract it or is there an easier way?
type: AnsweredQuestion

http://stackoverflow.com/comment/46607868
score: 0
has text: @VivienPipo: Please edit your questions instead of re-posting them.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29196936

http://stackoverflow.com/q/29064411
has title: Information from ICEcast
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: internet-radio
accepted answer: http://stackoverflow.com/a/29065305
tagged with: http://stackoverflow.com/tag/html
has body: I have a Dutch Radio Station called FinioxFM and I would like to get information from my ICEcast server to my website. I'm using Airtime, I've searched all over the internet and I couldn't find a answer. I saw a lot op options but they were all from 2007 or 2010 and I didn't know if they would still work now. My question is how do I get this information from my ICEcast server. Or is there a simple way with Airtime? Do I use HTML, Java Script or PHP? What are my options? Using Airtime V2.5.1 and a direct link to my stream is http://radio.finiox.com:8000/live - My website is http://www.finiox.com Thanks for helping me out!
has comment: http://stackoverflow.com/comment/46370675
tagged with: icecast
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29065305

http://stackoverflow.com/q/29217946
has answer: http://stackoverflow.com/a/29227709
type: Question
possible better answer: http://stackoverflow.com/a/29239975
tagged with: ember-data
answer count: 2
accepted answer: http://stackoverflow.com/a/29227709
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ember.js
has body: I haven't been able to find much of anything on the following, any posts or guides you may have on this would be appreciated! I am trying to create a new record with a form and router. The way that I am going about this is by setting the model in the router, then saving the record when the user submits the form with an action. I have seen other examples where the author does a "createRecord" in the controller and grabs the values from the form with "get" or "getProperties". However, in my code below it seems this is much simpler: Dashboard.CreateAccountRoute = Ember.Route.extend({ model: function() { return this.store.createRecord('account', {}); }, actions: { createAccount: function () { var account = this.modelFor('create_account'); var self = this; account.save().then(function(account){ self.flashMessage('The account was added successfully!', 'alert-success'); self.transitionTo("accounts"); }, function(reason) { self.flashMessage('There was an error saving the account. Please try again.', 'alert-error'); console.log(reason); }); } } }); The problem with this of course, is if the user does not submit the form, the record is still added to the local store. Otherwise, it works as expected setting values in the record from the form. How can I accomplish the above without saving anything to the store until after the action "createAccount"?
has title: How to use a blank Ember Data model in a route?
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29239975
upvote count: 2

http://stackoverflow.com/q/29167351
upvote count: 2
has body: $http({ url: 'http://myURL.com/api/', method: "POST", data: { 'YTParam' : 'test' } }) .then(function(response) { console.log(response.data); }, function(response) { // optional // failed } ); In my console I see the entire html got printed out, I was expecting the value of $_POST[myParam]. Why is that happening? my PHP as below &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; body{ margin: 0; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;?php echo $_POST["YTParam"]; if($_POST["YTParam"]) { $YTParam = $_POST["YTParam"]; echo $YTParam; } ?&gt; &lt;/body&gt; &lt;/html&gt; I did close every tag properly but have no idea why I have this problem.
answer count: 2
has comment: http://stackoverflow.com/comment/46553400
downvote count: 3
tagged with: php
has answer: http://stackoverflow.com/a/29167578
has comment: http://stackoverflow.com/comment/46553609
has comment: http://stackoverflow.com/comment/46553392
has comment: http://stackoverflow.com/comment/46553526
has answer: http://stackoverflow.com/a/29167704
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/46553563
has title: YTParamAPI page returned the entire HTML?
score: -1
has comment: http://stackoverflow.com/comment/46553598

http://stackoverflow.com/q/29174956
downvote count: 0
answer count: 1
has body: In the process of migrating a legacy app to Angular we have a setup where the legacy app loads the new up in an iframe. We want to test this integration with Protractor. The legacy app is not an Angular app. We'd be able to test if the legacy app had Angular, but it doesn't, so Protractor has trouble switching context into the iframe where the Angular app lives. How should this be done? Edit: Protractor fails as follows. After the iframe comes up and doing browser.switchTo().frame(...); Protractor is unable to find controls that are inside the iframe. We've tested the case outside the iframe and Protractor finds the buttons and links and fields just fine in the Angular app. But when the same page is loaded in an iframe it acts as though they weren't there.
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Testing Angular app with Protractor inside iframe hosted by non-Angular app?
score: 1
tagged with: iframe
has answer: http://stackoverflow.com/a/29175056
upvote count: 1
linked to: http://stackoverflow.com/q/28511013
type: Question
tagged with: protractor
tagged with: javascript

http://stackoverflow.com/comment/46596734
comment on: http://stackoverflow.com/a/29191342
score: 0
type: Comment
has text: This actually works but it doesn't change the data-id value to the current inputted value.. it sets the data-id to the previous value inputted in the textfield.. :(
type: AnswerComment

http://stackoverflow.com/comment/46371723
score: 0
comment on: http://stackoverflow.com/q/29068051
type: QuestionComment
type: Comment
has text: Edit your question, don't put code in the comments. What's with that semi-colon in the ` ` tag? Also, how are you implementing ScrollSpy? Where's the rest of your code?

http://stackoverflow.com/comment/46510154
type: QuestionComment
comment on: http://stackoverflow.com/q/29143610
has text: you can pass in a callback *for a reason.* Use this opportunity, and do your processing in the appropriate callback.
score: 0
type: Comment

http://stackoverflow.com/comment/46593709
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29189565
has text: I'm confused as to what you are trying to do. But if you are bringing down JSON, than you want to do `var obj = JSON.parse(message)` If you are creating a JSON string(as you are doing above) and want to access properties, than its the same `var obj = JSON.parse(jsonString);` Then `var actionValue = obj.action;`

http://stackoverflow.com/a/29131760
type: Answer
answers question: http://stackoverflow.com/q/29131150
score: 0
has body: Checking pass in js doesnt make sense, because user can see js code. Use PHP and AJAX.

http://stackoverflow.com/q/29078653
duplicate of: http://stackoverflow.com/q/28384470
linked to: http://stackoverflow.com/q/28384470
upvote count: 1
has title: How to download large files from secure server with angularJS without storing whole file in browser?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I need to allow user to download a lot of files from server secured by Oauth. The server expects to get Authorization header with value 'Bearer <token>' The server is written in java + spring framework, and uses custom SSO authorization. The files have upper size limit of 1GB. For other requests I use $http with header set trough $httpProvider.defaults.headers.common. After logging in the browser doesn't have the server cookie. Because of that I can't do just download since the server won't know I'm authorized. I also can't do something like this: http://blog.techdev.de/an-angularjs-directive-to-download-pdf-files/ since it first downloads whole file to browser. With 1GB files the browsers crash or slowdown beyond useful state. All solutions that I could find do so by downloading whole file into the browser first.
tagged with: single-sign-on
answer count: 0
downvote count: 0
score: 1
tagged with: file
type: Question
tagged with: javascript

http://stackoverflow.com/q/29140817
score: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29141597
accepted answer: http://stackoverflow.com/a/29141597
upvote count: 1
answer count: 1
favorite count: 0
tagged with: extjs
has body: I have a form and an onBlur listener on each field. This listener registers those fields that a user at some moment edited or at least put cursor on. Before I submit my form I loop through all fields of the form and if I see that a particular field is not among those registered by my listener, then I destroy it. After that I submit the form. The problem is, it seems as if destroy operation is asynchronous in some sense. By this I mean that even though a particular field was not registered there is still some chance that it can be submitted. Sometimes, I see that it happens, sometimes - not. And indeed it depenends on a number of fields. So, I need some more stable solution of excluding fields from a form. Now, this kind of solution ...loop through fields if(bad_field) field.destroy(); ... end of loop form.getForm().submit({ ... }) does not work in a stable manner.
has title: How to prevent some form's fields from being submitted
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46505390
type: Question
has comment: http://stackoverflow.com/comment/46505465

http://stackoverflow.com/q/29098720
has comment: http://stackoverflow.com/comment/46427799
has answer: http://stackoverflow.com/a/29098828
score: 2
has comment: http://stackoverflow.com/comment/46428556
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2832636
has body: I need to set pointers to a map a) when the map is initialized and b) when the map is moved. To get the markers, I make a call to my API like this: var bounds = map.getBounds(); and then take the bounds to get the correct markers. The problem is, that when I put that API-call inside google.maps.event.addListener(map, "bounds_changed", function(){}) it gets called way too often while dragging the map, but if I use google.maps.event.addListener(map, "idle", function(){}) map.getBounds is null upon initializing. edit: More code $(document).ready(function(){ initialize(); }); function initialize() { mapOptions = { zoom : 13, minZoom : minimumZoomLevel, scrollwheel : false, panControl : false }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); google.maps.event.addListener(map, "idle", function() { myfunction(); }); }); function myfunction(){ var bounds = map.getBounds(); } bounds is null!
has title: maps.getBounds() null when calling on map idle
type: Question
tagged with: google-maps
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46428914
has comment: http://stackoverflow.com/comment/46428518

http://stackoverflow.com/comment/46476151
type: Comment
comment on: http://stackoverflow.com/a/29124979
has text: Is there a way to convert the `LatLng` object to the method so it works? So I don't have to create another `setMarker` function just for the `LatLng` objects...
score: 0
type: AnswerComment

http://stackoverflow.com/a/29195554
has comment: http://stackoverflow.com/comment/46608637
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The code, which you posted, have two small problems: you use wrong option of jQuery UI Datepicker. dateFormat: "d.m.Y" should be fixed to dateFormat: "dd.mm.yy". you should use beforeSaveRow: myBeforeSaveRow in all inline editing. The current code uses if only is case of starting editing by direct call of editRow inside of onSelectRow. I suggest you to use inlineEditing option of free jqGrid: onSelectRow: function (rowid) { var $self = $(this), savedRow = $self.jqGrid("getGridParam", "savedRow"); if (savedRow.length &gt; 0 &amp;&amp; savedRow[0].id !== rowid) { $self.jqGrid("restoreRow", savedRow[0].id); } $self.jqGrid("editRow", rowid); }, inlineEditing: { // if defines COMMON inline editing options keys: true, beforeSaveRow: myBeforeSaveRow } see the demo.
has comment: http://stackoverflow.com/comment/46608519
upvote count: 1
answers question: http://stackoverflow.com/q/29194662
score: 1
accepted answer of: http://stackoverflow.com/q/29194662

http://stackoverflow.com/q/29124619
has title: Why doesn't jquery calculate width correctly before $(window).resize?
type: Question
has comment: http://stackoverflow.com/comment/46475906
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46475392
has comment: http://stackoverflow.com/comment/46475348
score: 0
has body: I've got this script here: $('.search-submit').css('right',($('.container').width()-$('.search-input').width())/2-$('.search-submit').width()-20); and it works great after $(window).resize() event, but not on $(document).ready() - why? On document.ready it calculates a wrong number, but as soon as I resize my window, it fixes that issue. What could be wrong?
answer count: 0
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/46475587

http://stackoverflow.com/comment/78002614
score: 0
type: Comment
has text: Protractor is for Angular but it's based on Selenium, a generic E2E testing framework. I'm sure you can use it for testing Ember apps.
type: AnswerComment
comment on: http://stackoverflow.com/a/29607742

http://stackoverflow.com/q/29183963
upvote count: 1
tagged with: google-chrome
has title: In a Chrome Extension, how can I accurately retrieve the user's region/locale/country from their Chrome browser?
type: AnsweredQuestion
has body: How does Google detect the user's country to set the user's search page accordingly? I have searched around and cannot find a simple way of doing it.
score: 1
has answer: http://stackoverflow.com/a/29188744
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/29188744
tagged with: javascript
has answer: http://stackoverflow.com/a/54539486
tagged with: google-chrome-app
answer count: 3
has answer: http://stackoverflow.com/a/29183985
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/46596185
possible better answer: http://stackoverflow.com/a/54539486
favorite count: 0

http://stackoverflow.com/comment/46419072
score: 0
type: AnswerComment
has text: Thanks for your answer. Even it works, my real code was a bit different and I still had the challenge. See my UPDATE 1 above.
comment on: http://stackoverflow.com/a/29093189
type: Comment

http://stackoverflow.com/q/29062563
has body: I am using webapp2 to build a webapp with angularjs. This is the directory structure. |--test-app |--lib |--static |--js |--app.js |--controller.js |--lib |--angular |--angualr-bootstrap |--index.html |--app.yaml |--mainapp.py But when I try to load the js files in index.html IN MAIN I get these errors: GET http://localhost:8080/static/js/app.js (404 - file not found) GET http://localhost:8080/static/js/controller.js (404 - file not found) I cannot figure out why I am getting these errors. Here is code for app.yaml application: test-app version: 1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /.* script: mainapp.app libraries: - name: webapp2 version: "2.5.2" Here is code for mainapp.py class Start(webapp2.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/html' self.response.write(open('static/index.html').read()) app = webapp2.WSGIApplication([ ('/', Start), ], debug=True)
tagged with: webapp2
has answer: http://stackoverflow.com/a/29062768
tagged with: javascript
answer count: 2
score: 2
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29062768
tagged with: angularjs
has title: 404 error while loading js files
upvote count: 2
tagged with: google-app-engine
has comment: http://stackoverflow.com/comment/46361299
tagged with: python
possible better answer: http://stackoverflow.com/a/29063264
has answer: http://stackoverflow.com/a/29063264
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46361375
type: Question

http://stackoverflow.com/q/29159660
has answer: http://stackoverflow.com/a/29159744
type: Question
answer count: 1
has body: So I have a couple of classes function BaseClass(x, y){ this.x = x; this.y = y; } function ImageClass(img, w, h, x, y){ BaseClass.call(this, x, y); this.img = img; } ImageClass.prototype = Object.create(BaseClass.protoype); ImageClass.prototype.constructor = ImageClass; function LayerClass(img, w, h, x, y){ ImageClass.call(img, w, h, x, y); this.collection = []; this.createSprite = function(img, r, a, w, h, x, y){ this.collection.push(new Sprite(img, r, a, w, h, x, y)); } } LayerClass.prototype = Object.create(ImageClass.prototype); LayerClass.prototype.constructor = LayerClass; function SpriteClass(img, r, a, w, h, x, y){ ImageClass.call(img, w, h, x, y); this.r = r; this.a = a; } SpriteClass.prototype = Object.create(ImageClass.prototype); SpriteClass.prototype.constructor = SpriteClass; In my code each of the inherited classes uses call() to pass 'this' The problem being is that if I have a Layer object that contains any Sprite objects, I would like the Sprite objects to have a parent (super) reference and I can't do this because the class constructors use this to set properties. So does anyone know how I could pass the parent or (and I know this is going to sound dumb, it's late) be able to get the parent scope this in the class constructor? While writing this I realized that it might be as simple as setting the parent property after the object is set as a child but I'm looking for confirmation if that's the best way or if anyone knows something better. Also feel free to tell me I know nothing about prototype because I'm still learning it. :-) -Thanks
tagged with: oop
score: 0
accepted answer: http://stackoverflow.com/a/29159744
has comment: http://stackoverflow.com/comment/46539969
tagged with: javascript
tagged with: inheritance
type: AnsweredQuestion
has title: passing parent object automatically
has comment: http://stackoverflow.com/comment/46541099
has comment: http://stackoverflow.com/comment/46541876

http://stackoverflow.com/a/29100861
has body: Somewhere in $scope.add method, you need to set item.hasNotificationSet=true;. Notice ng-class="agendaItem.hasNotificationSet ?. Also note, I recommend passing just agendaItem into the add method so that you have direct access to this object in order to change its "hasNotificationSet" property.
type: Answer
downvote count: 0
score: 2
accepted answer of: http://stackoverflow.com/q/29100802
upvote count: 2
answers question: http://stackoverflow.com/q/29100802
type: AcceptedAnswer

gwt
tags question: http://stackoverflow.com/q/29206774
tag name: gwt
type: Tag
tags question: http://stackoverflow.com/q/29079118
tags question: http://stackoverflow.com/q/29138765
tags question: http://stackoverflow.com/q/29211198
tags question: http://stackoverflow.com/q/29217167

http://stackoverflow.com/comment/46599787
comment on: http://stackoverflow.com/a/29182787
type: Comment
score: 0
type: AnswerComment
has text: But template strings are not meant to be constructed by user, so the security of this method can be OK. But in any case I dislike it.

http://stackoverflow.com/q/29098937
type: AnsweredQuestion
score: 0
type: Question
tagged with: javascript
tagged with: passport.js
tagged with: express
has answer: http://stackoverflow.com/a/29116511
answer count: 1
has title: Passport is authenticating strategies more than once (using multistrategies)
has body: I have configured Passport.js to use multiple strategies: passport.authenticate(['bearer', 'facebook-token', 'google-token', 'linkedin-token'],function(err, user, info) ... I am sure that this authenticate function calls only once, but within Passport's source code in the authenticate.js file, I see that some strategies are executing more than once. Say bearer fails, then I want facebook-token to be attempted. My facebookTokenStrategy code is the following: facebookTokenStrategy: new FacebookTokenStrategy({ clientID: process.env.FACEBOOK_APP_ID, clientSecret: process.env.FACEBOOK_APP_SECRET }, function(access_token, refresh_token, profile, done) { someFunction().then(function(user) { return done(null, user) }, done) }), I have placed console logs at many of these points and checked that the facebook-token strategy does work with the proper access token, but the strategy "succeeds" more than once, and my API call to Node.js ends up saying "Cannot GET /api/authenticate".
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29116511

http://stackoverflow.com/q/29118745
upvote count: 2
has answer: http://stackoverflow.com/a/29119331
tagged with: loops
possible better answer: http://stackoverflow.com/a/29119324
has comment: http://stackoverflow.com/comment/46465517
type: Question
has answer: http://stackoverflow.com/a/29119324
has comment: http://stackoverflow.com/comment/46464642
accepted answer: http://stackoverflow.com/a/29119331
answer count: 3
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I'm trying to write a performance orientated array lookup that will return the closest longitude and latitude relative to the users current location. One issue is that I have 5000 locations in my array and am needing to loop through all results returning the closest in as fast a time as possible, I am also having issues with the filter as currently it is returning the wrong results (which I believe is due to the lookup only looking for the closest negative to current) Here is my code: if(has('geolocation')){ navigator.geolocation.getCurrentPosition((position) =&gt; { // Example result from getCurrentPosition (this is my exact location) // // position.coords = { // latitude: 51.4523, // longitude: -0.9724 // } // This is the nearest location // // location = { // latitude: 51.457495699999996, // longitude: -0.973083 // } // This is the location my filter keeps returning // // location = { // latitude: "50.6931", // longitude: "-4.0094", // name: "Yes Tor" // } let closest = this.locations.filter((location) =&gt; { console.log(location, position.coords); return location.latitude &lt;= position.coords.latitude &amp;&amp; location.longitude &lt;= position.coords.longitude; }).pop(); console.log(closest); //Is incorrect }); } I have commented my current results, my question is if there is a faster way of doing this and if there is a way to get closest for both negative and positive from current. If anyone needs it here is an example of the array structure (length is 5968) let this.locations = [ { elevation: "936.0", id: "350001", latitude: "56.8716", longitude: "-4.1969", name: "A' Bhuidheanach Bheag", region: "ta", unitaryAuthArea: "Perth and Kinross" }, { elevation: "999.0", id: "350024", latitude: "57.6926", longitude: "-5.1328", name: "A'Chailleach (Fannaich Region)", region: "he", unitaryAuthArea: "Highland" } ]
favorite count: 0
has answer: http://stackoverflow.com/a/29119206
has comment: http://stackoverflow.com/comment/46465591
has comment: http://stackoverflow.com/comment/46464762
score: 2
type: AnsweredQuestion
has title: Get nearest Latitude and Longitude from array

http://stackoverflow.com/q/29183015
tagged with: yadcf
type: Question
accepted answer: http://stackoverflow.com/a/29194428
score: 0
has title: Colvis don't work for datatable with yadcf
answer count: 1
has body: I don't understand why colvis don't work for my table. I include these css and js: &lt;link rel="stylesheet" type="text/css" href="https://datatables.net/release-datatables/extensions/ColVis/css/dataTables.colVis.css"&gt; &lt;script src="https://datatables.net/release-datatables/extensions/ColVis/js/dataTables.colVis.js"&gt;&lt;/script&gt; and then for initialisation dom: 'C&lt;"clear"&gt;lfrtip' so my code is like this: oTable = $('#example').dataTable({ dom: 'C&lt;"clear"&gt;lfrtip', "bJQueryUI": true, "bStateSave": true }).yadcf([{ But this solution don't work for my table because Colvis doesn't appear and then destroy other css/layout of table. Here my table: MY TABLE
tagged with: javascript
has answer: http://stackoverflow.com/a/29194428
type: AnsweredQuestion
tagged with: datatables

http://stackoverflow.com/q/29195923
score: 0
has body: This is hard to describe so I'll try my best. I have a script working fine, based on the radio button selected, it prints the value to a text box that is disabled for editing. I have to take this one step further...I need that value to then be involved in an addition function, adding the value of the radio button. This is what I tried and it failed. No errors but doesn't add what I want it to. If I remove the if statements, it works but only prints the initial value of the radio button. I need to add to that value based on what is selected. edit: adding html as requested. Choice1 : Choice2 : Choice3 : //Enter how many in this box How many? @ //this is the choice, based on radio button, add something to it
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29196309
has title: Add to value based on radio button value
type: Question
answer count: 2
tagged with: radio-button
has comment: http://stackoverflow.com/comment/46604693
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29196309
possible better answer: http://stackoverflow.com/a/29196070
has answer: http://stackoverflow.com/a/29196070

http://stackoverflow.com/comment/46419393
has text: I would say, that the concept you are trying to use is over complicated. It is a bit challenging to explaine that in a few lines... I at least tried. Summary: If you want to share some stuff among states - use **sevice**. If it could be a MODEL related to parent scope life time - use $scope.Model... hope it helps
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29093189
type: AnswerComment

http://stackoverflow.com/q/29116954
linked to: http://stackoverflow.com/q/26603532
answer count: 2
has title: Handling AJAX in nested loop (Angularjs)
upvote count: 0
has comment: http://stackoverflow.com/comment/46461770
has comment: http://stackoverflow.com/comment/46461733
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29117594
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29117167
tagged with: promise
has answer: http://stackoverflow.com/a/29117594
tagged with: angularjs
has body: var $scope.units = [1,2]; var $scope.shiftplans = ['plan1','plan2','plan3'] for(var i=0;i&lt;$scope.units.length;i++){ for(var a=0;a&lt;$scope.shiftplans.length;a++) { console.log('i:'+i); console.log('a:'+a); } } prints : i:0 a:0 i:0 a:1 i:0 a:2 i:1 a:0 i:1 a:1 i:1 a:2 but : var $scope.units = [1,2]; var $scope.shiftplans = ['plan1','plan2','plan3'] for(var i=0;i&lt;$scope.units.length;i++){ for(var a=0;a&lt;$scope.shiftplans.length;a++) { ***$http.get(function(){ console.log('i:'+i); console.log('a:'+a); });*** } } Console log in above ajax prints values in different values based on ajax response. how to handle AJAX to complete and later to move to looping ?
has comment: http://stackoverflow.com/comment/46461677
type: AnsweredQuestion
downvote count: 1
linked to: http://stackoverflow.com/q/750486
type: Question
has answer: http://stackoverflow.com/a/29117167
duplicate of: http://stackoverflow.com/q/750486
score: -1
has comment: http://stackoverflow.com/comment/46461743

http://stackoverflow.com/q/29108779
has answer: http://stackoverflow.com/a/65516679
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/60701556
linked to: http://stackoverflow.com/q/29503213
possible better answer: http://stackoverflow.com/a/68857269
score: 111
has title: How to get selected value of a dropdown menu in ReactJS
has answer: http://stackoverflow.com/a/71174744
type: Question
has answer: http://stackoverflow.com/a/29109773
has comment: http://stackoverflow.com/comment/46447588
tagged with: reactjs
has answer: http://stackoverflow.com/a/73151192
upvote count: 112
has answer: http://stackoverflow.com/a/57307032
has comment: http://stackoverflow.com/comment/46447359
has answer: http://stackoverflow.com/a/61105969
tagged with: javascript
has answer: http://stackoverflow.com/a/29109365
tagged with: drop-down-menu
has body: I'm using react and I want to get the value of the selected option of a dropdown in react but I don't know how. Any suggestions? thanks! My dropdown is just a select like: N/A 1 2 3 4
has answer: http://stackoverflow.com/a/64213458
has answer: http://stackoverflow.com/a/61436068
has answer: http://stackoverflow.com/a/64927283
answer count: 14
has comment: http://stackoverflow.com/comment/46447532
has comment: http://stackoverflow.com/comment/89509532
has answer: http://stackoverflow.com/a/36147955
has answer: http://stackoverflow.com/a/69657212
tagged with: menu
favorite count: 0
accepted answer: http://stackoverflow.com/a/29109365
tagged with: select
has answer: http://stackoverflow.com/a/68857269

odata
tag name: odata
type: Tag
tags question: http://stackoverflow.com/q/29214737

http://stackoverflow.com/q/29122488
tagged with: wordpress
has comment: http://stackoverflow.com/comment/46480414
answer count: 0
has body: I have a cron that is executed each second. This cron executes a function which calls a javascript .js file and it must show an alert on the page. This is the main idea but it doesn't work. Can anyone help me? Here's my code: register_activation_hook(__FILE__, 'my_activation'); if ( !wp_next_scheduled('check_script') ) { wp_schedule_event( time(), 'second', 'check_script_hook' ); } function checkScript() { check(); } add_action('check_script_hook', 'checkScript'); function check() { echo("running"); wp_enqueue_script('script', plugins_url('js/script.js', __FILE__), array('jquery'),true,'1.2.1'); } add_action('wp_enqueue_scripts', 'script'); PD: The wp cron works correctly. If I put a echo into the function that is executed each second it works.
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46472778
type: Question
score: 0
has title: Uses a javascript function into wp scheduled event

http://stackoverflow.com/a/29241265
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29147024
has body: Here is a working demo: http://plnkr.co/edit/3tLixkFKYgpXfx04PbaD?p=preview One approach is to create custom templates for your filters. This way you have full control over the arrays that the filters are bound to, and you can easily attach change events: Then, use the templates in your ng-table markup: {{user.name}} {{user.age}} You can populate the option arrays in your existing names and ages functions: $scope.names = function(column) { ... $scope.nameOptions = names; ... }; $scope.ages = function(column, name) { var def = $q.defer(), arr = [], ages = []; angular.forEach(data, function(item) { if (inArray(item.age, arr) === -1) { if (angular.isUndefined(name) || item.name === name) { arr.push(item.age); ages.push({ 'id': item.age, 'title': item.age }); } } }); $scope.ageOptions = ages; def.resolve(ages); return def; };

http://stackoverflow.com/comment/46576507
score: 1
has text: Your intuition was right. It does work: http://jsfiddle.net/8mL873o0/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29176558

http://stackoverflow.com/q/29187461
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29187705
has title: Change div background color if checkbox inside is checked
has comment: http://stackoverflow.com/comment/46590537
type: Question
tagged with: checkbox
has body: I'm looking for a way to change the div background color which is the parent of a checkbox. However I only want it to change background color when the attribute 'checked' is inside the tag. HTML &lt;div class="company"&gt; &lt;input type="checkbox" name="Selected[]" class="checkboxC" value="8" checked&gt; Company 8 &lt;/div&gt; &lt;div class="company"&gt; &lt;input type="checkbox" name="Selected[]" class="checkboxC" value="9"&gt; Company 9 &lt;/div&gt; So in the example above, I'd only want the div with checkbox 8 to change background color. 9 Stays the default color. I also can't do anything with the name attribute because that's taken by PHP. Any help on how I can fix this using Javascript/jQuery?
answer count: 1
score: 0
has comment: http://stackoverflow.com/comment/46590445
has answer: http://stackoverflow.com/a/29187705
tagged with: checked
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46425528
comment on: http://stackoverflow.com/q/29097527
has text: It could be an idea, but I'm currently working on frontend part only and I really don't know how to set up my server to do that.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29198533
has body: I am looking for a way to visualize negative numbers within a chord diagram. When I add a negative number to my dataset, the group will just expand to the negative side, overlapping the other groups. Is it possible to add negative numbers to a chord diagram without screwing up the layout?
score: 1
upvote count: 1
has title: Chord Diagram (D3) with negative values
tagged with: javascript
favorite count: 0
tagged with: visualization
tagged with: data-visualization
downvote count: 0
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
tagged with: chord-diagram
type: Question

http://stackoverflow.com/a/29083197
has comment: http://stackoverflow.com/comment/53917510
type: Answer
has comment: http://stackoverflow.com/comment/77396751
has comment: http://stackoverflow.com/comment/77348252
has comment: http://stackoverflow.com/comment/56582869
has comment: http://stackoverflow.com/comment/64238813
has comment: http://stackoverflow.com/comment/66337257
has comment: http://stackoverflow.com/comment/69683072
answers question: http://stackoverflow.com/q/29080148
has comment: http://stackoverflow.com/comment/63416938
score: 138
downvote count: 1
has body: You need to use the expose-loader. npm install expose-loader --save-dev You can either do this when you require it: require("expose?$!jquery"); or you can do this in your config: loaders: [ { test: require.resolve('jquery'), loader: 'expose?jQuery!expose?$' } ] UPDATE: As of webpack 2, you need to use expose-loader instead of expose: module: { rules: [{ test: require.resolve('jquery'), use: [{ loader: 'expose-loader', options: '$' }] }] }
has comment: http://stackoverflow.com/comment/46422853
accepted answer of: http://stackoverflow.com/q/29080148
type: AcceptedAnswer
upvote count: 139
has comment: http://stackoverflow.com/comment/46423704

http://stackoverflow.com/q/29133342
answer count: 1
has body: I'm trying to link a product from the category.jsp page to its own product.jsp page. When I click on a given product on the category page, the link in the browser displays perfectly as supposed to: http://localhost:8080/ecommerce/product?389 but the issue: I receive a HTTP Status 404 - Not Found error. I know it's because it's not finding the page, but after trying several solutions... I seem to not be able to find the piece of code that would make a difference... Any help would be much appreciated The Controller Servlet: package controller; import cart.ShoppingCart; import wishlist.Wishlist; import entity.Category; import entity.Product; import java.io.IOException; import java.util.Collection; import javax.ejb.EJB; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import session.CategoryFacade; import session.ProductFacade; public class ControllerServlet extends HttpServlet { @EJB private CategoryFacade categoryFacade; @EJB private ProductFacade productFacade; @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String userPath = request.getServletPath(); HttpSession session = request.getSession(); Category selectedCategory; Product selectedProduct; Collection<Product> categoryProducts; // if product page is requested if (userPath.equals("/product")) { // get productId from request String productId = request.getQueryString(); if (productId != null) { // get selected product selectedProduct = productFacade.find(Short.parseShort(productId)); // place selected product in session scope session.setAttribute("selectedProduct", selectedProduct); } This is the code from the category.jsp to call the product: Full Category.jsp: <c:forEach var="product" items="${categoryProducts}" varStatus="iter"> ${product.n…
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29137318
tagged with: java
downvote count: 1
has title: How to send the details of a given link as a parameter to another jsp page?
type: Question
tagged with: jstl
tagged with: jsp
tagged with: javascript
score: -1
upvote count: 0
tagged with: sql

http://stackoverflow.com/comment/46636081
type: QuestionComment
has text: @Kevin so there is another explanation apart from ones which were already provided as answers?
comment on: http://stackoverflow.com/q/29212917
score: 0
type: Comment

http://stackoverflow.com/comment/46429230
score: 0
comment on: http://stackoverflow.com/a/29084916
type: Comment
type: AnswerComment
has text: Glad it did! Don't forget to [accept the answer](http://stackoverflow.com/help/accepted-answer) since it worked

http://stackoverflow.com/comment/46416478
type: Comment
type: QuestionComment
has text: i think option 1 is more flexible for changes or extends
score: 0
comment on: http://stackoverflow.com/q/29092157

http://stackoverflow.com/comment/46596496
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29191047
has text: OK thanks, changed it. It should now only change 3 and 8 to green.

http://stackoverflow.com/q/29191249
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29191283
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: How do I toggle the text of an element with jQuery .click(), .toggle() and .text() only? You can use a variable to hold the text to be toggled. But please no classes to be turned off and on with .toggle().
has comment: http://stackoverflow.com/comment/46637741
has answer: http://stackoverflow.com/a/29191273
has title: Toggle text of element with jquery
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/29191350
answer count: 3

http://stackoverflow.com/a/29127798
type: Answer
answers question: http://stackoverflow.com/q/29127370
score: 0
has body: Hard to say without seeing your code. The preferred way is to make the heavy calculations and logic on the server side - In case your data and logic is expected to grow in size and complexity. So I'd definately suggest to look into a product like elastic: https://www.elastic.co/ However, if that file is constant (not expected to grow) you could definately implement that using plain javascript on the client.

http://stackoverflow.com/comment/46443550
has text: html data that is
score: 0
comment on: http://stackoverflow.com/q/29106494
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29206061
score: 15
has title: Using Jenkins for Gulp based project
answer count: 3
has answer: http://stackoverflow.com/a/32320397
has answer: http://stackoverflow.com/a/49111141
downvote count: 0
tagged with: gulp
has comment: http://stackoverflow.com/comment/46624389
favorite count: 0
has body: I have a project which uses gulp as a local builder. I want to use Jenkins for versioning my project. How can i setup jenkins for gulp based projects?
tagged with: jenkins
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46623617
has answer: http://stackoverflow.com/a/31548617
tagged with: node.js
tagged with: jenkins-plugins
type: Question
upvote count: 15
tagged with: javascript

http://stackoverflow.com/a/29209798
accepted answer of: http://stackoverflow.com/q/29209511
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29209511
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46630694
has body: Instead of using * use personaldayone: $result = mysql_query("SELECT personaldayone FROM pdaynew WHERE pone = $pone");
has comment: http://stackoverflow.com/comment/46629481

http://stackoverflow.com/q/29185209
score: 1
favorite count: 0
type: Question
has body: I wanted to ask, how can I limit results of search. This is piece of code, responsible for quering. I want to have only five autocomplete items. Source: function( request, response ) { $.ajax({ type : 'post', dataType: "json", data: { 'person':request }, url: 'PersonWatch/all', success: function(data) { response( $.map( data, function(item, i) { return item.person })); } }); }
answer count: 1
has answer: http://stackoverflow.com/a/29185319
upvote count: 1
has title: Limiting results of Jquery UI autocomplete
tagged with: autocomplete
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29185319
type: AnsweredQuestion

http://stackoverflow.com/comment/46399279
has text: @JLILIAmen no, it won't.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29082909

http://stackoverflow.com/comment/46520654
comment on: http://stackoverflow.com/a/29149203
type: AnswerComment
has text: @robue-a7119895 this will get the first element of the document with class example so if you have multiple elements with class example then you might want to do something else...
score: 0
type: Comment

http://stackoverflow.com/a/29184816
has comment: http://stackoverflow.com/comment/46585565
has comment: http://stackoverflow.com/comment/46585685
answers question: http://stackoverflow.com/q/29184604
has comment: http://stackoverflow.com/comment/46585633
score: 0
has comment: http://stackoverflow.com/comment/46585412
has comment: http://stackoverflow.com/comment/46585328
has comment: http://stackoverflow.com/comment/46585840
has comment: http://stackoverflow.com/comment/46585804
type: Answer
has comment: http://stackoverflow.com/comment/46585709
has body: You must specify Requestmethod in controller like @RequestMapping(value = "/loginUser", method = RequestMethod.POST) You must Return Json Values In { } Braces
has comment: http://stackoverflow.com/comment/46585474
has comment: http://stackoverflow.com/comment/46585813

http://stackoverflow.com/q/29134158
has body: My html file has various functions which requires two different jquery versions. In the head section I have them loaded like this: I mostly need to use jquery-2.1.0.min.js so in all my scripts I've replaced every single $ with $jq21. For instance, if I ony include jquery-2.1.0 in my page and leave out v1.6, then the following script works fine. But when I include v1.6, and switch $ to $jq21, and also include the noConflict code, this script doesn't work: Every $ on the page is switched to $jq21 and the scripts won't work. Any ideas? Thank you.
score: 0
has comment: http://stackoverflow.com/comment/46535792
type: Question
has title: Conflicting jquery versions won't work even with $.noConflict(true);
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46493910
tagged with: multiple-versions
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46494002
tagged with: http://stackoverflow.com/tag/html
answer count: 0

http://stackoverflow.com/a/29179948
has comment: http://stackoverflow.com/comment/46576614
score: 1
has comment: http://stackoverflow.com/comment/46578800
has comment: http://stackoverflow.com/comment/46579104
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29179864
has comment: http://stackoverflow.com/comment/46577943
has comment: http://stackoverflow.com/comment/46577122
has comment: http://stackoverflow.com/comment/46578221
answers question: http://stackoverflow.com/q/29179864
has comment: http://stackoverflow.com/comment/46578381
type: Answer
has comment: http://stackoverflow.com/comment/46576629
has comment: http://stackoverflow.com/comment/46578179
has comment: http://stackoverflow.com/comment/46578658
has comment: http://stackoverflow.com/comment/46577632
has comment: http://stackoverflow.com/comment/46578351
has comment: http://stackoverflow.com/comment/46577104
has body: your html code Reg1 Reg2 Reg3 your jquery(make sure you include jquery file) $(document).ready(function(){ $('#reg_number').change(function(){ var reg_number = $(this).val(); var data_String; data_String = 'reg_number='+reg_number; $.post('ajax_file.php',data_String,function(data){ var data= jQuery.parseJSON(data); $('#first_name').val(data.first_name) }); }); }); your php code (ajax_file.php) <?php $reg_number =$_POST['reg_number']; //run your query here to fetch the result and store it in a variable $data echo json_encode($data); exit();` ?>
has comment: http://stackoverflow.com/comment/46578866
has comment: http://stackoverflow.com/comment/46578213
downvote count: 0

http://stackoverflow.com/comment/46430327
comment on: http://stackoverflow.com/q/29099879
score: 0
type: Comment
type: QuestionComment
has text: So, do you want one `Hello` instance per element, or one instance for all elements?

http://stackoverflow.com/q/29131310
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/3091374
has title: Reading asp HiddenField in javascript
has answer: http://stackoverflow.com/a/29132040
tagged with: asp.net
has answer: http://stackoverflow.com/a/29131513
has answer: http://stackoverflow.com/a/29132017
linked to: http://stackoverflow.com/q/28612938
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29131513
accepted answer: http://stackoverflow.com/a/29132017
type: Question
has comment: http://stackoverflow.com/comment/46489448
tagged with: javascript
has body: In .NET 4.5... I am trying to read this hidden field: &lt;asp:HiddenField ID="test2" runat="server" Value="" Visible="false" ClientIDMode="static"/&gt; which the value is being set in the code behind here: public static string TestSessionValue { get { object value = HttpContext.Current.Session["TestSessionValue"]; return value == null ? "" : (string)value; } set { HttpContext.Current.Session["TestSessionValue"] = value; } } TestSessionValue = String.Format("EmployeeCredential_ViewList.aspx?" + Employeeid + "={0}&amp;" + StrIsadmin + "={1}", _empCredential.EmployeeId, IsAdmin); test2.Value = TestSessionValue; and then I am trying to read the value in javascript like so: var hv = $('input[id$=test2]').val(); I have also tried this without success: var hv = $('#test2').val(); How do I successfully read an asp HiddenField value in javascript?

conditional-statements
tags question: http://stackoverflow.com/q/29113962
tags question: http://stackoverflow.com/q/29213392
tag name: conditional-statements
tags question: http://stackoverflow.com/q/29172877
type: Tag

http://stackoverflow.com/q/29165155
has answer: http://stackoverflow.com/a/55420276
possible better answer: http://stackoverflow.com/a/32323249
tagged with: node.js
favorite count: 0
tagged with: c++
has answer: http://stackoverflow.com/a/32323249
has comment: http://stackoverflow.com/comment/46549847
downvote count: 1
upvote count: 24
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/73012913
accepted answer: http://stackoverflow.com/a/55420276
score: 23
has title: Calling JavaScript from C++ with node.js
has body: Is there a way to call JS functions from C++ through node.js (as callbacks or something like that)? If yes, how? I'm searching for it on the web, but haven't found any helpful resource. Thanks in advance
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/9629677
tagged with: javascript
has comment: http://stackoverflow.com/comment/46549799

http://stackoverflow.com/comment/46398542
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29079836
score: 0
has text: Depending on what you want to use this for, from a security perspective it's not a very good solution if the ID increments. Even with the date stamp in front of it you can guess the next value too easily. If this isn't a concern that's fine. However if you explain what it is you are trying to accomplish we may be able to provide an alternative solution.

http://stackoverflow.com/comment/46563449
score: 0
comment on: http://stackoverflow.com/q/29172633
type: QuestionComment
has text: Escape all double and single quotes inside your js var with a backslash \
type: Comment

http://stackoverflow.com/comment/46616158
has text: https://jsfiddle.net/arunpjohny/9k1es0fL/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29202098

http://stackoverflow.com/comment/46420231
type: QuestionComment
has text: What does happen if you do vm.options.add(createOption) instead of document.impForm.vm?
comment on: http://stackoverflow.com/q/29073433
score: 0
type: Comment

http://stackoverflow.com/a/63585170
type: Answer
score: 2
downvote count: 0
has body: Here is another solution, in case it helps $('button').click(function() { var ser = $('#in').val(); var arr = ser.split("-"); var num = parseInt(arr[arr.length - 1]); arr.splice(-1, 1); var str = arr.join ('-'); for (n = 1; n <= 5; n++) { num++; ser = str + '-' + num; $('#result').html($('#result').html() + ' ' + ser); } }); div{width:80%;margin-top:30px;background:wheat;} Go
upvote count: 2
answers question: http://stackoverflow.com/q/29134222

http://stackoverflow.com/comment/98745691
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29071528
has text: Removing "currentBoundValue" from "customColor" calculation improved blink feature. Thanks.
score: 0

http://stackoverflow.com/a/29182957
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29182476
has comment: http://stackoverflow.com/comment/46583343
answers question: http://stackoverflow.com/q/29182476
type: Answer
has comment: http://stackoverflow.com/comment/46582788
downvote count: 0
has comment: http://stackoverflow.com/comment/46583502
has comment: http://stackoverflow.com/comment/46583984
has comment: http://stackoverflow.com/comment/46582422
has body: Since you are using Jekyll, you should just use the Includes feature built in. All you do is have a _includes folder in the root folder of your project, and add a js-css.html file in there with all your &lt;script&gt; and &lt;link&gt; tags to reference the JS and CSS files. Then in your template, you would just have: {% include js-css.html %} in your &lt;head&gt; tag everywhere.
score: 1
has comment: http://stackoverflow.com/comment/46582976
upvote count: 1

http://stackoverflow.com/a/29217717
downvote count: 1
type: AcceptedAnswer
has body: Dojo does not provide any function for dispatching the blur event, however you can trigger it manually. Here is a function you can use that takes a reference to an element node as a paramter: function blur(el){ if(el.fireEvent) // IE el.fireEvent("onblur"); else { var evt = document.createEvent('HTMLEvents'); evt.initEvent("blur", false, true); el.dispatchEvent(evt); } };
accepted answer of: http://stackoverflow.com/q/29215956
answers question: http://stackoverflow.com/q/29215956
score: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/29212545
score: 4
tagged with: angularjs-scope
upvote count: 4
linked to: http://stackoverflow.com/q/11938380
answer count: 2
linked to: http://stackoverflow.com/q/24075447
downvote count: 0
has comment: http://stackoverflow.com/comment/46727480
has title: AngularJS: How to share scope functions and variables with other controllers
favorite count: 0
has comment: http://stackoverflow.com/comment/46724458
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46634653
has answer: http://stackoverflow.com/a/29213296
type: UnansweredQuestion
has body: I've multiple controllers in my application, where I have some duplicate code like: $scope.alert = null; $scope.addAlert = function (message) { $scope.alert = { type: 'danger', msg: message }; }; $scope.clearAlerts = function () { $scope.alert = null; }; What is the recommended way sharing these scope functions and variables in AngularJS? Using controller inheritance?
tagged with: angularjs-controller
has comment: http://stackoverflow.com/comment/46634658
type: Question
has answer: http://stackoverflow.com/a/29212676
tagged with: angularjs-service
has comment: http://stackoverflow.com/comment/46635003
tagged with: javascript
has comment: http://stackoverflow.com/comment/46634645

http://stackoverflow.com/a/29159044
has body: I recommend changing your service to something like the following: .factory('SaveDocuments', function () { var lsKey = 'document', // the key to store the docs in local storage under documents = JSON.parse(localStorage.getItem(lsKey) || '[]'); // initialise from localStorage function saveToLocalStorage() { localStorage.setItem(lsKey, JSON.stringify(documents)); } return { save: function (id, name, link) { if (documents.filter(function (a) { return a.id == id; }).length) { alert('conflict!'); } else { // add to it, documents.push({ id: id, name: name, link: link }); saveToLocalStorage(); } }, del: function (id, name, link) { // clear all if del() is called with no arguments or null for all args if (!id &amp;&amp; !name &amp;&amp; !link) { documents = []; saveToLocalStorage(); return; } var initialLength = documents.length; documents = documents.filter(function (doc) { return (!id || doc.id !== id) &amp;&amp; (!name || doc.name !== name) &amp;&amp; (!link || doc.link !== link); }); // if nothing was removed, show error if (documents.length === initialLength) { alert('conflict!'); } else { saveToLocalStorage(); } } }; }); Note that I correctly initialised it from the local storage state when the application starts (so when you reload the page the data is there correctly), used a variable to hold the only key you use to store the data in local storage (to keep the code DRY), and fixed your del() method so it keeps ones which don't match the deletion criteria or deletes everything if no arguments passed in, then just overwrites the value in local storage with the updated state. NB: You should test this, I did not do any testing to see if this works.
has comment: http://stackoverflow.com/comment/46544988
type: Answer
has comment: http://stackoverflow.com/comment/46552899
answers question: http://stackoverflow.com/q/29158873
has comment: http://stackoverflow.com/comment/46550167
has comment: http://stackoverflow.com/comment/46551584
score: 0

http://stackoverflow.com/a/29179547
upvote count: 2
has body: use below code . use setTimeout function .here 3000 meaning 3 seconds. you can change seconds as per your requirement. The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds.1000 ms = 1 second. or use below code to clear text if you want to use jquery then use below code . see DEMO Add to Cart
type: Answer
answers question: http://stackoverflow.com/q/29179490
score: 2
downvote count: 0

http://stackoverflow.com/q/29214589
has answer: http://stackoverflow.com/a/29274632
has title: AngularJS Error: Requested keys of a value that is not an object. keys@[native code]
upvote count: 3
type: Question
tagged with: angularjs-directive
score: 3
has body: I got an error on mobile browsers and Safari, the project works normally on chrome and firefox with 0 errors. Error: Requested keys of a value that is not an object.keys @[native code] i'm using the following modules 'maticApp.controllers', 'maticApp.directives', 'checklist-model', 'ngRoute', 'ngCookies', 'ui.bootstrap' i tried to remove file by file to determine the error but it's hopeless. here is a link for the project http://matic.imenadigital.com/#/GetStarted Thanks in advance
has comment: http://stackoverflow.com/comment/46638745
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/29118511
answers question: http://stackoverflow.com/q/29118313
type: Answer
has body: You could use the $_POST variable. Or perhaps you should think about storing those variables server side in a PHP Session. &lt;?php session_start(); $_SESSION['tbl'] = $_POST['tbl']; $_SESSION['db'] = $_POST['db']; ?&gt; Then get them out agains &lt;?php session_start(); $table = $_SESSION['tbl']; $db = $_SESSION['db']; ?&gt;
score: 0

http://stackoverflow.com/q/29178385
score: 0
accepted answer: http://stackoverflow.com/a/29178396
answer count: 1
has title: Make a page load at the bottom and move assets up on scroll down
favorite count: 0
has comment: http://stackoverflow.com/comment/46574053
upvote count: 1
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29178396
downvote count: 1
type: Question
has body: This is for a class project. I am making a one page site about space for kids. The idea is to have the page load at the bottom and as you scroll a rocket blasts off etc. I can't find a solution to getting it to load at the bottom without specifying the anchor in the URL.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46574089

http://stackoverflow.com/q/29209442
type: UnansweredQuestion
has title: jquery ajax call fails when data size exceeds 1119 bytes
has answer: http://stackoverflow.com/a/29209655
tagged with: php
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29212516
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46633563
tagged with: ajax
upvote count: 1
favorite count: 0
has body: A button click triggers this code: $("#testButton").click(function() { var str = $("#ptext").html(); $.ajax({ type: "POST", url: "/pages/testfn", data: { thetext: str } }) .done(function(msg) { alert( "success " + msg ); }); }); The php that handles this is this: public function testfn() { $s = $_POST['thetext']; echo strlen($s); } This works perfectly if the amount of text I have in the #ptext div is less than 1120 bytes. More than that and it silently fails. How can I pass more than 1120 bytes to the testfn function?

graphics
tag name: graphics
type: Tag
tags question: http://stackoverflow.com/q/29150278

http://stackoverflow.com/q/29106552
type: Question
tagged with: firebase
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/51964536
has answer: http://stackoverflow.com/a/44283595
has comment: http://stackoverflow.com/comment/46443411
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46444212
has title: Add a timestamp to Firebase "push" method
has body: dataRef is a reference to my Firebase (Javascript web app) and this works perfectly: dataRef.child('comments').push({ comment:comment, username:username }); I want to add a Firebase server-generated timestamp to my "push", so I tried this: dataRef.child('comments').push({ comment:comment, username:username, timestamp:firebase.ServerValue.TIMESTAMP }); That gives me an error, though. The documentation explains how to use it, but I'm not getting it. Is there a syntax modification I can make that will make this work properly?

http://stackoverflow.com/comment/46448312
comment on: http://stackoverflow.com/a/29109260
type: Comment
has text: In _JavaScript_ you get a function overhead for each time you invoke a function, and here we invoke it `myArray.length` times
type: AnswerComment
score: 0

http://stackoverflow.com/q/29179503
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46576086
score: 0
tagged with: single-page-application
answer count: 1
tagged with: angularjs
has body: I'm developing a single page application. I am making use of Angularjs.v1.2.28. I'm making a HTTP GET request to the backend using this code. return { getCategories : function(sessionid,terminalid,tableno,section){ var req = { method: 'GET', url: Config.url+ "/menucategories", params : { 'sessionid' : sessionid, 'terminalid' : terminalid, 'tableno' : tableno, 'section' : section } }; return $http.get(req); }, I make use of the promise object that is returned from service in controller. var categoryPromise = categoryService.getCategories(sessionid,terminalid,tableno,section); categoryPromise.then(function(payload){ var categories = payload.data; if(categories.status.code == "1"){ if(Object.prototype.toString.call(categories) === '[object Array]') { $scope.categories = categories; categoryService.setCategories(categories); $scope.pax = tableService.getPax(); $scope.tablechair = tableService.getChoseTableChair(); } } else{ $location.url("/login"); $scope.errorMsg = categories.status.desc; } },function(errorPayload){ $location.url("/login"); $scope.errorMsg = "Server error while processing the request.Please contact system administrator"; }); It's always the errorCallback is getting called due to the URL getting changed to the browser application URL appended with some malformed characters. The URL which i give is http://localhost:8080/CafexRestful/menucategories But, it gets changed to the browser application URL below http://localhost:8080/CafexMobile/[object%20Object] I have been debugging in Chrome and Firebug. I couldn't resolve it. It may be something which is happening under the hood. The same code is working with another controller and service, where i fetch a different data. Please let me know if you need anymore information. Thanks.
has comment: http://stackoverflow.com/comment/46575994
type: AnsweredQuestion
has title: $http GET URL changes and looks for wrong resource
has answer: http://stackoverflow.com/a/29179673
accepted answer: http://stackoverflow.com/a/29179673

http://stackoverflow.com/q/29186985
answer count: 1
tagged with: javascript
favorite count: 0
has body: I've just started working with Lodash, and am trying to average out any value (at the lowest level) that's an array. No matter what I try, the original JSON persists. Do I need to build a brand new object and push everything into it? Why can't I simply manipulate it like I would an array? function averageIt(mtcs) { function jsonAvg(dataSet) { function avg(elmt) { var sum = 0; for( var i = 0; elmt[i]; i++ ){ sum += parseInt( elmt[i], 10 ); } return Math.round(sum/elmt.length * 100) / 100; } _.forEach(dataSet.json, function(day) { _.mapValues(day, function(n) { return _.isArray(n) ? avg(n) : n; }); }); console.log("JSON Averaged:", dataSet.json); return dataSet; } _.forIn(mtcs.dataSets, function(set) { set = jsonAvg(set); }); console.log("Averaged Metrics:", mtcs); return mtcs; } Regards - - - Really Confused "Programmer"
has title: Manipulating JSON with LoDash
tagged with: lodash
downvote count: 0
type: Question
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/29187268
score: 1
accepted answer: http://stackoverflow.com/a/29187268
tagged with: http://stackoverflow.com/tag/json
upvote count: 1

http://stackoverflow.com/comment/46633499
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29209413
score: 0
has text: Need to encode url and add it into , so that url should not be able to track by the users

http://stackoverflow.com/comment/46485589
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29129658
has text: I see the comments from @Malk. Updated code to reflect those changes. All credits to [@Malk](http://stackoverflow.com/users/575199/malk)
type: Comment

http://stackoverflow.com/q/29168007
has comment: http://stackoverflow.com/comment/46557807
upvote count: 1
has comment: http://stackoverflow.com/comment/46632332
has comment: http://stackoverflow.com/comment/46621676
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/46631152
has comment: http://stackoverflow.com/comment/46630918
has comment: http://stackoverflow.com/comment/46683409
type: Question
has comment: http://stackoverflow.com/comment/46559847
has comment: http://stackoverflow.com/comment/46631487
has comment: http://stackoverflow.com/comment/46631051
has comment: http://stackoverflow.com/comment/46557591
has comment: http://stackoverflow.com/comment/46557544
tagged with: javascript
has comment: http://stackoverflow.com/comment/46554598
has comment: http://stackoverflow.com/comment/46557027
has body: I have a save_video action on my NodesController that does this: format.html { redirect_to video_tag_users_path(@video) } What I want to happen is when it calls that action, it should render my tag_users.js.erb, but it is not. This is my tag_users action: def tag_users authorize! :read, @family_tree @video = Video.find(params[:video_id]) @node = @video.node respond_to do |format| format.html format.js end redirect_to root_path end This is the log of what is happening: Redirected to http://localhost:3000/videos/164/tag_users Completed 302 Found in 23ms (ActiveRecord: 12.3ms) Started GET "/videos/164/tag_users" for 127.0.0.1 at 2015-03-20 08:24:09 -0500 Processing by VideosController#tag_users as HTML Parameters: {"video_id"=&gt;"164"} # truncated for brevity Rendered videos/tag_users.html.erb within layouts/application (0.2ms) This is the file I want it to render: tag_users.js.erb $("#add-video-step-3").html("&lt;%= escape_javascript(render 'videos/tag_users_in_video') %&gt;"); Which then renders this modal _tag_users_in_video.html.erb: &lt;div class="bootstrap-styles" id="add-video-step-5"&gt; &lt;div class="modal-header"&gt; &lt;div class="titles clearfix"&gt; &lt;h2&gt;Tag Users&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Step 3 of 3&lt;/i&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="content"&gt; &lt;div&gt;Tag someone&lt;/div&gt; &lt;%= simple_form_for @node, url: add_tagged_user_node_path(@node), method: :post do |f| %&gt; &lt;%= f.error_notification %&gt; &lt;div class="form-inputs"&gt; &lt;%= f.association :user, label: "Users", collection: @users, as: :check_boxes, checked: @node.user_tags %&gt; &lt;/div&gt; &lt;div class="form-actions"&gt; &lt;%= f.button :submit, class: "btn btn-success ladda-button" %&gt; &lt;/div&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;/div&gt; &lt;/div&gt; Edit 1 So I changed the respond_to block in my tag_users action to this: render 'tag_users.js' But now it is actual…
has comment: http://stackoverflow.com/comment/46560063
has comment: http://stackoverflow.com/comment/46661399
has comment: http://stackoverflow.com/comment/46704660
has comment: http://stackoverflow.com/comment/46649016
has answer: http://stackoverflow.com/a/29209321
has comment: http://stackoverflow.com/comment/46631103
has comment: http://stackoverflow.com/comment/46628296
answer count: 2
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/46554686
linked to: http://stackoverflow.com/q/15041506
has comment: http://stackoverflow.com/comment/46557319
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46623780
has comment: http://stackoverflow.com/comment/46630508
favorite count: 0
has comment: http://stackoverflow.com/comment/46557695
has comment: http://stackoverflow.com/comment/46627960
has comment: http://stackoverflow.com/comment/46630432
has comment: http://stackoverflow.com/comment/46737491
linked to: http://stackoverflow.com/q/4227775
has comment: http://stackoverflow.com/comment/46557362
has comment: http://stackoverflow.com/comment/46631008
has comment: http://stackoverflow.com/comment/46724921
has title: How do I render my JS erb?
has comment: http://stackoverflow.com/comment/46590966
has comment: http://stackoverflow.com/comment/46621991
has comment: http://stackoverflow.com/comment/46554834
has comment: http://stackoverflow.com/comment/46630173
has comment: http://stackoverflow.com/comment/46558440
has comment: http://stackoverflow.com/comment/46554699
has comment: http://stackoverflow.com/comment/46558778
has comment: http://stackoverflow.com/comment/46557431
has comment: http://stackoverflow.com/comment/46629077
has answer: http://stackoverflow.com/a/29243815
has comment: http://stackoverflow.com/comment/46554641
has comment: http://stackoverflow.com/comment/46591484
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46559180

http://stackoverflow.com/q/29093285
linked to: http://stackoverflow.com/q/17083626
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: php
has title: Preview multiple images before upload
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/29093521
has answer: http://stackoverflow.com/a/29093649
has comment: http://stackoverflow.com/comment/46418603
has body: I want to preview multiple images before upload. Secondly I want to remove/deselect the selected file if I choose wrong file. I am working on jquery code but it preview one image at a time. Also I want to select multiple images at a single time. Here is the jquery code. $(document).ready(function() { //To add new input file field dynamically, on click of "Add More Files" button below function will be executed $('#add_more').click(function() { $(this).before($(" ", {id: 'filediv'}).fadeIn('slow').append( $(" ", {name: 'file[]', type: 'file', id: 'file'}), $(" ") )); }); //following function will executes on change event of file input to select different file $('body').on('change', '#file', function(){ if (this.files && this.files[0]) { abc += 1; //increementing global variable by 1 var z = abc - 1; var x = $(this).parent().find('#previewimg' + z).remove(); $(this).before(" "); var reader = new FileReader(); reader.onload = imageIsLoaded; reader.readAsDataURL(this.files[0]); $(this).hide(); $("#abcd"+ abc).append($(" ", {id: 'img', src: 'x.png', alt: 'delete'}).click(function() { $(this).parent().parent().remove(); })); } }); //To preview image function imageIsLoaded(e) { $('#previewimg' + abc).attr('src', e.target.result); }; $('#upload').click(function(e) { var name = $(":file").val(); if (!name) { alert("First Image Must Be Selected"); e.preventDefault(); } }); }); Here is the HTML code Multiple Image Upload Form First Field is Compulsory. Only JPEG,PNG,JPG Type Image Uploaded. Image Size Should Be Less Than 100KB. <?php include "upload.php"; ?>
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: image
has answer: http://stackoverflow.com/a/29093464

http://stackoverflow.com/comment/46398451
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29073445
score: 0
has text: You may try using ternary operator `?:`, like `data = $(($('.tabs').length ? '.tab.active .data', '.data') `, if repetition of `data` bothers you. On the other hand, I would be more concerned about unnecessary change in `data`'s value (in second version) then that repetition - I find assigning variables only once much clearer than doing that twice or more times - but that's just a personal preference. I would even consider wrapping that in function - `function getData(){ if (...) { return ...; } else { return ...; }}; var data = getData();`, but that seems like a bit overengineered ;)

http://stackoverflow.com/q/29129547
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46486596
has comment: http://stackoverflow.com/comment/46485142
has comment: http://stackoverflow.com/comment/46488229
has comment: http://stackoverflow.com/comment/46485915
has comment: http://stackoverflow.com/comment/46485464
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46485317
has comment: http://stackoverflow.com/comment/46484966
has body: i work with this plugin 3d-gallery-with-css3-and-jquery in my website. i want to stop the slider from working, if the screen is less than 900 px. i tried many ways but none of them work for me. any suggestions? if($(window).width() &gt; 900) { $(function() { $('#dg-container').gallery(); }); } $(window).resize(function() { if($(window).width() &lt; 900) { // how to stop the .gallery(); } }); in the slider i have found this code. destroy : function() { this.$navPrev.off('.gallery'); this.$navNext.off('.gallery'); this.$wrapper.off('.gallery'); } but the question is how to use this function?
type: Question
has answer: http://stackoverflow.com/a/29131345
has comment: http://stackoverflow.com/comment/46485388
has title: stop function if window.width less than pixels
has comment: http://stackoverflow.com/comment/46484912

http://stackoverflow.com/comment/46579296
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29181266
type: Comment
has text: Read my edit, it might help you out @user4696819. Moving files directly to the c drive won't be a great idea in my opinion...

http://stackoverflow.com/comment/46441518
score: 0
type: AnswerComment
has text: That does not work. I made a plunker: http://plnkr.co/edit/vvbbiiFprwNiTJTgWlR3?p=preview
comment on: http://stackoverflow.com/a/29103781
type: Comment

http://stackoverflow.com/comment/46609651
comment on: http://stackoverflow.com/a/29177436
score: 0
type: Comment
has text: Thanks for the response - I am using getFloatTimeDomainData instead. I'm trying to figure this out conceptually - where is the 'actual' value changing to effect the sound? Any clarification would be appreciated.
type: AnswerComment

http://stackoverflow.com/q/29067308
has title: Access function from require()'d file
answer count: 1
favorite count: 0
tagged with: npm
has answer: http://stackoverflow.com/a/29067369
tagged with: node.js
type: AnsweredQuestion
has body: Following is a code sample: test.js: function print(t){ console.log(t); } index.js: var test = require('./test.js'); test.print("ok"); I get a test.show is not a function error, and I'm not sure why it won't work if with other npm modules seem to work. I am using browserify to make the require work in the browser. How does requiring files that are not from a module work in npm?
upvote count: 2
score: 1
accepted answer: http://stackoverflow.com/a/29067369
downvote count: 1
type: Question
tagged with: javascript
tagged with: browserify

http://stackoverflow.com/q/29210160
accepted answer: http://stackoverflow.com/a/29210503
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46630726
tagged with: javascript
tagged with: jquery
has body: I am trying to show dropdown list in one cell of jqgrid an onClick of pencil icon(which when click the whole row become editable and dropdown list shows in debit credit ) below picture shows what i try to do my approach is below code what i did ''''''''''''''''''''''''gridfucntion'''''''''''''''''''''''''''''''''''''''' function showMinorityEntryData(){ alert('minoritydatashow'); if($("#reportingPeriodId").val()!="" && $("#parentCmp").val()!=""){ alert('minoritydatashow1111'); // $('#masterDiv').show(); $("#grid").jqGrid({ datatype: 'json', url:'showMinorityData.action?companyId='+companyId+"&parentCmp="+$("#parentCmp").val()+"&reportingPeriodId="+$("#reportingPeriodId").val(), mtype: 'GET', colNames:['Id', 'GlELEMENTNAME', 'Account Type','Pre-Acq-Amount','Share Amount','Actions'], colModel:[ {name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true,size:10},hidden:false,jsonmap:"minorityId"}, {name:'glElementName',index:'glElementName', width:100,editable:false, editrules:{required:true}, editoptions:{size:10},jsonmap:"glElementName"}, {name:'accountType',index:'accountType', width:100,editable:true, editrules:{required:true}, edittype:"select",formatter:'select',editoptions:{ value: "Debit:Debit;Credit:Credit"},editoptions:{size:10},jsonmap:"acntTypeName"}, {name:'preAcqAmount',index:'preAcqAmount', width:100,editable:true, editrules:{required:true}, editoptions:{size:10},jsonmap:"preAcqAmt"}, {name:'shareAmount',index:'shareAmount', width:100,editable:true, editrules:{required:true}, editoptions:{size:10},jsonmap:"shareAmt"}, {name:'actions',index:'actions', sortable:false,width : 50,align : 'center',formatter:actionIcons} ], postData: { }, rowNum:20, rowList:[10,20,40], height: 200, autowidth: true, // rownumbers: true, pager: '#pager', sortname: 'minorityId', viewrecords: true, sortorder: "asc", caption:"Minority Interest", emptyrecords: "Empty records", loadonce: false, loadComplete: function() { }, jsonReader : { root: "rows", page: "page", to…
score: 0
possible better answer: http://stackoverflow.com/a/29210650
has answer: http://stackoverflow.com/a/29210650
has comment: http://stackoverflow.com/comment/46630844
has answer: http://stackoverflow.com/a/29210503
type: AnsweredQuestion
has title: jqgrid dropdown list onclick of icon
tagged with: jqgrid

http://stackoverflow.com/q/29083497
has answer: http://stackoverflow.com/a/29083584
has title: Unable to change background of div containing unordered list
tagged with: javascript
tagged with: jquery
score: 0
has body: Simply want to change the background dynamically, don't seem to be able to do it, what am I missing here? I should clarify, that it is the background of the container div I am trying to change... $('#container').click(function(){ $(this).toggleClass('bgchange'); }); $('#container ul li').click(function(){ $(this).toggleClass('bgchange'); }); Fiddle http://jsfiddle.net/7ed7zs9w/1/
has answer: http://stackoverflow.com/a/29083647
accepted answer: http://stackoverflow.com/a/29083584
has comment: http://stackoverflow.com/comment/46400115
possible better answer: http://stackoverflow.com/a/29083647
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/q/29116352
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/13572129
answer count: 1
has title: How to do validation of hight and width in bootstrap
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: How to do validation of hight and width in bootstrap ? Any body plz help me... company_logo: { validators: { file: { extension: 'jpeg,png,jpg', type: 'image/jpeg,image/png,image/jpg', maxSize: 100024, // 2048 * 1024 message: 'The selected file is not valid' } } }
type: Question
has answer: http://stackoverflow.com/a/29116487

http://stackoverflow.com/a/29136187
has comment: http://stackoverflow.com/comment/46506285
answers question: http://stackoverflow.com/q/29134297
type: Answer
has comment: http://stackoverflow.com/comment/46582693
has comment: http://stackoverflow.com/comment/46582880
has comment: http://stackoverflow.com/comment/46582829
accepted answer of: http://stackoverflow.com/q/29134297
has comment: http://stackoverflow.com/comment/46514279
downvote count: 0
has comment: http://stackoverflow.com/comment/46500416
has comment: http://stackoverflow.com/comment/46557048
has body: There are many problems with your code. 1. Syntax error CasperJS and PhantomJS itself won't show you where the syntax error is, but it is probably in line for(var i = 0, i &lt; page_links.length; i++) {. Change , to ;. And page_links is not defined in this line. You probably meant x. For the future: CasperJS scripts are plain JavaScript. You can use online tools such as jslint.com to find such bugs (and other problems with your code). There is also a misplaced localhost. 2. this this has many meanings depending on where it is placed. a) Global this Take for example the very last line: casper.run(stringifyResult.call(this, urls)); This this is outside of all functions. So it refers to window (yes there are two separate window objects, one inside of the page context and one outside). It doesn't refer to casper which you probably expected. Use: casper.run(stringifyResult.call(casper, urls)); (^ non-final code: see 6.) b) jQuery callback The this inside of: success: function (data) { this.echo("All done."); return this.exit(); }, refers to the jqXHR object of jQuery (btw, you also cannot return something from an asynchronous function inside a function). It has nothing to do with CasperJS. Furthermore, it is impossible to call CasperJS functions from the page context (inside of casper.evaluate()), because the page context is sandboxed. It has no access to variables defined outside (this includes linksArr and server). See this for more information. 3. Unnecessary waitFor Your waitFor will never finish, but you probably designed it this way so that your AJAX request is sent. The problem is that the same broken request will be sent every 20 milliseconds. 4. Sending AJAX request CasperJS provides a utility to send AJAX requests in the page context: __utils__.sendAJAX(). It also blocks the execution by default, so there is no need to wait for the request in a out-of-bound fashion. function stringifyResult(webpages){ var linksArr = linkScraper.call(this, webpages); //send resu…
has comment: http://stackoverflow.com/comment/46547627
has comment: http://stackoverflow.com/comment/46500253
has comment: http://stackoverflow.com/comment/46582596
score: 7
has comment: http://stackoverflow.com/comment/46582743
upvote count: 7
has comment: http://stackoverflow.com/comment/46512946
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46539929

http://stackoverflow.com/comment/46387698
has text: what is `path`? where does it point to? external domain? same domain, different folder? is it `http` or `file` protocol that you are trying to access?
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29076864

http://stackoverflow.com/a/29195231
answers question: http://stackoverflow.com/q/29195050
has body: Here try this code. You can remove onmouseover attribute inside a tag. HTML Startseite JS $(function() { $('a').mouseover(function(){ var str = $(this).find('img').attr('src'); var new_str = str.substring(0,str.length - 4); alert(new_str); }); });
score: 0
type: Answer

query-string
tags question: http://stackoverflow.com/q/29067550
tag name: query-string
tags question: http://stackoverflow.com/q/29188563
type: Tag

http://stackoverflow.com/q/29162715
answer count: 2
tagged with: javascript
score: 0
tagged with: shadow-dom
tagged with: web-component
has answer: http://stackoverflow.com/a/29165631
has title: How to call a function from inside nested components
tagged with: polymer
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29175412
has answer: http://stackoverflow.com/a/29175412
accepted answer: http://stackoverflow.com/a/29165631
has body: I have this code in index.html: asd asd Keep Going welcom 2 and I want to call a function when the user clicks the button. I have tried this in my app.js: function welcomPagePlus() { ... } this polymer code is locate in my primary file so I can't use the Polymer({...}) function. Also the button is deep inside my shadow-dom so it looks like that is the problem. Please help me find how to call a function from the shadow-dom
type: Question

http://stackoverflow.com/a/29136352
type: Answer
has comment: http://stackoverflow.com/comment/46497849
upvote count: 1
has comment: http://stackoverflow.com/comment/46498050
has body: So after reading your question many times I think I get where you are going, and it definitely sounds like an XY problem. An escaped character is just a character; escaping is part of the syntax, not the string itself. If you are building regex dynamically, you will have to double escape special characters. In any case, here's a hacky way to do what you want relying on function stringification: var regex = function(f) { return RegExp(f.toString().match(/return\s+?'([\s\S]+)'/).pop()) } // instead of `RegExp('\\d\\b')` regex(function(){return '\d\b'}) //=&gt; /\d\b/ But again, this is not the way to go; just double-escape your characters manually.
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29136137
answers question: http://stackoverflow.com/q/29136137

http://stackoverflow.com/comment/46473998
score: 0
type: AnswerComment
type: Comment
has text: You were right, I added a timeout before searching the array and now it works. Thanks for your help!
comment on: http://stackoverflow.com/a/29109011

http://stackoverflow.com/a/29254305
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29200556
answers question: http://stackoverflow.com/q/29200556
has body: TinyMCE provides a possibility to add custom button, which allows me to trig any javascript event. It's really sufficient to insert this code inside the page and write some custom jQuery or else code to get elements by id: tinyMCE.init({ ... theme_advanced_buttons1 : 'example,..' setup : function(ed) { // Register example button ed.addButton('example', { title : 'example.desc', image : '../jscripts/tiny_mce/plugins/example/img/example.gif', onclick : function() { ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'})); } }); } });
score: 0

http://stackoverflow.com/a/37976138
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/29138999
has body: I am using MVC Razor with C#, and I got this logic to work in my view by updating it a bit: @if (!string.IsNullOrEmpty(ViewBag.Message)) { &lt;script type="text/javascript"&gt; alert("@ViewBag.Message"); &lt;/script&gt; }
downvote count: 0
type: Answer

http://stackoverflow.com/a/29162093
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29161935
downvote count: 0
answers question: http://stackoverflow.com/q/29161935
type: Answer
score: 2
upvote count: 2
has body: I have updated a part of your code in the form submit event handler: $('form').submit(function () { if (input.val() !== '') { var inputVal = input.val(), activeNumber = $('.ActiveListItem').text(); // gets the selected number // adds the selected number on before the inputValue: ul.append(' ' + activeNumber + ' ' +inputVal + 'X '); if (ul.hasClass('inactive')) { ul.removeClass('inactive') .addClass('active'); } }; input.val(''); return false; }); I have placed your sample here: FIDDLE

http://stackoverflow.com/q/29100814
has answer: http://stackoverflow.com/a/29101206
type: Question
has comment: http://stackoverflow.com/comment/46432192
possible better answer: http://stackoverflow.com/a/29101206
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has body: Maybe is an obvious question but I search on FullCalendar API, SO and google with no results. I wondering if I can change the default cell view of every event into the FullCalendar? For example my current events cell are only showing the time and the title I parsed from the data object. When I try to parse more data in the object I cannot display them into the calendar cell events: [ { title: 'All Day Event', start: '2015-02-01' morecontent : 'MORE CONTENT' // How to display this?? }, { title: 'Long Event', start: '2015-02-07', end: '2015-02-10' morecontent : 'MORE CONTENT' // and this?? } ];
accepted answer: http://stackoverflow.com/a/29107788
answer count: 2
has title: Change the default event cell view in FullCalendar jQuery plugin
has comment: http://stackoverflow.com/comment/46432095
downvote count: 0
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29107788
score: 1
upvote count: 1

http://stackoverflow.com/q/29150480
type: AnsweredQuestion
upvote count: 35
downvote count: 0
has answer: http://stackoverflow.com/a/52045108
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/64993218
tagged with: asp.net-mvc
tagged with: javascript
has body: So here I have list of menus for admin and under them I have Upload news. When this particular menu is clicked, I call a partial view as below. $("#body_data").load("/Admin/GetDailyNews", function () { $("#dailyNews").dataTable({ "lengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]], "columnDefs": [{ "targets": 3, "orderable": false }], "pagingType": "full_numbers", "oLanguage": { "sSearch": "" }, "deferRender": true }); } My PartialViewResult in AdminController is as below: [HttpGet] public PartialViewResult GetDailyNews() { var context=new MyContext(); List&lt;AVmodel.NewsEventsViewModel&gt; model = new List&lt;AVmodel.NewsEventsViewModel&gt;(); List&lt;news&gt; news = (from n in context.news where n.stdate &gt;= System.DateTime.Now orderby n.stdate descending select n).ToList(); foreach (var NEWS in news) { model.Add(new AVmodel.NewsEventsViewModel() { EDate = NEWS.stdate, EDesc = NEWS.brief, EName = Convert.ToString(NEWS.name), NID = NEWS.nid }); } return PartialView("_UploadNews", model); } My _UploadNews.cshtml is as below @model IEnumerable&lt;MCB.Models.BusinessObjects.AVmodel.NewsEventsViewModel&gt; &lt;table id="dailyNews" cellspacing="0" width="100%" class="table table-condensed table-hover table-responsive table-bordered order-column"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Event Date&lt;/th&gt; &lt;th&gt;Event Name&lt;/th&gt; &lt;th&gt;Detailed News&lt;/th&gt; &lt;th class="disabled"&gt;Actions&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; @foreach (var news in Model) { &lt;tr data-row="row_@news.NID"&gt; &lt;td&gt;@news.EDate.Date.ToShortDateString()&lt;/td&gt; &lt;td&gt;@Convert.ToString(news.EName)&lt;/td&gt; &lt;td&gt;@Convert.ToString(news.EDesc)&lt;/td&gt; &lt;td&gt;&lt;button class="btn btn-primary" data-target="#editAddNews" data-toggle="modal" onclick="javascript: EditNews(this);" data-info="data_@news.NID"&gt;&lt;span class="fa fa-edit"&gt;&lt;/span&gt; &lt;/button&gt;&amp;nbsp; &lt;button class="btn btn-danger" onclick="javascript:…
has title: How to reinitialize dataTables with newly fetched data from server using ajax in MVC
has answer: http://stackoverflow.com/a/56688673
accepted answer: http://stackoverflow.com/a/29183567
tagged with: datatables
tagged with: jquery
has answer: http://stackoverflow.com/a/53945499
favorite count: 0
tagged with: ajax
score: 35
possible better answer: http://stackoverflow.com/a/42088677
has answer: http://stackoverflow.com/a/29183567
has answer: http://stackoverflow.com/a/68459554
has answer: http://stackoverflow.com/a/42088677
has answer: http://stackoverflow.com/a/64134586

http://stackoverflow.com/comment/46538851
score: 0
type: Comment
type: QuestionComment
has text: Thanks for the help guys! I see what you're saying Tony, not sure what I was thinking when I wrote that. I'll try that and get back to you PremierBromanov, I was just thinking that might be the problem as I was able to only get it to spawn what appeared to be one platform once. It was probably all of them stacked on top of each other, good observation! vol7ron, I was tired when I wrote this, cut me some slack!
comment on: http://stackoverflow.com/q/29129759

http://stackoverflow.com/q/29185428
tagged with: model-view-controller
type: AnsweredQuestion
upvote count: 1
downvote count: 1
has title: How to handle array in angular js/HTML
type: Question
tagged with: javascript
has body: I'm using a Web API to display values in HTML via Angular. I have 4 attributes: Id, MovieName, Date and Cast. Cast is an array. I don't know how to handle the Cast attribute. Controller.js app.controller('MyController', function ($scope, MyService) { $scope.getemploy = function () { var promise = MyService.getMovies(); promise.then(function (pl) { $scope.Movies= pl.data }, function (error) { $log.error('Some Prob', error); }); } GetMovies()--> will bring movie details(Cast attribute will have male, female lead names in the array). HTML File : {{mov.Id}} {{mov.MovieName}} {{mov.Date}} {{mov.Cast}} But it's not working. I think I'll need some other way to handle Cast attributes, whether in html or angular. My Json output for your reference: [ { "_movieId": 1, "_moviename": "Olympus Has Fallen", "_releaseDate": 2013, "_cast": [ "Gerard Butler", "Dylan McDermott", "Aaron Eckhart", "Angela Bassett" ] } Can anyone please help?
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29185489
has answer: http://stackoverflow.com/a/29185489
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net-web-api
favorite count: 0
has answer: http://stackoverflow.com/a/29185518
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46586473
accepted answer: http://stackoverflow.com/a/29185518

http://stackoverflow.com/q/29149556
has title: How to create JSON data in JS
favorite count: 0
has answer: http://stackoverflow.com/a/29149592
has answer: http://stackoverflow.com/a/29149613
duplicate of: http://stackoverflow.com/q/17778297
answer count: 4
score: -3
has answer: http://stackoverflow.com/a/29149623
has body: I would like to create a json object such as this that I can send to the server: { "email": "some@gmail.com", "profile": { "token": "test" } } I can create the JSON but don't know how to create one that has multiple objects like the one above. This is what I've done so far (In Console) &gt; var dataModel = { email: "somemail@gmail.com", token: "sometoken"} &gt; undefined &gt; dataModel &gt; Object {email: "somemail@gmail.com", token: "sometoken"} The token needs to be inside profile
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29149641
linked to: http://stackoverflow.com/q/17778297
possible better answer: http://stackoverflow.com/a/29149592
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46522089
upvote count: 0
accepted answer: http://stackoverflow.com/a/29149613
tagged with: javascript

http://stackoverflow.com/comment/46625599
score: 0
comment on: http://stackoverflow.com/q/29207013
type: Comment
type: QuestionComment
has text: can you give a fiddle ?? to identify the problem

http://stackoverflow.com/comment/46532930
type: Comment
type: QuestionComment
has text: @Malk It's just a single text string. The code is currently just a generic use of the indexOf() function.
comment on: http://stackoverflow.com/q/29155885
score: 0

http://stackoverflow.com/comment/46560956
has text: @FelixKling , if there are whitespaces, `:empty` will still consider Some data is there , so it considers white spaces . So use of trim is proper
type: AnswerComment
comment on: http://stackoverflow.com/a/29171338
type: Comment
score: 0

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/29218133
tags question: http://stackoverflow.com/q/29146612
tags question: http://stackoverflow.com/q/29065135
tags question: http://stackoverflow.com/q/29106580
tags question: http://stackoverflow.com/q/29139568
tags question: http://stackoverflow.com/q/29181358
tags question: http://stackoverflow.com/q/29207173
tags question: http://stackoverflow.com/q/29096052
tags question: http://stackoverflow.com/q/29084928
tags question: http://stackoverflow.com/q/29149700
tags question: http://stackoverflow.com/q/29120889
tags question: http://stackoverflow.com/q/29148066
tags question: http://stackoverflow.com/q/29169447
tags question: http://stackoverflow.com/q/29091862
tags question: http://stackoverflow.com/q/29152665
tags question: http://stackoverflow.com/q/29080483
tags question: http://stackoverflow.com/q/29111214
tags question: http://stackoverflow.com/q/29092211
tags question: http://stackoverflow.com/q/29181429
tags question: http://stackoverflow.com/q/29111457
tags question: http://stackoverflow.com/q/29179157
tags question: http://stackoverflow.com/q/29175782
tags question: http://stackoverflow.com/q/29111812
tags question: http://stackoverflow.com/q/29104708
tags question: http://stackoverflow.com/q/29094297
tags question: http://stackoverflow.com/q/29128003
tags question: http://stackoverflow.com/q/29159070
tags question: http://stackoverflow.com/q/29138830
tags question: http://stackoverflow.com/q/29098563
tags question: http://stackoverflow.com/q/29200241
tags question: http://stackoverflow.com/q/29196250
tags question: http://stackoverflow.com/q/29145130
tags question: http://stackoverflow.com/q/29131359
tags question: http://stackoverflow.com/q/29099504
tags question: http://stackoverflow.com/q/29134586
tags question: http://stackoverflow.com/q/29190226
tags question: http://stackoverflow.com/q/29153453
tags question: http://stackoverflow.com/q/29118982
tags question: http://stackoverflow.com/q/29062664
tags question: http://stackoverflow.com/q/29195414
tags question: http://stackoverflow.com/q/29118313
tags question: http://stackoverflow.com/q/29111942
tags question: http://stackoverflow.com/q/29174502
tags question: http://stackoverflow.com/q/29208726
tags question: http://stackoverflow.com/q/29144803
tags question: http://stackoverflow.com/q/29202017
tags question: http://stackoverflow.com/q/29185270
tags question: http://stackoverflow.com/q/29112929
tags question: http://stackoverflow.com/q/29072914
tags question: http://stackoverflow.com/q/29071970
tags question: http://stackoverflow.com/q/29120110
tags question: http://stackoverflow.com/q/29209039
tags question: http://stackoverflow.com/q/29153802
tags question: http://stackoverflow.com/q/29169940
tags question: http://stackoverflow.com/q/29141541
tags question: http://stackoverflow.com/q/29130273
tags question: http://stackoverflow.com/q/29161103
tags question: http://stackoverflow.com/q/29090356
tags question: http://stackoverflow.com/q/29152369
tags question: http://stackoverflow.com/q/29166572
tags question: http://stackoverflow.com/q/29146297
tags question: http://stackoverflow.com/q/29174182
tags question: http://stackoverflow.com/q/29093751
tags question: http://stackoverflow.com/q/29216797
tags question: http://stackoverflow.com/q/29181962
tags question: http://stackoverflow.com/q/29130585
tags question: http://stackoverflow.com/q/29138027
tags question: http://stackoverflow.com/q/29132108
tags question: http://stackoverflow.com/q/29147755
tags question: http://stackoverflow.com/q/29135618
tags question: http://stackoverflow.com/q/29181514
tags question: http://stackoverflow.com/q/29205390
tags question: http://stackoverflow.com/q/29142245
tags question: http://stackoverflow.com/q/29070982
tags question: http://stackoverflow.com/q/29077073
tags question: http://stackoverflow.com/q/29205636
tags question: http://stackoverflow.com/q/29130546
tags question: http://stackoverflow.com/q/29188167
tags question: http://stackoverflow.com/q/29138656
tags question: http://stackoverflow.com/q/29100035

http://stackoverflow.com/comment/46526911
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29147834
has text: Yes, I did notice that - however, the array in php is in no way 'private' or declared as so (I even don't know how to do that). But do you think this is the source of the error?

http://stackoverflow.com/q/29217772
score: 2
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29217948
has body: What kind of wizardry is going on in x that isn't going on in y? var x = new Date; var y = { toString: function() { return x.toString(); }, valueOf: function() { return x.valueOf(); } }; String(x) // "Mon Mar 23 2015 18:26:40 GMT+0000 (GMT)" String(y) // "Mon Mar 23 2015 18:26:40 GMT+0000 (GMT)" '' + x // "Mon Mar 23 2015 18:26:40 GMT+0000 (GMT)" '' + y // "1427135200422" Am I on the right lines thinking that x has a primative value that ToStrings as the date string, but y doesn't have the primative value? Edit: For what it's worth, would the following work (ES6 here): var y = { [Symbol.toPrimitive](...args) { return x[Symbol.toPrimitive](...args); } };
answer count: 2
has title: JS valueOf and toString
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29217856
tagged with: tostring

http://stackoverflow.com/q/29178868
tagged with: bookshelf.js
score: 4
has body: I am trying to iterate thru array of objects and add some stuff inside these objects using async function in Node.js. So far my code looks like: var channel = channels.related('channels'); channel.forEach(function (entry) { knex('albums') .select(knex.raw('count(id) as album_count')) .where('channel_id', entry.id) .then(function (terms) { var count = terms[0].album_count; entry.attributes["totalAlbums"] = count; }); }); //console.log("I want this to be printed once the foreach is finished"); //res.json({error: false, status: 200, data: channel}); How can I achieve such a thing in JavaScript?
accepted answer: http://stackoverflow.com/a/29178908
upvote count: 4
has answer: http://stackoverflow.com/a/29179268
answer count: 2
downvote count: 0
tagged with: javascript
has title: make async call inside forEach
has answer: http://stackoverflow.com/a/29178908
favorite count: 0
tagged with: asynchronous
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29179268
type: Question

global
type: Tag
tags question: http://stackoverflow.com/q/29121621
tag name: global
tags question: http://stackoverflow.com/q/29141363

http://stackoverflow.com/comment/46401741
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29080033
type: AnswerComment
has text: Worked like a charm :) Your example was perfect, thank you very much!

http://stackoverflow.com/comment/46476113
type: Comment
has text: This list does not respond to changing data. How to change View to display data?
comment on: http://stackoverflow.com/a/29123094
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46544962
has text: Thank, it works.. but is it correct way to remove files from file input??
score: 0
comment on: http://stackoverflow.com/q/29162747
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29077861
has comment: http://stackoverflow.com/comment/46389236
type: Answer
has body: You are forgetting to insert the controllers for your templates inside the object in when. See below: dogs cats
answers question: http://stackoverflow.com/q/29077725
has comment: http://stackoverflow.com/comment/46389608
score: 0

http://stackoverflow.com/q/29077348
type: Question
linked to: http://stackoverflow.com/q/432493
downvote count: 0
tagged with: javascript
has title: How to match date in string
has comment: http://stackoverflow.com/comment/46388067
has comment: http://stackoverflow.com/comment/46388531
has comment: http://stackoverflow.com/comment/46388577
answer count: 1
accepted answer: http://stackoverflow.com/a/29078100
has comment: http://stackoverflow.com/comment/46394799
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29078100
has body: I'm trying to tease out a date from a block of text. As far as I know, the date will always look similar to Mar 5, 2015 (three-letter month, day with no leading zeros, four-digit year). The block of text is a little more variable, however. For the most part, it looks generally like this: We understand that sometimes your travel plans change. We do not charge a change or cancel fee. However, this property (Hotel Name) imposes the following penalty to its customers that we are required to pass on: Cancellations or changes made after 11:59 AM ((GMT-05:00) Eastern Time (US &amp; Canada)) on Mar 10, 2015 are subject to a 1 Night Room &amp; Tax penalty. The property makes no refunds for no shows or early checkouts. Here's my attempt (val is the variable containing the string): var valDate = val.match("\\\)\\\) on (.*)are"); return valDate[1]; As you can see, I went for the two )) at the end of the timezone (which I believe will always be there, regardless of EST/PST/etc) and the 'are' that immediately follows the date. And this was working very well.... until one of my hotels passed the following: We understand that sometimes your travel plans change. We do not charge a change or cancel fee. However, this property (Hotel Name) imposes the following penalty to its customers that we are required to pass on: cancellations or changes made before 6:00 PM ((GMT-05:00) Eastern Time (US &amp; Canada)) on Mar 15, 2015 are subject to a 1 Night Room &amp; Tax penalty. Cancellations or changes made after 6:00 PM ((GMT-05:00) Eastern Time (US &amp; Canada)) on Mar 15, 2015 are subject to a 1 Night Room &amp; Tax penalty. The property makes no refunds for no shows or early checkouts. And my code returned: Mar 15, 2015 are subject to a 1 Night Room &amp; Tax penalty. Cancellations or changes made after 6:00 PM ((GMT-05:00) Eastern Time (US &amp; Canada)) on Mar 15, 2015 Which is somewhere less than desirable. I think I understand why this is happening, but try though I might I'm not fix…
tagged with: regex
has comment: http://stackoverflow.com/comment/46388283
score: 2
type: AnsweredQuestion
tagged with: match

http://stackoverflow.com/comment/46471774
type: QuestionComment
comment on: http://stackoverflow.com/q/29122322
has text: Also will fail if ` ` is `multiple` as your code will be creating same property more than once and you will also have an extra trailing comma... which is part of the error prone problem
score: 0
type: Comment

http://stackoverflow.com/a/29164006
has comment: http://stackoverflow.com/comment/46547326
upvote count: 1
has comment: http://stackoverflow.com/comment/46547139
has comment: http://stackoverflow.com/comment/46547727
answers question: http://stackoverflow.com/q/29163950
has comment: http://stackoverflow.com/comment/46547194
downvote count: 0
type: Answer
has body: Try with the below code, you can style accordingly $( "span:nth-child(1):contains('Following')" ).css( "background", "#ccc" );
score: 1

http://stackoverflow.com/comment/46607411
comment on: http://stackoverflow.com/a/29192372
score: 0
type: Comment
has text: No problem. Did it work properly in your case????? (it's a bit tricky, if you don't understand: I am available. @КристинаСоколова ) :-)
type: AnswerComment

http://stackoverflow.com/q/29179378
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29179480
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29179398
accepted answer: http://stackoverflow.com/a/29179398
has answer: http://stackoverflow.com/a/29179644
type: AnsweredQuestion
has body: There are multiple elements each with class p1,p2,p3....p14 So, when I try to get text from the class that was clicked,I get the text from all the classes! For example, when the the text has to be 80 it will be 808080080808080808080. Is there a work-around for this, else than giving each an ID? $('.p1,.p2,.p3,.p4,.p5,.p6,.p7,.p8,.p9,.p10,.p11,.p12,.p13,.p14').click(function(event) { if(!playerSelected) { playerName = this.title; // GETS TEXT FROM ALL CLASSES playerNumber = $('.' + this.className + '&gt;strong').text(); console.log(playerName + " : " + playerNumber); playerSelected = true; } });
has title: Getting text from all the classes on a click event
type: Question
possible better answer: http://stackoverflow.com/a/29179644
has comment: http://stackoverflow.com/comment/46575647

http://stackoverflow.com/comment/46505274
score: 0
has text: it still doesn't work.here act_price (actual price)and adv_price(advance price) are id's of 2 text boxes that should be automatically filled on basis of eventtype
type: Comment
comment on: http://stackoverflow.com/a/29130415
type: AnswerComment

http://stackoverflow.com/q/29155248
tagged with: dynamicobject
favorite count: 0
type: Question
tagged with: viewmodel
has comment: http://stackoverflow.com/comment/46533919
has comment: http://stackoverflow.com/comment/46531396
upvote count: 1
has title: How can I handle a dynamic viewModel in my controller?
has comment: http://stackoverflow.com/comment/46531941
tagged with: asp.net-mvc
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46531467
has body: In my controller, my create method takes a viewModel that inherits from DynamicObject. The reason is that I need static properties on the model, but I may also add things to it via JavaScript before I pass it to the controller. So, I have: public class MyViewModel: DynamicObject { public string id {get;set;} } [HttpPost] public IHttpActionResult Create(MyViewModel viewModel) { // save to Db } From the JavaScript (using Angular), I've passed in this viewmodel: var vm = { id: 1, name: "Jim"}; However, this does not work and is throwing me this error: [{"PropertyName":null,"ErrorMessage":null,"ErrorCode":null,"AttemptedValue":null,"CustomState":null}] I haven't found an example of what I'm trying to do, but I would think making an object dynamic would allow for this. What am I missing here?
has comment: http://stackoverflow.com/comment/46531897
answer count: 0
downvote count: 0
tagged with: .net
has comment: http://stackoverflow.com/comment/46533550
has comment: http://stackoverflow.com/comment/46531828
score: 1

http://stackoverflow.com/comment/46491241
comment on: http://stackoverflow.com/q/29132659
score: 0
type: Comment
type: QuestionComment
has text: in your `onclick` event, pass `this` and access it in the showDetails( ) function

http://stackoverflow.com/q/29106661
has comment: http://stackoverflow.com/comment/46443083
has comment: http://stackoverflow.com/comment/46443118
tagged with: javascript
has answer: http://stackoverflow.com/a/29106741
accepted answer: http://stackoverflow.com/a/29106741
has body: Why is it apparently safe to use numbers as integers in Javascript? What I mean is that a loop such as the one below is generally "trusted" to run the expected number of times even though the final loop requires an exact compare of (10000 == 10000) when these two values are floats and not ints. Is there some sort of built-in rounding feature that makes this safe and reliable -- or is this horrible and untrustworthy coding? Thanks. --edit-- It is interesting that there is a declared safe integer range. I was not aware of MAX_SAFE_INTEGER. We all know the standard whine that 2 + 2 = 3.9999. I note that MAX_SAFE_INTEGER is listed as ECMAScript-6 so does this imply that IEEE-754 does not actually mention a safe integer range? var cnt = 0; for (var i=0 ; i&lt;=10000 ; i++){ // loop 10001 times cnt++; } alert('cnt = '+ cnt);
upvote count: 1
tagged with: integer
favorite count: 0
has comment: http://stackoverflow.com/comment/46445081
linked to: http://stackoverflow.com/q/307179
duplicate of: http://stackoverflow.com/q/307179
has comment: http://stackoverflow.com/comment/46443067
type: AnsweredQuestion
tagged with: numbers
downvote count: 0
has answer: http://stackoverflow.com/a/29106732
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/29106732
has title: Javascript -- reliable to use numbers as integers?
answer count: 2

http://stackoverflow.com/a/29069322
score: 12
type: AcceptedAnswer
has body: The only way to know if a server/port is available is to try to actually connect to it. If you knew that the server responded to ping, you could run a ping off the server, but that just tells you if the host is running and responding to ping, it doesn't directly tell you if the server process you want to connect to is running and accepting connections. The only way to actually know that it is running and accepting connections is to actually connect to it and report back whether it was successful or not (note this is an asynchronous operation): var net = require('net'); var Promise = require('bluebird'); function checkConnection(host, port, timeout) { return new Promise(function(resolve, reject) { timeout = timeout || 10000; // default of 10 seconds let socket, timer; timer = setTimeout(function() { reject(new Error(`timeout trying to connect to host ${host}, port ${port}`)); socket.end(); }, timeout); socket = net.createConnection(port, host, function() { clearTimeout(timer); resolve(); socket.end(); }); socket.on('error', function(err) { clearTimeout(timer); reject(err); }); }); } checkConnection("example1.com", 8080).then(function() { // successful }, function(err) { // error })
accepted answer of: http://stackoverflow.com/q/29069111
answers question: http://stackoverflow.com/q/29069111
type: Answer
upvote count: 12
has comment: http://stackoverflow.com/comment/46377036
has comment: http://stackoverflow.com/comment/121246807
has comment: http://stackoverflow.com/comment/121246913
downvote count: 0
has comment: http://stackoverflow.com/comment/46415456
has comment: http://stackoverflow.com/comment/121246590

http://stackoverflow.com/comment/46586152
has text: What is `jsdom.jsdom().parentWindow` supposed to do, you're not passing anything in, it's generally `jsdom.jsdom(html, options)` ?
score: 0
comment on: http://stackoverflow.com/q/29185223
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29352522
score: 0
answers question: http://stackoverflow.com/q/29208417
has body: This is what I've finally came about: Changed the "main.js" file to "main.php" file. On header, changed the to require_once ".../js/main.php" Now you have all the code block on header, but somehow I guess it's exactly the same? Now I can put PHP code on """JS""" main file. And right now I can do something like: var data = []; //Controlled parameters which sure I'll have and always will add manually. data.push({ name: "ajax", value: action }); //add more parameters... data.push({ name: "section", value: section }); //Those "others" POST parameters which can vary depending on the request call. &lt;?php foreach ($_POST as $k=&gt;$v){ ?&gt; data.push({ name: "&lt;?php echo $k;?&gt;", value: "&lt;?php echo $v;?&gt;" }); &lt;?php } ?&gt; ... $.ajax({ type: "POST", url: "?a="+action, //data: { ajax: action, section: section }, data: $.param(data), timeout: 8000 //8 seconds max. }).done(function( data ) { ... And that's it! I've started by creating an object in JS on every view which played with this concept of forwarding POST data. But it was "unmaintainable". Then I thought that could be good to create a JS snipet after main.js inclusion on header precisely with this "object creation POST data", as all the calls are going to be made on $(document).ready(); time, so sure it will be accessible. You know: if it exists use it if not... blah! But the I thought that it is not necessary to create a POST object in JS all the time, as long as sometimes probably big data is going to be on server-side, so do not want to put it on client to. You delivery this "post" thing to the object and with time, you forget on this and start to put things on POST no-one should see and it happens that you have'em absolutely visible on JS! So it seem that your proposed options (SESSIONING the POST via "post" var on session array or by ID screening) should be the most secure in this idea of reusing the info only on server side, but I've found it somehow... "tedious to mantain" too. So I've finally c…
type: Answer

http://stackoverflow.com/q/29106580
favorite count: 0
possible better answer: http://stackoverflow.com/a/29106847
has title: How to disable and enable a radio button at the same time
upvote count: 1
tagged with: php
type: AnsweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/46443875
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46443222
answer count: 2
accepted answer: http://stackoverflow.com/a/29107035
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46443488
score: 0
has answer: http://stackoverflow.com/a/29106847
has answer: http://stackoverflow.com/a/29107035
has comment: http://stackoverflow.com/comment/46443197
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46443036
has body: I have a few radio buttons which are displayed from mysql database. What I'm trying to achieve is when I click the submit button after selecting a radio button, it is disabled and when I click another radio button, the previously disabled one will be enabled and the currently selected radio button will be disabled. My code for displaying the buttons: &lt;form action=""&gt; &lt;?php foreach ($sql-&gt;results() as $sql) {?&gt; &lt;input type="radio" name="session_id" id="cur" value="&lt;?php echo $sql-&gt;id; ?&gt;"&gt; &lt;?php echo $sql-&gt;title;?&gt;&lt;?php }?&gt; &lt;input type="submit" value="submit" onclick="set_type('a')"&gt; &lt;/form&gt; &lt;?php } ?&gt; I have tried to enable and disable some radio buttons on jsfiddle but it only works with different ids whereas my radio buttons have only one id. EDIT: It has been made clear, ids must be unique. I have changed that.

http://stackoverflow.com/q/29122322
tagged with: children
has answer: http://stackoverflow.com/a/29122459
tagged with: javascript
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/29122490
has comment: http://stackoverflow.com/comment/46471724
tagged with: jquery
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46471649
has comment: http://stackoverflow.com/comment/46471101
has answer: http://stackoverflow.com/a/29122490
has comment: http://stackoverflow.com/comment/46471774
type: Question
possible better answer: http://stackoverflow.com/a/29122663
has body: I have a set of controls on my page that I am attempting to iterate through and determine if they have values. Some of these controls are &lt;select&gt; items and in this instance I need to loop through the options associated with the &lt;select&gt; control and find the ones that are selected. I have tried .children() as well as .find("option:selected") and neither of them work (both throw an "undefined" error in javascript). What am I doing wrong? function getJsonValue(control, json) { if(control.dataset["fieldname"] !== "undefined"){ if(control.tagName == "SELECT") { var selected = "{"; var idName = control.dataset["idname"]; control.children.each( function() { if(this.selected) { selected += idName + ": " + this.val() + ","; } }); selected += "}"; if(selected != '') { json += control.dataset["fieldname"] + ": "; json += selected + ","; } } else { if(control.val() != '') { json += control.dataset["fieldname"] + ": "; json += control.val() + ","; } } } }; The error is appearing on line 5 of the above code (control.children.each). I've tried: control.children.each( function() { control.childre().each( function() { control.find("option:selected").each( function() { None of these options work. For reference, the "control" variable is passed from another function that is found by doing the following: $("#search-header").find("select").each( function() { json = getJsonValue(this, json); });
has title: Using .children and .find in jQuery
has answer: http://stackoverflow.com/a/29122663

http://stackoverflow.com/q/29063017
upvote count: 1
downvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has title: Setting up a microsoft access database connection with node.js
has body: Hy guys, I recently started looking into node.js, and I decided to rewrite all the php code to javascript code. That all went well, but now I'm trying to set up a database connection to a microsoft access database. I tried doing something like this: var dbname = "/databases/users.accdb"; var db = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" + dbname + ";Uid=Admin;Pwd=;"); But that doesn't seem to work, since it gives me Uncaught ReferenceError: PDO is not defined error. How would i do this properly? Sincerely, Zeno EDIT: I have set the environment PYTHON variable, downloaded microsoft visual studio 2012, and when I install the odbc module, 300+ error lines are produced. too much to list here obviously, i can't even see the top of the error log in the console... Anyone has an idea what's going on?
score: 0
tagged with: node.js
tagged with: pdo
tagged with: ms-access-2010
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29063057
tagged with: database

http://stackoverflow.com/a/29098966
has body: I have something similar to this in my Maps; is this any help to you: I declared a varible called map: var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); Then did a loop: for (var obj in data) { var pointer = data[obj]; pointer.image = "red_icon.png"; var position = new google.maps.LatLng(pointer.Latitude, pointer.Longitude); pointer.marker = new google.maps.Marker({ position: position, map: map, title: pointer.Title, icon: "../../Content/images/" + pointer.image, custom: { id : pointer.ObjectiveId } }); }
score: 0
answers question: http://stackoverflow.com/q/29098827
type: Answer

http://stackoverflow.com/q/29129759
tagged with: phaser-framework
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46563158
accepted answer: http://stackoverflow.com/a/29130860
has title: Javascript: Running a while loop with an if statement to randomly generate things with a clause
tagged with: do-while
has comment: http://stackoverflow.com/comment/46538851
tagged with: if-statement
has answer: http://stackoverflow.com/a/29131126
tagged with: javascript
has body: Ok, so my question is very specific. I'm attempting to randomly generate a game stage for a 2D platformer I'm making. I want the platforms to be a set distance apart and I want the number of platforms created to be configureable. I believe the best way to do this is with a while loop that has an if statement nested in it, I've attempted it but can't get it working. Here's what I've tried. var numLedges = 10; var lastLedge; var xSpace = randomIntFromInterval(0, 600); var ySpace = randomIntFromInterval(0, 400); var currentLedgeX = xSpace; var currentLedgeY = ySpace; var lastLedgeX = -1000; var lastLedgeY = -1000; var i = 0; var loopCount = 0; var maxLoops = 100; function randomIntFromInterval(min,max) { return Math.floor(Math.random()*(max-min+1)+min); } function createLedges() { do { // This is supposed to make sure the platforms are being created 100px away in any direction if (currentLedgeX &gt; lastLedgeX + 100 || currentLedgeX &lt; lastLedgeX - 100 &amp;&amp; currentLedgeY &gt; lastLedgeY + 100 || currentLedgeY &lt; lastLedgeY - 100) { // Creates a ledge using phaser that is roughly 40 x 40px var currentLedge = stillLedge.create(currentLedgeX, currentLedgeY, 'platform'); currentLedge.body.immovable = true; lastLedgeX = currentLedgeX; lastLedgeY = currentLedgeY; i++; } loopCount++; } while (i != numLedges || loopCount &lt; maxLoops) } This doesn't appear to loop or it turns into an infinite loop somewhat randomly. If someone can think of a better way of doing this or a way to make this work I'd appreciate it. I'm out of ideas and haven't been able to find anything useful on the subject. Here's a quick example of what's happening using an old tutorial's game. CLICK
has comment: http://stackoverflow.com/comment/46487695
tagged with: random
possible better answer: http://stackoverflow.com/a/29131126
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46485699
has answer: http://stackoverflow.com/a/29130860
has comment: http://stackoverflow.com/comment/46485618
type: Question
has comment: http://stackoverflow.com/comment/46487681
has answer: http://stackoverflow.com/a/29131243

http://stackoverflow.com/comment/46545094
comment on: http://stackoverflow.com/q/29162798
score: 0
type: Comment
type: QuestionComment
has text: I tried. but it is the same.

http://stackoverflow.com/q/29092232
has comment: http://stackoverflow.com/comment/46416291
has title: Push array into array with keys
has comment: http://stackoverflow.com/comment/46416465
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46417036
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29092885
accepted answer: http://stackoverflow.com/a/29092885
score: 0
has body: I am currently working with arrays and pushing items into an array. Below I have for loop, inside CasperJS is invoked and links are scrapped and placed in array. Page links are placed in array named page_links and video links in array video_links. However I am trying to merge both arrays into one array. How can I push the items in array with keys? var page_links = []; var video_links = []; for (var i = 0; i &lt; categoryUrls.length; i++) { // start for loop casper.thenOpen(categoryUrls[i], function() { tryAndScroll(this); casper.then(function() { this.getElementsInfo('.title').forEach(function(element) { // skip elements that don't have a href attribute... if (!element.attributes.href) { return; } page_links.push( element.attributes.href ); casper.thenOpen(element.attributes.href, function() { this.click('.responsivewrapper'); }).then(function(){ casper.each(this.getElementsInfo('.badge-youtube-player'), function(casper, element, j) { video_links.push( element["attributes"]["src"] ); }); }); }); }); }); } Desired result { { 'page_link' : 'www.example.com', 'video_link' : 'www.example.com' }, { 'page_link' : 'www.example.com', 'video_link' : 'www.example.com' } }
answer count: 1
tagged with: casperjs

http://stackoverflow.com/comment/46653546
has text: I attempted to require the ngModel instead of creating a scope variable but no luck initially, it just breaks my binding to the TreeView control. I had already looking at the Angular documentation but quite honestly their example is so contrived it doesn't really shed much light on the subject
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29147316

http://stackoverflow.com/a/29185049
score: 1
has body: This would replace comma and a single space with comma. &gt; "Anchor, Island, Super Over, Power Play".replace(/,\s/g, ",") 'Anchor,Island,Super Over, Power Play' OR This would replace one or more spaces after the comma with an empty string. &gt; "Anchor, Island, Super Over, Power Play".replace(/,\s+/g, ",") 'Anchor,Island,Super Over,Power Play'
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29185006

http://stackoverflow.com/a/29397181
has body: An alternative: Rely on the cascade, instead of specificity A number of solutions here recommend using @import to include your css4.css file and then modifying the selectors therein to have a greater specificity or to use the !important declaration, but there is yet another way. Paste the entire contents of css4.css at the end of css3.css. In this way, you need not rely on !important or specificity, because the cascading inheritance will adopt your rules at the end of the file if they are of equal specificity. With this method, you are sacrificing modularity for easier implementation. Example of pasting, relying on cascade: /* Contents of css3.css */ .mycooldiv { font: bold 1.2em sans-serif; color: tomato; } /* Pasted contents of css4.css */ .mycooldiv { color: lime; } Hello World However, it would be easy enough to create greater specificity by simply prepending html to the beginning of every rule in css4.css, if you don't want to paste it at the end of css3.css. This is preferred to adding !important where it works. Example of importing, relying on greater specificity: /* @import of css4.css with greater specificity */ html .mycooldiv { color: lime; } /* Contents of css3.css */ .mycooldiv { font: bold 1.2em sans-serif; color: tomato; } Hello World
downvote count: 0
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29206832

http://stackoverflow.com/comment/46625115
comment on: http://stackoverflow.com/a/29207291
type: AnswerComment
score: 0
type: Comment
has text: I just told you how to do that, why are you downvoting me?

http://stackoverflow.com/comment/107946622
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29123043
has text: If you do it with a div outside the svg your case is quite simple because you just want the "OK" text in the center. You could position it with CSS, no JS needed.

http://stackoverflow.com/comment/46392186
comment on: http://stackoverflow.com/a/29079301
score: 0
type: AnswerComment
has text: Reading the question though I see why that's not clear. That object is the output of `country`, not `countries`.
type: Comment

http://stackoverflow.com/a/29208056
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/29208002
has comment: http://stackoverflow.com/comment/46626409
type: Answer
has comment: http://stackoverflow.com/comment/46670960
has body: y is not defined, so y-600 could not be computed.
downvote count: 1

http://stackoverflow.com/q/29154959
has comment: http://stackoverflow.com/comment/46530857
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46531021
tagged with: javascript
tagged with: jquery
has body: A JavaScript object is used to store error messages. Works great if there are errors, but if no errors (object is blank) the code fails. So, I added the jQuery $.isEmptyObject() test -- and now it fails if there is content. Why does this code fail when trying to read the size of the object? jsFiddle HTML: If visible, code not work jQuery: var tmp; var objErr = new Object(); objErr['test'] = 'bob'; if ($.isEmptyObject(objErr) ){ $('div').hide(); }else{ tmp = Object.size(objErr); //<=== fails here $('div').hide(); //if not work, js is broken } if (tmp > 1){ $('div').hide(); alert(tmp); }else{ $('div').hide(); }
has comment: http://stackoverflow.com/comment/46531034
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46530971
has title: Understanding JavaScript Object.size() with jQuery $.isEmptyObject()
linked to: http://stackoverflow.com/q/5223

http://stackoverflow.com/comment/46413268
type: QuestionComment
comment on: http://stackoverflow.com/q/29062636
score: 0
has text: In facts I want to do it this way, let's say I have a json file and i want to retrieve data from that json file, and now i am stuck in there, i will start a new question tonight.
type: Comment

http://stackoverflow.com/comment/46381993
has text: Thanks for all of your help michael. Im' not sure what was going on but I changed from UTF-8 to iso-8859-1 and it all seems to work. I appreciate all of the tips and the help.
type: Comment
comment on: http://stackoverflow.com/q/29071179
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46501095
score: 0
type: QuestionComment
has text: var test1 = {foo: ['foo'], bar: 'bar'}; var test2 = {foo: test1.foo}; test1.foo[0] = 'new value'; test2.foo;
type: Comment
comment on: http://stackoverflow.com/q/29138381

http://stackoverflow.com/a/29100198
type: Answer
accepted answer of: http://stackoverflow.com/q/29099610
upvote count: 46
score: 46
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29099610
has comment: http://stackoverflow.com/comment/108681107
downvote count: 0
has body: The event argument is still passed, but the rangeId argument is prepended to the arguments list, so your changeRangeName method would look like changeRangeName: function (rangeId, event) { var newName = event.target.value; }, See Function.prototype.bind()

http://stackoverflow.com/a/29215656
has body: Starting with this, here's how to find all siblings matching a selector: var allSiblings = $(this).siblings("the-selector-here"); Here's how to find all following siblings: var allSiblings = $(this).nextAll("the-selector-here"); Here's how to find one following sibling that may not be adjacent: var allSiblings = $(this).nextAll("the-selector-here").first(); More in the API documentation. From your fiddle, I don't know which of those you want, but in a comment you said: I want to write something that is going to select a whole lot of elements. ...which makes me think you want nextAll (without first). Then there's this comment: I need to select the element after this AND this at the same time ...which means you also want .add(this): $(".shapeLeftDiamond").click(function() { var parent = $(this).parent(); var thisShape = $(this).nextAll("div[class^='shapeRight']").add(this); thisShape.height(parent.height() + 20); }) main { height: 200px; width: 200px; background-color: #F13; } .shapeLeftDiamond { float: left; width: 80px; height: 50px; background-color: #FF0; } .shapeRightDiamond { float: right; width: 80px; height: 50px; background-color: #0FF; } Click me Should also grow
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29215600
downvote count: 0
has comment: http://stackoverflow.com/comment/46640824
type: Answer

http://stackoverflow.com/comment/46370771
type: Comment
comment on: http://stackoverflow.com/a/29063474
has text: Can't help you with that, I'm afraid. The only problem in the presented code is the variable name "name". Check your other functions that you use for errors.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46482230
type: Comment
comment on: http://stackoverflow.com/a/29128186
has text: `parseInt` should be given a radix (i.e. 10)
type: AnswerComment
score: 0

http://stackoverflow.com/q/29072649
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
tagged with: zeroclipboard
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29072681
has body: I'm trying to copy text to clipboard by using ZeroClipboard. It works good, but only in the second click on the button and not in the first click. I saw few solutions in Google but none of them fixed my problem. Thanks! $("body").on('click','.copyToClipboard', function (event) { var clientTarget = new ZeroClipboard( $("#copy_to_clipboard"), { moviePath: "js/ZeroClipboard.swf", debug: false } ); $('#copy_to_clipboard').attr('data-clipboard-text', texttocopy); alert(texttocopy); clientTarget.on( "load", function(clientTarget) { $('#flash-loaded').fadeIn(); clientTarget.on( "complete", function(clientTarget, args) { clientTarget.setText( args.text ); $('#data-to-copy-text').fadeIn(); } ); alert(args); } ); });
has title: Jquery - ZeroClipboard works only in second click

http://stackoverflow.com/comment/46561614
has text: That's not correct, have you tried given code in answer. As you can see `'test'` remains unchanged above.
type: AnswerComment
comment on: http://stackoverflow.com/a/29171142
score: 0
type: Comment

http://stackoverflow.com/a/39617937
score: 3
has body: you can use the non-ES6 notation to do that. this is what worked for me: let myModule = null; if (needsToLoadModule) { myModule = require('my-module').default; }
answers question: http://stackoverflow.com/q/29168433
upvote count: 4
type: Answer
downvote count: 1

http://stackoverflow.com/a/29087237
upvote count: 1
has body: The problem is that you are trying to get the element by ID and using [0], I guess you wanna getElementsByTagName because that the result is undefined, the code should be: var changeKey = xmlDoc.getElementsById("t:ItemId").getAttribute("ChangeKey"); Or if "t:ItemId" is a collection: var changeKey = xmlDoc.getElementsByTagName("t:ItemId")[0].getAttribute("ChangeKey");
answers question: http://stackoverflow.com/q/29087084
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46410536

http://stackoverflow.com/q/29125514
tagged with: javascript
score: 0
tagged with: jquery
tagged with: angularjs
has title: Get element in the same context of AngularJS directive (elements with same name, directive on several elements)
has comment: http://stackoverflow.com/comment/46479071
answer count: 0
type: UnansweredQuestion
tagged with: directive
type: Question
has body: I have an issue with using the same directive on several elements. What I want to do is return the selectedindex of the element in a specific directive context. Example: Say I have 6 elements (same class) with the same directive. If I change the select option on one of these elements I want the directive to return the selectedindex of the one I changed. Let's give code a go at clarifying: function changeyvalue() { return { restrict: 'A', link: function (scope, element, attrs) { scope.ifChangeSelect = function () { //Returns selectedindex of last inputfntsize. var a = $(element[0]).prop('selectedIndex'); //Gets parent var selectIndex = $(element).parent(); //Also returns selectedindex of last inputfntsize. var getChildrenParent = selectIndex.children('.inputFntSize').first().prop('selectedIndex'); if (a == 0) { alert("true"); } } } And say I have 6 elements that look like this, (but I also have several parent elements that look the same); &lt;select class="inputFntSize" changeyvalue ng-change="changeIfSelect()" ng-model="test.selectedFontSize" ng-options="fontsize for fontsize in test.fontsizes"&gt;&lt;/select&gt; Basically, I want the selectedindex to be returned of the element I change the value on, and not the last one created. Any ideas on how to do so?
has comment: http://stackoverflow.com/comment/46503048

http://stackoverflow.com/comment/88014840
score: 0
has text: You are a genius, Ximik
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29212899

http://stackoverflow.com/q/29073418
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46381258
linked to: http://stackoverflow.com/q/27437954
has answer: http://stackoverflow.com/a/29073671
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29073671
tagged with: alert
score: 1
upvote count: 1
type: Question
downvote count: 0
tagged with: button
tagged with: sweetalert
tagged with: javascript
has body: I have the same question as this guy: Sweetalert - Call function in Javascript With the answers given in that question I can not figure out the problem. I have downloaded the .js and .css files from http://tristanedwards.me/sweetalert. I have saved them in the same project as I am working in with my script. Then within my .html file I have added the following lines: Title This works with the standard Alert() functionality. Why doesnt it work with sweetAlert? I am assuming multiple .js files could cause the problem since I call for 3 of them.
has title: Using SweetAlert in Javascript
has comment: http://stackoverflow.com/comment/46381035
has comment: http://stackoverflow.com/comment/46381259

http://stackoverflow.com/a/29109575
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29109334
accepted answer of: http://stackoverflow.com/q/29109334
upvote count: 1
has body: Found answer here: Initializing select with AngularJS and ng-repeat So in my case: products
score: 1
type: AcceptedAnswer

http://stackoverflow.com/a/29202166
type: Answer
score: 2
upvote count: 2
has body: A faster way to do it is using .find() cause it will not trigger the somewhat expensive jQuery's Sizzle Selector Library: if( !$(".div").find("&gt;")[0] ){ // Maybe has text, but has absolutely no children Elements. } If you want to be more specific about your selectors, instead of using "&gt;" (any immediate child) you can use "div" aswell, to restrict your search to DIV Elements only. You can also check with "if is empty" $(".div:empty").someMethodYouWant(); // Do some stuff on empty elements. (Really empty) or if( $(".div").is(":empty") ){ // Has no elements and no text } note that the above will yield false if you have just some text (means it's not empty). If you rather want to go for immediate children &gt; elements if( !$(".div:has(&gt;)").length ){ // Maybe has text, but has absolutely no children Elements. } or also: if( !$(".div:has(&gt;)")[0] ){ // Maybe has text, but has absolutely no children Elements. } or even simpler: if( !$(".div &gt;")[0] ){ // Maybe has text, but has absolutely no children Elements. }
accepted answer of: http://stackoverflow.com/q/29202132
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46616436
answers question: http://stackoverflow.com/q/29202132
has comment: http://stackoverflow.com/comment/46616652

http://stackoverflow.com/q/29120520
answer count: 1
tagged with: javascript
has title: disallowTrailingComma does not work in jscs
score: 0
has answer: http://stackoverflow.com/a/29120856
accepted answer: http://stackoverflow.com/a/29120856
has comment: http://stackoverflow.com/comment/46468218
type: AnsweredQuestion
tagged with: jscs
has body: I am using http://jscs.info. I need to get a warning if my app has left trailing comma, example, using: var x = { prop1: 10, prop2: 20, }; I should get a warning. With the following settings: disallowTrailingComma true requireTrailingComma true I cannot get the warning. What I am doing wrong here? { "disallowCommaBeforeLineBreak": null, "disallowDanglingUnderscores": true, "disallowEmptyBlocks": true, "disallowImplicitTypeConversion": [ "string" ], "disallowKeywordsOnNewLine": [ "else" ], "disallowKeywords": [ "with" ], "disallowMixedSpacesAndTabs": true, "disallowMultipleLineBreaks": true, "disallowMultipleLineStrings": true, "disallowMultipleVarDecl": null, "disallowPaddingNewlinesInBlocks": null, "disallowQuotedKeysInObjects": true, "disallowSpaceAfterBinaryOperators": true, "disallowSpaceAfterKeywords": [ "for", "while", "do", "switch" ], "disallowSpaceAfterLineComment": false, "disallowSpaceAfterObjectKeys": null, "disallowSpaceAfterPrefixUnaryOperators": true, "disallowSpaceBeforeBinaryOperators": null, "disallowSpaceBeforeBlockStatements": null, "disallowSpaceBeforePostfixUnaryOperators": true, "disallowSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true }, "disallowSpacesInConditionalExpression": null, "disallowSpacesInFunctionDeclaration": null, "disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInNamedFunctionExpression": null, "disallowSpacesInsideArrayBrackets": null, "disallowSpacesInsideObjectBrackets": null, "disallowSpacesInsideParentheses": null, "disallowTrailingComma": true, // -------------------null "disallowTrailingWhitespace": true, "disallowYodaConditions": true, "maximumLineLength": 120, "requireAlignedObjectValues": "skipWithFunction", "requireBlocksOnNewline": true, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedConstructors": true, "requireCommaBeforeLineBreak": true, "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "r…
tagged with: jshint
type: Question
has comment: http://stackoverflow.com/comment/46468375

http://stackoverflow.com/comment/46581717
comment on: http://stackoverflow.com/a/29182807
has text: Ah, got it. But it is far too complicated. [Inputs use plain text](http://stackoverflow.com/a/29182744/2963652), so there's a much simpler way to achieve this task.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29177741
upvote count: 2
type: Answer
downvote count: 1
score: 1
has body: There is a great JavaScript library called underscore. http://underscorejs.org/ As well as many other very useful functions this library has a simple contains function that can be used to discover contents of an array. Since you are learning I thought it might be useful to inform you about this library. Using indexOf to discover contents of a spring is not an overkill and any type of implementation that you might do to discover elements of a collection will do exactly what indexOf does, iterating over the collection till your target element is found. But I personally find syntax of indexOf very cumbersome (!= -1 hate it) so I try to use it as less as I can.
has comment: http://stackoverflow.com/comment/46597314
answers question: http://stackoverflow.com/q/29177655

http://stackoverflow.com/a/29132751
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29131729
has body: Look at the code you posted: oblique and ortho functions just set and return the given matrix. They're not taking previous transforms into account and they're not returning a new matrix. So you're overwriting your previous transforms and store references to the same matrix within your m and n variables. var oblique = mat4.createMatrix(); var orhto = mat4.createMatrix(); mat4.oblique(oblique, 15, 60); mat4.ortho(-2.0, 2.0, -2.0, 2.0, 0.1, 100, orhto); var pMatrix = mat4.matrixMultiply(oblique, ortho);
has comment: http://stackoverflow.com/comment/46791732
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29131729

http://stackoverflow.com/comment/46395714
score: 0
has text: Yes it was a typo @MikeWeber
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29081066

http://stackoverflow.com/q/29163091
has title: Jquery return from nested function
has comment: http://stackoverflow.com/comment/46545557
has comment: http://stackoverflow.com/comment/46545694
type: Question
tagged with: c#
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Here is my code &lt;input type="file" id="choose" multiple="multiple" /&gt; &lt;br&gt; &lt;div id="uploadPreview"&gt;&lt;/div&gt; function readImage(file) { var reader = new FileReader(); var image = new Image(); reader.readAsDataURL(file); reader.onload = function(_file) { image.src = _file.target.result; // url.createObjectURL(file); image.onload = function() { var w = this.width, h = this.height, t = file.type, // ext only: // file.type.split('/')[1], n = file.name; if (h &lt; 400 || w &lt; 400) { alert('in'); return true; } }; }; } $("#choose").change(function (e) { var F = this.files; alert( readImage( F[0]) ); }); when I upload low image, it always returns undefined Fiddle
score: 0
has comment: http://stackoverflow.com/comment/46545596
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46545902
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46545910
has answer: http://stackoverflow.com/a/29163384

http://stackoverflow.com/q/29134414
has comment: http://stackoverflow.com/comment/46494688
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46494579
has comment: http://stackoverflow.com/comment/46494542
has comment: http://stackoverflow.com/comment/46494669
type: UnansweredQuestion
has title: jQuery array parameter and each()
has comment: http://stackoverflow.com/comment/46494347
has comment: http://stackoverflow.com/comment/46494524
tagged with: object
has comment: http://stackoverflow.com/comment/46494593
has body: I'm new in jQuery world, still learning. I'm trying to understand how can I pass an array parameter reading data from an "each()" loop. Let my try to explain (my native language is Portuguese, sorry). My original code is below: $('#relatorio').DataTable({ (...) columns: [ {visible:$('#c1').is(':checked')}, {visible:$('#c2').is(':checked')}, {visible:$('#c3').is(':checked')} ] }); Since I'll use this in several places (reports), I did a .JS file. But, in each report, I'll have different checkboxes. So I want to scan each checkbox and mount the object array dynamically. I've add a class "colsel" in each checkbox, so I can do: var vCada=[]; $('.colsel').each(function(){ vCada.push({visible:$(this).is(':checked')}); }); Ok, but now I don't know how to replace this directly in there. I had success creating a function that returns the object array: function StatusCols() { var vCada=[]; $('.colsel').each(function(){ vCada.push({visible:$(this).is(':checked')}); }); return vCada; } and then: columns: StatusCols() But I'm not satisfied with this and my newbie knowledge is not helping me :( I've tried: columns: function() { var vCada=[]; $('.colsel').each(function(){ vCada.push({visible:$(this).is(':checked')}); }); return vCada; } So, where is my mistake? Can anyone help me (and teach me)? Thank you!
type: Question
has comment: http://stackoverflow.com/comment/46494527
has answer: http://stackoverflow.com/a/29134691
has comment: http://stackoverflow.com/comment/46494408
tagged with: arrays
answer count: 1

http://stackoverflow.com/q/29171174
has body: I´m having some trouble setting the initial value of my Jquery UI Slider. The main problem (I think) is that the initial value I'm setting is being generated AFTER the slider is created (the initial value is coming from a Jquery.ajax). Here is what I have: &lt;script type="text/javascript"&gt; $(window).load(function(){ function ReadVars() { $.ajax({ //Post to fetch values from computer B url: "somefile.php", type: "post", datatype: "html", data: { foo: "foo", bar: "bar", }, success: function(response){ //Computer B responds with several values separated by // a comma e.g. "0,23,1,hello,etc" var responseSplitted = response.split( "," ); //The second value from the response (in this case 23) //should be the initial value of the slider var SliderStart = responseSplitted[1]; console.log("Slider start = ", SliderStart); }, }); } var Init = false; if( !Init ) { console.log( "Init" ); Init = true; ReadVars(); } setInterval( ReadVars, 10000 ); //Update respond every 10 seconds $("#slider1").slider({ value: SliderStart, //SliderStart should be 23.. but is not working //because SliderStart does not exist at the moment this part is run min: 0, max: 60, slide: function (event, ui) { $("#slider1Value").val(ui.value + " kg"); }, stop: function(){ var value = $(this).slider( "option", "value" ); console.log( "value = ", value ); } }); $( "#slider1Value" ).val( $( "#slider1" ).slider( "value" )); }); &lt;/script&gt; &lt;body&gt; &lt;input id="slider1Value" type="text"&gt; &lt;div id="slider1" style="width:300px;"&gt;&lt;/div&gt; &lt;input type="text" id="slider1Value" /&gt; &lt;/body&gt; If I include the following two lines under the "success: function(response){}", then it works. $( "#slider1" ).slider( "option", "value", SliderStart ); $( "#slider1Value" ).val( $( "#slider1" ).slider( "value" ) + " kg" ); However, I just want to set the initial value once and not every 10 seconds. Is there anyway of doing this?
has title: How to set start value of jquery slider after jquery ajax response?
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29171280
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/46560598
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46560719

http://stackoverflow.com/comment/46414394
has text: And how do I pass the sorted array of middlewares into your function? Can I just use a global variable?
comment on: http://stackoverflow.com/a/29090673
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/57012040
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29091452
upvote count: 3
score: 3
has body: For minimal code lovers, function nthprime(n) { var prime=[], i=1 while (i++ &amp;&amp; prime.length&lt;n) prime.reduce((a,c)=&gt;(i%c)*a,2) &amp;&amp; prime.push(i) return prime.length?prime.pop():-1 } [-1,0,1,2,3,5,10,100].forEach(n=&gt;console.log(`nthprime(${n})=${nthprime(n)}`))
has comment: http://stackoverflow.com/comment/106562024

http://stackoverflow.com/q/29139936
tagged with: cordova
has title: Parsing JSON into C-Style char array with Objective-C
has answer: http://stackoverflow.com/a/29200381
accepted answer: http://stackoverflow.com/a/29200381
has body: While developing a plugin for cordova, I've run into some trouble parsing JSON-Objects that contain C-Style char arrays. The JSON Object looks like: { UUID: "E6DACE68-5F93-4127-AD80-EE8C4AF4D539", primary: true, characteristics: [ { properties:"CBCharacteristicPropertyRead", value: [0x51,0xA2,0x5F,0xFF], permissions:"CBAttributePermissionsReadable", UUID: "54ADDF4D-771A-4029-81FF-20F36210D2F2" }, { properties:"CBCharacteristicPropertyRead", value: [0xAA,0xBB,0xCC,0xDD], permissions:"CBAttributePermissionsReadable", UUID: "14A68648-2FC3-440D-AAA8-818FD73539A3" } ] } I'm parsing this using the following code (see complete version down below, I cut out the important bit for demonstration purposes): NSMutableArray *characteristics = [[NSMutableArray alloc] init]; NSError *error = nil; NSData *jsonService = [[command.arguments objectAtIndex:0] dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary *serviceArgs = (NSDictionary*)[NSJSONSerialization JSONObjectWithData:jsonService options:kNilOptions error:&amp;error]; NSMutableDictionary * characteristicsDictionary = [NSMutableDictionary dictionaryWithCapacity:10]; for (NSDictionary *characteristicArgs in [serviceArgs valueForKey:@"characteristics"]) { NSString *value = [characteristicArgs objectForKey:@"value"]; NSString *props = [characteristicArgs objectForKey:@"properties"]; NSString *permissions = [characteristicArgs objectForKey:@"permissions"]; NSString *uuid = [characteristicArgs objectForKey:@"UUID"]; //NSLog(@"Adding Characteristic: uuid=%@, properties=%@, value=\"%@\", permissions=%@", uuid, props, value,permissions); NSData *dataValue; if (value == (id)[NSNull null] || value.length == 0 ) { //NSLog(@"value is null!"); dataValue = nil; } else dataValue = [value dataUsingEncoding:NSUTF8StringEncoding]; //... //... As you can see, I was using NSString before, but I had to change that, because the data conversion didn't work properly across browsers. Now I want to change the dataValue line to: dataValue = [NSData da…
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
upvote count: 1
answer count: 1
tagged with: objective-c
favorite count: 0

http://stackoverflow.com/comment/46391445
has text: may be u r not actually clicking the iframe.. is there any layer above that or some z-index issue, that is preventing u to click on it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29078453
score: 0

http://stackoverflow.com/comment/46547326
type: AnswerComment
score: 0
has text: with the help of nth-child selector style accordingly
type: Comment
comment on: http://stackoverflow.com/a/29164006

http://stackoverflow.com/q/29088598
tagged with: jquery
score: -4
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46410151
has body: I need Jquery to do event tracking for certain plugins. I get everything to work with the following: &lt;script src="//code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &amp; $('.home .et_pb_more_button').on('click',function() { ga('send', 'event', 'button', 'click', 'case study'); }); Problem...the jquery code breaks the functionality of the website. How can I track events in Google Analytics, but not break the jquery functionality? the site is directiveconsulting.com
tagged with: events
has answer: http://stackoverflow.com/a/29088687
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/46410460
tagged with: google-analytics
has title: Breaks my Site, but I need for Event Tracking
has comment: http://stackoverflow.com/comment/46410327
tagged with: javascript
has comment: http://stackoverflow.com/comment/46410096
downvote count: 4
has comment: http://stackoverflow.com/comment/46410081
upvote count: 0
answer count: 1

http://stackoverflow.com/q/29144604
has answer: http://stackoverflow.com/a/29144763
accepted answer: http://stackoverflow.com/a/29144763
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29144781
score: 8
has answer: http://stackoverflow.com/a/45024009
type: AnsweredQuestion
downvote count: 0
tagged with: twitter-bootstrap
upvote count: 8
type: Question
has title: Bootstrap carousel with responsive HTML5 videos?
tagged with: javascript
has body: I'm trying to make a carousel with videos. With the images it works fine the image are responsive even in mobile view. But with videos the width is responsive but not the height. Basically I would like to achieve the same comportement with a carousel image but with a video. I've tried many tricks online but none is doing it. My video is 1024/552px Tried my best at a fiddle. You can see if you load the fiddle with a small width, it keeps the same height and it isn't responsive but the width of the carousel/video is (it crops the video on the sides though). It doesn't have the same comportement as an image. As you will see I have included an image in the second slide to further demonstrate my problem. https://jsfiddle.net/687bsb21/1/ Here's the code : Your browser does not support the video tag. hello hello hello hello. Previous Next Thanks for helping.
tagged with: html5-video
possible better answer: http://stackoverflow.com/a/29144781
answer count: 3
favorite count: 0

http://stackoverflow.com/comment/46602201
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29194550
type: AnswerComment
has text: @nicael How come? It returns 0 not `auto`

http://stackoverflow.com/q/29147424
score: 1
favorite count: 0
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29147931
type: UnansweredQuestion
tagged with: playframework
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have got different @inputText templates given. They look like that: @inputText( addLiftForm("xyz"), '_label -&gt; null, '_showConstraints -&gt; false, ) Is it possible to use an onchange function on that textfield?
type: Question
tagged with: onchange
has title: play framework templates onchange possible?

http://stackoverflow.com/comment/46524299
has text: thanks! it is very usefull, i'll implement it in the ongoing project and hope i don't mess anything else :p
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29142408

http://stackoverflow.com/a/29155213
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29155153
has body: This would imply that your page will reload every time you click, a more elegant approach would be to use some JavaScript and some AJAX like this onclick="someFunction()" and after that you use some ajax to populate your page.

http://stackoverflow.com/q/29099625
downvote count: 1
answer count: 1
has title: How to add a node to a child object
has comment: http://stackoverflow.com/comment/46431376
tagged with: javascript
type: UnansweredQuestion
upvote count: 0
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29099677
has body: I want to insert an object say-{id:parentid+appendvalue} in each of children array using javascript/jquery. Here is my sample data: var obj={ "name": "root", "id":12, "children": [ { "name": "child-1", "children": [ { "name": "inner-child" } ] }, { "name": "child-2" } ] }; Each object is of the format {name,id,children[]}.Here , I want to insert {id:parentid+".0"} recursively to all children nodes so that , I would get the following output. var obj={ "name": "root", **"id":12**, "children": [ { "name": "child-1", **"id": 12.0** "children": [ { "name": "inner-child", **"id" : 12.0.0** } ] }, { "name": "child-2", **"id": 12.1** } ] }; Please note the children object is not restricted to any level. Please help.
score: -1

http://stackoverflow.com/comment/107682230
type: QuestionComment
type: Comment
has text: Is it really enough? Changing the order of call inside this function will change its behaviour.
comment on: http://stackoverflow.com/q/29072518
score: 0

http://stackoverflow.com/a/29102069
accepted answer of: http://stackoverflow.com/q/29101258
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 11
has body: Thanks to SonarQube mailing list, the solution is to set the following properties: sonar.sources=client sonar.tests=client sonar.exclusions=**/*.spec.js sonar.test.inclusions=**/*.spec.js
upvote count: 11
answers question: http://stackoverflow.com/q/29101258

http://stackoverflow.com/comment/46526099
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29151303
has text: i am getting images from istagram api

http://stackoverflow.com/a/29171467
answers question: http://stackoverflow.com/q/29171276
score: 2
has body: I am too lazy to start up a VM, but if I remember right IE8 does not return quotes. A simple console.log(d) would verify that. pattern = /id="?subblock_(\d+)"?/,
type: AcceptedAnswer
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46561176
accepted answer of: http://stackoverflow.com/q/29171276
downvote count: 0

http://stackoverflow.com/a/29081212
has body: function createImg(param) { var img = $('&lt;img&gt;'); img.attr('src', $(this).attr("data-src")); //img.appendTo(".image-cont", this); $(".image-cont", this).append(img); } Using append rather than appendTo solved this.
accepted answer of: http://stackoverflow.com/q/29081179
answers question: http://stackoverflow.com/q/29081179
has comment: http://stackoverflow.com/comment/46403227
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29072182
tagged with: arrays
accepted answer: http://stackoverflow.com/a/29112497
tagged with: javascript
tagged with: ajax
score: 0
answer count: 4
has title: Retrieve json array on ajax success and loop json array
has body: I'm getting and json array on ajax success. I just encode it on my controller class and then get it on success. Here is my json var info = { "full_name" : "Ray Villalobos", "title" : "Staff Author", "links" : [ { "blog" : "http://example.com", "facebook" : "http://facebook.com/example", "youtube" : "http://www.youtube.com/example", "podcast" : "http://feeds.feedburner.com/example", "twitter" : "http://twitter.com/example" }, { "blog" : "http://example.com", "facebook" : "http://facebook.com/example", "youtube" : "http://www.youtube.com/example", "podcast" : "http://feeds.feedburner.com/example", "twitter" : "http://twitter.com/example" }, { "blog" : "http://example.com", "facebook" : "http://facebook.com/example", "youtube" : "http://www.youtube.com/example", "podcast" : "http://feeds.feedburner.com/example", "twitter" : "http://twitter.com/example" } ] }; right now, I'm retrieving the key and values like this if my link has only one dataset instead of an array: for ( key in info.links ) { if (info.links.hasOwnProperty(key)) { output += '&lt;li&gt;' + '&lt;a href = "' + info.links[key] + '"&gt;' + key + '&lt;/a&gt;' + '&lt;/li&gt;'; } //if the links has the key property } // for...go through each link how do I retrieve array key,values in my loop?
tagged with: php
has answer: http://stackoverflow.com/a/29112497
has comment: http://stackoverflow.com/comment/46378698
has answer: http://stackoverflow.com/a/29072244
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46378613
possible better answer: http://stackoverflow.com/a/29072244
has answer: http://stackoverflow.com/a/29072289
has answer: http://stackoverflow.com/a/29074173
type: Question

http://stackoverflow.com/a/29112021
answers question: http://stackoverflow.com/q/29111481
score: 0
type: Answer
has body: It does not work because of the parentheses in your RegEx constructor definition that create another capturing group. var query = new RegExp("(\\b" + text + "\\b)", "gim"); The regex I'd use is ([a-z])([a-z])([a-z])\3\2\1, and it should be hard-coded. Here is the function: function highlightSearch() { var text = document.getElementById("query").value; var query = new RegExp("(?:\\b([a-z])([a-z])([a-z])\\3\\2\\1\\b)", "gim"); var e = document.getElementById("searchtext").innerHTML; var enew = e.replace(/(&lt;span&gt;|&lt;\/span&gt;)/igm, ""); document.getElementById("searchtext").innerHTML = enew; var newe = enew.replace(query, "&lt;span&gt;$&amp;&lt;/span&gt;"); document.getElementById("searchtext").innerHTML = newe; }

http://stackoverflow.com/q/29100426
has title: JavaScript: Function not modifying the actual array
has comment: http://stackoverflow.com/comment/46431321
has answer: http://stackoverflow.com/a/29100515
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29100515
has comment: http://stackoverflow.com/comment/46431135
has comment: http://stackoverflow.com/comment/46431193
type: AnsweredQuestion
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46431297
has body: I have arrays like this: [ 'markdown', [ 'para', '\'example\'' ] ] And I have a function that finds recursively the strings inside those arrays: function traverse(tree, callback) { for (var i = 0; i &lt; tree.length; ++i) { if (_.isArray(tree[i]) || _.isObject(tree[i])) { traverse(tree[i], callback) } else { callback(tree[i]) } } } The problem is, when I perform tasks like replace what's being replaced isn't the actual array but just copies of its nodes. Example: function replaceQuotes(tree, callback) { traverse(tree, function(node) { node = node.replace(/'/g, '"') console.log(node) // outputs: "example" }) callback(null, tree) } function showResult(err, tree) { console.log(tree) // outputs [ 'markdown', [ 'para', '\'example\'' ] ] } How can I do it so I can I modify the actual arrays with the transverse function? (By the way, I'm using the Async Node.js module.)
linked to: http://stackoverflow.com/q/51185
answer count: 1
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/a/29217948
has comment: http://stackoverflow.com/comment/46644915
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29217772
has body: The behavior of + is defined in 11.6.1 The Addition operator ( + ) The production AdditiveExpression : AdditiveExpression + MultiplicativeExpression is evaluated as follows: Let lref be the result of evaluating AdditiveExpression. Let lval be GetValue(lref). Let rref be the result of evaluating MultiplicativeExpression. Let rval be GetValue(rref). Let lprim be ToPrimitive(lval). Let rprim be ToPrimitive(rval). If Type(lprim) is String or Type(rprim) is String, then Return the String that is the result of concatenating ToString(lprim) followed by ToString(rprim) Return the result of applying the addition operation to ToNumber(lprim) and ToNumber(rprim). See the Note below 11.6.3. NOTE 1 - No hint is provided in the calls to ToPrimitive in steps 5 and 6. All native ECMAScript objects except Date objects handle the absence of a hint as if the hint Number were given; Date objects handle the absence of a hint as if the hint String were given. Host objects may handle the absence of a hint in some other manner. Therefore, according to the definition of ToPrimitive and DefaultValue, ToPrimitive returns x.toString() for x, because x is a Date object, so it's like the hint were String. ToPrimitive returns y.valueOf() for y, because y is a non-Date native object, so it's like the hint were Number. Thus, the addition operator returns different results.
has comment: http://stackoverflow.com/comment/46644991
downvote count: 0

http://stackoverflow.com/comment/46590357
comment on: http://stackoverflow.com/q/29187436
type: Comment
type: QuestionComment
score: 0
has text: yes, it was exactly it

http://stackoverflow.com/q/29092180
upvote count: 2
has comment: http://stackoverflow.com/comment/46416308
tagged with: socket.io
has comment: http://stackoverflow.com/comment/46416453
tagged with: javascript
type: UnansweredQuestion
score: 2
answer count: 0
downvote count: 0
tagged with: jquery
favorite count: 0
has title: I called Socket.io function and Uncaught TypeError: undefined is not a function
type: Question
has comment: http://stackoverflow.com/comment/46416570
tagged with: sockets
has body: I'm making socket.io chat application, and I got trouble at javascript. this is my javascript file (client) and At $('body').on("submit", ".chat_form", function(){ socket.emit('chat message', $('.chat_form').firstChild().val()); $('.chat_form').firstChild().val(''); return false; }); " socket.emit('chat message', $('.chat_form').firstChild().val()); " brings Uncaught TypeError: undefined is not a function and I think it is about javascript problem. Is anybody could help me?
tagged with: node.js

http://stackoverflow.com/comment/46415230
type: Comment
has text: Thanks @RexAdrivan technically you answer my question and it works great, however it doesnt really appear like i wanted it to appear. I have this list that i had sucessfully populated with json object, like shown in the image at imgur.com/0604jKc and im trying to use the code that you had fix for me and append it out like so imgur.com/w2XBn1t imgur.com/Iu8gHTe CC: DelightedD0D & dvhh
comment on: http://stackoverflow.com/a/29090413
score: 0
type: AnswerComment

http://stackoverflow.com/q/29178819
has comment: http://stackoverflow.com/comment/46574742
tagged with: web-applications
has title: How to make flat buttons in webix
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46574788
tagged with: webix
has comment: http://stackoverflow.com/comment/46574761
score: 0
has body: As far as I can tell, webix's default buttons looks like this: I saw in a demo, however, "flat" type buttons like this: How do I go about making my navigation buttons look like that? I do not see anything about it in the documentation.
possible better answer: http://stackoverflow.com/a/29178892
tagged with: flat
accepted answer: http://stackoverflow.com/a/29210998
has comment: http://stackoverflow.com/comment/46574765
tagged with: css
has answer: http://stackoverflow.com/a/29210998
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29178892

http://stackoverflow.com/comment/46368676
type: Comment
comment on: http://stackoverflow.com/q/29066487
score: 0
type: QuestionComment
has text: No, I don't have the website/url. I just came across this situation while was reading something else and decided to ask if there are some common rules for that.

http://stackoverflow.com/comment/46555060
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29168270
score: 1
has text: And what is the problem?

http://stackoverflow.com/a/29185194
score: 2
has body: The variable 'velocity' is the term of a geometric progression (see e.g., http://en.wikipedia.org/wiki/Geometric_progression) while 'position' is the sum of terms of a geometric progression, so you could replace the for loop in your code with this: var power = Math.pow(friction, times); position += velocity * (1 - power) * friction / (1 - friction); velocity *= power; However, it is unclear to me if removing the for loop really yields something better efficiency-wise or precision-wise. Indeed, it depends on Math.pow implementation details, which in turn should also use some loop.
upvote count: 2
answers question: http://stackoverflow.com/q/29184696
has comment: http://stackoverflow.com/comment/46586081
type: Answer
downvote count: 0

sequelize.js
tags question: http://stackoverflow.com/q/29187776
type: Tag
tags question: http://stackoverflow.com/q/29165644
tags question: http://stackoverflow.com/q/29147825
tag name: sequelize.js

http://stackoverflow.com/comment/46574448
score: 0
has text: If it helps, it seems like they may be using this plugin: http://codecanyon.net/item/layered-popups-for-wordpress/5978263
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29178592

http://stackoverflow.com/comment/46387969
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29077176
type: Comment
has text: @PaulParton It's just how it is, and makes sense really. Think "unix pipe" as per the edit. There are no "wildcard" operators here either. You get what you ask for.

http://stackoverflow.com/q/29110479
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29110546
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have the regex ^\(\d+\) which is designed to match parentheses containing digits and which does what is expected. I want to extend this to match digits in parentheses followed by a space followed by a string which comes from a variable. I know that I can crate a RegExp object to do this but am having trouble understanding which characters to escape to get this to work. Is anybody able to explain this to me?
has answer: http://stackoverflow.com/a/29110546
has title: Which characters to escape when using RegExp object in JavaScript?
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/29104372
tagged with: css
has title: Imported file is undefined
type: AnsweredQuestion
has body: Solution My question was asked with little knowledge in HTML and JavaScript, I apologize for this. With more experience I can clearly see that this was not a good question asked, anyway the solution to my question was simply that the source file was not in the corresponding library. The thing is, when I click on "live preview" in brackets IDE, I can see the dynamic diagram I have created, but when I double click on the index.html file, it is showing the navigation bar, but not the dynamic chart....So the difference is: - Live priview: is showing the navigation-bar with the dynamic chart - Double click on index.html: showing just the navigation-bar without the dynamic chart....? Btw: I have also tested this in localhost with xamp, same problem there with no dynamic chart... Here is my code: index.html: Toggle navigation KPEC 5 6 7 8
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29104688
accepted answer: http://stackoverflow.com/a/29104688
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29104266
has comment: http://stackoverflow.com/comment/46439849
type: UnansweredQuestion
score: 0
tagged with: typescript
has answer: http://stackoverflow.com/a/29104792
has body: I have a simple .html page like this : &lt;/html&gt; &lt;head&gt; &lt;script type="text/javascript" src="jquery/jquery-1.8.2.js"&gt;&lt;/script&gt; ... &lt;script type="text/javascript"&gt; var obj; function document_load() { obj = new mySpace.myClass(); console.log("end document load"); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="document_load()"&gt; ... ... &lt;/body&gt; &lt;/html&gt; myClass is a TypeScript class with this constructor : public constructor() { console.log("begin constructor"); (&lt;any&gt;$).when( jQuery.getJSON('path/myJson1.json', function (data) { this.obj1 = data; console.log("here1"); }), jQuery.getJSON('path/myJson2.json', function (data) { this.obj2 = data; console.log("here2"); }) ).then(function () { if (this.obj1 &amp;&amp; this.obj2) { console.log("here3"); this.obj3 = new myClass3(); this.obj4 = new myClass4(); console.log("everything went ok"); } }); } Actually the console prints this : begin constructor end document load here1 here2 The reason of this behaviour is (of course) cause of asynchronous jQuery calls (or at least I guess). How can I obtain the following behaviour? begin constructor here1 here2 here3 everything went ok end document load I clarify that the jsons are taken correctly (I tried to print them and they are correct).
linked to: http://stackoverflow.com/q/24398699
type: Question
has title: jQuery.when() need to be cleared up
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29110376

http://stackoverflow.com/comment/46978414
comment on: http://stackoverflow.com/q/29119812
type: Comment
type: QuestionComment
has text: One thing that's definitely going to go wrong here is that you're evaluating the reference to the `settingsView` before you tap the settings button.
score: 0

http://stackoverflow.com/q/29191876
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/18567994
has body: Color must start from center point and with transition time. I have used all css transitions but no one gave me effect which i want. Its not a duplicate because i want with css only.
tagged with: javascript
tagged with: jquery
has title: Fill background color in on hover as animation that starts from center point and goes outerwards
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46597585
duplicate of: http://stackoverflow.com/q/18567994
tagged with: css
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29193713
accepted answer: http://stackoverflow.com/a/29193713
score: -1

http://stackoverflow.com/q/29204404
favorite count: 0
has comment: http://stackoverflow.com/comment/46620006
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
has title: Mysql datetime string format as human readable date in angularjs?
has answer: http://stackoverflow.com/a/29204789
has body: I am retrieving date-time string from server and displaying to user in angularJs. I want to format date-time string in to human readable format. I prefer 10 sec ago type of format. How it is possible in angularjs? My Date String given below "created_at": "2015-03-22 16:10:02", I have tried with following function and filter but not working, $scope.convertToDate = function (stringDate) { var dateOut = new Date(stringDate); dateOut.setDate(dateOut.getDate() + 1); return dateOut; }; filter,
type: Question
tagged with: javascript
tagged with: date
score: 0
has comment: http://stackoverflow.com/comment/75748648
upvote count: 1
linked to: http://stackoverflow.com/q/20709910
answer count: 1
downvote count: 1
tagged with: jquery

http://stackoverflow.com/a/29204207
has comment: http://stackoverflow.com/comment/47662382
type: Answer
has comment: http://stackoverflow.com/comment/47840467
has body: Take a look here for lots of good answers and discussion: Resizing an iframe based on content Long story short, if the iFrame is a cross-domain request you're going to have a bad time. Built-in browser security measures make the content within an iFrame difficult to access (on purpose).
answers question: http://stackoverflow.com/q/29204099
score: 0

http://stackoverflow.com/comment/46383900
has text: Ah of course. Thanks a lot for the answer. Is it a stupid idea to use them today? I am thinking about the loading time and so on. Does it matter today?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29075053
type: QuestionComment

cookies
tags question: http://stackoverflow.com/q/29133257
tags question: http://stackoverflow.com/q/29179731
tags question: http://stackoverflow.com/q/29071302
tags question: http://stackoverflow.com/q/29195949
type: Tag
tags question: http://stackoverflow.com/q/29126790
tags question: http://stackoverflow.com/q/29089502
tags question: http://stackoverflow.com/q/29208312
tags question: http://stackoverflow.com/q/29187322
tags question: http://stackoverflow.com/q/29179291
tags question: http://stackoverflow.com/q/29180201
tags question: http://stackoverflow.com/q/29179087
tags question: http://stackoverflow.com/q/29144493
tags question: http://stackoverflow.com/q/29065928
tags question: http://stackoverflow.com/q/29198984
tags question: http://stackoverflow.com/q/29114345
tag name: cookies
tags question: http://stackoverflow.com/q/29100868
tags question: http://stackoverflow.com/q/29154823
tags question: http://stackoverflow.com/q/29097364
tags question: http://stackoverflow.com/q/29204572
tags question: http://stackoverflow.com/q/29159349
tags question: http://stackoverflow.com/q/29149834
tags question: http://stackoverflow.com/q/29115827
tags question: http://stackoverflow.com/q/29139296
tags question: http://stackoverflow.com/q/29211232
tags question: http://stackoverflow.com/q/29125717
tags question: http://stackoverflow.com/q/29209558

http://stackoverflow.com/a/29119005
has body: The observable array will only listen to changes to the array itself, you also need the members onthe Person to be observables if you want them to update
answers question: http://stackoverflow.com/q/29118457
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46465666
score: 1
has comment: http://stackoverflow.com/comment/46469084

http://stackoverflow.com/comment/46417614
type: Comment
has text: Is this an SQL query?
type: QuestionComment
comment on: http://stackoverflow.com/q/29092987
score: 0

http://stackoverflow.com/comment/46362822
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29063391
score: 0
has text: How do you test that data contains only title?

karma-jasmine
tags question: http://stackoverflow.com/q/29140698
tags question: http://stackoverflow.com/q/29150998
type: Tag
tags question: http://stackoverflow.com/q/29149587
tags question: http://stackoverflow.com/q/29124416
tags question: http://stackoverflow.com/q/29165262
tags question: http://stackoverflow.com/q/29192367
tag name: karma-jasmine

http://stackoverflow.com/a/29096413
has body: The error describes the problem perfectly. myApp is not defined. Define it with var myApp
answers question: http://stackoverflow.com/q/29096355
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/46528023
comment on: http://stackoverflow.com/q/29153384
type: Comment
type: QuestionComment
has text: Have you read the documentation? Because ``ng-click`` is one of the basic directives. Most tutorials use it in their examples.
score: 0

http://stackoverflow.com/comment/46398877
type: Comment
type: QuestionComment
has text: Is there any other code in your page that uses the Google Maps Javascript API v3 (before the onload event fires)? Can you provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve) that demonstrates the issue?
comment on: http://stackoverflow.com/q/29080540
score: 0

http://stackoverflow.com/comment/46457193
type: Comment
comment on: http://stackoverflow.com/a/29114260
has text: Thanks, this is better. However, I need the function to reverse only after 20 seconds.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46389853
score: 0
comment on: http://stackoverflow.com/q/29078231
type: QuestionComment
has text: use common class for the elements that you want to enable.
type: Comment

http://stackoverflow.com/q/29141926
has comment: http://stackoverflow.com/comment/46508165
has comment: http://stackoverflow.com/comment/46508384
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46508047
has comment: http://stackoverflow.com/comment/46507998
has body: I am trying to write a wrapper library of D3 constructs and have hit a hurdle for the following one http://vallandingham.me/gates_bubbles/. This is written in coffee script which I translated into javascript. Here is the code: (function () { var $, DD3; DD3 = window.DD3 = {}; $ = jQuery; function AJAX(uri, cons) { $.ajax({ url: uri, type: 'GET', dataType: 'json', async: true, error: function (jqXHR, textStatus, errorThrown) { alert(uri); } }).done(function (data) { cons.data = data; cons.generate(); }); } // Other constructs DD3.Bubble_Force = (function(){ function Bubble_Force(options){ if (!(this instanceof DD3.Bubble_Force)) { return new DD3.Bubble_Force(options); } if (typeof options.element === 'string') { this.el = $(document.getElementById(options.element)); } else { this.el = $(options.element); } if (this.el === null || this.el.length === 0) { throw new Error("Graph placeholder not found."); } var div = this.el[0]; var _THIS = this; Bubble_Force.prototype.width = options.width !== "undefined" &amp;&amp; options.width !== null ? options.width : $(div).parent().width(), Bubble_Force.prototype.height = options.height !== "undefined" &amp;&amp; options.height !== null ? options.height : 500; Bubble_Force.prototype.data = typeof options.data === "string" ? {} : options.data; Bubble_Force.prototype.generate = function(){ var layout_gravity = -0.01, damper = 0.1, vis = null, circles = null, force = null, fill_color = d3.scale.ordinal().domain(["low", "medium", "high"]).range(["#d84b2a", "#beccae", "#7aa25c"]), year_centers = { "2008": { x: this.width / 3, y: this.height / 2 }, "2009": { x: this.width / 2, y: this.height / 2 }, "2010": { x: 2 * this.width / 3, y: this.height / 2 } }, max_amount = d3.max(_THIS.data, function(d) { return parseInt(d.total_amount); }), radius_scale = d3.scale.pow().exponent(0.5).domain([0, max_amount]).range([2, 85]), center = { x: this.width / 2, y: this.height / 2 }, nodes = []; var d; for(d in this.data){ d = this.data[d]; var node …
has title: force.start() initialises x, y, px and py to NaN in force layout of d3
has comment: http://stackoverflow.com/comment/46509422
tagged with: javascript
has comment: http://stackoverflow.com/comment/47965508
favorite count: 0
has comment: http://stackoverflow.com/comment/46508477
has comment: http://stackoverflow.com/comment/46508051
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46509167
score: 5
upvote count: 6
has comment: http://stackoverflow.com/comment/46507938
has comment: http://stackoverflow.com/comment/46509995
answer count: 0
has comment: http://stackoverflow.com/comment/46507557
tagged with: d3.js
has comment: http://stackoverflow.com/comment/46507795

http://stackoverflow.com/a/29148898
score: 0
answers question: http://stackoverflow.com/q/29109630
type: Answer
has body: Seems like this was user error as I can't reproduce it anymore.
accepted answer of: http://stackoverflow.com/q/29109630
type: AcceptedAnswer

http://stackoverflow.com/comment/46589550
type: Comment
comment on: http://stackoverflow.com/a/29186699
type: AnswerComment
has text: Why `window.location.href.slice(window.location.href.indexOf('?') + 1)` is better than `location.search.substring(1)` ?
score: 0

http://stackoverflow.com/a/29195601
has comment: http://stackoverflow.com/comment/46605140
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46605403
has body: You should use ngOptions : all users Then the binding will work. See updated plnkr Edit, concerning the following question in comment : could you please explain, why it is not working with ng-repeat? You can achieve the same visual result with : all users {{user.name}} I.e. we added ng-selected="user.id === ngModel". But this has some drawbacks. First, you are creating unneeded isolated scopes. And also, the values bound to the options are strings, i.e. you will actually select '1', '2' or '3' instead of 1, 2 or 3.
accepted answer of: http://stackoverflow.com/q/29195511
has comment: http://stackoverflow.com/comment/46609999
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/46608035
upvote count: 3
has comment: http://stackoverflow.com/comment/46609829
answers question: http://stackoverflow.com/q/29195511
has comment: http://stackoverflow.com/comment/46609755
has comment: http://stackoverflow.com/comment/46604651

http://stackoverflow.com/a/29306924
answers question: http://stackoverflow.com/q/29130853
type: AcceptedAnswer
downvote count: 1
has body: The issue was not related to CORS problems on the client side. The answer is that the service did not like my data. If the data was bad, the API was returning bad CORS headers instead of sending a response that the data was bad.
type: Answer
upvote count: 0
accepted answer of: http://stackoverflow.com/q/29130853
score: -1

http://stackoverflow.com/comment/46391734
comment on: http://stackoverflow.com/a/29068522
has text: Instead of using update, you might want to have a look at using transaction for this. I don't think AngularFire provides a wrapper for transaction, but you can just use it directly on the ref: https://www.firebase.com/docs/web/api/firebase/transaction.html
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/29181371
accepted answer: http://stackoverflow.com/a/29181420
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: Can anyone help me out , on how to trigger events for DOM elements having lower z-index value . //HTML code ... //Hihger Z-index element //Lower Z-index element //Binding Events $("#element2").on("mouseenter",function() {alert("Problem with lower z-index")}); If I set a higher Z-index value for the #element2 the event is triggered.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46579201
upvote count: 3
downvote count: 2
has comment: http://stackoverflow.com/comment/46579080
type: Question
has answer: http://stackoverflow.com/a/29181420
tagged with: javascript
has comment: http://stackoverflow.com/comment/46579077
linked to: http://stackoverflow.com/q/4024479
has title: Triggering events for the DOM elements with lower Z-index value
answer count: 1
score: 1
tagged with: jquery

http://stackoverflow.com/q/29148539
favorite count: 0
accepted answer: http://stackoverflow.com/a/29150633
type: AnsweredQuestion
upvote count: 5
type: Question
tagged with: reactjs
score: 5
has title: Flux + React.js - Callback in actions is good or bad?
has answer: http://stackoverflow.com/a/29150633
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46523671
tagged with: reactjs-flux
has comment: http://stackoverflow.com/comment/46529944
has body: Let me explain the problem that I've faced recently. I have React.js + Flux powered application: There is a list view of articles (NOTE: there are multiple of of different lists in the app) and article details view inside it. But there is only one API endpoint per each list which returns array of articles. In order to display the details I need to find article by id in array. That works pretty fine. I trigger action which makes request to server and propagates store with data, when I go to details screen then I just get the necessary article from that array in store. When user lands on article details view before list (stores are empty) then I need to make a request. Flow looks like: User loads details view -> component did mount -> stores are empty -> rendered empty -> fetchArticles action is triggered -> request response is 200 -> stores now have list of articles -> component did update -> rendered with data successfully Component could look as follows: let DetailsComponent = React.createClass({ _getStateFromStores() { let { articleId } = this.getParams(); return { article: ArticleStore.getArticle(articleId) }; }, componentDidMount() { // fire only if user wasn't on the list before // stores are empty if (!this.state.article) { ArticleActions.fetchArticles('listType'); } }, render() { return &lt;ArticleDetails article={this.state.article} /&gt;; } }); The interesting part comes next: Now I need to make another request to server but request options depend on the article details. That's why I need to make second request after the first one on the details view. I've tried several approaches but all of them look ugly. I don't like calling actions from stores that makes stores too complicated. Calling action inside action in this case doesn't work well because I will need to find article from store inside that action. Solution (?!) What I've came up with is to use callback in action inside component and it feels much more cleaner: let DetailsComponent = React.createCla…

http://stackoverflow.com/comment/52768388
type: AnswerComment
score: 0
type: Comment
has text: Thank you so much mate, it was really helpful :) really appreciate that, cheers :) The 2nd question; well I meant how I could keep the JSON data to be in sync all the time... so if a FILE was renamed and its parent was changed then the view changes seamlessly and if you were to refresh the page, the result would be the same, so I suppose there would be a ajax request sent/received every time a change takes place... Right! Thanks
comment on: http://stackoverflow.com/a/30122863

http://stackoverflow.com/comment/46609470
type: Comment
type: QuestionComment
has text: What i want after the page is rendered is for data to be entered as number of weeks and number of days each of those weeks supplements were taken. User clicks button and a prompt asks to enter the number of supplement packs for each of the days entered in the textfield box. Each prompt is then shown on screen as some text and the number of packs for each of the days. A subtotal is displayed for each week that was entered. @brian thanks...not sure why I didn't change that already. Thanks for reminding me.
comment on: http://stackoverflow.com/q/29198278
score: 0

http://stackoverflow.com/comment/46510743
comment on: http://stackoverflow.com/a/29143869
has text: How does this answer the question "How to check if event is applied on an element with javascript?"?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29104997
has comment: http://stackoverflow.com/comment/46440662
has comment: http://stackoverflow.com/comment/46441210
has comment: http://stackoverflow.com/comment/46441693
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29105111
has answer: http://stackoverflow.com/a/29105498
has body: Let's say I have a variable myvar, and I don't have a variable myvar2. I can run the following without a problem: typeof myvar // ⇒ 'string' typeof myvar2 // ⇒ 'undefined' typeof and delete are the only functions I know of which don't throw errors when given an undefined parameter like this. I looked at the language spec for typeof and to my uninitiated eyes it seems to use internal functions like IsUnresolvableReference. Edit: I'd been working in a language that checks type with a synonymous function, and hadn't noticed typeof is actually an operator in JavaScript. I've removed parentheses from the code here but left the above as written. When I create a function: function myFunc(input_variable) { return("hello"); } ... as expected this throws a ReferenceError when passed myvar2 as a parameter, unless I run var myvar2;. If I wrap the return in a try/catch statement to handle the myvar2 not defined case, I still get the same error, as the variable seems to be checked for a resolvable reference upon entry into the function (upon runtime?) : function myFunc(input_var) { try { return "hello"; } catch(error) { if (error.name === 'ReferenceError'){ return "world"; } } } I was wondering how I can make a function that accepts unresolved references. My general guess is that, if it's a standard behaviour of functions, then perhaps I could modify some prototype for this construction specifically...? I'm aware prototypes are for objects, I'm wondering if this level of control over function is possible somehow? By way of context, I always find myself writing function(input_var) : if (typeof input_var == 'undefined' || my_settings.input_var_is_optional === true) var input_var = 'Sometimes variables are optional. This is my default value.'; return dealWith(input_var); } else if (typeof input_var == 'string') { return dealWith(input_var); } else { // Already checked that input_var isn't optional, so we have a problem return false; // or throw a TypeError or something like that } b…
type: Question
possible better answer: http://stackoverflow.com/a/29105135
score: 5
has answer: http://stackoverflow.com/a/29105111
has comment: http://stackoverflow.com/comment/46440481
has comment: http://stackoverflow.com/comment/46451188
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46440819
has answer: http://stackoverflow.com/a/29105135
has title: Is it possible to pass undeclared variables as parameters in Javascript?
has comment: http://stackoverflow.com/comment/46440060
answer count: 3
tagged with: typeof
has comment: http://stackoverflow.com/comment/46440452
downvote count: 0
has comment: http://stackoverflow.com/comment/46440137
favorite count: 0
has comment: http://stackoverflow.com/comment/46440232

http://stackoverflow.com/q/29108092
tagged with: flask
has comment: http://stackoverflow.com/comment/46446077
has comment: http://stackoverflow.com/comment/46445941
has comment: http://stackoverflow.com/comment/46445871
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46445963
answer count: 0
type: UnansweredQuestion
score: 0
has title: Why does IE9 not display javascript element properly unless "developer tools" is opened?
has comment: http://stackoverflow.com/comment/46446749
tagged with: jinja2
has comment: http://stackoverflow.com/comment/46445985
type: Question
has body: I'm working with a form that will display a SelectField (id='databases') and only if the checkbox (id='alternate') is selected (using javascript) will the SelectField (id='alt_databases') display. This code works perfectly for Chrome/Firefox, but only works in IE9 when I open "developer tools". Code is based on flask, jinja2, and javascript. Does anyone have advice on this? I'm certain it's an IE specific issue. Form: {{ form.hidden_tag() }} {{ form.alternate.label }} {{ form.alternate }} {{ form.alt_databases.label }} {{ form.alt_databases(size=20) }} {{ form.databases.label }} {{ form.databases(size=20) }} {{ form.submit }} Javascript: (function () { var el = document.getElementById('alternate'), source = document.getElementById('alt_databases'); target = document.getElementById('databases'); el.addEventListener('change', function() { if (el.checked) { source.parentNode.style.display = 'block'; } else { source.parentNode.style.display = 'none'; } }); })();
tagged with: internet-explorer
tagged with: javascript

http://stackoverflow.com/comment/46375370
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29070171
type: QuestionComment
has text: you are assigning nothing to data. is a typo ?

http://stackoverflow.com/comment/49140729
comment on: http://stackoverflow.com/a/29110217
has text: Realize that this was a long time ago, but thought I should mark it as answer as it worked for me after a re-install.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47023615
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29179486
has text: @AjayPunekar Have you tried removing all of the libraries from your bundle, and then adding & compiling them one-by-one? I'm assuming you're getting a conflict somewhere, given how many scripts you're trying to bundle together.

http://stackoverflow.com/comment/46593836
type: Comment
type: QuestionComment
has text: This is an image puzzle. This puzzle has 3*3 grid. But it's last square is blank. When i click the each and every square it should have to search about the blank square where is near to that clicked square. I have kept this attribute in a object as object.state = false for blank square.
comment on: http://stackoverflow.com/q/29143467
score: 0

http://stackoverflow.com/comment/46585977
has text: http://demos.telerik.com/kendo-ui/grid/excel-export current export functionality works with filtered and sorted data
comment on: http://stackoverflow.com/q/29183618
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29138027
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29138749
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/29138749
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/29138065
has answer: http://stackoverflow.com/a/29138065
has body: So I'm making a video game similar to Kick Ass, which is a game playable on any website. However, This will be an RPG using DOM and JS to move and operate everything. The only trouble is, I need to be able to add the character div to the web page when somebody clicks on the bookmarklet. Is it possible to add an entirely new div with a set class to the end of a web page using a bookmarklet?
tagged with: dom
has title: How to add a div to a webpage via a bookmark?
has comment: http://stackoverflow.com/comment/46501825
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/46473425
type: Comment
comment on: http://stackoverflow.com/a/29088132
score: 0
type: AnswerComment
has text: interesting idea, however if the plot markers are told to display the values how can you counteract this?

http://stackoverflow.com/comment/46438388
type: Comment
has text: I just showed a shorter way to write those two lines.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29103919

http://stackoverflow.com/comment/46561650
has text: Thanks for answering. I have tried this and the string is no longer displaying on the webpage. Is there more setup required other than including $sce as a parameter in my AngularJS controller?
score: 0
comment on: http://stackoverflow.com/a/29171428
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46381465
score: 0
type: QuestionComment
type: Comment
has text: I have tried compiling the url in POSTMAN, there i am getting the exact data & in that i am getting 200 ok.but it is not coming in the javascript coding
comment on: http://stackoverflow.com/q/29073665

http://stackoverflow.com/a/29129451
has comment: http://stackoverflow.com/comment/80504596
type: AcceptedAnswer
downvote count: 0
has body: I've had the same issue to anyone who runs into this problem in the future here is the solution: To accomplish reloading of data from a different source: refer to the DOM table element NOT the DataTable object or you will get a reinitilization error: step 1: clear data : $('#your_table_name').DataTable().clear(); step 2: Destroy the DataTable object $('#your_table_name').DataTable().destroy(); if you're using child rows this is very important remove the click listener $( "#your_table_name tbody" ) .off( "click", "td.details-control"); Reinit DataTables: loadTable('newsource','your_table_name') and your loadTable function function loadTable(src,tableName) { var oTable = $('#'+tableName).DataTable({ 'bProcessing' : true, 'bServerSide' : true, 'responsive' : true, "sDom": '&lt;"toolbar"lfr&gt;tip&lt;"F"&gt;R', 'sAjaxSource' : src, }); //initchildrows() }
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29110251
answers question: http://stackoverflow.com/q/29110251

http://stackoverflow.com/q/29141428
downvote count: 0
accepted answer: http://stackoverflow.com/a/29146520
score: 1
tagged with: angular-material
tagged with: material-design
has comment: http://stackoverflow.com/comment/46506557
type: Question
has title: Material Design (AngularJS) <md-select> not working
tagged with: javascript
has body: I am trying to use the tag but I can't have the same result as in here. I am writing this code: X milimeter Move Absolute Move Relative Jog But the result that I get is this: The other Material Design elements is working just fine, only the tag that seems to not work. I have already tried to read the docs here but it is so simple that I don't understand why is not working. When I use the default and tags it works but I really want to use the Material Design ones.
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46507217
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46510861
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29146520

http://stackoverflow.com/a/29138449
accepted answer of: http://stackoverflow.com/q/29125331
answers question: http://stackoverflow.com/q/29125331
score: 0
type: AcceptedAnswer
has body: It was a spelling mistake. Thx to Qualiture
type: Answer

http://stackoverflow.com/q/29156329
has body: so I'm making an MVC site that needs a HTML input box. I have a text area that loads from an ajax dialog window. I understand that TinyMCE needs me to remove the control when i hide the dialog, that is fine. I cannot however get the editor to load at all. I am using version 4.1.9 (2015-03-10) with the jquery module. i.e. both tinymce.jquery.js &amp; jquery.tinymce.min.js Once the dialog window has opened i call this; $("textarea").tinymce({ // General options mode: "textareas", theme: "modern", // Theme options menubar: false, toolbar: "bold,italic,underline,|,bullist,numlist", statusbar: false, init_instance_callback: function (editor) { console.log("tinymce init: " + editor.id); } }); But i get an exception in the javascript in the following method, it appears self.ariaTarget is undefined leading to the line starting elm.setAttribute failing because elm is null. I don't understand what i have done wrong. /** * Sets the specified aria property. * * @method aria * @param {String} name Name of the aria property to set. * @param {String} value Value of the aria property. * @return {tinymce.ui.Control} Current control instance. */ aria: function(name, value) { var self = this, elm = self.getEl(self.ariaTarget); if (typeof value === "undefined") { return self._aria[name]; } else { self._aria[name] = value; } if (self._rendered) { elm.setAttribute(name == 'role' ? name : 'aria-' + name, value); } return self; }, Thanks for the help. Mark Edit: I have been following this jsfiddle http://jsfiddle.net/thomi_ch/m0aLmh3n/19/ and instead of loading tinymce in with the document, it loads it from a url when it initialises (see below). I've changed my code to use the same script_url as the example and it works to render the editor (missing icons etc as the css cant be found) but this implies to me that there is something wrong with the version of my tinymce.jquery.js file. $('textarea').tinymce({ script_url : 'http://demo.nilooma.com/system/plugins/tinymce/4.1.6/tiny_mce/tinymce.…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29167472
upvote count: 10
type: Question
score: 10
tagged with: javascript
tagged with: jquery
has title: TinyMCE -> Cannot read property 'setAttribute' of null
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29167472
favorite count: 0
tagged with: tinymce

http://stackoverflow.com/comment/46382983
type: Comment
has text: While true, it doesn't relate to the issue with the element not becoming visible. **One** of them should have.
score: 1
comment on: http://stackoverflow.com/a/29074606
type: AnswerComment

http://stackoverflow.com/a/29153906
type: Answer
accepted answer of: http://stackoverflow.com/q/29151870
score: 0
has body: Solved it. Turns out the parameters were referenced from the grid scope instead of the current click scope. I'm just getting into Angular so this difference eluded me. Hope this helps somebody!
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29151870

http://stackoverflow.com/q/29142418
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46508301
has answer: http://stackoverflow.com/a/29142619
linked to: http://stackoverflow.com/q/26999143
has answer: http://stackoverflow.com/a/35285999
favorite count: 0
tagged with: epiceditor
type: UnansweredQuestion
upvote count: 1
has body: I'm trying to use epic editor in my rails application, but the problem is it can't see my text area although I specified its id Here's configuration &lt;script type="text/javascript"&gt; var opts = { container: 'epiceditor' , basePath: '' , textarea: 'my-edit-area' , clientSideStorage: true , localStorageName: 'epiceditor' , useNativeFullscreen: true , file: { name: null , defaultContent: '' , autoSave: 100 // Set to false for no auto saving } , theme: { base: '&lt;%= asset_path("base/epiceditor.css") %&gt;' , preview: '&lt;%= asset_path("preview/github.css") %&gt;' , editor: '&lt;%= asset_path("editor/epic-light.css") %&gt;' } , focusOnLoad: false , shortcut: { modifier: 18 // alt keycode , fullscreen: 70 // f keycode , preview: 80 // p keycode } , string: { togglePreview: 'Toggle Preview Mode' , toggleEdit: 'Toggle Edit Mode' , toggleFullscreen: 'Enter Fullscreen' } , parser: typeof marked == 'function' ? marked : null , autogrow: false , button: { fullscreen: true , preview: true , bar: "auto" } } var editor = new EpicEditor(opts).load(); &lt;/script&gt; and here's the view file &lt;div id='epiceditor'&gt; &lt;%= text_area_tag(f['name'],f['value'], size: '20x5', class: 'form-control', id: 'my-edit-area') %&gt; &lt;/div&gt; In the console it gives me this Uncaught TypeError: Cannot read property 'value' of null
tagged with: ruby-on-rails
score: 1
has title: Epic editor can't access my textarea rails
type: Question

http://stackoverflow.com/comment/46485726
type: Comment
has text: @LShetty I think I know what is going now. That div element with the innerHTML text "This is a required question" is being hidden from the webpage somehow and jquery is still detecting it as being visible on the webpage even though it is hidden.
type: QuestionComment
comment on: http://stackoverflow.com/q/29129218
score: 0

http://stackoverflow.com/q/29201648
type: Question
score: 0
answer count: 3
has body: I am struggling to get multiple countdown timers displayed in a meteor app. AuctionExpireIn is a date in the format - 2015-03-23T17:17:52.412Z. Have a auctionItems collection , displaying 3 rows of auction items in auctionItem template. While the target date is different for each of the auction items, what I am seeing is all the three rows have the same countdown timer . Apparently the session is not tied to each of the records and the same session value is being displayed for all the three rows. How do I get different rows to display countdown timer based on the target data that each auction item document has? Appreciate all the help. Template.auctionItem.helpers({ AuctionExpireIn : function() { var target_date = new Date(this.AuctionExpireIn).getTime(); //alert (target_date); // variables for time units var days, hours, minutes, seconds; // update the tag with id "countdown" every 1 second setInterval(function( ) { // find the amount of "seconds" between now and target var current_date = new Date().getTime(); var seconds_left = (target_date - current_date) / 1000; var countdown =''; // do some time calculations days = parseInt(seconds_left / 86400); seconds_left = seconds_left % 86400; hours = parseInt(seconds_left / 3600); seconds_left = seconds_left % 3600; minutes = parseInt(seconds_left / 60); seconds = parseInt(seconds_left % 60); // format countdown string + set tag value countdown= days + "d, " + hours + "h, " + minutes + "m, " + seconds + "s"; Session.set ('countdown', countdown); }, 1000); return Session.get('countdown'); } });
possible better answer: http://stackoverflow.com/a/29202907
tagged with: javascript
has answer: http://stackoverflow.com/a/29201785
tagged with: countdown
has title: Multiple countDown timers on a single page in a meteor app
has answer: http://stackoverflow.com/a/31996869
tagged with: meteor
tagged with: timer
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/31996869
has answer: http://stackoverflow.com/a/29202907

http://stackoverflow.com/comment/46382071
score: 2
has text: then you can pass data as {{comp-one compData="thisText"}} and use compData property inside component.
type: AnswerComment
comment on: http://stackoverflow.com/a/29073274
type: Comment

http://stackoverflow.com/a/29215454
has body: I've conducted this little experiment, both in FF and Chrome. I executed this at the console: var mine = setInterval(function () { console.log("status:", window.status); }, 1000); Then I hovered over links. The status output to the console was always the empty string. (Yes, I checked that it is an empty string and not something else that happens to print like an empty string.) Your problem is not with your call to .executeScript but that window.status just does not appear to be well supported.
has comment: http://stackoverflow.com/comment/46657424
score: 1
accepted answer of: http://stackoverflow.com/q/29205581
answers question: http://stackoverflow.com/q/29205581
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/29082184
has answer: http://stackoverflow.com/a/29083132
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: css
tagged with: settimeout
has title: On click fade out div then fade back in
has body: I've implemented a toggle views page, where you can toggle between a list and a grid the animations between toggle states is a bit ugly (toggle using the two links at the top to see what I mean): http://jsfiddle.net/qvLoLhy7/2/ To get around this issue I am trying to apply a setTimeout function on the toggle buttons so that I can fade out the parent div #post-list first, then perform the layout change and then finally fade #post-list back in again to show the updated layout. When I implement this though the fade in/out works but the layout doesn't change: http://jsfiddle.net/qvLoLhy7/ Can anybody help find out why this might be happening? Here's a snippet of the JS: function init() { optionSwitch.forEach( function( el, i ) { el.addEventListener( 'click', function( ev ) { $('#post-list').addClass('go'); // Fade out setTimeout(function() { _switch( this ); //Update layout. Switch refers to another function }, 500); setTimeout(function() { $('#post-list').removeClass('go'); // Fade new layout back in }, 1000); }, false ); } ); }
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46523815
type: QuestionComment
has text: The problem is that the whole site (really everything) gets unclickable afterwards, also when I trigger the function from another element it works without a flaw.
comment on: http://stackoverflow.com/q/29149174
score: 0
type: Comment

google-signin
tags question: http://stackoverflow.com/q/29152569
type: Tag
tag name: google-signin
tags question: http://stackoverflow.com/q/29099268

http://stackoverflow.com/q/29065125
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29076750
has title: SVG in Sproutcore, access DOM-nodes with Sproutcore, bind sproutcore-events to DOM
has answer: http://stackoverflow.com/a/29066747
has body: I'm experimenting with Sproutcore and am trying to use SVG (Standard Vector Graphics) within the sproutcore app. I need to be able to "draw" on a canvas of some kind, to display elements like lines, boxes, images. SVG has it all. My Idea was to include the SVG-Image using a StaticContentView: svg: SC.StaticContentView.design({ classNames: ['my-static-content-view'], content: "&lt;svg version='1.1' width='970' height='219'&gt; \ &lt;image id='someimage' x='410.5' y='122' width='25' height='25' xlink:href='"+static_url('/resources/layout/someimage.png')+"'&gt;&lt;/image&gt; \ &lt;/svg&gt;", tagName: 'section' }) That works great so far, the svg-image is displayed inside the app, the subimage gets loaded too. Now my problem: I want to be able to manipulate the svg-image at runtime, add new nodes and bind sproutcore-events to the different nodes. For example: When the someimage up in the codesnippet gets clicked I want an event to be triggered. I figured I could bind events using SC.Event.add(someelement, "click", someHandler); But I need to be able to access the svg-DOM-node, the "someimage", in order to bind the event to it. I have googled and tried jQuery using $('someimage').get(0) and many other methods but nothing seems to work. Can anybody give me a hint on how to access the element? Am I maybe doing it wrong using StaticContentView in the first place? Can I maybe build the SVG as a native Sproutcore-Element or View to make things easier?
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: sproutcore
tagged with: sproutcore-views
score: 1
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29085188
answers question: http://stackoverflow.com/q/29085101
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46404005
has body: Just use setTimeout and send website as a parameter $('.website').each(function(i) { var website = $(this).text(); setTimeout(function(siteText){ Parse.Cloud.run('getMainEmail', {url: siteText}, { success: function(result) { cell.next().text(result); }, error: function(error) { console.log("Couldn't find email for website: " + siteText); console.log(error); } }, (i + 1) * 5000, website); });
type: Answer
has comment: http://stackoverflow.com/comment/46403745
accepted answer of: http://stackoverflow.com/q/29085101
upvote count: 1

http://stackoverflow.com/q/29187004
has answer: http://stackoverflow.com/a/29187161
type: Question
has answer: http://stackoverflow.com/a/29187431
answer count: 2
has comment: http://stackoverflow.com/comment/46589073
possible better answer: http://stackoverflow.com/a/29187161
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46589275
has comment: http://stackoverflow.com/comment/46589165
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29187431
tagged with: append
has title: How to get movie info from multiple IMDB ids using an API?
favorite count: 0
has body: I've tried searching for this but I couldn't find any answer that would fit with the problem I'm facing. I recently started playing with JQuery and all so this must be really stupid. I have a div (.movie) that repeats itself throughout the page, each one with a specific id (#titanic, for example) the information for title, year and runtime comes from a JSONP inside a function. so, inside each div I've called such function and defined which movie to search for. the problem is, it does append the title, year and runtime to the last div only, not all of them. it gets all the different information for different movies, but everything is appended to the last div. function getinfo(){ $.ajax({ url:"http://www.myapifilms.com/imdb?format=JSONP&idIMDB="+id, type:'GET', dataType:'JSONP', callback: 'callback', success: function(data, text, xhqr){ $('#'+id).append( ' ' + data.title + ' ' ); $('#'+id).append( ' ' + data.year + ' ' ); $('#'+id).append( ' ' + data.runtime + ' ' ); } }); } the only valid id is being considered the last one I declared even though it searches for different movies each time I run getinfo(), it just appends on to the wrong place. bet this is stupid but I've been banging my head for hours now thanks!
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/q/29094857
type: Question
has body: When I console.log the details variable, I get the following results: details:{ 1:{ 2015-2-10 : 0 2015-2-11 : 0 2015-2-12 : 0 2015-2-13 : 0 2015-2-14 : 0 2015-2-15 : 0 2015-2-16 : 0 2015-2-17 : 0 2015-2-18 : 0 2015-2-19 : 0 2015-2-2 : 0 2015-2-20 : 0 2015-2-21 : 0 2015-2-22 : 0 2015-2-23 : 0 2015-2-24 : 0 2015-2-25 : 0 2015-2-26 : 0 2015-2-27 : 1 2015-2-28 : 1 2015-2-3 : 0 2015-2-4 : 0 2015-2-5 : 0 2015-2-6 : 0 2015-2-7 : 0 2015-2-8 : 0 2015-2-9 : 0 2015-3-1 : 0 } } I want to do is to display the dates with ascending order. So the output will become: details:{ 1:{ 2015-2-2 : 0 2015-2-3 : 0 2015-2-4 : 0 2015-2-5 : 0 2015-2-6 : 0 2015-2-7 : 0 2015-2-8 : 0 2015-2-9 : 0 2015-2-10 : 0 2015-2-11 : 0 2015-2-12 : 0 2015-2-13 : 0 2015-2-14 : 0 2015-2-15 : 0 2015-2-16 : 0 2015-2-17 : 0 2015-2-18 : 0 2015-2-19 : 0 2015-2-20 : 0 2015-2-21 : 0 2015-2-22 : 0 2015-2-23 : 0 2015-2-24 : 0 2015-2-25 : 0 2015-2-26 : 0 2015-2-27 : 1 2015-2-28 : 1 2015-3-1 : 0 } } My question: Is it possible to do it? my plunker is http://plnkr.co/edit/dQO3D1Omc0o7ZH9TfeUZ?p=preview Thanks in advance!
has comment: http://stackoverflow.com/comment/46420989
tagged with: javascript
has answer: http://stackoverflow.com/a/29094937
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/5467129
tagged with: angularjs
type: UnansweredQuestion
has title: Sort date property in object in ascending order Angularjs/Javascript

http://stackoverflow.com/comment/46613966
type: Comment
type: QuestionComment
has text: @EasilyBaffled, I don't see where you're using `whitelist`, or where you're setting `àllowedURLS`.
comment on: http://stackoverflow.com/q/29196364
score: 0

http://stackoverflow.com/comment/46638546
score: 0
type: QuestionComment
has text: @NickDewitt If it came before he wouldn't have been able to test that the width is 0...
comment on: http://stackoverflow.com/q/29214139
type: Comment

http://stackoverflow.com/q/29101928
tagged with: rest
tagged with: http://stackoverflow.com/tag/html
tagged with: knockout-mapping-plugin
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29103051
tagged with: knockout.js
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29102624
accepted answer: http://stackoverflow.com/a/29103051
has answer: http://stackoverflow.com/a/29102624
tagged with: javascript
score: -1
has title: How to bind multiple links with same knockout function passing different IDs
answer count: 2
upvote count: 0
has body: Question: I am new to KnockoutJS. Following example code is working for me. But you can see that fetch function is hard coded and working for only user with id=100. How can I create a Get link with each row in the html table list and pass id of that record to fetch function that shows record only for that particular row in console. Any Idea? HTML: Get Delete Get All ID Name Code Created Action Get Link will come here to call fetch funtion JS: I am using following libraries: knockout-3.3.0.js knockout.mapping-latest.js knockout-rest.min.js
favorite count: 0

http://stackoverflow.com/comment/46441739
score: 0
has text: Thanks for the answer! But, my layout's unspecified- I think that's the correct term? The code is something like: ? {block:Date}{TimeAgo}{block:NoteCount} ({NoteCountWithLabel}){/block:NoteCount}{/block:Date} So, all the permalinks will be classed in "inpo" and what I'm trying to do is to click on "cari" so that the "inpo" will fadeToggle.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29105806

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/29180026
tags question: http://stackoverflow.com/q/29103001
tags question: http://stackoverflow.com/q/29099546
tags question: http://stackoverflow.com/q/29068088
tags question: http://stackoverflow.com/q/29066336
tags question: http://stackoverflow.com/q/29130244
tags question: http://stackoverflow.com/q/29171912
tags question: http://stackoverflow.com/q/29211683
tags question: http://stackoverflow.com/q/29126974
tags question: http://stackoverflow.com/q/29155515
tags question: http://stackoverflow.com/q/29170197
tags question: http://stackoverflow.com/q/29151105
tags question: http://stackoverflow.com/q/29164092
tags question: http://stackoverflow.com/q/29192909
tags question: http://stackoverflow.com/q/29145938
tags question: http://stackoverflow.com/q/29196664
tags question: http://stackoverflow.com/q/29062764
tags question: http://stackoverflow.com/q/29141302
tags question: http://stackoverflow.com/q/29165047
tags question: http://stackoverflow.com/q/29212899
tags question: http://stackoverflow.com/q/29202363
tags question: http://stackoverflow.com/q/29108968
tag name: svg
tags question: http://stackoverflow.com/q/29065125
tags question: http://stackoverflow.com/q/29128198
tags question: http://stackoverflow.com/q/29087113
tags question: http://stackoverflow.com/q/29166490
tags question: http://stackoverflow.com/q/29110166
tags question: http://stackoverflow.com/q/29146277
tags question: http://stackoverflow.com/q/29099216
tags question: http://stackoverflow.com/q/29065154
tags question: http://stackoverflow.com/q/29153981
tags question: http://stackoverflow.com/q/29149174
tags question: http://stackoverflow.com/q/29202900
tags question: http://stackoverflow.com/q/29085896
tags question: http://stackoverflow.com/q/29086297
tags question: http://stackoverflow.com/q/29090033
tags question: http://stackoverflow.com/q/29115897
tags question: http://stackoverflow.com/q/29174627
tags question: http://stackoverflow.com/q/29131627
tags question: http://stackoverflow.com/q/29159500
tags question: http://stackoverflow.com/q/29151120
tags question: http://stackoverflow.com/q/29194562
tags question: http://stackoverflow.com/q/29186363
tags question: http://stackoverflow.com/q/29081286
tags question: http://stackoverflow.com/q/29069907
tags question: http://stackoverflow.com/q/29107863
tags question: http://stackoverflow.com/q/29141416
tags question: http://stackoverflow.com/q/29133487
tags question: http://stackoverflow.com/q/29121889
tags question: http://stackoverflow.com/q/29117299
tags question: http://stackoverflow.com/q/29147691
type: Tag

http://stackoverflow.com/comment/46518060
score: 0
comment on: http://stackoverflow.com/a/29146613
type: Comment
has text: Nice, thanks. I ended up mixing js and css to get something like [this](http://jsfiddle.net/3rgyv9cn/9/)(add 5 windows and you will get what I mean).
type: AnswerComment

http://stackoverflow.com/q/29182763
tagged with: javascript
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46581654
tagged with: jquery
favorite count: 0
has body: I am in a process to add a division slider to my website. I have made the division slider with the help of css and jquery. Here Goes the html code which has angular js directives in it. Number of divisions would be sent from the backend. {{a.Feature}} Here goes the jquery code which makes this division slider slide. $(document).ready(function() { //Hovering Over Thumbnail Navigation $('.thumbnailArrows').hover(function() { var whiches = $(this).children('img').attr('id'); if (whiches == 'Tleft') { movingThumbs1(3000, '+'); } else { movingThumbs1(3000, '-'); } }, function() { $('#divHolder').stop(); }); //Function for Thumbnails Moving function movingThumbs1(speed, direction) { var currentLeft = $('#divHolder').position().left; //figure out how far to go left - only for right arrow var moving = $('#divHolder').width() - (Math.abs($('#divHolder').position().left) + $('#myslick').width()); if (currentLeft == 0 && direction == '+') { //do nothing } else if (Math.abs($('#divHolder').position().left) + $('#myslick').width() >= $('#divHolder').width() && direction == '-') { //do nothing } else if (direction == '+' && currentLeft != 0) { $('#divHolder').animate({ left: 0, }, speed); } else { $('#divHolder').animate({ left: '+='+direction + moving, }, speed); } } }); When the right arrow is hovered over the division slider moves to right . But after reaching the end it once again slide away bringing the empty area in picture. But after reaching the end function to move towards right shouldn't be called once again. But that happens. All the code works fine if I don't use angular js directives.
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46581664
tagged with: css
score: 2
type: AnsweredQuestion
has title: Jquery slider with angular js not working properly
possible better answer: http://stackoverflow.com/a/29182905
upvote count: 2
has answer: http://stackoverflow.com/a/29182846
has answer: http://stackoverflow.com/a/29182905
type: Question
accepted answer: http://stackoverflow.com/a/29182846

http://stackoverflow.com/q/29108215
score: 0
accepted answer: http://stackoverflow.com/a/29108448
tagged with: d3.js
has body: I'm having this weird problem rendering a simple line graph from an array of parsed data objects with D3. When I hardcode an array of data objects into my code, the graph will render fine. However, when I parse a JSON file, create a data object, and push it to an array, it won't render... The two arrays (hardcoded vs. parsed) have the exact same data, yet only the hardcoded will render the graph. Hardcoded data... (creates graph) var lineData = [ {date: new Date("03/04/15"), rain: "2.2"}, {date: new Date("03/05/15"), rain: "2.3"}, {date: new Date("03/06/15"), rain: "0.0"}, {date: new Date("03/07/15"), rain: "2.0"}, {date: new Date("03/08/15"), rain: "5.0"}, {date: new Date("03/09/15"), rain: "2.3"}, {date: new Date("03/10/15"), rain: "15.0"}, {date: new Date("03/11/15"), rain: "0.0"}, {date: new Date("03/12/15"), rain: "7.0"}, {date: new Date("03/13/15"), rain: "0.0"}, {date: new Date("03/14/15"), rain: "1.0"}, {date: new Date("03/15/15"), rain: "0.0"}, {date: new Date("03/16/15"), rain: "2.3"}, {date: new Date("03/17/15"), rain: "8.0"}, {date: new Date("03/18/15"), rain: "1.4"}, {date: new Date("03/19/15"), rain: "0.0"}, {date: new Date("03/20/15"), rain: "1.0"} ]; var vis = d3.select("#visualisation"), WIDTH = 600, HEIGHT = 250, MARGINS = { top: 20, right: 20, bottom: 20, left: 50 }, xRange = d3.time.scale().range([MARGINS.left, WIDTH - MARGINS.right]).domain([d3.min(lineData, function (d) { return d.date; }), d3.max(lineData, function (d) { return d.date; }) ]), yRange = d3.scale.linear().range([HEIGHT - MARGINS.top, MARGINS.bottom]).domain([d3.min(lineData, function (d) { return d.rain; }), d3.max(lineData, function (d) { return d.rain * 1.2; }) ]), xAxis = d3.svg.axis() .scale(xRange) .tickSize(5), yAxis = d3.svg.axis() .scale(yRange) .tickSize(5) .orient("left"); vis.append("svg:g") .attr("class", "x axis") .attr("transform", "translate(0," + (HEIGHT - MARGINS.bottom) + ")") .call(xAxis); vis.append("svg:g") .attr("class", "y axis") .attr("transform", "transla…
type: AnsweredQuestion
has title: Creating a line grpah from array of data objects
has answer: http://stackoverflow.com/a/29108448
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29123754
has comment: http://stackoverflow.com/comment/46475824
upvote count: 7
has comment: http://stackoverflow.com/comment/46473714
answers question: http://stackoverflow.com/q/29123676
has comment: http://stackoverflow.com/comment/46475985
has comment: http://stackoverflow.com/comment/46473675
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/46476108
type: Answer
has body: This may not be as hard as you'd imagine: var str = "The zoo has a panda named {{123}} that is colored {{234}}"; var array = [ { label: 'Ralph', id: '123' }, { label: 'White and Black', id: '234' } ]; for(var i = 0; i &lt; array.length; i++){ str = str.replace("{{" + array[i].id + "}}", array[i].label); } alert(str); Simply loop over the array and replace each key in the string with the desired label. If the key isn't found in the string, the replace simply does nothing.

http://stackoverflow.com/a/29136110
has comment: http://stackoverflow.com/comment/46497922
has comment: http://stackoverflow.com/comment/46497319
has comment: http://stackoverflow.com/comment/46497689
type: Answer
has body: this is one of the way you can do it hope this will help you var arr = ["Apple", "Orange", "Pineapple"]; var $el = ' '; $.each(arr, function(i, v) { $el += ' ' + v.slice(0, 1) + ' '; $el += ' ' + v + ' '; }); $el += ' '; $('body').append($el);
upvote count: 1
answers question: http://stackoverflow.com/q/29135995
score: 1
accepted answer of: http://stackoverflow.com/q/29135995
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46574434
type: AnswerComment
has text: Thanks I tried to do javascript:alert(motivateEN.0.0); but returns an error?
comment on: http://stackoverflow.com/a/29178627
type: Comment
score: 0

http://stackoverflow.com/comment/46580345
has text: "The script is executed when button on toolbar is pressed." is the element you are looking for present in the inspector at that point of time?
score: 0
comment on: http://stackoverflow.com/q/29181437
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46375021
type: AnswerComment
score: 0
type: Comment
has text: is it possible to prepend entire picture elements by the way?
comment on: http://stackoverflow.com/a/29069974

http://stackoverflow.com/q/29114403
tagged with: javascript
linked to: http://stackoverflow.com/q/2749244
favorite count: 0
has answer: http://stackoverflow.com/a/29114439
linked to: http://stackoverflow.com/q/8656106
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29114478
has answer: http://stackoverflow.com/a/29114478
type: Question
has answer: http://stackoverflow.com/a/29114560
has title: JavaScript: setTimeout (setInterval) not working
tagged with: settimeout
has body: Ok, so basically i'm creating an Interval class to handle repeating actions. I have something like this: function Interval(fn, speed) { this.fn = fn; this.speed = speed; this.nt = setInterval(fn, speed); } And then i have 3 methods: this.pause = function() { clearInterval(this.nt); } this.start = function() { this.nt = setInterval(this.fn, this.speed); return this.nt; } this.wait = function(time) { this.pause(); setTimeout(function() { this.start(); }, time); } The problem appears in the third method. this.pause(); and this.start(); works as expected. But when I nest this.start into a setTimeout function it stops working. I don't understand why. Here's an example: var i = 0: var nt = new Interval(function() { alert('Itineration: '+ i ); if(i&gt;5); nt.pause(); setTimeout(nt.start, 2000); // nt.wait(2000); }, 500); Neither nt.wait(2000); nor nt.pause(); setTimeout(nt.start, 2000); is working.
score: -1
has comment: http://stackoverflow.com/comment/46457440
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/46457680
upvote count: 1
tagged with: nested
tagged with: setinterval
accepted answer: http://stackoverflow.com/a/29114439

ecmascript-6
tags question: http://stackoverflow.com/q/29215464
tags question: http://stackoverflow.com/q/29182244
tags question: http://stackoverflow.com/q/29094629
tags question: http://stackoverflow.com/q/29186246
tags question: http://stackoverflow.com/q/29094280
tags question: http://stackoverflow.com/q/29207313
tags question: http://stackoverflow.com/q/29104906
tags question: http://stackoverflow.com/q/29207878
tag name: ecmascript-6
tags question: http://stackoverflow.com/q/29149272
tags question: http://stackoverflow.com/q/29194024
tags question: http://stackoverflow.com/q/29093396
type: Tag
tags question: http://stackoverflow.com/q/29195856
tags question: http://stackoverflow.com/q/29185601
tags question: http://stackoverflow.com/q/29085197
tags question: http://stackoverflow.com/q/29157557

http://stackoverflow.com/q/29112052
tagged with: lifecycle
tagged with: http://stackoverflow.com/tag/html
tagged with: custom-element
score: 2
downvote count: 0
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29426813
tagged with: javascript
upvote count: 2
tagged with: web-component
answer count: 1
has title: Clarification on custom web components and lifecycle callbacks
has body: I was hoping to get some clarification as it relates to custom elements and their lifecycle callbacks: I have some confusion with the element created callback. The spec says something like: "called when each instance of an element is created." to my thinking, an instance is inserted into the dom 'virtually' right after it is created, and so the benefit of having these two callback essentially back to back in the document flow. I have also read online that the created callback is more closely related to the element becoming defined. Which of these cases is what the spec says. This is probably along the lines of the previous question: I see 3 ways of a custom element making it into a document: It is part of the document from the beginning. In this case, in relation to the document.readyState events, when will the definition be registered? It is inserted via javascript. I assume that the programmer will register the definition prior to creation and insertion. Then, the question is: when does the created callback fire? When does the attached callback fire? Lastly, if I setup other elements to interact with my element when it is inserted, when can I be sure that that work is finished? The last method I can think of relates to the shadow dom, and the sense that an element is somewhat half in and half out of the document. Thank you for reading, I would appreciate any clarification and edification you might be able to provide.
type: UnansweredQuestion

http://stackoverflow.com/a/29195197
downvote count: 0
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/46603380
score: 2
answers question: http://stackoverflow.com/q/29195135
has body: I think your check is wrong here, you are saying if your object has a property of 'success' but that is the value not the property. Try something like this: success: function (data) { var json = data, obj = JSON.parse(json); if (obj.result === 'success') //if data = {"result":"success"} { $('div#loginResult').text("Login result: " + obj.result); $('div#loginResult').addClass("error"); } else // /if data = {"result":"error"} { $('form#loginForm').hide(); $('div#loginResult').text("Login result: " + obj.result); $('div#loginResult').addClass("success"); } } https://jsfiddle.net/ghkokgg7/

http://stackoverflow.com/comment/46472661
has text: Sure, I've added an example on plunker. I'm not referencing the controller inside the module config function, so in theory this should work...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29122840
type: Comment

http://stackoverflow.com/q/29175143
has title: How to select all *renderable* text elements in browser
upvote count: 1
possible better answer: http://stackoverflow.com/a/29175528
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29175528
accepted answer: http://stackoverflow.com/a/29175577
tagged with: dom
type: Question
tagged with: browser
answer count: 2
has body: How can I select all visible renderable HTML text nodes in a browser document? In other words, how can I get a list of DOM nodes I can traverse via scripting in order to obtain the text that is actually visible to the user in the browser, in document order? I would like to rely on the browser to tell me the nodes that constitute currently visible renderable text. I'm not sure where to start. Help?
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29175577
tagged with: cross-browser

http://stackoverflow.com/a/29140540
has body: var b = { maths:[12,23,45], physics:[12,23,45], chemistry:[12,23,45] }; // using loops you can do like for(var i=0;i&lt;b.maths.length;i++){ console.log(b.maths[i]);//will give all the elements }
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29140301

http://stackoverflow.com/comment/46552106
has text: This is not what the OP asked. It is my opinion this question should just be closed.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29166481
type: Comment

http://stackoverflow.com/comment/46557993
score: 0
type: QuestionComment
type: Comment
has text: @yamidemichaos tried, but didn't worked..
comment on: http://stackoverflow.com/q/29169764

http://stackoverflow.com/q/29206290
has title: Need Android or Iphone mobile devices back button click event in javascript or jquery
upvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/46672567
score: 1
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/29206809
downvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Currently working on Single Page Application(HTML5) using following plugins : - Sammy.js - Knockout.js - Require.js - Jquery.js This application is developed for Android, Iphone &amp; Windows mobile devices, lot of scenarios are based on click of device back button or browser back button, can anybody have idea how to handle device back button or browser back button click event? As this is SPA framework, hence navigation happen on route hash change which is handle by Sammy.js, but on every navigation sammy.before event is called and not able to distinguish between the browser back or device back or its simple navigation.

http://stackoverflow.com/comment/46595545
has text: It would help if you posted some code
comment on: http://stackoverflow.com/q/29190567
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46428126
has text: Not sure, but just a guess. Try and replace `XMLHttpRequest` with `qXHR` as IE may not like a reserved function to be used as a function argument!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29098571

http://stackoverflow.com/comment/46676418
has text: Yes, they are different. When used correctly, ID should be unique across the entire HTML document - use it for unique elements like Nav Bars, Document Areas, etc. Class is the way to go for assigning common styling and functionality across multiple items.
comment on: http://stackoverflow.com/a/29218105
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29131359
favorite count: 0
tagged with: innerhtml
upvote count: 1
downvote count: 1
has title: Changing content of a DIV: different span parts
has comment: http://stackoverflow.com/comment/46488496
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29131737
has comment: http://stackoverflow.com/comment/46488363
type: Question
has answer: http://stackoverflow.com/a/29131439
answer count: 2
tagged with: javascript
has body: Suppose I have the following DIV: Hertog-Jan It has two 'parts', the first being the name (which should NEVER change), the second being the price. Ultimately, I have to use an API to retrieve the actually price for Hertog-Jan from the website of the Dutch store 'Albert Heijn', but for know, I use a random number generator to generate a random number between 100 and 999, and make that the 'price': function price (it) { var value = (Math.round(((Math.random() * 900) + 100))); /* value *= 0.01; */ document.getElementById(it).innerHTML.price += ": €" + value; } (maybe not the best) and then call the function like this price('div5'); However, the output will always be Hertog-Jan (no price appearing). Am I doing something wrong? I personally think it has to do with the innerHMTL.price, but I'm not sure. I used to have Hertog-Jan but later I have to add an option to sort by name, price, etc. so I thought it would be useful to have the name and price information in two separate, uhm, 'boxes' (you get the idea). Some of you may have noted that value *= 0.01 is now basically 'turned off', which is due to the fact that sometimes, if a number (such as 626) is multiplied by 0.01, it doesn't give me 6.26, but rather 6.260000000001. Is there any way to fix this? I want random numbers between 1 and 10 (including 1, excluding 10) rounded to exactly two decimals (and it should ALWAYS be two decimals, of course).
possible better answer: http://stackoverflow.com/a/29131439
score: 0
accepted answer: http://stackoverflow.com/a/29131737
has comment: http://stackoverflow.com/comment/46488523
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46489152

http://stackoverflow.com/comment/75928428
type: AnswerComment
type: Comment
has text: as for stamp collision, I think it's safer to create some custom ID on install, attaching that ID to every `storage.sync.set` (as obj property), and when `storage.onChanged` listener fires up, compare ID's (ID is saved in local storage ofc). I does require loading ID from storage on every comparison but it's pretty straight forward
comment on: http://stackoverflow.com/a/29064381
score: 0

http://stackoverflow.com/comment/46511595
comment on: http://stackoverflow.com/q/29142673
score: 0
type: QuestionComment
type: Comment
has text: can you set up a jsfiddle to reproduce the problem?

http://stackoverflow.com/comment/46644599
score: 0
comment on: http://stackoverflow.com/q/29216433
type: Comment
type: QuestionComment
has text: AndreiC, the "I would like" section was an example. Could you confirm the json syntax for nested properties?

http://stackoverflow.com/q/29182416
tagged with: javascript
type: Question
has body: I want to change the background image of a container by setting CSS rules with Javascript on a button click. This works, but the image changes back almost immediately. Is there any way to keep the changes? HTML: JS: function ImageChange1() { document.getElementById("container").style.backgroundImage = "url('Image1.jpg')"; } function ImageChange2() { document.getElementById("container").style.backgroundImage = "url('Image2.jpg')"; } function ImageChange3() { document.getElementById("container").style.backgroundImage = "url('Image1.jpg')"; } function ImageChange4() { document.getElementById("container").style.backgroundImage = "url('Image1.jpg')"; } function ImageChange5() { document.getElementById("container").style.backgroundImage = "url('Image1.jpg')"; }
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46580987
possible better answer: http://stackoverflow.com/a/29182980
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: JavaScript keep image change in HTML
has answer: http://stackoverflow.com/a/29182980
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29182531
accepted answer: http://stackoverflow.com/a/29182531

http://stackoverflow.com/a/29123675
has body: You only pass in the options (as in datepicker({ startDate: '+1d'})) when you're initializing the controller. Since it's already initialized you don't need to do that. Instead you want to use the setDate() method and then pass in the javascript date representation of tomorrow a string representing the relative date like this: $('#txtDateOfJourney').datepicker('setDate', "+1d"); Demo in Stack Snippets $('#btnTomorrow').click(function() { $('#txtDateOfJourney').datepicker('setDate', "+1d"); }); Tomorrow
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29121830
answers question: http://stackoverflow.com/q/29121830
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/46482646
has comment: http://stackoverflow.com/comment/46482710
has comment: http://stackoverflow.com/comment/46511627
downvote count: 0
has comment: http://stackoverflow.com/comment/46511946

http://stackoverflow.com/comment/46574379
comment on: http://stackoverflow.com/q/29178592
has text: Probably one line horizontally 1px high with a hover event on the top of the page.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29192506
answers question: http://stackoverflow.com/q/29192444
upvote count: 1
has body: HTML: &lt;body onbeforeunload="return confirmEvent()"&gt; javascript: function confirmEvent(e) { return "do you really want to leave?"; }
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46599042
type: Answer

http://stackoverflow.com/a/29166262
has body: The problem is from this part of your code $(document).ready(function(){ $('#openModal').hide(); }); This is waiting that all the html has loaded before firing your code, so hiding your modal. JQuery hide function is adding an inline style to your element display:none so you could add this inline style yourself on the dom element to avoid this flash X Header Form Contents
has comment: http://stackoverflow.com/comment/46553206
answers question: http://stackoverflow.com/q/29166032
has comment: http://stackoverflow.com/comment/46552611
score: 0
type: Answer

http://stackoverflow.com/comment/46641923
type: Comment
comment on: http://stackoverflow.com/a/29216068
score: 0
type: AnswerComment
has text: Did you mean `ng-options` instead of `ng-repeat`? The latter gives me errors while the former works.

http://stackoverflow.com/a/29082270
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46397788
type: Answer
has comment: http://stackoverflow.com/comment/46397576
upvote count: 6
has body: So if JS is single-threaded who is putting UI events into event queue while we are computing something else? Not JS obviously :-) It's one of the other threads in a browser, the one that is responsible for managing UI events (which are, in turn, supplied by the OS) in this case. In fact, there are a lot of things running in parallel to the JS engine, for example the thread(s) that are managing network connections (and queuing ajax events).
has comment: http://stackoverflow.com/comment/46397722
has comment: http://stackoverflow.com/comment/46398108
has comment: http://stackoverflow.com/comment/46398194
accepted answer of: http://stackoverflow.com/q/29082146
answers question: http://stackoverflow.com/q/29082146
score: 6

http://stackoverflow.com/q/29079686
tagged with: google-cloud-messaging
has comment: http://stackoverflow.com/comment/46415913
has comment: http://stackoverflow.com/comment/46393301
tagged with: cordova
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46440626
has title: JSON decode in Phonegap
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
has body: I want the JSON data that is receiving in my app to be decoded and stored into MySQL database. This is an Android application made using Phonegap. Here is the application code : function onNotification(e) { $("#app-status-ul").append(' EVENT -> RECEIVED:' + e.event + ' '); switch( e.event ) { case 'registered': if ( e.regid.length > 0 ) { $("#app-status-ul").append(' REGISTERED -> REGID:' + e.regid + " "); console.log("regID = " + e.regid); $("#pp").click(function(){ tokenHandler(e.regid); }); } break; case 'message': if (e.foreground) { $("#app-status-ul").append(' --INLINE NOTIFICATION--' + ' '); var soundfile = e.soundname || e.payload.sound; var my_media = new Media("/android_asset/www/"+ soundfile); my_media.play(); } else { if (e.coldstart) $("#app-status-ul").append(' --COLDSTART NOTIFICATION--' + ' '); else $("#app-status-ul").append(' --BACKGROUND NOTIFICATION--' + ' '); } $("#app-status-ul").append(' MESSAGE -> MSG: ' + e.payload.message + ' '); //android only $("#app-status-ul").append(' MESSAGE -> MSGCNT: ' + e.payload.msgcnt + ' '); //amazon-fireos only $("#app-status-ul").append(' MESSAGE -> TIMESTAMP: ' + e.payload.timeStamp + ' '); break; case 'error': $("#app-status-ul").append(' ERROR -> MSG:' + e.msg + ' '); break; default: $("#app-status-ul").append(' EVENT -> Unknown, an event was received and we do not know what it is '); break; } } e.payload.message contains the message to be decoded. Here is the server side code : <?php class GCMPushMessage { var $url = 'https://android.googleapis.com/gcm/send'; var $serverApiKey = "xxxxxxxxxxxxxxx"; var $devices = 0; function GCMPushMessage(){ //$this->serverApiKey = $apiKeyIn; } function setDevices($deviceIds){ if(is_array($deviceIds)){ $this->devices = $deviceIds; } else { $this->devices = array($deviceIds); } } /* Send the message to the device @param $message The message to send @param $data Array of data to accompany the message */ function send($message, $data = false){ //echo $this->serverApiKey.$this…
tagged with: push-notification
type: UnansweredQuestion

http://stackoverflow.com/comment/46409244
comment on: http://stackoverflow.com/a/29088073
has text: Yeah, fantastic point. Semicolons are good practice to use.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46455923
has text: please reformat your code block.It's hard to read
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29113507

http://stackoverflow.com/comment/46488821
has text: You have mistyped the query: you typed `Product$.query` instead of `Product.$query`. Another thing, the `$query` function returns an object that will be automagically filled up when request is fulfilled so you can assign it directly to your variable `products`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29130731

http://stackoverflow.com/a/29163161
score: 1
upvote count: 2
downvote count: 1
has body: is it, what u want? $(document).ready(function(){ var burl = "http://www.example.com"; $('a').attr('href', burl); }); ps using jQuery.
type: Answer
answers question: http://stackoverflow.com/q/29163097

http://stackoverflow.com/a/29178513
answers question: http://stackoverflow.com/q/29178474
score: 1
downvote count: 0
type: Answer
has body: You need to find the option which was selected using the value of the input element $K2 = jQuery.noConflict(); $K2('#submit').on('click', function () { var g = $K2('#to-selected').val(); var id = $K2('#to').find('option[value="' + g + '"]').attr('id'); alert(id); return false; }); Demo: Fiddle
upvote count: 1

http://stackoverflow.com/comment/47007351
type: QuestionComment
type: Comment
has text: $("#accomplishments").addClass("animated fadeOutLeft"); doesn't work?
comment on: http://stackoverflow.com/q/29153802
score: 0

http://stackoverflow.com/comment/66939527
type: Comment
comment on: http://stackoverflow.com/a/29149361
type: AnswerComment
has text: What if I want to only render the {indents}, without the enclosing div?
score: 0

http://stackoverflow.com/q/29169011
type: Question
score: 5
has body: I come from a Ruby background, which features an enumerable class. In Ruby, I can easily find combinations of array elements. array.combination(2).count I know that JavaScript doesn't feature such built in functions, so I was wondering how I could implement this in JS. I was thinking something like I have an array as follows var numbers = [9,7,12] var combos = [] for (var i = 0; i &lt; numbers.length; i++) { combos.push([numbers[i], numbers[i+1]) } By the way, the possible combos are [9,7], [9,12] and [7,12] so by calling the length function on this array, 3 would be returned. Any ideas?
upvote count: 5
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46556428
answer count: 3
has answer: http://stackoverflow.com/a/29169217
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29169088
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46556378
has answer: http://stackoverflow.com/a/29171121
has title: JavaScript arrays - Finding the number of combinations of 2 elements

http://stackoverflow.com/a/29136684
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46499677
has body: i am making a modification to Norlihazmey Ghazali's answer. But this modification would properly remove all components of the div that you have appended. $('#addTitles').on('click','.closed-btn',function(e){ e.preventDefault(); var par = $(this).closest($("[id^=app]")); $(par).remove(); });
type: Answer
answers question: http://stackoverflow.com/q/29136408
accepted answer of: http://stackoverflow.com/q/29136408

http://stackoverflow.com/comment/137543583
has text: "*You can't. The keys of a map can be anything*" that's only true in the most generic possible case when the programmer has no knowledge or expectation of the data being serialised. However, in the exceptionally vast majority or cases, it's entirely possible, moreover, *trivial* to implement a serialisation for maps. Since you *know* what the data is, it's not hard to create an extremely simple serialise/deserialise pair that will work. Where it might get hard is if an object key holds more than their key/values. E.g. it's a class instance or a function. But it'd be dubious to serialise that.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29085474
type: AnswerComment

http://stackoverflow.com/comment/46408623
score: 0
type: AnswerComment
has text: That's great Steve. Thanks. How would I then use the name in the other page in the same way I am currently using it with getElementByID and innerHTML to put the name inside a chosen id?
comment on: http://stackoverflow.com/a/29087589
type: Comment

http://stackoverflow.com/q/29185251
answer count: 1
has title: What is the maximum number of outputs for a Web Audio Context and Buffer
tagged with: audio
has comment: http://stackoverflow.com/comment/47245008
has body: I'm trying to create a program which can output audio to any number of arbitrary channels in a single buffer. I'm using Chrome 43.0.2339.0 canary (64-bit) on a Mac. The hardware I am outputting to is a Motu 16A which is capable of 128 channels of IO over thunderbolt connection. I've created a pen (based on a modified MDN example) which demonstrates what I'm trying to accomplish: http://codepen.io/alexanderson1993/pen/dPwqPL And the code: var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var button = document.querySelector('button'); audioCtx.destination.channelCount = 8 var channels = audioCtx.destination.channelCount; // Create an empty half-second buffer at the // sample rate of the AudioContext var frameCount = audioCtx.sampleRate * 0.5; button.onclick = function(){ var myArrayBuffer = audioCtx.createBuffer(audioCtx.destination.channelCount, frameCount, audioCtx.sampleRate); // Fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel &lt; channels; channel++) { // This gives us the actual ArrayBuffer that contains the data var nowBuffering = myArrayBuffer.getChannelData(channel); for (var i = 0; i &lt; frameCount; i++) { // Math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowBuffering[i] = Math.random() * 2 - 1; } } // Get an AudioBufferSourceNode. // This is the AudioNode to use when we want to play an AudioBuffer var source = audioCtx.createBufferSource(); // set the buffer in the AudioBufferSourceNode source.buffer = myArrayBuffer; // connect the AudioBufferSourceNode to the // destination so we can hear the sound source.connect(audioCtx.destination); // start the source playing source.start(); } You'll notice on line 4 I explicitly set the channel count to 8, even though my destination is capable of 128 channels (as is evidenced by running audioCtx.destination.maxChannelCount). This functions as expected, with audio being piped to all 8 channels. However, whenever I increa…
has answer: http://stackoverflow.com/a/29522556
upvote count: 5
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29522556
tagged with: web-audio-api
favorite count: 0
tagged with: html5-audio
type: Question
score: 5
has comment: http://stackoverflow.com/comment/47200512

http://stackoverflow.com/comment/46444076
type: AnswerComment
has text: I think ":int" is just an attempt to specify a type. I suspect he meant to say `amountSoFar = 1` since "int" is not being used.
score: 0
comment on: http://stackoverflow.com/a/29107180
type: Comment

http://stackoverflow.com/comment/46726797
type: QuestionComment
score: 0
type: Comment
has text: Could you write the code that download from Chrome in an iPad for me please? I'm implementing **download.min.js** but it doesn't works on my device. I've just update de iPad to iOS 8.2
comment on: http://stackoverflow.com/q/29134418

http://stackoverflow.com/comment/46498533
type: Comment
has text: I have tried what u have suggested, onclick event is wokring but I am not getting correct values while clicking on the bar chart. I have added points like [65, 59, 80, 81, 56, 55, 40] and I am accessing like points[0].y I am getting values while clicking like 75.2,90.4,37.3,34.7,98.0,100,59,138.5. I dont understand what are these values
comment on: http://stackoverflow.com/a/29131374
score: 1
type: AnswerComment

http://stackoverflow.com/comment/46514923
has text: Thanks, that is what I thought. I was hoping there was some built-in way, but it looks like a custom function will be just fine.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29128658

http://stackoverflow.com/q/29196513
tagged with: javascript
tagged with: jquery
has title: Jquery autoplay and autoplay next song
accepted answer: http://stackoverflow.com/a/29196941
answer count: 1
type: AnsweredQuestion
tagged with: audio
score: 0
has body: I can't seem to find useful code to make my playlist autoplay the first song when site loads and then when the song finishes, autoplay the next song. I got this code following a tutorial, but they did not include these functions. I have looks all over and the code I have seen has not helped me with my issue. var audio; //Hide pause buton $('#pause').hide(); //Initialize Audio initAudio($('#playlist li:first-child')); //Initializer Function function initAudio(element){ var song = element.attr('song') var title = element.text(); //Create audio object audio = new Audio('media/' + song); if(!audio.currentTime){ $('#duration').html('0.00'); } $('#audio-player .title').text(title); $('#playlist li') .removeClass('active'); element.addClass('active'); } //PLay Button $('#play') .click(function(){ audio.play(); $('#play') .hide(); $('#pause') .show(); $('#duration') .fadeIn(400); showDuration(); }); //Pause Button $('#pause') .click(function(){ audio.pause(); $('#pause') .hide(); $('#play') .show(); }); //Stop Button $('#stop') .click(function(){ audio.pause(); audio.currentTime = 0; $('#pause') .hide(); $('#play') .show(); $('#duration') .fadeOut(400); }); //Next Button $('#next').click(function(){ audio.pause(); var next = $('#playlist li.active').next(); if (next.length == 0) { next = $('#playlist li:first-child'); } initAudio(next); audio.play(); showDuration(); }); //Prev Button $('#prev') .click(function(){ audio.pause(); var prev = $('#playlist li.active').prev(); if (next.length == 0){ prev = $('playlist li:last-child'); } initAudio (prev); audio.play(); showDuration(); }); //Time Duration function showDuration(){ $(audio).bind('timeupdate', function(){ //Get Hours &amp; Minutes var s = parseInt (audio.currentTime % 60); var m = parseInt ((audio.currentTime)/ 60) % 60; //Add 0 if less than 10 if(s &lt; 10){ s = '0' + s; } $('#duration').html (m + '.' + s); var value = 0; if(audio.currentTime &gt; 0) { value = Math.floor((100 / audio.duration) * audio.currentTime); }…
type: Question
has answer: http://stackoverflow.com/a/29196941

http://stackoverflow.com/q/29181253
accepted answer: http://stackoverflow.com/a/29181489
tagged with: requestanimationframe
tagged with: javascript
has answer: http://stackoverflow.com/a/29181573
has answer: http://stackoverflow.com/a/29181489
answer count: 3
score: 8
favorite count: 0
has answer: http://stackoverflow.com/a/66736179
upvote count: 9
tagged with: animation
has comment: http://stackoverflow.com/comment/46582409
possible better answer: http://stackoverflow.com/a/66736179
type: AnsweredQuestion
has title: Is requestAnimationFrame implementation's recursive?
has comment: http://stackoverflow.com/comment/46579026
downvote count: 1
type: Question
has body: I'm currently experimenting with three.js, which relies on requestAnimationFrame to perform animations. Wouldn't the following code result in infinite recursion before the cube rotations and renderer.render function are invoked? function render() { requestAnimationFrame(render); cube.rotation.x += 0.1; cube.rotation.y += 0.1; renderer.render(scene, camera); } render(); The code works, but I'm trying to improve my overall understanding of JavaScript. The way I see it, is that render is invoked as a callback function. But does that mean that JavaScript continues running through the code in the function before stopping to move on to the next call?
linked to: http://stackoverflow.com/q/38229386

http://stackoverflow.com/comment/46401609
comment on: http://stackoverflow.com/a/29080791
has text: If you're going to upgrade, I'd suggest you upgrade all the way up to 7.2 at least, there's not many architectural difference (i.e. MongoDB in 7.5)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29162379
has comment: http://stackoverflow.com/comment/46544196
type: AnsweredQuestion
has body: I have the following code that runs a loop and updates the page as it goes. At the moment the page does not update until the entire loop has run its course. As you can see, I tried adding a draw function drawValues that is called every 5000 times to draw the current values to the screen. My understanding is that when drawValues is updated, the page should update and then the main loop will resume with its calculations until another 5000 loops. At the moment the page will not update until the loop runs in its entirety, somehow ignoring every other call to drawValues Full Snippet: /*jslint browser: true*/ /*global $, jQuery, alert*/ $(document).ready(function() { 'use strict'; var namesAtStart = ["Sam", "John"], specialNum = 8, amountOfNames = namesAtStart.length, counter = [], renderCounter = 0, x, a, loopLength, number, id, preId = "content_", finalId; for (a = 0; a < amountOfNames; a += 1) { counter.push(0); } for (x = 1; x <= specialNum; x += 1) { // Start the counter array at zero for (a = 0; a < amountOfNames; a += 1) { counter[a] = 0; } loopLength = Math.pow(10, x); finalId = preId + loopLength.toString(); $(".output-small").append(''); for (a = 0; a < loopLength; a += 1) { number = Math.floor((Math.random() * amountOfNames) + 1); counter[number - 1] += 1; renderCounter += 1; if (renderCounter == 5000) { drawValues(namesAtStart, counter, finalId, x, a); } if (a == loopLength - 1) { // This is where I am trying to make the code non blocking and async drawValues(namesAtStart, counter, finalId, x, a); } } } }); // This is the part that I want to run when called and update page. function drawValues(names, counter, finalId, id, currentCount) { 'use strict'; var a; $("#" + finalId).empty(); $("#" + finalId).append(" " + Math.pow(10, id).toLocaleString() + " "); for (a = 0; a < names.length; a += 1) { $("#" + finalId).append( names[a] + ": " + counter[a].toLocaleString() + " (" + (counter[a] / currentCount * 100).toFixed(2) + "%) " ); } $("#" + finalId).append("Numeri…
has answer: http://stackoverflow.com/a/29162473
has title: JavaScript non-blocking updates to page
type: Question
has comment: http://stackoverflow.com/comment/46544264
has comment: http://stackoverflow.com/comment/46544418
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46544392
score: 0
accepted answer: http://stackoverflow.com/a/29162473
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/46544240

http://stackoverflow.com/comment/46622137
comment on: http://stackoverflow.com/q/29205031
type: QuestionComment
has text: Dude, OP, your question started off great with that nice clean array of objects and then turned in to nonsensical nothing when you listed the 2nd block of code. Instead of the entire 2nd block of code, just list another nice clean array of objects that you DESIRE. We'll take care of telling you the code to convert 'Array 1' into desired 'Array 2'.
score: 0
type: Comment

http://stackoverflow.com/a/29197615
accepted answer of: http://stackoverflow.com/q/29197410
has body: Remove the selected attribute on the default option and use ng-selected="user.deliveryTime === deliveryTime.time" : Delivery Slot {{deliveryTime.time}}
answers question: http://stackoverflow.com/q/29197410
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/q/29092237
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: In my Windows mobile app using Js i want to capture video, compress it and send it to server if front cam available from front cam i searched but i didn't found any proper documentation for js.
has title: Video capturing in Windows mobile app using Js
has answer: http://stackoverflow.com/a/29109302
type: AnsweredQuestion
tagged with: windows-phone-8.1
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29109302

http://stackoverflow.com/q/29158723
has answer: http://stackoverflow.com/a/66475591
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46537686
has comment: http://stackoverflow.com/comment/46537963
has answer: http://stackoverflow.com/a/29158816
has answer: http://stackoverflow.com/a/31767249
has comment: http://stackoverflow.com/comment/46537731
tagged with: flatten
has answer: http://stackoverflow.com/a/54524056
answer count: 15
favorite count: 0
has comment: http://stackoverflow.com/comment/46537775
has comment: http://stackoverflow.com/comment/121935787
has comment: http://stackoverflow.com/comment/46537856
has answer: http://stackoverflow.com/a/71162130
has answer: http://stackoverflow.com/a/54087416
possible better answer: http://stackoverflow.com/a/29158887
has answer: http://stackoverflow.com/a/50020934
has answer: http://stackoverflow.com/a/29158774
has body: I have an array which contains several arrays, each containing several objects, similar to this. [[object1, object2],[object1],[object1,object2,object3]] Here is a screenhot of the object logged to the console. What would be the best approach to flattening this out so it just an array of objects? I've tried this with no luck: console.log(searchData); var m = [].concat.apply([],searchData); console.log(m); searchData logs out the screenshot above, but m logs out [ ] Here is the actual contents of searchData: [[{"_id":"55064111d06b96d974937a6f","title":"Generic Title","shortname":"generic-title","contents":" The Healing Center offers practical, social, and spiritual support to individuals and families. Services include, but are not limited to: food and clothing, job skills training and job search assistance, auto repair (Saturdays only), mentoring, financial counseling, tutoring, prayer, life skills training, and helpful information about local community services. Stay in touch with us: ","__v":0},{"_id":"5508e1405c621d4aad2d2969","title":"test english","shortname":"test-page","contents":" English Test ","__v":0}],[{"_id":"550b336f33a326aaee84f883","shortname":"ok-url","title":"now english","contents":" okokko ","category":"Transportation","__v":0}]]
has answer: http://stackoverflow.com/a/29158772
has answer: http://stackoverflow.com/a/53278932
has answer: http://stackoverflow.com/a/29158887
has answer: http://stackoverflow.com/a/77637902
has comment: http://stackoverflow.com/comment/72527894
has title: JavaScript flattening an array of arrays of objects
has answer: http://stackoverflow.com/a/52680940
type: AnsweredQuestion
score: 59
accepted answer: http://stackoverflow.com/a/29158772
linked to: http://stackoverflow.com/q/10865025
has answer: http://stackoverflow.com/a/70301955
upvote count: 59
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/68021620

http://stackoverflow.com/a/29139338
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46502788
has body: Try to replace data: data, with data: JSON.stringify(data),.
has comment: http://stackoverflow.com/comment/46504160
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29139290
has comment: http://stackoverflow.com/comment/46504293
answers question: http://stackoverflow.com/q/29139290
score: 1
has comment: http://stackoverflow.com/comment/46502582

http://stackoverflow.com/a/31643759
type: Answer
answers question: http://stackoverflow.com/q/29080978
score: 0
has body: For anyone else who stumbles upon this in a frustrated googling haze... After the first hyphen is added, it changes the length of the array, so it gets evaluated in the loop to see if the hyphen element !== 0. Since a '-' !== 0, another hyphen is added. This is also why you keep blowing your stack since the hyphen keeps changing the length of your array (side note, always cache your length in a variable outside of your for loop and use that in your loop instead). To fix it, you could add a bunch more &amp;&amp;'s to your if statement i.e. if(theArray[x] % 2 !== 0 &amp;&amp; theArray[x+1]% 2 !== 0 &amp;&amp; theArray[x] !== '-' &amp;&amp; theArray[x+1] !== '-') or you could just be more specific and only look for modulo results that evaluate to 1.

http://stackoverflow.com/comment/46406134
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29086494
has text: @Dagon Sorry, I tagged them as I thought jquery and php could be alternative ways of solving my problem

http://stackoverflow.com/q/29158493
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46537726
has title: Javascript equivalent of pluck and uniq from Ruby
has comment: http://stackoverflow.com/comment/46538107
type: Question
has answer: http://stackoverflow.com/a/29158967
answer count: 1
tagged with: javascript
has body: Hi I am trying to convert my database from Postgres to Mongo and changing from Ruby to Javascript, I am having trouble converting the following query. name_array = RoomRaw.pluck(:name).uniq() Any help is appreciated. Edit: Also is it possible to do the sum of a row? ie. energy_ac = RoomRaw.where(timestamp: (beginning_of_last_full_hour..end_of_last_full_hour), name: name).last.sum(:energy_ac)
has comment: http://stackoverflow.com/comment/46537699
score: 0
accepted answer: http://stackoverflow.com/a/29158967
tagged with: ruby
has comment: http://stackoverflow.com/comment/46542180

http://stackoverflow.com/comment/46484787
type: Comment
type: QuestionComment
score: 2
has text: Try: `clickContainer.addEventListener('submit', loadData);`. Pass the event listener the function, not what the function returns.
comment on: http://stackoverflow.com/q/29129481

http://stackoverflow.com/comment/46600610
type: Comment
has text: @RobertLongson Hm, I currently load the document from the local file system, so no mime type is specified. When delivered via an http server that once specifies `image/svg+xml`. I added the document intro to the question above.
comment on: http://stackoverflow.com/q/29192909
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46479891
type: Comment
comment on: http://stackoverflow.com/a/29126865
has text: Thanks for the input! Yeah I am seeking to display images and a small amount of text copy per state.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46602444
comment on: http://stackoverflow.com/a/29194494
type: Comment
score: 1
has text: @Bram So as not to leave the dialog expanded. Because that was not my aim - to expand the dialog, so we hide it after getting data.
type: AnswerComment

ajax
tags question: http://stackoverflow.com/q/29106103
tags question: http://stackoverflow.com/q/29073351
tags question: http://stackoverflow.com/q/29090089
tags question: http://stackoverflow.com/q/29142030
tags question: http://stackoverflow.com/q/29170683
tags question: http://stackoverflow.com/q/29153007
tags question: http://stackoverflow.com/q/29192034
tags question: http://stackoverflow.com/q/29120102
tags question: http://stackoverflow.com/q/29096426
tags question: http://stackoverflow.com/q/29135706
tags question: http://stackoverflow.com/q/29074226
tags question: http://stackoverflow.com/q/29093439
tags question: http://stackoverflow.com/q/29093420
tags question: http://stackoverflow.com/q/29139536
tags question: http://stackoverflow.com/q/29130557
tags question: http://stackoverflow.com/q/29119905
tags question: http://stackoverflow.com/q/29174297
tags question: http://stackoverflow.com/q/29084298
tags question: http://stackoverflow.com/q/29174955
tags question: http://stackoverflow.com/q/29154297
tags question: http://stackoverflow.com/q/29087892
tags question: http://stackoverflow.com/q/29179662
tags question: http://stackoverflow.com/q/29128717
tags question: http://stackoverflow.com/q/29139290
tags question: http://stackoverflow.com/q/29111889
tags question: http://stackoverflow.com/q/29143496
tags question: http://stackoverflow.com/q/29095760
tags question: http://stackoverflow.com/q/29201938
tags question: http://stackoverflow.com/q/29063391
tags question: http://stackoverflow.com/q/29144602
tags question: http://stackoverflow.com/q/29073754
tags question: http://stackoverflow.com/q/29108966
tags question: http://stackoverflow.com/q/29179967
tags question: http://stackoverflow.com/q/29082864
tags question: http://stackoverflow.com/q/29089104
tags question: http://stackoverflow.com/q/29192882
tags question: http://stackoverflow.com/q/29188563
tags question: http://stackoverflow.com/q/29208417
tags question: http://stackoverflow.com/q/29140719
tags question: http://stackoverflow.com/q/29113729
tags question: http://stackoverflow.com/q/29084116
tags question: http://stackoverflow.com/q/29066363
tags question: http://stackoverflow.com/q/29155195
tags question: http://stackoverflow.com/q/29143155
tags question: http://stackoverflow.com/q/29069975
tags question: http://stackoverflow.com/q/29215982
tags question: http://stackoverflow.com/q/29089145
tags question: http://stackoverflow.com/q/29116304
tags question: http://stackoverflow.com/q/29130941
tags question: http://stackoverflow.com/q/29139935
tags question: http://stackoverflow.com/q/29098571
tags question: http://stackoverflow.com/q/29087600
type: Tag
tags question: http://stackoverflow.com/q/29126342
tags question: http://stackoverflow.com/q/29105523
tags question: http://stackoverflow.com/q/29071990
tags question: http://stackoverflow.com/q/29097090
tags question: http://stackoverflow.com/q/29192444
tags question: http://stackoverflow.com/q/29081235
tags question: http://stackoverflow.com/q/29114334
tags question: http://stackoverflow.com/q/29097101
tags question: http://stackoverflow.com/q/29116491
tags question: http://stackoverflow.com/q/29085874
tags question: http://stackoverflow.com/q/29105909
tags question: http://stackoverflow.com/q/29116954
tags question: http://stackoverflow.com/q/29152146
tags question: http://stackoverflow.com/q/29213717
tags question: http://stackoverflow.com/q/29204482
tags question: http://stackoverflow.com/q/29092448
tags question: http://stackoverflow.com/q/29081246
tags question: http://stackoverflow.com/q/29076806
tags question: http://stackoverflow.com/q/29214977
tags question: http://stackoverflow.com/q/29165008
tags question: http://stackoverflow.com/q/29108436
tags question: http://stackoverflow.com/q/29136385
tags question: http://stackoverflow.com/q/29188336
tags question: http://stackoverflow.com/q/29190923
tags question: http://stackoverflow.com/q/29175076
tags question: http://stackoverflow.com/q/29175006
tags question: http://stackoverflow.com/q/29095184

http://stackoverflow.com/comment/46562816
type: Comment
has text: When I use files.get it returns a 404 file not found as I think I have to authenticate again to access the file info (i.e get downloadUrl). To authenticate I have to create the authurl and ask the user to authenticate right? Which makes the authentication twice one through Google Picker and another to download. Is there any other way?
score: 0
comment on: http://stackoverflow.com/q/29163385
type: QuestionComment

http://stackoverflow.com/q/29188736
favorite count: 0
type: Question
tagged with: python
tagged with: client-side
has title: What would cause a delay and in some cases skipping of client side calculations?
tagged with: django
upvote count: 1
tagged with: heroku
type: UnansweredQuestion
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/46592285
tagged with: javascript
score: 1
has body: Hopefully I'm asking the right question: I recently built a competition scoring app, eventually I'd like to get to the point where I learn how to build a websocket (I think that a good idea, no?) for it but right now it works as follows. Users input scores into a form, the form is submitted to page where django takes the information and adds it to the database as follows: #Every time a form is submitted it goes through this #get results from the post number_of_judges = 15 judge = request.POST.get("judge") round = request.POST.get("round") pk = request.POST.get("pk") event = request.POST.get("event") cat1 = float(request.POST.get("cat1")) * 5 cat2 = float(request.POST.get("cat2"))* .5 cat3 = float(request.POST.get("cat3"))*2.5 cat4 = float(request.POST.get("cat4")) cat5 = float(request.POST.get("cat5"))*1.5 total = sum([cat1, cat2, cat3, cat4, cat5]) if round == "R1": inst = firstround_1.objects.get(pk =int(pk)) scoring = score.objects.create(person = inst, judge = judge, cat1 = cat1, cat2 = cat2, cat3 = cat3, cat4 = cat4, cat5 = cat5, total = total, event = event) #this is here so i can go back and look at individual entries inst.score = float(inst.score) + ( total / number_of_judges ) inst.Entry = inst.Entry + 1 #I put this here to track how many judges that submitted inst.save() The problems I experienced was that some were delays, and some came in as duplicates, some seem to not have even made it into the final calculation of the persons score. There are on average 15 people inputting, I am using python-django 1.6.5. Could this have been a wifi issue? (I was sharing wifi with a streaming service) What are some ways I can prevent these problems? I have since moved the app to heroku so that I can increase the dynos and such, would this actually help?

http://stackoverflow.com/comment/46535164
has text: You can use the `renderlet` call to do this. See https://github.com/dc-js/dc.js/blob/master/web/docs/api-1.6.0.md#renderletrenderletfunction
comment on: http://stackoverflow.com/q/29156839
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46462277
type: Comment
score: 0
type: AnswerComment
has text: I don't want to hide the scrollbars. I want to know when the system shows them. Mac OS defaults hide scrollbars, but when you start scrolling they do appear. Some browsers overlap the content with the appeared scrollbars. When I know the moment when the scrollbar appears I can move the overlapped elements.
comment on: http://stackoverflow.com/a/29107009

http://stackoverflow.com/comment/46405942
score: 0
comment on: http://stackoverflow.com/q/29085792
type: Comment
has text: Just call `alert` if you want a simple popup.
type: QuestionComment

http://stackoverflow.com/a/29657144
accepted answer of: http://stackoverflow.com/q/29150050
has comment: http://stackoverflow.com/comment/47839341
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29150050
upvote count: 8
has comment: http://stackoverflow.com/comment/47562832
type: Answer
has body: Full disclosure: I'm part of ArangoDB's development team and primarily work on Foxx and everything JavaScript. I'm also the guy who wrote the org/arangodb/request module. ArangoDB is a different environment than Node.js, despite sharing many similarities (such as using the V8 JavaScript engine). Unlike Node.js (or the browser), ArangoDB uses a thread-based concurrency model and doesn't feature an Event Loop. However the threads are not exposed in JavaScript (and in fact in V8 every thread is fully isolated) so you normally don't even have to think of them. In the browser and in Node.js functions like setTimeout work by delaying code execution via the Event Loop (until a certain amount of time has passed or until an external event has occurred). In ArangoDB the code is always executed linearly. For example, incoming HTTP requests are passed to Foxx controllers in JavaScript and the response is sent as soon as the controller returns. Even if you could use setTimeout, the external resources you were working with (or even "internal" ones like the document collections and transactions) would likely be already gone by the time the delayed code could execute. Because of this, the request function provided by the org/arangodb/request module is also entirely synchronous. Instead of returning a promise or taking a callback it directly returns the incoming response data. It is also decidedly not the same module as request on npm but rather a synchronous implementation based on that module's API to the extent that implementing its API is possible outside Node.js (e.g. not including streams and returning the remote response instead of taking callbacks). If you come from a Node.js/io.js background, this may feel wrong because non-blocking IO can achieve higher throughput, but keep in mind that the design goals of ArangoDB and Node.js are very different. Node.js is built around streams and network connections. ArangoDB is built as a persistent data storage and has to deal with tra…
score: 8

http://stackoverflow.com/comment/46366300
comment on: http://stackoverflow.com/q/29064840
score: 0
type: Comment
type: QuestionComment
has text: Can you prepend the rest of the vars with _ and see if that does anything?

http://stackoverflow.com/q/29117464
has answer: http://stackoverflow.com/a/29117741
tagged with: javascript
has title: Returning Set of Styles
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29117617
tagged with: css
has answer: http://stackoverflow.com/a/29117617
accepted answer: http://stackoverflow.com/a/29117741
type: AnsweredQuestion
has body: Hello World The code i want to make is that it toggles between two sets of Styles whenever mouse is licked on 'para' element. But i couldn't figure out how to return the styles to the 'para.onclick' call below the function.
type: Question
answer count: 2

http://stackoverflow.com/a/29147392
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/29147312
has body: controller="VegetableCtrl" should be ng-controller="VegetableCtrl"
type: Answer

http://stackoverflow.com/a/29106274
has body: This is the standard way: No logic in UI, I removed all of event-related codes Ext.define('imp.view.Login', { extend: 'Ext.form.Panel', alias: "widget.login", xtype: 'login', requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img', 'Ext.util.DelayedTask', 'imp.controller.Login'], config: { title: 'Login', items: [ { xtype: 'button', itemId: 'testButton', ui: 'action', padding: '10px', text: 'Test' }, { xtype: 'textfield', itemid: 'editBox' } ] } }); Here how to handle the Tap even in a controller: Ext.define('imp.controller.Login', { extend: 'Ext.app.Controller', config: { refs: { loginView: 'loginview', mainMenuView: 'mainmenuview' }, control: { 'loginview #testButton': { tap: 'onTestCommand' } } }, onTestCommand: function (button, e, eOpts){ console.log('onTestCommand'); /*a sefe way to get editbox value*/ var Form = button.up('formpanel'); var editbox = Form.down('#editBox'); var value = editbox.getValue(); }});
has comment: http://stackoverflow.com/comment/46707708
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46725006
answers question: http://stackoverflow.com/q/29080256

http://stackoverflow.com/q/29173516
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29174364
accepted answer: http://stackoverflow.com/a/29174364
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29186086
has title: Meteor - Simple Search Issues
upvote count: 1
has body: So I'm trying to do a live search of some client-side info in Meteor. I have Template.userTable.events({ "change #nameSearchBar":function(event){ //console.log(event); searchText = event.target.value; filteredUsers = Meteor.users.find({"profile.name":{$regex: (".*"+searchText+".*") } }); console.log(filteredUsers.fetch()); } }); In my js, and Template.userTable.helpers({ usersOnline: function() { return filteredUsers; } }); As well. I can see that filteredUsers is updated in the console logs, but I don't get the nice live-update of the html that lists usersOnline - instead I just get all of them, which is what the usersOnline was initialised to, by calling filteredUsers = Meteor.users.find(). How can I get the desired live-update?
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/29186086

colors
tags question: http://stackoverflow.com/q/29141174
tags question: http://stackoverflow.com/q/29066486
tag name: colors
type: Tag

http://stackoverflow.com/comment/46390128
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29077953
has text: @bloodyKnuckles I've put them there from the start to see if the function was failing. I'm still very new to javascript.

http://stackoverflow.com/comment/46586634
type: QuestionComment
type: Comment
score: 2
has text: I work in a system where the the export should be from the server side
comment on: http://stackoverflow.com/q/29183618

http://stackoverflow.com/comment/46553293
type: AnswerComment
score: 0
type: Comment
has text: Just got around to trying this out and it works well. Accessed the image width via `img.src` as I didn't need the `onload` stuff. Though apparently this question is a dupe lol.... but a different answer specific to my query solved my issue, fancy that lol - thanks man!
comment on: http://stackoverflow.com/a/29150066

http://stackoverflow.com/comment/46458125
score: 0
has text: Great, this works well, thank you for the effort! It's better than my use of the while loop, I think.
type: AnswerComment
comment on: http://stackoverflow.com/a/29114755
type: Comment

http://stackoverflow.com/comment/46541921
type: QuestionComment
comment on: http://stackoverflow.com/q/29161103
score: 0
has text: i see it did work so using $('# or . ') alone does not use or access DOM? Is this what your trying to say?
type: Comment

http://stackoverflow.com/a/29072316
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29069979
score: 3
has body: It looks like your payload is a string rather than a parsed JSON array. Try payload = JSON.parse(payload); then in your handlebars template use {{#each payload}} {{title}}&lt;br&gt; {{author}} {{/each}}
answers question: http://stackoverflow.com/q/29069979
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46450912
type: Comment
type: QuestionComment
has text: @dustmouse no change. Exactly the same bug/behavior.
score: 0
comment on: http://stackoverflow.com/q/29110693

http://stackoverflow.com/comment/46588362
has text: Isn't there a way to just get the final URL from the dataSource object???
score: 4
comment on: http://stackoverflow.com/q/29183618
type: QuestionComment
type: Comment

css
tags question: http://stackoverflow.com/q/29192641
tags question: http://stackoverflow.com/q/29193331
tags question: http://stackoverflow.com/q/29140376
tags question: http://stackoverflow.com/q/29104661
tags question: http://stackoverflow.com/q/29119833
tags question: http://stackoverflow.com/q/29182310
tags question: http://stackoverflow.com/q/29199439
tags question: http://stackoverflow.com/q/29181031
tags question: http://stackoverflow.com/q/29100875
tags question: http://stackoverflow.com/q/29090343
tags question: http://stackoverflow.com/q/29173548
tags question: http://stackoverflow.com/q/29077046
tags question: http://stackoverflow.com/q/29211146
tags question: http://stackoverflow.com/q/29087648
tags question: http://stackoverflow.com/q/29073416
tags question: http://stackoverflow.com/q/29108766
tags question: http://stackoverflow.com/q/29173908
tags question: http://stackoverflow.com/q/29104135
tags question: http://stackoverflow.com/q/29149705
tags question: http://stackoverflow.com/q/29091627
tags question: http://stackoverflow.com/q/29171009
tags question: http://stackoverflow.com/q/29122050
tags question: http://stackoverflow.com/q/29157248
tags question: http://stackoverflow.com/q/29094985
tags question: http://stackoverflow.com/q/29121599
tags question: http://stackoverflow.com/q/29204276
tags question: http://stackoverflow.com/q/29197580
tags question: http://stackoverflow.com/q/29100856
tags question: http://stackoverflow.com/q/29171537
tags question: http://stackoverflow.com/q/29173915
tags question: http://stackoverflow.com/q/29107631
tags question: http://stackoverflow.com/q/29157494
tags question: http://stackoverflow.com/q/29162674
tags question: http://stackoverflow.com/q/29160687
tags question: http://stackoverflow.com/q/29104372
tags question: http://stackoverflow.com/q/29121787
tags question: http://stackoverflow.com/q/29215229
tags question: http://stackoverflow.com/q/29078701
tags question: http://stackoverflow.com/q/29085489
tags question: http://stackoverflow.com/q/29135383
tags question: http://stackoverflow.com/q/29182416
tags question: http://stackoverflow.com/q/29091112
tags question: http://stackoverflow.com/q/29204776
tags question: http://stackoverflow.com/q/29121365
tags question: http://stackoverflow.com/q/29081381
tags question: http://stackoverflow.com/q/29070030
tags question: http://stackoverflow.com/q/29093700
tags question: http://stackoverflow.com/q/29175553
tags question: http://stackoverflow.com/q/29114436
tags question: http://stackoverflow.com/q/29157077
tags question: http://stackoverflow.com/q/29084765
tags question: http://stackoverflow.com/q/29145034
tags question: http://stackoverflow.com/q/29138748
tags question: http://stackoverflow.com/q/29150138
tags question: http://stackoverflow.com/q/29106063
tags question: http://stackoverflow.com/q/29214139
tags question: http://stackoverflow.com/q/29183308
tags question: http://stackoverflow.com/q/29160328
tags question: http://stackoverflow.com/q/29122497
tags question: http://stackoverflow.com/q/29116205
tags question: http://stackoverflow.com/q/29151675
tags question: http://stackoverflow.com/q/29213308
tags question: http://stackoverflow.com/q/29162860
tags question: http://stackoverflow.com/q/29122877
tags question: http://stackoverflow.com/q/29218133
tags question: http://stackoverflow.com/q/29109316
tags question: http://stackoverflow.com/q/29207173
tags question: http://stackoverflow.com/q/29068441
tags question: http://stackoverflow.com/q/29091862
tags question: http://stackoverflow.com/q/29179157
tags question: http://stackoverflow.com/q/29175782
tags question: http://stackoverflow.com/q/29161939
tags question: http://stackoverflow.com/q/29145130
tags question: http://stackoverflow.com/q/29099504
tags question: http://stackoverflow.com/q/29110166
tags question: http://stackoverflow.com/q/29134586
tags question: http://stackoverflow.com/q/29062664
tags question: http://stackoverflow.com/q/29111942
tags question: http://stackoverflow.com/q/29184532
tags question: http://stackoverflow.com/q/29208726

http://stackoverflow.com/q/29121235
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46469053
score: 1
type: Question
tagged with: jqgrid
tagged with: javascript
has body: Example from http://www.trirand.net/demo/javascript/jqgrid/loading_data/scrollbar/index.html Versions of Guriddo jqGrid JS: 4.7.0 and 4.7.1. Add gridview: true to repeat bug (function ($) { 'use strict'; $(function () { $('#jqGrid').jqGrid({ url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&amp;qwery=longorders', mtype: 'GET', datatype: 'json', page: 1, colNames: ['Order ID', 'Customer ID', 'Order Date', 'Freight', 'Ship Name'], colModel: [{ name: 'OrderID', key: true, width: 75 }, { name: 'CustomerID', width: 150 }, { name: 'OrderDate', width: 150 }, { name: 'Freight', width: 150 }, { name: 'ShipName', width: 150 }], width: 750, height: 250, rowNum: 20, gridview: true, scroll: 1, // set the scroll property to 1 to enable paging with scrollbar - virtual loading of records emptyrecords: 'Scroll to bottom to retrieve new page', // the message will be displayed at the bottom pager: '#jqGridPager' }); }); })(jQuery); When you select some checkboxes on the page X and scroll down, and then go back to page X, checkboxes become unchecked, but selection is still applied, and .jqGrid('getGridParam', 'selarrrow') returns selected rows. The problem repeats only with gridview: true. I make some demo screencast that repeat bug.
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: multipleselection
favorite count: 0
has title: Multiple checkboxes at jqgrid have gone uncheked after scroll with gridview: true
tagged with: jqgrid-asp.net
has answer: http://stackoverflow.com/a/29142519
accepted answer: http://stackoverflow.com/a/29142519

http://stackoverflow.com/a/29066759
answers question: http://stackoverflow.com/q/29064209
has comment: http://stackoverflow.com/comment/54381232
score: 25
downvote count: 0
has comment: http://stackoverflow.com/comment/89763430
has body: Google’s documentation only mentions that they can consume dynamically added structured data if the syntax JSON-LD is used: Also, Google can read JSON-LD data even when it is dynamically injected into the page's contents, such as by Javascript code or embedded "widgets". This does not necessarily mean that they can’t read it in case of other syntaxes (like Microdata or RDFa), but at least they don’t document it. That their testing tool doesn’t read it may or may not mean something (it could be that the tool doesn’t handle this but their internal system does). However, there should be no issue with your actual markup, as you can easily test it yourself by pasting your markup instead of entering your URL.
upvote count: 25
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/54381801
accepted answer of: http://stackoverflow.com/q/29064209
has comment: http://stackoverflow.com/comment/108621844
type: Answer

http://stackoverflow.com/comment/46401806
comment on: http://stackoverflow.com/q/29084369
type: Comment
type: QuestionComment
score: 2
has text: Try: `dataJSON.companies[0].fields[mediaType].length;`

http://stackoverflow.com/q/29150835
has comment: http://stackoverflow.com/comment/48466027
has comment: http://stackoverflow.com/comment/48466177
answer count: 1
has comment: http://stackoverflow.com/comment/46532655
favorite count: 0
tagged with: backbone.js
tagged with: extends
has answer: http://stackoverflow.com/a/29151412
accepted answer: http://stackoverflow.com/a/29151412
has title: How do I make an extend method that works like Backbone's, using jQuery?
has body: I would like to use jQuery's extend method to create a method that does this: var a = foo.extend({bar:'a'}); var b = new a({}); // b instanceof a =&gt; true In other words, I would like extend to create a class. How do I do it?
upvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46535676
type: Question
score: -2
tagged with: javascript
tagged with: jquery
downvote count: 6

http://stackoverflow.com/a/29229283
downvote count: 0
answers question: http://stackoverflow.com/q/29211068
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46665896
has comment: http://stackoverflow.com/comment/46665756
score: 2
has body: To achieve this you should be looking at very old browsers. For example, Firefox 3. Modern browsers do not seem to be vulnerable to this attack. See here for some methods of defence - whether they are worthwhile is a matter of opinion. At the moment, no they are not worthwhile. However, if a new, vulnerable browser becomes popular then great - your defense could have saved a user and their data from being stolen - but just because there was a vulnerability in the past, doesn't mean it will be again in the future. There is just as likely to be a different, unknown vulnerability existing in future. Most modern browsers update automatically, so if there was a flaw this would usually be patched pretty quickly. It does take little effort to defend against, so in the end it is up to the developer to decide whether the cost covers the potential risk exposure.

http://stackoverflow.com/comment/46447844
has text: Thanks for this advice, Pocketg! I'm working on it now.
comment on: http://stackoverflow.com/a/29102185
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46454843
type: QuestionComment
has text: It's Firefox 36.0.1.
comment on: http://stackoverflow.com/q/29112492
score: 0
type: Comment

http://stackoverflow.com/comment/46473324
comment on: http://stackoverflow.com/q/29123425
has text: Have you got [Disable Local File Restrictions](https://support.apple.com/en-gb/HT5364) set in your developer menu in Safari?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29137957
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46500180
upvote count: 8
accepted answer of: http://stackoverflow.com/q/29137862
has body: C# allows you to use var to specify that the type will be evaluated some other way than explicitly stating it. That's quite handy for code that used to look like this: Type&lt;string,int,int,int,int&gt; xyzzy = new Type&lt;string,int,int,int,int&gt;(); Now you can instead do: var xyzzy = new Type&lt;string,int,int,int,int&gt;(); However, the variable itself is still statically typed, so the type must be available at the point where the variable is created, so that the compiler can know what to do with it. The clue lies in the error message you see: Implicitly-typed local variables must be initialized Note that it's implicitly-typed rather than untyped. So, of these: int x; // explicit int. var x = 7; // implicit int because we're using int to set it. var x; // no idea what type this should be. the first two are okay because the type information is available. The third is not okay because the information as to what type you want is not available. Contrast the use of var with dynamic - the latter is more closely related to var in Javascript, it's dynamically typed(a) and figuring out what can be done to it is deferred until run-time. (a) Technically, I think it's still considered a static type but the regular type checking is bypassed at compile time.
type: Answer
answers question: http://stackoverflow.com/q/29137862
score: 8

http://stackoverflow.com/comment/46504119
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29139665
type: AnswerComment
has text: Please correct your answer. `td.append`, you pass a string.

http://stackoverflow.com/a/29216999
answers question: http://stackoverflow.com/q/29216881
type: Answer
upvote count: 9
downvote count: 0
has body: The keys to understanding both of those statements are: Understanding what arguments is Understanding "shadowing" So let's talk about arguments, then talk about shadowing, and then I think it'll be fairly clear what those two statements are trying to say. arguments The arguments object is provided as part of the scope within a function: It's effectively an automatically-defined variable that has a pseudo-array of the arguments the function was called with: function foo() { console.log("My arg count: " + arguments.length); } foo(1, 2, 3); // My arg count: 3 When I say automatically-defined, I mean it's very much as though you had this: // CONCEPTUAL, not real function foo() { var arguments = /*...magic code to get the arguments we were called with */; console.log("My arg count: " + arguments.length); } foo(1, 2, 3); // My arg count: 3 ...it's just that the JavaScript engine does it for you. The arguments object is a lot like an array&nbsp;&mdash; as we saw above, it has length, and you can access the individual arguments using the usual [] notation: function foo() { var n; console.log("My arg count: " + arguments.length); for (n = 0; n &lt; arguments.length; ++n) { console.log(arguments[n]); } } foo(1, 2, 3); Output: My arg count: 3 1 2 3 You can even use named arguments and the arguments pseudo-array in the same function: function foo(a) { console.log("a = " + a); console.log("arguments[0] = " + arguments[0]); } foo("Hi there"); Output: a = Hi there arguments[0] = Hi there It's a pseudo-array because although it has length and [] indexing, it's not really an array and doesn't have all of the features normal arrays have (like slice, forEach, etc.). In loose mode, it also has the very surprising property that it's linked to the named arguments, so you get weird stuff like this: function foo(a) { console.log("before: a = " + a); arguments[0] = a * 2; console.log("after: a = " + a); } foo(10); Output: befer: a = 10 after: a = 20 Spooky, eh? In strict mode, that link isn…
score: 9

http://stackoverflow.com/a/29103080
has body: I don't think what you are trying to achieve is the correct solution. In your situation, I would probably just pass $scope.data.team.organization_id as a parameter to your state and use it in the resolve block. .state('app.teams.show.games.add', { url: '/add/:orgId', // or /add?orgId or :orgId/add templateUrl: 'templates/schedule/games/add.html', controller: 'GamesAddCtrl', resolve:{ org: function($http, $stateParams){ return $http.get('http://api.example.com/orgs/'+$stateParams.orgId, {cache: true}); } } })
score: 0
answers question: http://stackoverflow.com/q/29102270
type: Answer

http://stackoverflow.com/comment/46528582
has text: Yes, it is because `test` is a string. You could do `test = metro;` but at thhat point, why use a variable at all?
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29153714
type: Comment

http://stackoverflow.com/comment/46551734
type: AnswerComment
type: Comment
has text: there is a big file which contains Long lat and ID.. I am not allowed to write Marker statically for each. Is tehre any other solution ?
comment on: http://stackoverflow.com/a/29165592
score: 0

http://stackoverflow.com/comment/46391378
comment on: http://stackoverflow.com/a/29077397
type: AnswerComment
has text: It's strange that Google complains about these files – I'm using GA on all of my websites, I never received a notification like this. Moreover, these files are JS scripts and therefore not a part of normal indexing process (search engines don't run JS anyway). In sum, I would simply ignore the warnings.
score: 0
type: Comment

http://stackoverflow.com/q/29123083
tagged with: firefox
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29125759
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/29123341
favorite count: 0
tagged with: xpath
has answer: http://stackoverflow.com/a/29123341
has comment: http://stackoverflow.com/comment/46473075
has comment: http://stackoverflow.com/comment/46475362
upvote count: 1
tagged with: python
has title: Selenium test fails with Firefox when trying to log in
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29125759
has comment: http://stackoverflow.com/comment/46475419
score: 1
has comment: http://stackoverflow.com/comment/46475393
tagged with: selenium
type: Question
has body: We created extensions for Chrome, Firefox and Safari and we want to test our extensions with Selenium. I created a test to log in to https://outlook.office365.com/owa/ and the test works with Chrome, but it fails with Firefox. Also with Chrome I had to inject the JavaScript code directly into the page, because when clicking on the sign in button with Selenium nothing happens. Do you know how I can log in to Office 365 with Firefox? Here is my code: import time import unittest from selenium import webdriver from selenium.webdriver.chrome.options import Options as ChromeOptions from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions def login_to_office365(self, email, password, name): self.driver.maximize_window() self.driver.get(url='https://outlook.office365.com/owa/') self.assertEqual(first="Sign in to Office 365", second=self.driver.title) self.driver.find_element_by_xpath(xpath="//form[@id='credentials']//input[@name='login']").send_keys(email) self.driver.find_element_by_xpath(xpath="//form[@id='credentials']//input[@name='passwd']").send_keys(password) self.driver.find_element_by_xpath(xpath="//span[@id='cred_sign_in_button'][text()='Sign in']").click() # Nothing happens from this click. self.driver.execute_script("Post.SubmitCreds();") # Works only with Chrome. WebDriverWait(driver=self.driver, timeout=30).until(expected_conditions.title_is("{} - Outlook Web App".format(name))) self.assertEqual(first="{} - Outlook Web App".format(name), second=self.driver.title) The exception is a timeout exception when waiting for the title to change.
has comment: http://stackoverflow.com/comment/46472488

http://stackoverflow.com/q/29072934
has title: As for all the tags input with the specified attribute to set, for example, attribute checked = false?
has answer: http://stackoverflow.com/a/29072986
downvote count: 1
type: Question
tagged with: javascript
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/29072997
upvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Put tags input type = "radio" with its attribute data-group: &lt;input type="radio" id="id1" data-group="group1"&gt; &lt;input type="radio" id="id2" data-group="group1"&gt;&lt;br&gt; &lt;input type="radio" id="id3" data-group="group2"&gt; &lt;input type="radio" id="id4" data-group="group2"&gt;&lt;br&gt; How at all elements of input type="radio", which is data-group "group1", set the checked=false?

http://stackoverflow.com/a/33528170
answers question: http://stackoverflow.com/q/29176417
score: 1
has body: There're a number of problems: In your code example you don't create instance of XMLHttpRequest. It should be look like this: var xhr = new XMLHttpRequest() Making real requests in tests is a bad idea. If your module depends on data from remote server you should mock XMLHttpsRequest or use "fake server" (e.g. sinon). I strongly recommend you don't make real requests in tests.
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46580817
has text: As ever, I should have read the documentation more carefully. There is now an openOnStart option in v5.5.2, although it seems to be necessary to specify both the albumID and the imageID.
type: QuestionComment
comment on: http://stackoverflow.com/q/29181406
score: 1
type: Comment

http://stackoverflow.com/q/29105791
has title: javascript iterate through dom looking for specific aria-label
tagged with: attributes
favorite count: 0
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29105925
upvote count: 1
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29106118
has answer: http://stackoverflow.com/a/29105925
has answer: http://stackoverflow.com/a/29106118
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I've spent hours on this one. My company is forced to use a non-user-friendly 3rd party website. We only use IE11. My job is to use javascript and jquery to customize the screen and make things a little easier for our users. I use a bookmarklet to insert &lt;script&gt; tags into IE and reference a .js file saved locally. This website uses hundreds of input text fields but we only need a handful of them. So, I want to highlight input text fields on the screen. Some fields have ID's some only have Name. For the most part, this works: $(document.getElementById('s_3_1_18_0').toggleClass("highlightField"); $(document.getElementsByName('s_3_1_19_0')[0]).toggleClass("highlightField"); HighlightField simply adds CSS background-color: yellow !important The problem is, this 3rd party app changes the ID and the Name in bizarre ways. One day, the name will be 's_3_1_19_0', the next it will be 's_3_2_48_0'. So highlighting using this method is not stable. However, these fields have an area-label that stays constant. I'm wondering how to use javascript or jquery to iterate through each text box, looking for a specific aria-label. For example, the "valid to" field has a bizarre name that changes all the time but it's aria-label is always "Valid To". Can anyone please help me with this?

http://stackoverflow.com/comment/46477529
comment on: http://stackoverflow.com/a/29123341
type: Comment
has text: @alecxe I got this exception: `AttributeError: 'NoneType' object has no attribute 'submit'` with Chrome and Firefox. I also tried `send_keys(password + "\n")` and it didn't work (the same timeout exception).
score: 0
type: AnswerComment

http://stackoverflow.com/a/72035972
type: Answer
answers question: http://stackoverflow.com/q/29206453
score: 0
has body: The function toLocaleTimeString() did it for me. From the documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString // Depending on timezone, your results will vary const event = new Date('August 19, 1975 23:15:30 GMT+00:00'); console.log(event.toLocaleTimeString('en-US')); // expected output: 1:15:30 AM

http://stackoverflow.com/comment/46626618
comment on: http://stackoverflow.com/q/29207018
type: Comment
has text: thank u sooooooooo much bro ... singhakash ...it works
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46465032
comment on: http://stackoverflow.com/q/29118925
has text: looks like a feature test not working in IE8, and failing obtrusively. most likely the script is not compat with IE8; most good ones are not these days...
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29174206
answer count: 3
tagged with: asynchronous
score: 2
upvote count: 2
possible better answer: http://stackoverflow.com/a/29174587
has answer: http://stackoverflow.com/a/29174691
has answer: http://stackoverflow.com/a/29174542
accepted answer: http://stackoverflow.com/a/29174542
type: AnsweredQuestion
tagged with: synchronous
type: Question
has title: Understanding Javascript asynchronous setInterval in canvas
tagged with: canvas
has answer: http://stackoverflow.com/a/29174587
downvote count: 0
tagged with: javascript
has body: The following code creates a canvas with a ball at the centre when the init() method is invoked by using a setInterval. When the keydown() event is fired the ball moves on X and Y axis (depending on what key the user has pressed). What I struggle to understand is what happens when a key is pressed. Does the setInterval stop when a key is pressed to update the key value (keyLeft, keyRight, etc) and then resumes and takes the updated values into consideration OR Does the code inside the key event execute while the setInterval is in progress? I 've read that setInterval is asynchronous while key events are synchronous and since Javascript is single threaded the second option can't be true, right? I could really use your knowledge on this one.. &lt;canvas id="canvas" style="border: 1px solid black" width="400" height="400"&gt;&lt;/canvas&gt; &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var Ball = { positionX: 200, positionY: 200, keyLeft: false, keyRight: false, keyUp: false, keyDown: false, init: function() { this.canvas = document.getElementById('canvas'); this.ctx = this.canvas.getContext('2d'); setInterval(Ball.draw, 10); }, circle: function (x, y, fill) { this.ctx.beginPath(); this.ctx.arc(x, y, 20, 0, Math.PI * 2, false); if (fill) { this.ctx.fill(); } else { this.ctx.stroke(); } }, draw: function() { Ball.ctx.clearRect(0, 0, 400, 400); if (Ball.keyLeft) Ball.positionX -= 5; else if (Ball.keyRight) Ball.positionX += 5; if (Ball.keyUp) Ball.positionY -= 5; else if (Ball.keyDown) Ball.positionY += 5; Ball.circle(Ball.positionX, Ball.positionY, true); } } Ball.init(); $('body').keydown(function (e) { var key = e.keyCode; if (key == 37) { Ball.keyLeft = true; } else if (key == 39) { Ball.keyRight = true; } if (key == 38) { Ball.keyUp = true; } else if (key == 40) { Ball.keyDown = true; } }); &lt;/script&gt;
favorite count: 0
has comment: http://stackoverflow.com/comment/46566694

http://stackoverflow.com/a/29142519
has comment: http://stackoverflow.com/comment/46509931
upvote count: 1
has comment: http://stackoverflow.com/comment/46509902
score: 1
has body: I can confirm that it's bug in jqGrid 4.7 and free jqGrid 4.8. I fixed the problem in free jqGrid (see here). The demo uses the current sources from github and it has no problem with the state of checkboxes in case of usage virtual scrolling.
has comment: http://stackoverflow.com/comment/46510727
has comment: http://stackoverflow.com/comment/46510844
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29121235
accepted answer of: http://stackoverflow.com/q/29121235
type: Answer

http://stackoverflow.com/a/29084307
type: AcceptedAnswer
score: 0
type: Answer
has body: Ok I found out why it wasn't working. I just noticed that I duplicated jQuery script import some lines after these imports. This was resseting jQuery enviroment and therefore, tag-it was removed from it. Hope this helps someone in a future and thanks for the help!
accepted answer of: http://stackoverflow.com/q/29083989
answers question: http://stackoverflow.com/q/29083989

http://stackoverflow.com/q/29201764
score: 0
has title: jQuery not executing onClick for a class of buttons
has comment: http://stackoverflow.com/comment/46615473
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46615636
has body: Javascript: PHP and HTML Form: It is looping through for every user that the search result turns up. Next to each user is an input button that onClick should call getuser.php. The Input buttons are identical except for they're names. On the click, the jQuery should execute yet it does not detect it. <?php for($i=0; $i<$ctk->rowCount(); $i++){ echo " ";//PP, Later add clickable profile echo " Attributes "; echo " ".$ctk_values[$i][0]." ";//UN echo " ".$ctk_values[$i][1]." ";//UL echo " ".$ctk_values[$i][5]." ";//UA echo "YOYOYOO".$ctk_values[$i][4]; $GlobalAcceptorId=$ctk_values[$i][4]; ?> <?php echo $GlobalAcceptorId; ?> <input class="acceptorbutton" type="button" name="<?php echo $ctk_values[$i][4];?>"> <?php }//Ends for loop ?> <?php } } ?> What I've tried so far: the alert box isn't appearing. I've tried changing the form button type to submit and made the Javascript $(".acceptorbutton").submit(function(){.... Thanks in advance! Please let me know if you need more information but so far I don't think I'm missing any critical data.
has comment: http://stackoverflow.com/comment/46615661
tagged with: php
has answer: http://stackoverflow.com/a/29202323
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46615549
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/46615514
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29202323
has comment: http://stackoverflow.com/comment/46615994
tagged with: ajax
has comment: http://stackoverflow.com/comment/46615536

http://stackoverflow.com/comment/46484092
has text: yes, but since theres are a lot of tracks with a lot of information (while i actually only need the IDs) the request takes much longer than necessary. i edited my question to be more specific. thanks.
comment on: http://stackoverflow.com/q/29128876
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46370485
type: Comment
has text: Could you post a complete code on [jsbin.com](http://jsbin.com/?html,css,js,output)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29066874

http://stackoverflow.com/q/29137989
favorite count: 0
type: AnsweredQuestion
downvote count: 0
tagged with: fonts
score: 1
tagged with: webgl
type: Question
accepted answer: http://stackoverflow.com/a/29157500
tagged with: canvas
tagged with: javascript
has answer: http://stackoverflow.com/a/29157500
has body: I'd like use Canvas2D to make a glyph texture for WebGL. A glyph texture is a texture full of letters that you use to render text. The problem I'm running into is I can't see, given the Canvas API, how to do this in a cross platform "good" way. What do I mean? Well for example if I was using some old 8bit font where I knew each character was 8x8 pixels exactly, then I'd know if I wanted say 32 glyphs I'd need a texture some multiple of 32 8x8 cells. Like say 256x8 or 128x16 or 64x32 etc.. I'd put the character for each glyph in each cell and be done. Unfortunately I can't see any good way to figure out the size of letter using the canvas2D api without a ton of work. For example: Let's say I want 8x16 EGA like glyphs. Well let's check. I tell the browser I want an "8px monospace" font. var ctx = document.createElement("canvas").getContext("2d"); ctx.font = "8px monospace"; var dim = { minWidth: 100, maxWidth: 0, }; for (var ii = 33; ii &lt; 128; ++ii) { var letter = String.fromCharCode(ii); var t = ctx.measureText(letter); dim.minWidth = Math.min(t.width, dim.minWidth); dim.maxWidth = Math.max(t.width, dim.maxWidth); } console.log(dim); It prints // Object {minWidth: 0, maxWidth: 4.80078125} That's clearly not what I want. On top of that AFAICT the size of the font is browser and platform dependent. I'm not even sure if I use my own font if that guarantees what size the glyphs will be rendered for a given font size specification. One way is to try different sizes, measure their characters, then pick the closest match. That sounds very inefficient. Another would maybe to just pick a size and render all of the character and just use them the size they are scaling when used in WebGL. In this case though picking "8px monospace" would make a pretty ugly font, at least in Chrome. I can iterate until I find something that looks good but then I have no idea if it will look good in another browser or on another platform. Is there some official way to know the size a font will…
upvote count: 1
has title: How to choose a font size for making a glyph texture in canvas2d
answer count: 1

http://stackoverflow.com/q/29070326
type: Question
has title: Node js require json using variable (var)
score: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29070403
has body: I want to require ./../bin/&lt;variable&gt;.json. So I make a var as var (reqLink = "'./../bin/"+lanID+".json'") and pass to (var engJason = require(reqLink)) but it didn't work. But it does work with a relative path like this (var engJason = require('./../bin/eng.json');) var reqLink = "'./../bin/"+lanID+".json'"; var engJason = require(reqLink); //Not working ||error Cannot find module ''./../bin/eng.json''
accepted answer: http://stackoverflow.com/a/29070403
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/75916290
score: 0
has text: Is the jQuery library script already injected into the page? I mean, the page should have ` `. Otherwise, you should inject it using `.loadUrl("javascript:...")`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29177647

http://stackoverflow.com/q/29095140
has comment: http://stackoverflow.com/comment/46426785
has title: value++ in for loop itself
upvote count: 1
has answer: http://stackoverflow.com/a/29097642
favorite count: 0
has comment: http://stackoverflow.com/comment/46421510
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46428145
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: for-loop
has answer: http://stackoverflow.com/a/29095242
tagged with: javascript
tagged with: callback
has body: I have a fairly simple questions about a for loop in javascript. I'm trying to increment the value (j in my code) after I've run a method, which declares a callback method and in that function I increment the value. But my code breaks, and I'm not sure if it is valid JavaScript. But everywhere I check this is valid javascript code: http://www.w3schools.com/js/js_loop_for.asp like that one, Statement 3 Here is my code: for(j=0; j &lt;= 5; ) { var keyContent = window.localStorage[window.localStorage.key(j)]; console.log(keyContent); var dataForm = JSON.parse(keyContent); uploadDataAndImage(dataForm, function(data) { console.log(data); if(data){ console.log("Data good"); j++; } else { console.log("Data bad"); break; } }); } EDIT: Made it work by doing this: var formDataArray = []; for(j=0; j &lt;= 5; j++ ) { var keyContent = window.localStorage[window.localStorage.key(j)]; console.log(keyContent); var dataForm = JSON.parse(keyContent); formDataArray[j] = JSON.parse(keyContent); uploadDataAndImage(formDataArray[j], function(data) { console.log(data); if(data){ console.log("Data good"); } else { console.log("Data bad"); return; } }); }

http://stackoverflow.com/a/29156260
has body: Your code works, it just wasn't running becuase the fiddle is already executing on window load, and because you need to define window.socialSharing before setting the svg up. Edit: Apparently, in order for it to work you need to set the background image on a div, and also set the xmlns attribute on the svg (Although in IE this attribute is added automatically, so you have to check for its existence): svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"); Check this updated fiddle.
answers question: http://stackoverflow.com/q/29153981
type: Answer
has comment: http://stackoverflow.com/comment/46534599
has comment: http://stackoverflow.com/comment/46571018
score: 0

http://stackoverflow.com/a/29081606
upvote count: 1
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29081486
has body: You can move the ng-if into the elements within the td: 0" ng-href="someLink">Yes No

http://stackoverflow.com/q/29210357
has title: How to save onclick function results
has body: i have an onclick function created in javascript in which when i click on a Table Row in my page it turns red. What can i do so when i 'll do a new search the specific Table Row remain red. Here is a snip of my code: IN F_NAME L_NAME ARR_DATE RET_DATE PHONE Here is a FIDDLE.
score: 0
has answer: http://stackoverflow.com/a/29210714
has comment: http://stackoverflow.com/comment/46630571
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29210944
has comment: http://stackoverflow.com/comment/46646779
linked to: http://stackoverflow.com/q/1458724
tagged with: refresh
tagged with: onclick
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/46526456
type: QuestionComment
has text: The output is 7 Ill update the question to include the html
comment on: http://stackoverflow.com/q/29152369
score: 0
type: Comment

http://stackoverflow.com/a/29112064
has body: Its a known issue. The workaround that has generally worked is to broadcast a custom event from within '$stateChangeStart' handler and then do your state transition from within that custom event's handler. $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { event.preventDefault(); // prevent page from being loaded anyway $userRoles.hasPermissions(toState.name).then(function(data) { var result = data === "true"; if (!result) { $rootScope.$broadcast('goToPermission'); } else { $rootScope.$broadcast('goToState', toState.name); } }); }); borrowed from: https://github.com/angular-ui/ui-router/issues/178#issuecomment-49156829
type: Answer
accepted answer of: http://stackoverflow.com/q/29111913
answers question: http://stackoverflow.com/q/29111913
score: 5
type: AcceptedAnswer
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/46866921

http://stackoverflow.com/comment/46484452
comment on: http://stackoverflow.com/q/29125717
score: 0
type: Comment
type: QuestionComment
has text: Alright, I added the $("#reservation_form").validate(); before the end function. And it's still not working....am I supposed to put it somewhere else?

http://stackoverflow.com/a/29234718
answers question: http://stackoverflow.com/q/29209725
has comment: http://stackoverflow.com/comment/46743715
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46709905
accepted answer of: http://stackoverflow.com/q/29209725
type: Answer
score: 2
downvote count: 0
has body: .json and .js file are used in three.js. They are one of the object's format. what is difference between them? js extension marks that content of the file should be script following javascript syntax and so is human readable. json extension marks that content of the file should be tree structure following javascript object syntax (javascript object has nothing to do with 3d objects) and so is human readable. Also this structure is valid for .js extension, in other words any valid json file is also valid js file. Three js loaders are from the big part file parsers. These loaders does not care about file extension at all. It is ignored. Only important thing for the parser is content of the file. Do they require different loaders to load the object? As I know, three.js is able to load multiple kinds of structures. Each kind has each own loader (and loader contain one or more parsers). The most basic one is JSONLoader. It requires file with specific json structure (data about materials, normals, positions, texture coordinates and more or less, not everything is compulsory). The example you provided uses BinaryLoader. This binary loader requires two files (as I understand). First file contains json structure with materials and location of other file (so json parser is used to parse this file). Second file contains buffers (data about normals, positions, texture coord...) and is binary file. I have no idea what exact binary structure is used here. You see this is kind of hybrid and if you provide buffer data in json structure, it wont be able to read it. Last loader I have heard of is fbxloader, which can read results created in blender for example. But Im not sure if this one is working. In that example .js file for object and for that BinaryLoader is used. But when I do the same means I had used the .js file for my object with BinaryLoader, it did not worked. I hope this is clear now. BinaryLoader expects two files with json and binary structures. It ignores file name i…
upvote count: 2

http://stackoverflow.com/q/29180615
has answer: http://stackoverflow.com/a/29180701
has answer: http://stackoverflow.com/a/29180664
accepted answer: http://stackoverflow.com/a/29180664
possible better answer: http://stackoverflow.com/a/29180653
type: Question
tagged with: replace
has answer: http://stackoverflow.com/a/29180653
has answer: http://stackoverflow.com/a/29180814
downvote count: 2
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46577737
has title: remove all Decimals and single numbers from array / string
answer count: 4
favorite count: 0
has body: so my script generates a big blob of "Piano Notes" which are similar to... var songNotes = "..."; the large Piano notes content and my problem is between the piano notes which i need [also in the fiddle] there are empty ",," and decimal numbers.. so i cant figure out how to remove the empty ,, and decimals as big as "1.0416666666642413,0.625,0,g3,1498.9583333333358,,0,c3,1.0416666666642413,0.625,0,c3" and i want them removed except the the needed words which are var theRightOnes = "s2,as2,cs3,ds3,fs3,gs3,as3,gs3,cs4,ds4,fs4,cs3,as4,gs4,ds5,a2,cs4,b2,c3,a3,ds4,b3,c4,as3,gs2,e3,c3,c4,cs3,ds3,a4,fs3,gs3,as3,g3,f3,b4,c5,a3,d4,as2,e4,g4,d3,b3,b2,f4,a2,d4,e4,cs5,gs1,e2,c2,c3,cs2,ds2,a3,fs2,gs2,as2,g2,f2,b3,c4,a2,d3,as1,e3,g3,d2,b2,b1,f3,a1,d5,e5"; so can anyone give me a clue on how this can be accomplished? if anyone needs more info then i am ready oblige to do so.. Regards - Adarsh Hegde
upvote count: 0
type: AnsweredQuestion

http://stackoverflow.com/a/29145786
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46516825
upvote count: 3
has body: There is no way around eventually parsing out the HTML, but you do have some ability to decide whether to do this on the server side or the client side. If you want to delay parsing until the server side, put document.getElementById('myTable').outerHTML into the hidden field. This will pass a blob of text to the server, and the text will be an HTML representation of the table's DOM. I say "an HTML representation of the table's DOM" because it might not be exactly the same as the HTML code on the page, but it should at least be semantically equivalent to that code (plus any changes you might have made in the DOM via JavaScript). On the server side, you'd run this text through some kind of parser, extract the data, and put it into a CSV to return it. You could also parse the table on the client-side, perhaps using something akin to the Visitor pattern to walk the table's DOM and build out a different data structure.. This is nontrivial stuff, but it would save you some bandwidth and server load by transmitting the data in a more compact and easily-parseable form. You could even pass it as CSV, so that the server wouldn't need to convert the data between formats at all; depending on what else you need to do with the data, this might let you cut out the AJAX call entirely.
has comment: http://stackoverflow.com/comment/46519728
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/29145397
accepted answer of: http://stackoverflow.com/q/29145397

http://stackoverflow.com/a/29199015
has comment: http://stackoverflow.com/comment/46611161
downvote count: 0
has comment: http://stackoverflow.com/comment/46610531
has body: The DOM is weird... But querySelector will let you get by name OR id. It's like the jQuery selector. form.querySelector('[name=aaa]').value form.querySelector('#aaa').value The reason it doesn't have a value btw is because form.aaa tries to match by id or name and returns multiple elements. Trying to get the value of that returns "", or apparently undefined in IE
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/29198899
score: 2

http://stackoverflow.com/a/29109938
answers question: http://stackoverflow.com/q/29109876
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29109876
type: Answer
has body: var tempDate = date; simply assigns a reference to date. You are not creating a copy. Similarly, setDate does not return a new date, it mutates the date itself. One solution would be to create a copy: var tempDate = new Date(date); Your loop could be simplified to var repeats = (new Date(date)).setDate(date.getDate() + (i*7))
upvote count: 3
score: 3

http://stackoverflow.com/comment/46457482
has text: Since its a pop up its hard to hide that dom element . #reference can be placed outside as i want to display only when user click some option.
comment on: http://stackoverflow.com/a/29114093
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29118354
type: Answer
downvote count: 1
score: -1
upvote count: 0
has body: Following are your mistakes You have written Session["test"] instead of $_SESSION['test'] you are using % symbol instead of ? Try this: &lt;?php session_start(); $_SESSION['test'] ="orange"; ?&gt; &lt;script&gt; var username = '&lt;?= $_SESSION["test"] ?&gt;'; alert(username ); &lt;/script&gt;
answers question: http://stackoverflow.com/q/29117764

http://stackoverflow.com/q/29139704
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47776928
tagged with: jquery
has title: How to download a file from AJAX request in Liferay serveResource(-, -) method
tagged with: ajax
has comment: http://stackoverflow.com/comment/46503326
has answer: http://stackoverflow.com/a/29820510
favorite count: 0
has answer: http://stackoverflow.com/a/29733601
has answer: http://stackoverflow.com/a/29837036
has comment: http://stackoverflow.com/comment/47776262
type: Question
has comment: http://stackoverflow.com/comment/47776975
has answer: http://stackoverflow.com/a/29145853
has comment: http://stackoverflow.com/comment/46503410
has answer: http://stackoverflow.com/a/29825334
score: 22
tagged with: java
answer count: 5
linked to: http://stackoverflow.com/q/16086162
has comment: http://stackoverflow.com/comment/46503496
upvote count: 22
tagged with: liferay
has body: I have a requirement like: I am making an AJAX request to pass some data to server. In my server I am creating a file using that data. "Now problem is the file is not getting downloaded to client-side". (I am using Apache POI API to create excel file from the given data). Can any one will help me to do this ? Here is my code: (Code to make AJAX request) &lt;script&gt; function downloadUploadedBacklogs () { try { var table_data = []; var count = jQuery("#backlogTable tr:first td" ).length; jQuery("#&lt;portlet:namespace/&gt;noOfColumns").val(count); var index = 0; jQuery('tr').each(function(){ var row_data = ''; jQuery('td', this).each(function(){ row_data += jQuery(this).text() + '='; }); table_data.push(row_data+";"); }); jQuery("#&lt;portlet:namespace/&gt;backlogDataForDownload").val(table_data); jQuery("#&lt;portlet:namespace/&gt;cmd").val("downloadUploadedBacklogs"); alert('cmd: ' + jQuery("#&lt;portlet:namespace/&gt;cmd").val()); var formData = jQuery('#&lt;portlet:namespace/&gt;backlogImportForm').serialize(); jQuery.ajax({ url:'&lt;%=resourceURL%&gt;', data:formData, type: "post", success: function(data) { } }); alert('form submitted'); } catch(e) { alert('eroor: ' + e); } }; &lt;/script&gt; Java code serveResource(-,-) method /* * serveResource(-, -) method to process the client request */ public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, PortletException { String cmd = ParamUtil.getString(resourceRequest,"cmd"); System.out.println("**********************cmd*************"+cmd); if(cmd!="") { if("downloadUploadedBacklogs".equalsIgnoreCase(cmd)){ String backlogData = ParamUtil.getString(resourceRequest, "backlogDataForDownload"); ImportBulkDataUtil.downloadUploaded("Backlogs", resourceRequest,resourceResponse); } } } / * ImportBulkDataUtil.downloadUploaded(-, -, -) method to create excel file / public static void downloadUploaded(String schema, ResourceRequest resourceRequest,ResourceResponse reso…

http://stackoverflow.com/comment/46458391
type: QuestionComment
has text: Hello, you can try twitter bootstrap and use the modal module..
comment on: http://stackoverflow.com/q/29114934
score: 0
type: Comment

http://stackoverflow.com/comment/46694528
has text: Use the code above to replace the code in the serialEvent tab of the sketch. Please go through the whole example code and try to understand it. It will help you on the long run. the serialEvent tab is the where the arduino to processing serial communication takes part
comment on: http://stackoverflow.com/a/29198602
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29105968
score: 3
downvote count: 0
has body: Assuming what you actually want to do is to add each item to one respective li, there's no inner loop needed. Since you're not using jQuery, you can't append an HTML string -- but in this case, innerHTML will work fine, since the li elements are already empty and we don't need to preserve any existing contents. var data = { "info": [{ "title": "Title Here", "desc": "This is some info about this item, it ranges from 20 to 30." }, { "title": "Title Here 2", "desc": "This is 2 some info about this item, it ranges from 20 to 30." }, { "title": "Title Here 3", "desc": "This is 3 some info about this item, it ranges from 20 to 30." }, { "title": "Title Here 4", "desc": "This is 4 some info about this item, it ranges from 20 to 30." }] } var nums = document.getElementById("list"); var listItem = nums.getElementsByTagName("li"); for (var i in data.info) { var output = " " + " " + data.info[i].title + " " + " " + data.info[i].desc + " " + " "; var li = listItem[i]; li.innerHTML = output; } If your data may contain < or other HTML characters, you'll want to insert the text as TEXT nodes instead of HTML: for (var i in data.info) { var div = document.createElement('div'); div.className = 'meta'; var h2 = document.createElement('h2'); var ht = document.createTextNode(data.info[i].title); h2.appendChild(ht) var p = document.createElement('p'); ht = document.createTextNode(data.info[i].desc); p.appendChild(ht) div.appendChild(h2); div.appendChild(p); var li = listItem[i]; li.appendChild(div); }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29105765
upvote count: 3
answers question: http://stackoverflow.com/q/29105765
type: Answer

http://stackoverflow.com/comment/46552032
type: QuestionComment
comment on: http://stackoverflow.com/q/29166747
has text: Don't put the scripts in the `head` section, put them right before ` `.
score: 0
type: Comment

http://stackoverflow.com/q/29101238
has answer: http://stackoverflow.com/a/29101611
answer count: 4
tagged with: quotes
has answer: http://stackoverflow.com/a/29101597
has body: string mystring == "&lt;input class=\"success\" type=\"button\" id=\"Delegate_New_btn\" value=\"New\" onclick=\"location.href="+mylocation+"'/&gt;"; I have a string like above. The problem is when I innerHTML it to a div like below, then it shows incorrect syntax error : document.getElementById("id").innerHTML=mystring; What I need is : &lt;input type="button" value"somevalue" onclick="location.href='mylocationurl'"/&gt; I don't know how to include this single quotes inside a double quotes. I had tried back slash method but I also failed to implement that. Note : i had define this in my serverside C# and pass it to client side Please help me to solve this. More information VM.Custombuttons_tag = "&lt;td&gt;&lt;input class=\"btn btn-mini btn-success\" type=\"button\" id=\"Delegate_New_btn\" value=\"New\" onclick='location.href=\'" + string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~")) + "/ABC/Delegate/AssignListUserLevel?PeriodId=0'/&gt;&lt;/td&gt;"; this is my full code here VM is a method and Custombuttons_tag is string so when ever i run my code it will innerHTML the code to a div and it shows some incorrect syntax error
has comment: http://stackoverflow.com/comment/46433180
type: Question
has answer: http://stackoverflow.com/a/29101269
tagged with: javascript
has answer: http://stackoverflow.com/a/29101587
score: 0
tagged with: string
has title: How to write single quotes inside a double quotes in string inputted Html Elements
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/76463680
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29128948
has text: Is there a way to access previous slide on `afterChange` event?

jquery-widget-factory
tag name: jquery-widget-factory
type: Tag
tags question: http://stackoverflow.com/q/29166640

http://stackoverflow.com/q/29131002
score: 1
upvote count: 1
has title: Change/Wrap a function from prototype
type: Question
possible better answer: http://stackoverflow.com/a/29131106
tagged with: javascript
has comment: http://stackoverflow.com/comment/46487828
answer count: 2
tagged with: wrapper
has answer: http://stackoverflow.com/a/29131106
tagged with: this
downvote count: 0
has body: I'm writing a framework that uses wrapping of functions in order to create a debug tool. Currently, I want to report and aggregate information upon function call. I'm using the following code: function wrap(label, cb) { return function () { report(label); cb.apply(this, arguments); } } And then in order to bind the debug operation I will use: function funcToWrap (){/* Some existing function*/} funcToWrap = wrap("ContextLabel", funcToWrap); Now, when funcToWrap is invoked, it is wired to go through report() method. The requirement I have is to now change this syntax so that the wrapping is done via: funcToWrap.wrap("ContextLabel"); Ideally, something like this would solve my issue, but this of course is illegal: Function.prototype.time = function(label){ var func = this; // The actual difference: this = function () { // ILLEGAL report(label); func.apply(this, arguments); } }; Thank you from ahead for any insight regarding this.
has comment: http://stackoverflow.com/comment/46487940
favorite count: 0
linked to: http://stackoverflow.com/q/24097767
has comment: http://stackoverflow.com/comment/46487881
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29131084
accepted answer: http://stackoverflow.com/a/29131084

http://stackoverflow.com/q/29112895
has title: DataTable - How to implement a nested datatable?
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29114968
tagged with: datatables
favorite count: 0
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I have a nested dict like following: var dataSet = [{"s_group": [{"range_name": null, "name": "XXXXXXXXXXXX"}], "configfile": "XXXXXXXXXXX", "src_port": ["0-65535"], "d_group": [{"range_name": null, "name": "YYYYYYYYYYY"}], "action": "accept", "protocol": "nun", "dst_port": ["NN"]}] I am able to create a table with above data using datatable for action, protocol, dst_port and src_port. But not for s_group and d_group &lt;script&gt; $(document).ready(function() { $('#sg_rules').html( '&lt;table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-condensed" id="sg_table"&gt;&lt;/table&gt;' ); $('#sg_table').dataTable( { "data": dataSet, "columns": [ { "title": "Action", "data": "action" }, { "title": "Protocol", "data": "protocol" }, { "title": "SRC_PORT", "data": "src_port" }, { "title": "DST_PORT", "data": "dst_port" } ] } ); } ); &lt;/script&gt; JSFiddle : http://jsfiddle.net/1s0jbm2z/ I am not able to display s_group and d_group to the table as they are another dict. I want to display them as a nested table.
has answer: http://stackoverflow.com/a/29114968
type: Question
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46550114
type: Comment
type: QuestionComment
has text: Does the value change while still inside the function? Or does it never chance?
score: 0
comment on: http://stackoverflow.com/q/29165732

http://stackoverflow.com/q/29201938
type: Question
has body: This is the script: &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; function addedCart() { document.getElementById("msgs-box").innerHTML = "Item added successfully to cart"; setTimeout(function() { $('#msgs-box').html(''); }, 6000); } &lt;/script&gt; The form: &lt;form action="addToCart" method="post"&gt; &lt;input name="productId" value="${product.id}" type="hidden"&gt; &lt;input class="submit" onclick="addedCart()" value="&lt;fmt:message key='AddToCart'/&gt;" type="submit"&gt; &lt;/form&gt; The issue: When I put type="submit" and click on "addToCart", the script is fired and the message displays but the time isn't working. Whether I put 3 secs (3000) or 30 secs (30 000) as time value, the script will not play the time right. The message will just appear and disappear. On the other hand, When I put type="button" and click on "addToCart", the script is fire, the message displays and the script is playing the time right but the values aren't sent to the cart.jsp. How can I solve this issue? I need to send the values to the cart and I need the script to work and play the time right. Edit --- The New Code With Ajax var $msgBox = $('#msgs-box'); function addedCart() { event.preventDefault(); // Prevent default Form Submit Action $msgBox.html("Item added successfully to cart"); setTimeout(function() { $msgBox.html(''); }, 6000); $.ajax({ url : 'cart.jsp', data: $("#cartForm").serialize(), // (tip: assign and use an ID for your form) success: function( addedCart ) { alert( "Item added successfully to cart", addedCart); } }); } The HTML: &lt;form id="cartForm" action="addToCart" method="post"&gt; &lt;br&gt; &lt;br&gt; &lt;input name="productId" value="${product.id}" type="hidden"&gt; &lt;input class="submit" onclick="addedCart()" value="&lt;fmt:message key='AddToCart'/&gt;" type="submit"&gt;
tagged with: forms
has comment: http://stackoverflow.com/comment/46615850
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has title: How to make a setTimeout script work properly with an html form?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46615884
has answer: http://stackoverflow.com/a/29202079

http://stackoverflow.com/a/46812764
type: Answer
has comment: http://stackoverflow.com/comment/117557541
downvote count: 2
has comment: http://stackoverflow.com/comment/86961928
score: 10
has comment: http://stackoverflow.com/comment/85096694
has body: Definitely you will need to store old value manually, depending on what moment you are interested (before focusing, from last change). Initial value can be taken from defaultValue property: function onChange() { var oldValue = this.defaultValue; var newValue = this.value; } Value before focusing can be taken as shown in Gone Coding's answer. But you have to keep in mind that value can be changed without focusing.
upvote count: 12
answers question: http://stackoverflow.com/q/29118178
has comment: http://stackoverflow.com/comment/85040660
has comment: http://stackoverflow.com/comment/117557209
has comment: http://stackoverflow.com/comment/91647922
has comment: http://stackoverflow.com/comment/96331884
has comment: http://stackoverflow.com/comment/109295284

http://stackoverflow.com/q/29130716
has comment: http://stackoverflow.com/comment/46531098
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29133386
tagged with: angularjs
has title: How to show template immediately on state enter in ui-router, next when promise is resolved then show data?
type: AnsweredQuestion
tagged with: angular-ui-router
has body: How to show first template and then if location promise is resolved just render it in loaded template? Even I would like to show spinner in input to inform user that data is loading. I suppose that I could do an external service that can be used directly in landingCtrl, but whether it can be done somehow through the ui-router? var app = angular .module('myApp', [ 'ngCookies', 'ui.router' ]) app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { .state('landing', { url: '/landing', templateUrl: 'landing.html', controller: 'landingCtrl', resolve: { location: [ '$state', '$stateParams', '$q', '$window' , function ($state, $stateParams, $q, $window) { var deferred = $q.defer(); $window.navigator.geolocation.getCurrentPosition( function (position) { deferred.resolve(position); }); return deferred.promise; }] } }) }]) app.controller('landingCtrl', ['$scope', 'location', function($scope, location) { $scope.location = location; }]); landing.html Show immediately Resolved data: {{location}}
accepted answer: http://stackoverflow.com/a/29133386
type: Question

http://stackoverflow.com/q/29216928
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm getting reports that a website I developed is not functioning as it should in IE 9 and IE 10. The problem occurs when attempting to submit a form: $("form[name='signIn']").submit(function(e) { var formData = new FormData($(this)[0]); e.preventDefault(); $( "#return_status_sign_in" ).empty(); $.ajax({ url: "&lt;?= SITE_URL ?&gt;account/login", type: "POST", data: formData, async: false, success: function (msg) { $('#return_status_sign_in').append(msg); }, cache: false, contentType: false, processData: false }); }); The above submits the form via AJAX in all other browsers and works perfectly. However, in IE 9 and 10, the page refreshes and the POST data appears as get variables in the URL. How come is this happening? Could it be that e.preventDefault(); is not triggering? If so, what's the alternative to that?
tagged with: ajax
has answer: http://stackoverflow.com/a/29217151
has comment: http://stackoverflow.com/comment/46643852
has comment: http://stackoverflow.com/comment/46643043
has comment: http://stackoverflow.com/comment/46646269
has comment: http://stackoverflow.com/comment/46643083
has comment: http://stackoverflow.com/comment/46643027
score: 0
type: UnansweredQuestion
has title: IE9 + IE10 AJAX Call not working
type: Question
tagged with: internet-explorer

http://stackoverflow.com/comment/46406290
has text: Okay. I wasn't trying to be pedantic or anything. Just pointing out that web workers *aren't an option* for many people- especially those writing E&E software.
type: Comment
comment on: http://stackoverflow.com/a/29086575
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46479731
type: Comment
has text: i think the problem is with an empty tr
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29125379

http://stackoverflow.com/a/29153814
upvote count: 1
has body: If you only want to handle click events, then it doesn't matter. If you want to handle a button being activated, then you can't simulate that by simply binding a click event on any kind of element. A button isn't only activated by clicking it, you can for example activate it by using the tab key to move focus to it, and press space. (Exact function may differ between browsers.) You should try to use HTML elements that were designed for the action that you want to use, even if you take over everything with JavaScript. They not only look and react in a specific way, people who for example uses screen readers rely on being able to navigate pages in other ways than pointing and clicking.
answers question: http://stackoverflow.com/q/29153660
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29153660
type: Answer
score: 1

node.js
tags question: http://stackoverflow.com/q/29108401
tags question: http://stackoverflow.com/q/29186093
tags question: http://stackoverflow.com/q/29089925
tags question: http://stackoverflow.com/q/29201091
tags question: http://stackoverflow.com/q/29128345
tags question: http://stackoverflow.com/q/29113036
tags question: http://stackoverflow.com/q/29147825
tags question: http://stackoverflow.com/q/29179145
tags question: http://stackoverflow.com/q/29177846
tags question: http://stackoverflow.com/q/29090349
tags question: http://stackoverflow.com/q/29182710
tags question: http://stackoverflow.com/q/29089689
tags question: http://stackoverflow.com/q/29086406
tags question: http://stackoverflow.com/q/29198933
tags question: http://stackoverflow.com/q/29122495
tags question: http://stackoverflow.com/q/29104207
tags question: http://stackoverflow.com/q/29108194
tags question: http://stackoverflow.com/q/29090331
tags question: http://stackoverflow.com/q/29111425
tags question: http://stackoverflow.com/q/29116593
tags question: http://stackoverflow.com/q/29180396
tags question: http://stackoverflow.com/q/29156962
tags question: http://stackoverflow.com/q/29136262
tags question: http://stackoverflow.com/q/29200686
tags question: http://stackoverflow.com/q/29063787
tags question: http://stackoverflow.com/q/29173569
tags question: http://stackoverflow.com/q/29131002
tags question: http://stackoverflow.com/q/29090618
tags question: http://stackoverflow.com/q/29111833
tags question: http://stackoverflow.com/q/29084657
tags question: http://stackoverflow.com/q/29187122
tags question: http://stackoverflow.com/q/29065139
tags question: http://stackoverflow.com/q/29154067
tags question: http://stackoverflow.com/q/29204710
tags question: http://stackoverflow.com/q/29148082
tags question: http://stackoverflow.com/q/29111730
tags question: http://stackoverflow.com/q/29167166
tags question: http://stackoverflow.com/q/29175877
tags question: http://stackoverflow.com/q/29156308
tags question: http://stackoverflow.com/q/29063413
tags question: http://stackoverflow.com/q/29206061
tags question: http://stackoverflow.com/q/29123447
tags question: http://stackoverflow.com/q/29196468
tags question: http://stackoverflow.com/q/29183142
tags question: http://stackoverflow.com/q/29156176
tags question: http://stackoverflow.com/q/29184449
tags question: http://stackoverflow.com/q/29127907
tags question: http://stackoverflow.com/q/29180611
tags question: http://stackoverflow.com/q/29212414
tags question: http://stackoverflow.com/q/29088825
tags question: http://stackoverflow.com/q/29096743
tags question: http://stackoverflow.com/q/29158904
tags question: http://stackoverflow.com/q/29067450
tags question: http://stackoverflow.com/q/29139654
tags question: http://stackoverflow.com/q/29076457
tags question: http://stackoverflow.com/q/29099724
tags question: http://stackoverflow.com/q/29197033
tags question: http://stackoverflow.com/q/29090036
tags question: http://stackoverflow.com/q/29197627
tags question: http://stackoverflow.com/q/29087411
tags question: http://stackoverflow.com/q/29133140
tags question: http://stackoverflow.com/q/29170488
tags question: http://stackoverflow.com/q/29210454
tags question: http://stackoverflow.com/q/29104311
tags question: http://stackoverflow.com/q/29116289
tags question: http://stackoverflow.com/q/29129967
tags question: http://stackoverflow.com/q/29166308
tags question: http://stackoverflow.com/q/29122816
tags question: http://stackoverflow.com/q/29163876
tags question: http://stackoverflow.com/q/29064590
tags question: http://stackoverflow.com/q/29217311
tags question: http://stackoverflow.com/q/29134086
tags question: http://stackoverflow.com/q/29097354
tags question: http://stackoverflow.com/q/29198119
tags question: http://stackoverflow.com/q/29118221
tags question: http://stackoverflow.com/q/29118455
tags question: http://stackoverflow.com/q/29115858
tags question: http://stackoverflow.com/q/29174185
tags question: http://stackoverflow.com/q/29106631
tags question: http://stackoverflow.com/q/29088037

http://stackoverflow.com/q/29130557
has answer: http://stackoverflow.com/a/29130640
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46486961
has title: array_push flat array issue - need to be able to add multiple variables to the array
tagged with: jquery
has body: I am trying to add a pair of variables 'product_name' and 'photos' (which is the URL of the car photo) into an array. I have a friend that said my efforts are failing because I am pushing into a flat array. I've looked to see how to do this with variable pairs and am stymied. He had suggested pushing row into $isotopecubes instead of how I have it below, but when I try I am getting null values. I need to be able to access val.photo and val.product_name in my javascript call in my php file that references this ajax code. Note: if I just use: array_push($isotopecubes, $row['photo']); I get back the following JSON response on my console: "/images/photos/cars/vw/14_Virginia_L.jpg", "/images/photos/cars/mazda/2013/14hybrid.jpg" so I know I am reaching the database and getting the correct values. Here is my ajax code: &lt;?php include '../../global_config.php'; include 'config.php'; if ($_GET['action'] == 'get-images') { $selectSql = "SELECT product_name, photo FROM cars WHERE publish = 1;"; $isotopecubeResult = $db-&gt;query($selectSql); $isotopecubes = array(); while($isotopecubeResult-&gt;fetchInto($row, DB_FETCHMODE_ASSOC)) { array_push($isotopecubes, $row['photo'], $col['product_name']); // $isotopecubes = array_merge($isotopecubes, $row['photo']); } echo json_encode($isotopecubes); } ?&gt;
has comment: http://stackoverflow.com/comment/46486926
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/46528264
tagged with: php
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46487004

http://stackoverflow.com/comment/46597903
type: AnswerComment
comment on: http://stackoverflow.com/a/29191815
type: Comment
has text: nope, before this I do have savedData in my ng-repeat, not sure why I have to take ng-repeat down, to be the same line with the href.
score: 0

http://stackoverflow.com/comment/46504201
comment on: http://stackoverflow.com/q/29140053
has text: Why are there php tags over your script?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46482107
comment on: http://stackoverflow.com/q/29121733
has text: Don't use the [promise constructor antipattern](http://stackoverflow.com/q/23803743/1048572)!
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/46645303
type: AnswerComment
comment on: http://stackoverflow.com/a/29217377
type: Comment
has text: yes it works fine thanks a lot, I am still trying to understand this line of code reduce(function (a, b) { return a && obj[b]; } // Here a refer to what.. is it Previous Value(default)? b refer to what (is it current value) and then what & how we are returning? what this line doing return a && obj[b]
score: 0

http://stackoverflow.com/comment/46504595
type: QuestionComment
comment on: http://stackoverflow.com/q/29139935
score: 0
has text: You could also put a anchor at your button, and after your ajax call, you "scrollTo()" the anchor?
type: Comment

http://stackoverflow.com/comment/46537726
comment on: http://stackoverflow.com/q/29158493
type: Comment
type: QuestionComment
has text: defining re-usables makes it easy: `function pluck(o){return o[this];} function uniq(a,b,c){return c.indexOf(a)===b;} RoomRaw.map(pluck, "name").filter(uniq);`
score: 0

http://stackoverflow.com/comment/46626387
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29154605
has text: @Hughett I have updated the answer as well as the jsfiddle. If it answers your question, please mark it as correct so as for the thread to close.

http://stackoverflow.com/comment/46481417
has text: You realize you can not touch the button from your code. You could only not allow it to render...
score: 0
comment on: http://stackoverflow.com/q/29127689
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29156767
has comment: http://stackoverflow.com/comment/46534446
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/46534636
tagged with: media-queries
has comment: http://stackoverflow.com/comment/46534679
has title: Bootstrap's Togglable Tabs into an accordion at NON desktop size
has comment: http://stackoverflow.com/comment/46534334
answer count: 0
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
score: 1
favorite count: 0
has body: Using Bootstrap's Togglable Tabs I want to display into an accordion if viewed at a smaller screen size (max 768px) - much like the Bootstrap accordion (but doesn't have to have the sliding effect). Home Profile Messages Settings It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. See Fiddle - https://jsfiddle.net/DTcHh/5685/ For this to work I need to make the active tab's content show below each according tab. ie. At the smaller size I need to move to the above , inside of the that has a class of active and display only the that has a class of active. For each active accordion tab the markup should now look something like this- Home It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. I can then use the conditional code below using the window resize function to display it only at the size I need. $(window).resize(function () { if ($(this).width() <= 768) { } else { } }); Any help much appreciated!
type: Question
has comment: http://stackoverflow.com/comment/46534886
upvote count: 1

http://stackoverflow.com/comment/46607761
has text: Interesting, actually `finally` is indeed executed. But looks like it can't change anything, since the value is already returned.
comment on: http://stackoverflow.com/q/29197539
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46363392
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29063558
has text: OK. But, what are trying to accomplish here?

http://stackoverflow.com/comment/46463228
type: Comment
comment on: http://stackoverflow.com/a/29117413
has text: Okay, but what if our collection is an array of objects? Sticking to `item` won't do any magic though answers is correct in the scope of array of numbers.
score: 0
type: AnswerComment

addition
tags question: http://stackoverflow.com/q/29084975
type: Tag
tag name: addition
tags question: http://stackoverflow.com/q/29110088
tags question: http://stackoverflow.com/q/29107121

http://stackoverflow.com/q/29194725
has answer: http://stackoverflow.com/a/29213126
score: 0
answer count: 2
has body: I am trying to build a series of checkbox to check days of the week, but I can't figure out how to maintain proper presentation state when switching routes. Since it keeps the previous state (controllers are singleton), I can't figure out what's the best way to reinitialize it every time I transition and also when I try to create a new instance of event. The setup is the following (coffeescript notation): an array controller defined as such: ProjectEventsController = Ember.ArrayController.extend itemController: 'project/event' The item controller contains observers that watch changes on checkboxes ProjectEventController = Ember.ObjectController.extend mon:true tue:true wed:true thu:true fri:true sat:true sun:true _days: [] eventId: undefined eventObserver: (()-> if !@get('eventId') @set 'eventId', @get('event.id') @set '_days', @defaultDays # if we have a recurrence days, we check the days that are already checked # else we check them all if @get('event.recurrence') and @get('event.recurrence.days') console.log 'existing recurrence', @get('event.recurrence.days') (@defaultDays.filter (day)=> !@get('event.recurrence.days').contains day ).forEach (uncheckedDay)=> console.log 'uncheckedDay', uncheckedDay @set uncheckedDay.toLowerCase(), false if (@get('event.recurrence') and @get('event.recurrence.days') == @defaultDays) console.log 'all days checked', @get('event.recurrence.days'), @defaultDays @set 'recurrenceEnabled', false ).observes('event.id') _daysObserver: ((k,v)-> val = @get v key = v.toUpperCase() days = @get '_days' if val if !days.contains key days.push key else days = days.filter (item)-> item != key @set '_days', days if @get 'event.recurrence' @set 'event.recurrence.days', days.toArray() else @set 'event.recurrence', Ember.Object.create type: 'weekly' days: days start_hhmm: @defaultHHmm duration_seconds: @defaultDuration ).observes('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun') The checkbox is then simple something like this: {{input checked=thu type="…
has answer: http://stackoverflow.com/a/29217585
has title: Reinitalize item-controller after route transition
type: UnansweredQuestion
tagged with: ember.js
tagged with: coffeescript
type: Question
tagged with: javascript

http://stackoverflow.com/q/29096415
score: -1
answer count: 1
has body: I have it's show some values in forloop.i want to calculate those values and add it to textbox.this is my code &lt;?php $itemCount = count($_POST["opt"]); for($i=0;$i&lt;$itemCount;$i++) { $op_name=$_POST['opt'][$i]; $price=$_POST['price'][$i]; ?&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="text" value="&lt;?php echo $op_name;?&gt;" name="opt" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" value="&lt;?php echo $price;?&gt;" name="price" id="price" style="width: 40px;" onkeyup="order()"/&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="amt" style="width: 40px;" id="amount" onkeyup="order()" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; Total &lt;input type="text" value="&lt;?php echo $tot;?&gt;" id="tot" /&gt;onkeyup="order()"/&gt; javascript function order(){ var price=document.getElementById("price").value; var amt=document.getElementById("amount").value; var cal_price=1*price; var cal_amt=1*amt; document.getElementById("tot").value =((cal_price)*(cal_amt)); } my code calculate only first row values.i want all Price*ammount total to display in textbox
favorite count: 0
has comment: http://stackoverflow.com/comment/46424072
has title: How to calculate php for loop values using javascript
tagged with: php
has answer: http://stackoverflow.com/a/29096565
type: AnsweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46425241
upvote count: 0
accepted answer: http://stackoverflow.com/a/29096565
has comment: http://stackoverflow.com/comment/46424169
tagged with: javascript

http://stackoverflow.com/q/29154220
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46588725
tagged with: http://stackoverflow.com/tag/html
tagged with: client-side
has answer: http://stackoverflow.com/a/29161915
has comment: http://stackoverflow.com/comment/46588112
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46529529
tagged with: web-scraping
has title: Downloading static web page after client-side scripts load
type: Question
score: 0
has body: I am looking for an automatable way to download the contents of a web page after the client-side javascript app has finished loading all the divs. I know I can do this by saving the site through browser GUI, but I am looking for a solution on the command line or some other scripting method. Things I have tried: curl, wget Anyone have suggestions?
linked to: http://stackoverflow.com/q/28884428

http://stackoverflow.com/q/29105387
has comment: http://stackoverflow.com/comment/46440852
score: 2
type: Question
upvote count: 2
tagged with: com
downvote count: 0
answer count: 1
tagged with: javascript
has title: Handle COM object events in JavaScript
tagged with: events
has comment: http://stackoverflow.com/comment/46454951
has body: I have a COM object that raises events and JavaScript on the web page to capture those events. It all works perfectly. Now I have to "distribute" this JavaScript to several other web applications for use on their web pages (this is all internal intranet stuff). Here is the JavaScript function and script tag for the event sink: How can I put this into a separate .js file? Or does it have to remain on the page itself? The ica object is on the page in an object tag:
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29105611

http://stackoverflow.com/comment/46561027
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29171286
type: QuestionComment
has text: @FelixKling It creates two defer object and I feel like I can get rid of it but not sure how

http://stackoverflow.com/comment/46464383
has text: http://jsfiddle.net/arunpjohny/gvau5s0z/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29118543

http://stackoverflow.com/a/30126271
downvote count: 0
answers question: http://stackoverflow.com/q/29087925
type: Answer
upvote count: 3
has body: Unfortunately, I am not allowed to make comments. Therefore I have to write a new answer. The already given answer suggests to subtract a small amount from the x value (0.001 in this example) to prevent the triangle effect. But this is not quite accurate and can only be seen as workaround. The triangle effect is caused by the sorting performed by jqPlot. Sorting is required by most chart types, including line charts. If the data is already sorted before feeding it to jqPlot, sorting can be disabled for jqPlot by setting the sortData attribute to false, see jqPlot.sortData This will prevent the sorting issues and therefore no triangle effect occurs! You may also want to hide the point markers as jqPlot doesn't know the difference between the real points and our injected artificial points. var data = [3, 7, 9, 1, 4, 6, 8, 2, 5]; var points = [[1, data[0]]]; for (var i = 1; i &lt; data.length; i++) { points.push([i + 1, data[i - 1]]); points.push([i + 1, data[i]]); } var plot1 = $.jqplot('chart1', [points], { sortData: false, seriesDefaults: { showMarker: false } }); Try it in a fiddle If you want to get also the point markers right, the only option I see is changing the rendering logic, e.g. writing a step chart plugin. For reference, see also the answers in the following post: jqPlot step chart not plotting in series order
score: 3

http://stackoverflow.com/comment/46397833
comment on: http://stackoverflow.com/q/29082444
type: Comment
type: QuestionComment
has text: Maybe [this answer](http://stackoverflow.com/questions/7999806/jquery-how-to-trigger-click-event-on-href-element/28015837#28015837) will help.
score: 0

http://stackoverflow.com/a/29133019
type: Answer
answers question: http://stackoverflow.com/q/29132952
has body: You can just get the number and use it for the second selector $("[class^='mini']").click(function() { $(this).toggleClass( 'mini_' + this.className.slice(-1) + 'b' ); });
score: 0

http://stackoverflow.com/a/29183375
answers question: http://stackoverflow.com/q/29181437
type: Answer
accepted answer of: http://stackoverflow.com/q/29181437
has comment: http://stackoverflow.com/comment/46586611
has body: var elem = document.getElementById("precont"); returned null because web pages document object wasn't directly available in the extension (chrome/button.js) I gained access via the current window: var precontElem = window.content.document.getElementById("precont");
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/46555084
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29168183
has text: I'm concerned that this user is creating a system that will be dealing with Credit Card numbers with their lack of experience this is not a good starting project.

http://stackoverflow.com/comment/46640863
comment on: http://stackoverflow.com/a/29214114
type: AnswerComment
score: 0
has text: When i append it just appends as text [object HTMLImageElement]
type: Comment

http://stackoverflow.com/q/29216551
tagged with: javascript
score: 11
has answer: http://stackoverflow.com/a/34553064
accepted answer: http://stackoverflow.com/a/29216935
type: AnsweredQuestion
has title: Making a gulpfile: getting an error when call gulp.parallel
possible better answer: http://stackoverflow.com/a/34553064
tagged with: gulp
upvote count: 11
favorite count: 0
type: Question
answer count: 2
tagged with: node.js
has answer: http://stackoverflow.com/a/29216935
has comment: http://stackoverflow.com/comment/46642987
has comment: http://stackoverflow.com/comment/46642935
downvote count: 0
has body: I'm working through the book Getting Started With Gulp (which was published in January 2015) but I realize that because development with Gulp is moving quite fast it may be slightly out of date already. Here is my gulpfile: // Modules &amp; Plugins var gulp = require('gulp'); var concat = require('gulp-concat'); var myth = require('gulp-myth'); var uglify = require('gulp-uglify'); // newly added var jshint = require('gulp-jshint'); // newly added var imagemin = require('gulp-imagemin'); // let's add two node.js modules: var connect = require('connect'); // var serve = require('serve-static'); var browsersync = require('browser-sync'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var plumber = require('gulp-plumber'); // Tasks // styles task gulp.task('styles', function(){ return gulp.src('app/css/*.css') // now we add our pipes: .pipe(plumber()) .pipe(concat('all.css')) .pipe(myth()) .pipe(gulp.dest('dist')); }); // scripts task gulp.task('scripts', function() { return gulp.src('app/js/*.js') .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(concat('all.js')) .pipe(uglify()) .pipe(gulp.dest('dist')); }); // images task gulp.task('images', function() { return gulp.src('app/img/*') .pipe(imagemin()) .pipe(gulp.dest('dist/img')); }); // browsersync Task: gulp.task('browsersync', function(cb) { return browsersync({ server: { baseDir:'./' } }, cb); }); // browserify Task: gulp.task('browserify', function() { return browserify('./app/js/app.js') .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('dist')); }); // watch task: gulp.task('watch', function() { gulp.watch('app/css/*.css', gulp.series('styles', browsersync.reload)); gulp.watch('app/js/*.js', gulp.series('scripts', browsersync.reload)); gulp.watch('app/img/*', gulp.series('images', browsersync.reload)); }); // Default Task gulp.task('default', ['styles', 'scripts', 'images', 'browsersync', 'browserify', 'watch']); EDIT: After changing the final gulp.task line, it ru…

http://stackoverflow.com/q/29212335
has body: I have a page that displays graphs based on the selected criteria. Each graph is a separate instance and needs its own object reference. I have new objects being created within the for loop but how can I access those objects outside that particular function. var chartObject = new Array(); function runInit () { $(document).ready(function(){ $("#submit").click(function() { $("#pointList :selected").each(function(){ selectedValues.push($(this).val()); }); for(var j = 0; j &lt; selectedValues.length; j++) { chartObject[j] = new Object(); var charts = []; charts.push( drawDataView( demos[demo] ) ); chartObject[j].allDataLoaded = function( ) { //more code }; } }); }); } I need to use chartObject[j] in another function: function drawDataView ( demo ) { var dataCache = new DataCache( chartObject[j], dataSource ); } Obviously j isn't defined in drawDataView, so how can I create new objects within that for-loop and use the variable elsewhere? Any suggestion is appreciated!
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29212451
type: Question
score: 0
answer count: 1
tagged with: object
has title: Create new objects in for loop - Javascript
tagged with: for-loop
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29212451

http://stackoverflow.com/q/29146697
type: Question
accepted answer: http://stackoverflow.com/a/29161430
answer count: 2
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/29161430
score: 0
has body: In my app i use something similar to this jsbin: http://jsbin.com/vefoqofuzo/1/edit?html,js,output JS Bin List name {{ list.name }} {{ list.isSelected }} and js: var app = angular.module('listsModule', []); app.controller('listsController', function ($scope) { $scope.lists = [ {"id": 39, "name": "list1", "isSelected": false}, {"id": 40, "name": "list2", "isSelected": false} ] }); but i have one trouble... What would be if i will have huge ammounts of data? Filter is not the best practice... So for performance i use ng-show. But then i have question: how to select only visible values with selectAll button? http://jsbin.com/curifaliqa/1/edit?html,js,output So i don't use filter: becouse it affect on performance, instead i use: JS Bin Select all! List name 0" ng-click="selectCheckbox(list)"> {{ list.name }} {{ list.isSelected }} and how now i could deal with only shown elements? not with all of them... ?
has title: AngularJS filter by search and check filtered values
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29147294
has answer: http://stackoverflow.com/a/29147294

http://stackoverflow.com/comment/46445309
type: QuestionComment
comment on: http://stackoverflow.com/q/29106953
has text: The promise you are returning needs to be resolved with that asynchronously fetched data. `that didn't help` doesn't give us any indication of what you did or what went wrong. What foursquare library are you using?
score: 0
type: Comment

http://stackoverflow.com/q/29154334
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/29154429
has comment: http://stackoverflow.com/comment/46529754
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29154429
downvote count: 1
type: Question
has body: I am dynamically adding/removing elements using javascript &amp; jQuery. For some reason my inner for loop is not exiting. The counter continues to climb past the arrays length, and continues to add elements until the browser crashes. When stepping through in Firefox debugger groupList[i].length shows the correct value. Any ideas why the internal loop never returns false? var $j = jQuery.noConflict(); // array of arrays var groupList = []; groupList[groupList.length] = ["Japan", "Honda", "Toyota", "Nissan"]; groupList[groupList.length] = ["America", "Ford", "Dodge", "Chevrolet"]; // loop that creates a radio button from the first element in each array for (var i = 0; i &lt; groupList.length; ++i) { $j("#groupBtns").append("&lt;label class=\"btn btn-primary active\" id=\"btn" + groupList[i][0] + "\"&gt;&lt;input type=\"radio\"&gt;" + groupList[i][0] + "&lt;/label&gt;"); } // function to add second group of radio button for remaining elements in selected array function groupClick(group) { for (var i = 0; i &lt; groupList.length; ++i) { if (group == groupList[i][0]) { // -- this is the infinite loop -- // for (var o = 1; 0 &lt; groupList[i].length; ++o) { $j("#subGroupBtns").append("&lt;label id=\"btn" + groupList[i][o] + "\" class=\"btn btn-primary\"&gt;&lt;input type=\"radio\"&gt;" + groupList[i][o] + "&lt;/label&gt;"); } } } } // event listener $j("#groupBtns").on('click', function (e) { groupClick($j(e.target).text()) }); note: the arrays will not always be the same length so I cannot use a static terminator for the loop.
upvote count: 0
has title: array of arrays: infinite loop

http://stackoverflow.com/comment/46619460
comment on: http://stackoverflow.com/a/29203762
score: 0
type: AnswerComment
type: Comment
has text: Keep the (x1 === x2) comparison. Add an additional comparison for the y values afterwards.

http://stackoverflow.com/comment/46558700
has text: Well you are going to have an issue when hash is not defined and the browser should already be scrolled to the position when the page loads in the first place.
comment on: http://stackoverflow.com/q/29170022
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46620189
has text: Well of course, you have to put it after the click function has been bond to the button, that is, after calling initAudio(). If that's the case, I'm running out of ideas. Try to `console.log` stuff at various places...
comment on: http://stackoverflow.com/a/29196941
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29066337
score: 0
has comment: http://stackoverflow.com/comment/46373936
has comment: http://stackoverflow.com/comment/46373311
type: UnansweredQuestion
tagged with: timezone
has comment: http://stackoverflow.com/comment/46374286
has comment: http://stackoverflow.com/comment/46375923
answer count: 0
tagged with: wordpress
has title: User Local Time in Wordpress Comment Timestamp
type: Question
has body: I'm trying to get Wordpress comments to show the time, based on the visitors's location. So when a visitor posts a comment, it is according to their time. Since it can't be done solely with PHP, I've utilized Javascript. &lt;script type="text/javascript"&gt; var currentDate = new Date() var day = currentDate.getDate() var month = currentDate.getMonth() + 1 var year = currentDate.getFullYear() document.write("&lt;b&gt;" + day + "/" + month + "/" + year + "&lt;/b&gt;") &lt;/script&gt; Of course, this only posts the current time. If I implement it into my comments inside get_the_time (code below), all the timestamps will read the same time- the visitor's current time. PHP: &lt;div class="comment-time-stamp"&gt;&lt;?php printf(__('%1$s at %2$s'), get_comment_date(), get_the_time()) ?&gt;&lt;/div&gt;&lt;/div&gt; So I tried to add a function that will only affect the visitor's post: function local_date_time($format, $timestamp) { $timezone_str = get_option('timezone_string') ?: 'UTC'; $timezone = new \DateTimeZone($timezone_str); // The date in the local timezone. $date = new \DateTime(null, $timezone); $date-&gt;setTimestamp($timestamp); $date_str = $date-&gt;format('Y-m-d H:i:s'); // Pretend the local date is UTC to get the timestamp // to pass to local_date_time(). $utc_timezone = new \DateTimeZone('UTC'); $utc_date = new \DateTime($date_str, $utc_timezone); $timestamp = $utc_date-&gt;getTimestamp(); return $format, $timestamp, true; } It broke the page and stopped it from loading. I am a little lost on where to go from here.
has comment: http://stackoverflow.com/comment/46369893
tagged with: javascript
tagged with: date

http://stackoverflow.com/q/29137946
has answer: http://stackoverflow.com/a/29138286
accepted answer: http://stackoverflow.com/a/29138286
tagged with: formidable
has body: I want to store uploaded images in my nodejs application in a particular naming scheme in a serial fashion. Suppose when I upload the first image it should be renamed to 1.png and stored. For the subsequent ones, they are stored as 2.png,3.png,... irrespective of whatever the name was when uploaded. I can do this easily. However asynchronous code for renaming is executing before the image upload is complete. Need some suggestions and help regarding this. app.post('/projects/:uid/:qid', function (req, res) { try{ var _uid = req.param("uid"); var _q = req.param("qid"); var _path = __dirname + '/public/projects/' + _uid + '/'+_q; //console.log("projects/images uid - %s path - %s",_uid,_path); mkdirp(_path, function (err) { if (err){ console.error(err); res.json({status:"NOT OK - Failed"}); } else { var form = new formidable.IncomingForm(); form.uploadDir = _path; form.keepExtensions = true; form.type = 'multipart'; form.multiples = true; var img_number = 0; form.on('fileBegin', function(name, file) { //console.log("file uploading begin -", name,file); file.path = form.uploadDir +'/'+ file.name; //console.log(file.path); img_number++; }); form.on('error', function(err) { console.log("file Upload Error - ", err); res.json({status:"ERROR"}); }); form.on('end', function() { res.json({status:"OK" , number_of_images: img_number}); }); form.parse(req, function(err, fields, files) { }); } }); } catch(e){console.log("IMAGE UPLOAD FAILURE- ",e);} });
tagged with: javascript
has title: Renaming an image in Nodejs as soon as uploaded
upvote count: 1
answer count: 1
tagged with: asynchronous
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
tagged with: body-parser
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/q/29198460
has comment: http://stackoverflow.com/comment/46609990
tagged with: loops
score: 5
linked to: http://stackoverflow.com/q/4743500
has answer: http://stackoverflow.com/a/29199712
accepted answer: http://stackoverflow.com/a/29199712
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: onkeydown
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to move a div up and down using two keys in Javascript. The idea is that while a certain key is depressed, a function loops and adds to the div's 'top' style value each time. The basic function works, but I can't get it to loop and I can't get anything to respond to a keypress. It's hard to find info on keypress handling in Javascript, it seems most people use jQuery to handle that. Is my use of the do-while loop correct? is there a better way to handle keydown and keyup events? Here's my code: var x = 0; console.log(x); function player1MoveDown() { var value = document.getElementById("player1").style.top; value = value.replace("%", ""); value = parseInt(value); value = value + 1; value = value + "%"; document.getElementById("player1").style.top = value; console.log(value); } //moves paddle down; adds to paddle's 'top' style value function player1MoveSetting() { x = 1; do { setInterval(player1MoveDown(), 3000); } while (x == 1); console.log(x); } //paddle moves while x=1; runs player1MoveDown function every 3 seconds function player1Stop() { x = 0; } And here's the relevant bit of HTML: &lt;div class="paddle" id="player1" style="top:1%" onkeydown="player1MoveSetting()" onkeyup="player1Stop()"&gt;&lt;/div&gt;
has title: Loop a function while key is pressed
tagged with: onkeypress
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46609438
upvote count: 5

http://stackoverflow.com/a/29128622
accepted answer of: http://stackoverflow.com/q/29128523
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
has body: RequireJS modules are singletons. It loads a module once and only once. If a module has been loaded already, what you get if you load it again is a reference to the same module as originally loaded. The factory function you pass to define won't be run a second time. So what you are seeing is exactly what is expected.
answers question: http://stackoverflow.com/q/29128523

http://stackoverflow.com/a/29153975
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29153894
type: Answer
upvote count: 3
has body: In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. When we define our faithful function doSomething() in a page, its owner is the page, or rather, the window object (or global object) of JavaScript. An onclick property, though, is owned by the HTML element it belongs to. Via- http://www.quirksmode.org/js/this.html
score: 3
answers question: http://stackoverflow.com/q/29153894
type: AcceptedAnswer

http://stackoverflow.com/comment/46572882
has text: ...ECMAScript 6 will have `.endsWith()` for strings, which would be more efficient. Otherwise, you could do `that.src.slice(-myImages[newImgNumber].length) === myImages[newImgNumber]`
score: 0
comment on: http://stackoverflow.com/q/29177655
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46635325
comment on: http://stackoverflow.com/q/29212837
type: Comment
has text: Set value of ng-model variable to your selected item.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46372076
has text: I added the displayMessage it just add the error message nothing much
comment on: http://stackoverflow.com/q/29068152
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29193607
answers question: http://stackoverflow.com/q/29193511
has body: You can control styles of visited linked with :visited pseudo-class. You can defined necessary color settings for visited links and when you need to mark link as replied you can add some CSS class to it, and defined CSS rules like this: a.updated:visited { color: #00E; } Here is a little demo: a.updated:visited { color: #00E; } Visited without class Visited with class
type: Answer
upvote count: 2
score: 2
downvote count: 0

http://stackoverflow.com/q/29172868
answer count: 2
tagged with: jquery
has title: How to make active menu item with highlight style?
linked to: http://stackoverflow.com/q/4866284
has answer: http://stackoverflow.com/a/29172927
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29172927
possible better answer: http://stackoverflow.com/a/29173070
tagged with: javascript
has answer: http://stackoverflow.com/a/29173070
has body: I wish to make the active menu item highlighted with a coloured square. .main-menu ul { padding: 0px; margin: 0px; text-align: center; } .main-menu li { list-style: none; display: inline-block; padding: 40px 0; } .main-menu a { font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 14px; margin-right: 5px; padding: 5px 5px; margin: 0; border-radius: 3px; /*color: #fff;*/ line-height: 24px; display: inline-block; } .main-menu a:hover { background-color: #F78E21; color: #fff; } Home About Us Projects Gallery TV Appearances Events Links Testimonials Contact Us
score: 0

http://stackoverflow.com/comment/46485886
has text: "My setTimeout function fires every 3 seconds" - Nope. It fires once, after a delay of three seconds.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29130030

http://stackoverflow.com/q/29142613
accepted answer: http://stackoverflow.com/a/29142702
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29142680
upvote count: 1
has answer: http://stackoverflow.com/a/29142680
type: Question
has answer: http://stackoverflow.com/a/29142780
has title: Create a 'remove div' link
answer count: 3
has answer: http://stackoverflow.com/a/29142702
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: With this code I'm able to add a div with some text and and hyperlink inside the div: $(' ') .html("x " + i.item.label + " - ") .attr({ 'id': i.item.val }) .addClass('boxClass') .appendTo('#acResults'); I'd like to remove the created link when I click on the x link inside the created div. Something similar to the remove tag in the tags section of this site. Could you please help me?

http://stackoverflow.com/q/29153168
has comment: http://stackoverflow.com/comment/46528843
has comment: http://stackoverflow.com/comment/46528301
downvote count: 2
has comment: http://stackoverflow.com/comment/46528458
has comment: http://stackoverflow.com/comment/46527715
has answer: http://stackoverflow.com/a/29153541
has comment: http://stackoverflow.com/comment/46527797
type: Question
has comment: http://stackoverflow.com/comment/46528066
has comment: http://stackoverflow.com/comment/46528056
has comment: http://stackoverflow.com/comment/46528975
has comment: http://stackoverflow.com/comment/46527787
tagged with: parent-node
score: -2
has title: How to get parent's parent's parent's id in Angularjs
tagged with: javascript
has comment: http://stackoverflow.com/comment/46527753
has comment: http://stackoverflow.com/comment/46528982
has body: I have a problem. I need to know how to get grandparent's ID in AngularJS. I need "{{parent}}" to become "grand-parent". (it should be ) var app = angular.module('myApp', []); app.controller('myCtrl', function($scope) { var pid = document.getElementsByClassName("i-am-a-child"); var pid = this.parentNode.id; if (this.parentNode&&this.parentNode.id) var pid=this.parentNode.id; $scope.parent = var pid; } My actual code 0 }" ng-dblclick="childToggleCt(project)" id="project-{{$index}}"> Pending And for now JS was like tis : $scope.ParentIdShow = function(obj) { alert(obj.target.parentNode.parentNode.parentNode.id); }
has comment: http://stackoverflow.com/comment/46528636
upvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/14994391
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46527702
has comment: http://stackoverflow.com/comment/46528526
has comment: http://stackoverflow.com/comment/46529035
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46528627
has comment: http://stackoverflow.com/comment/46527571
has comment: http://stackoverflow.com/comment/46528417
has comment: http://stackoverflow.com/comment/46528163
has comment: http://stackoverflow.com/comment/46527779

http://stackoverflow.com/a/29068607
has comment: http://stackoverflow.com/comment/46372667
has comment: http://stackoverflow.com/comment/46372963
score: 0
has comment: http://stackoverflow.com/comment/46372931
has body: Abuse the round() function. That will get rid of the garbage: function isNumber(n) { if(Math.round(n)==n &amp;&amp; n.length==(Math.round(n)).length) return n; else return false; } Essentially this function returns false if the number is not an integer, and returns the exact integer if it is an integer. Input 14.0 should return false Input 13.5 should return false Input 13 should return 13.
type: Answer
has comment: http://stackoverflow.com/comment/46372746
has comment: http://stackoverflow.com/comment/46372731
answers question: http://stackoverflow.com/q/29068565
has comment: http://stackoverflow.com/comment/46372717

http://stackoverflow.com/comment/46623920
type: QuestionComment
has text: Unfortunately, i don't know anything about jquery. it would be very helpful if you could give the jquery for my question's javascript.
score: 0
comment on: http://stackoverflow.com/q/29205390
type: Comment

http://stackoverflow.com/comment/94373819
type: AnswerComment
score: 0
type: Comment
has text: Thank you for notifying me about this, I have updated the link
comment on: http://stackoverflow.com/a/42612739

http://stackoverflow.com/comment/46534062
type: AnswerComment
type: Comment
has text: Why don't you use a combination of the two examples? Example 1) for creating your combos (single div, array to store selected names) and 2) to show/hide the loaded info? You should be able to figure out how to do this on your own at this point ;) - let me know if you get stuck
score: 0
comment on: http://stackoverflow.com/a/29150701

http://stackoverflow.com/q/29179332
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29180265
answer count: 1
tagged with: ipad
linked to: http://stackoverflow.com/q/18855642
type: UnansweredQuestion
tagged with: scroll
has title: Ipad scroll reached bottom condition not met
has body: I have a requirement to change the footer if the scroll reached bottom of the page. So I used if($(window).scrollTop() + $(window).height() == $(document).height()) condition to check whether the scroll has reached the bottom or not. But this condition is not getting met in an Ipad, but works on desktop. Is there something different to check to find if scroll has reached bottom? How to fix this?

http://stackoverflow.com/comment/46516262
comment on: http://stackoverflow.com/a/29146785
has text: i dont think that answers his question. He wants to know if it is possible to know the function name from inside the function itself
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29188049
has title: Cant get javascript to fire on value change
tagged with: model-view-controller
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29188122
upvote count: 1
downvote count: 1
type: Question
has body: im having issues with a certain section of code. The value is updated by a qr scanner system, when the value equals or contains the word "Job" i need a JS function to fire Reset Scan $(document).ready(function () { $('#qr-value').onchange('input', function () { if ($('#qr-value').val() == 'hello stephen') { alert('Changed!') } }); }); UPDATE: QR.JS (where qr code is entered into the textbox) function read(a) { //$("#qr-value").text(a); var TheTextBox = document.getElementById("qr-value"); TheTextBox.value = a; } qrcode.callback = read;
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29188117
has answer: http://stackoverflow.com/a/29188117
has answer: http://stackoverflow.com/a/29188122
favorite count: 0

http://stackoverflow.com/q/29122975
has answer: http://stackoverflow.com/a/29123268
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29123304
has title: How do I get the value of each ListItem in a ListBox using JavaScript
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29123268
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46476686
tagged with: asp.net
has answer: http://stackoverflow.com/a/29123304
has body: I have a ListBox that's dynamically populated. I'd like to mark each selected ListItem as "selected" if the value of the ListItem matches a specific string of characters. ASP.NET: &lt;asp:ListBox ID="lstComputers" runat="server"&gt;&lt;/asp:ListBox&gt; C#: //code that populates lstComputers. //I got this part working properly already Javascript: //I'm really bad at javascript, so here's the sudo code of what I'd like done For each ListItem in lstComputers{ If ListItem.value like 'HP%' then{ //assuming % is like a wild card in SQL ListItem.selected = true; } } Please help me out with the JavaScript. Thanks

http://stackoverflow.com/comment/46586356
score: 0
type: Comment
type: QuestionComment
has text: @mplungjan I just checked it, and it clicks some menu button that has nothing to do with a `submit` button. How do I prevent it? `<button name="bmenu" onclick="DisableHL('bmenu'); location.href='<%= movies %>'; return false;" class="btn">Movies `
comment on: http://stackoverflow.com/q/29185270

http://stackoverflow.com/comment/46565368
score: 0
comment on: http://stackoverflow.com/q/29172780
type: Comment
type: QuestionComment
has text: @ehlers - yup, something weird is going on, see update on getting it working with regular files. Something is breaking `ng-template` but I'm at a loss.

http://stackoverflow.com/comment/46448751
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109410
has text: Also, in response to a comment in your question, you definitely CAN have multiple switch statements in a function.
score: 0

http://stackoverflow.com/comment/46589823
has text: Place the script element under the button element.
type: QuestionComment
comment on: http://stackoverflow.com/q/29187436
score: 0
type: Comment

http://stackoverflow.com/comment/46504843
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29134778
score: 0
has text: CBroe, Thank you. I didn't notice the mistake of calling the function as opposed to assigning and missing the space. Thanks for explaining.

http://stackoverflow.com/q/29080493
accepted answer: http://stackoverflow.com/a/29082072
type: AnsweredQuestion
score: 1
has body: I have a simple code which looks like follows: function setValue() { var col = "E"; var sh = SpreadsheetApp.getActiveSpreadsheet(); var values = sh.getRange("Sheet2!"+col+"1:"+col).getValues() var ct = 0; while ( values[ct][0] != "" ) { ct++; } ct++; sh.getRange(col+ct).setValue(Math.floor((Math.random() * 10) + 1)); }; What this does is a loop over column E to look for the first empty row, and places a random value in it. This is just for testing purposes only and works fine if I trigger the function manually. The function even triggers when I set an on change trigger so every time I hit backspace or do something in the Sheet, a new random number appears in Column E. This, however, does not work for time-driven triggers. I have tested everything, from setting a trigger every minute through: Script editor... --> Resources --> All your triggers --> time-driven --> minutes timer and even placing this code: ScriptApp.newTrigger("setValue") .timeBased() .after(1 * 60 * 1000) .create(); which hypothetically should trigger the function a given time after 1 minute has passed. None of these work, and I cannot figure out why. Is there any other way to fire this function every minute? Since the function fires on change as well (but this is only a workaround), is there a script which produces and on change effect on the sheet which will eventually trigger this function? Best regards!!
upvote count: 1
type: Question
tagged with: google-sheets
has answer: http://stackoverflow.com/a/29082072
tagged with: javascript
tagged with: google-apps-script
has title: Time-driven trigger not working in Google Spreadsheet
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/29082523
upvote count: 1
has body: You can directly use replace() method, try the following: contentItem.screen.SoftwareLibrary.Code.replace("if", "if"); Or you can create a CSS class colored and give it a different background color, and whenever you find the word if you give it this class: CSS: .colored { background-color:red; } JS: //managethuis function like you want window.addEventListener("load", changeColor); function changeColor() { contentItem.screen.SoftwareLibrary.Code.replace("if", "if"); }
downvote count: 0
answers question: http://stackoverflow.com/q/29082402
has comment: http://stackoverflow.com/comment/46398229
has comment: http://stackoverflow.com/comment/46398069
type: Answer
has comment: http://stackoverflow.com/comment/46398332
score: 1

http://stackoverflow.com/q/29070195
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/58133801
tagged with: animated-gif
has title: How do i get a particular gif Frame?
score: 2
answer count: 0
type: Question
has body: I just wanted to ask, is there any way to get one frame out of complete gif (for example, the 164 image in the animation) using javascript / jQuery? For being more clear, by using it, will i be able to make a slider image library, which every image in there is the next image in the gif animation? Thanks in advance.
tagged with: http://stackoverflow.com/tag/gif
has comment: http://stackoverflow.com/comment/46375342
linked to: http://stackoverflow.com/q/4645274
tagged with: javascript
tagged with: jquery
upvote count: 2
linked to: http://stackoverflow.com/q/2385203
has comment: http://stackoverflow.com/comment/46375363
tagged with: user-interface
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/29087887
has comment: http://stackoverflow.com/comment/46408985
score: 1
accepted answer of: http://stackoverflow.com/q/29087854
has comment: http://stackoverflow.com/comment/46408833
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46409502
has comment: http://stackoverflow.com/comment/46408811
has comment: http://stackoverflow.com/comment/46419086
type: Answer
has comment: http://stackoverflow.com/comment/46409282
has comment: http://stackoverflow.com/comment/46410223
has body: PHP's "associative arrays" — an ordered set of name/value pairs — are a fairly rare data structure, particularly rare to find as a feature of the language rather than as a library class. JavaScript doesn't have them — yet. ES6 will introduce better iteration semantics to the language generally, and a standard library Map type that takes advantage of those semantics so that when iterated, it visits entries in key insertion order; more below. Before ES6 Until ES6, you can use objects, as you seem to know, like so: var obj = { foo: 'val1', bar: 'val2', baz: 'val3' }; ...but the properties have no order. If order is important, you'd have to track the order separately, perhaps by having the keys in an array: var keys = ['foo', 'bar', 'baz']; var obj = { foo: 'val1', bar: 'val2', baz: 'val3' }; var i; for (i = 0; i < keys.length; ++i) { console.log(obj[keys[i]]); } This is less delicate than parallel arrays, because you only have to worry about the order of one array. As of ES6 ES6's Map defines that when iterated, the map's entries are visited in the order in which the keys were inserted. You can also initialize a Map instance by using an array of key/value arrays, like so: var map = new Map([ ["foo", "val1"], ["bar", "val2"], ["baz", "val3"] ]); So that will be the equivalent form when it's widely-supported. More about Map in this article (and the draft spec). Unfortunately it seems that JS object literals don't allow evaluating code to set values for their properties Yes, they do. In your example, the foo property will be a jQuery object with a set of elements matching the CSS selector foo (a set which is probably empty, as there is no foo element). Example: var obj = { foo: 6 * 7 }; console.log(obj.foo); // 42 You can't (yet) use an expression for the property name in a property initializer like that, just the value. In ES6, you'll be able to use an expression for the property name as well: // As of ES6 var obj = { ['f' + 'o' + 'o']: 6 * 7 }; console.log(obj.foo); // …
has comment: http://stackoverflow.com/comment/46409142
has comment: http://stackoverflow.com/comment/46418499
has comment: http://stackoverflow.com/comment/46409346
has comment: http://stackoverflow.com/comment/46409656
upvote count: 1
has comment: http://stackoverflow.com/comment/46409230
has comment: http://stackoverflow.com/comment/46432329
has comment: http://stackoverflow.com/comment/46409058
has comment: http://stackoverflow.com/comment/46409419
answers question: http://stackoverflow.com/q/29087854

http://stackoverflow.com/comment/46596134
has text: Put some dummy value in the else part and whether it is coming to else part
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29190904

http://stackoverflow.com/q/29110300
accepted answer: http://stackoverflow.com/a/29115980
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46459544
has answer: http://stackoverflow.com/a/29115980
answer count: 2
has title: jQuery filter only to the visible elements
has body: I have the below jQuery filter code: And i am trying fo tilter only the visible elements (to aply the filter if another filter was applied.) $(window).bind("load", function() { $(".filters li").on("click", function() { id = ($(this).data("id") + '').split(','); filter = $(this).data("filter"); $("#hotel-list .box").hide(); id[0] == "all" && $("#hotel-list .box").show() || id.forEach(function(v) { $('#hotel-list .box[data-' + filter + '*="' + v.trim() + '"]').show(); }); return false; }); HTML code of the Filters: Clasificare Toate Tip Masa Toate Room Only Breakfast Half Board Full Board All Inclusive Self Catering And the html elemets filtered are: Content here Content here ..... JSFIDDLE Have any ideea on how can i filter only the visible elements ?
has comment: http://stackoverflow.com/comment/46450277
downvote count: 0
possible better answer: http://stackoverflow.com/a/29110545
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46456766
has answer: http://stackoverflow.com/a/29110545
favorite count: 0
has comment: http://stackoverflow.com/comment/46459684
has comment: http://stackoverflow.com/comment/46459934
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46538405
score: 0
type: Comment
type: QuestionComment
has text: I'm kinda a newbie. What kind of event handler would I call here and what would it do?
comment on: http://stackoverflow.com/q/29159070

http://stackoverflow.com/q/29177729
has body: I'm just learning backbone so forgive me if the title is incorrect. I want to sort through the model (is the model an array?, have i got that wrong?) but I can't do it. In regular JS I can use this function to sort through an array and I know it works: getObjects: function(obj, key, val) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; if (typeof obj[i] == 'object') { objects = objects.concat(getObjects(obj[i], key, val)); } else if (i == key &amp;&amp; obj[key] == val) { objects.push(obj); } } return objects; } But I don't know where I should put this in Backbone. I tried putting it in the view, but I get an error saying "undefined is not a function" for getObjects. window.WineListView = Backbone.View.extend({ initialize: function () { this.render(); }, //sort through JSON when getting different priority tasks getObjects: function(obj, key, val) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; if (typeof obj[i] == 'object') { objects = objects.concat(getObjects(obj[i], key, val)); } else if (i == key &amp;&amp; obj[key] == val) { objects.push(obj); } } return objects; }, render: function () { var wines = this.model.models; wines = getObjects(wines, 'completed', 'No'); var len = wines.length; var startPos = (this.options.page - 1) * 8; var endPos = Math.min(startPos + 8, len); $(this.el).html('&lt;ul class="thumbnails"&gt;&lt;/ul&gt;'); for (var i = startPos; i &lt; endPos; i++) { $('.thumbnails', this.el).append(new WineListItemView({model: wines[i]}).render().el); //$('.thumbnails', this.el).append('&lt;br/&gt;'); } $(this.el).append(new Paginator({model: this.model, page: this.options.page}).render().el); return this; } }); How can I declare my getObjects function so that it can be accessed? Is the model not an array? Is there a different way I should be sorting? Any help would be greatly appreciated! Thank You.
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: sorting
tagged with: backbone.js
score: 0
has title: Sort through a model(array) in Backbone?
has comment: http://stackoverflow.com/comment/46574549
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46577849
has comment: http://stackoverflow.com/comment/46574795
has answer: http://stackoverflow.com/a/29227107
has comment: http://stackoverflow.com/comment/46574534

http://stackoverflow.com/a/29124566
type: Answer
upvote count: 1
score: 1
has body: You are NEVER 100% secure, however you should take a look at this. If you use ENT_QUOTES parameter too, currently there are no ways to inject ANY XSS on your website if you're using valid charset (and your users don't use outdated browsers). However, if you want to allow people to only post SOME html tags into their "Tweet" (for example &lt;b&gt; for bold text), you will need to take a deep look at EACH whitelisted tag.
downvote count: 0
answers question: http://stackoverflow.com/q/29124061

http://stackoverflow.com/q/29163881
linked to: http://stackoverflow.com/q/27858282
tagged with: sql
linked to: http://stackoverflow.com/q/25163785
has body: How to retrieve or display data on html page from db2 by sql adapter in ibm worklight? What are the codes for these? How to Display data in a text box? How to Display data in a label? How to Display data in a drop down box? How to select check box? like automatically getting data from db2 for example Interests:Technology,Science,etc. Now the user can update/change data and save. How to select radio/option button? like automatically getting data from db2 for example Gender:Male or Female. Now the user can update/change data and save. like in jsp. Is the codes are same in android hybrid apps development or not? Your Account Details <% String usertype="general"; String email=(String)session.getAttribute("email"); String pwd=(String)session.getAttribute("pwd"); String sex=new String(); Connection con=null; try { if(email==null) out.println(" Please Login to view your account!!!"); //MS ACCESS Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:dsn1"); PreparedStatement pst=null; pst=con.prepareStatement("select * from user1 where usertype=? and email=? and pwd=?"); //"select * from user1 where usertype='"+usertype+"' and email = '"+email+"' and pwd='"+pwd+"'" synchronized(pst) { pst.setString(1, usertype); pst.setString(2, email); pst.setString(3, pwd); } ResultSet rs = pst.executeQuery(); while(rs.next()) { //usertype=rs.getString(1); email=rs.getString(2); //pwd=rs.getString(3); sex=rs.getString(4); //out.println(""); out.println (" "); out.println(" "); out.println(" "); out.println("Email: "+email); out.println(" "); out.println(" "); out.println(" "); out.println(" "); out.println("Sex: "+sex); out.println(" "); out.println(" "); } catch(Exception e) { e.printStackTrace(); } //return false; finally { con.close(); } %>
answer count: 1
favorite count: 0
tagged with: worklight-adapters
has title: How to retrieve or display data on html page from db2 by sql adapter in ibm worklight? android hybrid apps development
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22670179
tagged with: ibm-mobilefirst
upvote count: 0
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/23708346
has answer: http://stackoverflow.com/a/29164304
linked to: http://stackoverflow.com/q/22744628
tagged with: javascript
score: -1

http://stackoverflow.com/q/29131606
score: 0
accepted answer: http://stackoverflow.com/a/29131756
has comment: http://stackoverflow.com/comment/46489406
has comment: http://stackoverflow.com/comment/46489145
has comment: http://stackoverflow.com/comment/46489131
has comment: http://stackoverflow.com/comment/46489579
has comment: http://stackoverflow.com/comment/46489376
has comment: http://stackoverflow.com/comment/46489163
has comment: http://stackoverflow.com/comment/46488907
tagged with: php
has comment: http://stackoverflow.com/comment/46489349
type: Question
type: AnsweredQuestion
has title: Form validation with AJAX - preventing from blank fields
has comment: http://stackoverflow.com/comment/46489072
has comment: http://stackoverflow.com/comment/46489216
has comment: http://stackoverflow.com/comment/46489011
has comment: http://stackoverflow.com/comment/46489621
tagged with: validation
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29131756
tagged with: jquery
tagged with: ajax
has body: I have some script in JS which should validate my form. It shows information like 'sent' or 'loading' when processing. I'd like to add one more feature. I want to prevent users from sending an e-mail with blank fields. What should I add to the code below to achieve this? $(function() { var form = $('#form'); var submit = $('#submit'); form.on('submit', function(e) { e.preventDefault(); $.ajax({ url: '', type: 'POST', dataType: 'html', data: form.serialize(), beforeSend: function() { document.getElementById("submit").value = "Loading..."; }, success: function() { form.trigger('reset'); document.getElementById("submit").value = "Message sent!"; }, }); }); });

http://stackoverflow.com/comment/46408863
type: Comment
has text: I am doing something similar by using `return Content("http://www.google.co.uk");`. I think using `JavaScript` is fine though.
comment on: http://stackoverflow.com/a/29087846
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46451706
comment on: http://stackoverflow.com/q/29111096
type: QuestionComment
has text: So that error is saying that your module userApp is having issues with it's dependencies. Make sure that all of those things you are injecting into the module actually exist as another module. You have shown the mainCtrl and app.routes, but do the others exist? If you are copying code, you could be copying the angular.module dependency list but havent gotten to copying the actual modules yet.
type: Comment
score: 0

http://stackoverflow.com/comment/46377174
type: Comment
comment on: http://stackoverflow.com/a/29071251
score: 0
has text: Bxckbone is giving error (i guess undefined) . I am trying to use this `window.history.pushState(stateObj, title, URL);` but whatever url i am using in `stateobj` it is only refeing me to main url that is '/'
type: AnswerComment

http://stackoverflow.com/q/29074010
downvote count: 0
tagged with: filepicker
type: AnsweredQuestion
score: 3
has body: Can we upload a file to any default folder, say Documents or Public folder, in OneDrive using OneDrive's JavaScript File Picker API? i.e. instead of setting path using WL.upload({ path: response.data.folders[0].id, element: "file", overwrite: "rename" }); can we set the path value for a default folder like Documents/Public?
has title: Upload file to default folder using OneDrive File Picker API
tagged with: onedrive
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29291008
accepted answer: http://stackoverflow.com/a/29291008
tagged with: javascript
upvote count: 3
possible better answer: http://stackoverflow.com/a/29088022
has answer: http://stackoverflow.com/a/29088022
favorite count: 0

http://stackoverflow.com/q/29118817
has comment: http://stackoverflow.com/comment/46464832
possible better answer: http://stackoverflow.com/a/29119037
has answer: http://stackoverflow.com/a/29119037
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/46464719
accepted answer: http://stackoverflow.com/a/29118978
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46464804
answer count: 2
tagged with: arrays
downvote count: 0
has title: comparing consecutive elements in an array returns nothing (javascript)
tagged with: string
has body: I'm doing some exercises and having a hard time figuring out why my code won't work, would be glad if someone can point me in the right direction. So my input is a string of numbers, which I .split to get an array of strings (so I can loop trough it). Then I want to compare if the strings are equal to the next one or not, and use it to do something (here I'm just printing out the status). Can't figure out what I did wrong, code below. var line = "40 40 40 40 29 29 29 29 29 29 29 29 57 57 92 92 92 92 92 86 86"; line = line.split(" "); for (x = 0; x &lt; line.lenght; x++) { if (line[x] == line[x + 1]) { console.log("numbers are the same"); } else if (line[x] !== line[x + 1]) { console.log("numbers aren't the same"); } }
favorite count: 0
has answer: http://stackoverflow.com/a/29118978

http://stackoverflow.com/q/29171962
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29172024
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29172024
has body: I'm dynamically building a tabbed display of files based on user input from the file chooser that is displayed for input type=file &lt;input type="file" id="selectedFiles" style="display: none;" multiple/&gt; &lt;input type="image" src="file_select_button_image.png" onClick="buildFileTabs();"/&gt; The problem is that when the user clicks on the file select button the file chooser is displayed ANDbuildFileTabs is called(). This is happening with the chromium browser. I have not tried any other browsers. How to I associate the buildFileTabs() function with the closing of the file chooser dialog?
type: Question
has title: How to I associate a javascript function with the closing of the file chooser dialog?
answer count: 1

http://stackoverflow.com/q/29198719
score: 0
has answer: http://stackoverflow.com/a/29198946
answer count: 1
tagged with: jquery
has title: Dynamically adding and removing div using JQuery?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29198946
has body: I'm trying to create a form that allows a user to enter their experience and education I would like the user to be able to add and remove education or experience. I am able to do this... sort of. Only the problem is my new divs that I am creating are being appended to the end of the page instead of being appended after the previous div. These are my scripts: $(document).ready(function() { var inputs = 1; $('#btnAdd').click(function() { $('.btnDel:disabled').removeAttr('disabled'); var c = $('.clonedInput:first').clone(true); c.children(':text').attr('name', 'input' + (++inputs)); $('.clonedInput:last').after(c); }); $('.btnDel').click(function() { if (confirm('continue delete?')) { --inputs; $(this).closest('.clonedInput').remove(); $('.btnDel').attr('disabled', ($('.clonedInput').length < 2)); } }); }); $(document).ready(function() { var inputs = 1; $('#btnAdd2').click(function() { $('.btnDel2:disabled').removeAttr('disabled'); var c = $('.clonedInput:first').clone(true); c.children(':text').attr('name', 'input' + (++inputs)); $('.clonedInput:last').after(c); }); $('.btnDel2').click(function() { --inputs; $(this).closest('.clonedInput').remove(); $('.btnDel2').attr('disabled', ($('.clonedInput').length < 2)); }); }); I understand it's bad form to duplicate code like this but I'm not sure how else to else to do it so that clicking the add button doesn't get pressed for the wrong div... and my html is: Education Please add all of your education Level: Secondary Some Post Secondary College Did you receive a degree, diploma or certificate? Certificate Diploma Degree Experience Please add all of your experience Position title: Years at position: Responsibilities: Type: Accounting, banking and Finance Publishing & Journalism Social Care & guidance work Any ideas on how I can fix my script so that when I click the add button for education, a new div containing all of the fields for "education" show up below the previous education box and the same for education? Any help w…
tagged with: javascript

http://stackoverflow.com/q/29090420
score: -4
favorite count: 0
has comment: http://stackoverflow.com/comment/46413313
type: Question
has comment: http://stackoverflow.com/comment/46413224
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29090939
has title: Print Javascript function in htm php page
has comment: http://stackoverflow.com/comment/46413644
has comment: http://stackoverflow.com/comment/46413199
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/46413350
type: UnansweredQuestion
has body: this is my javascript code: i m print the result value in html tag like: bt its not showing the value..!!
downvote count: 4
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46473675
has text: OP also wants the indexes of the replaced items, although it's unclear why, or in what form.
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29123754

http://stackoverflow.com/q/29062789
possible better answer: http://stackoverflow.com/a/29063500
has answer: http://stackoverflow.com/a/29063188
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/27381352
score: 1
accepted answer: http://stackoverflow.com/a/29063188
upvote count: 1
type: AnsweredQuestion
has title: Protractor Angular cannot get the count of elements
tagged with: protractor
tagged with: javascript
has answer: http://stackoverflow.com/a/29063500
has body: I'm trying to write a test where I check the ammount of items in a ng-repeat. After that I add 1 item to that ng-repeat and I want to see if the old value+1 is equal to the new value. This is my html: &lt;tr ng-repeat="list in listData.myLists"&gt;...&lt;/tr&gt; And my test describe("list test", function(){ it('Description of the test', function(){ browser.get('app/#/list'); var list = element.all(by.repeater('list in listData.myLists')); var ammount; list.count().then(function(c) { ammount = c; }); ... Here I add an item var secondAmmount = element.all(by.repeater('list in listData.myLists')).count(); expect(secondAmmount).toEqual(ammount + 1); }); }); But I'm getting 7 is not equal to NaN. I have also tried just adding the list.count() + 1 directly into the toEquals method but then I get an object instead of a number. Is there something I'm doing wrong here? Thanks for any help in advance
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/47727816
score: 0
has text: That's true, but it looks like the behavior of HtmlUnit is to throw on _any_ exception. The way that jquery handles some things (like #1) is it's a caught exception, so execution doesn't stop. (I don't necessarily agree with this, and neither does this guy: http://bugs.jquery.com/ticket/14123)
comment on: http://stackoverflow.com/q/29140710
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29088892
linked to: http://stackoverflow.com/q/2174297
tagged with: javascript
has answer: http://stackoverflow.com/a/29088919
has body: I have seen some developers use variables in a way that does not make sense to me, and this is something I have seen more commonly in AngularJS. Consider this code: var someVariable = (someOtherVariable === 'true'); if (!!someVariable) { // do some stuff here } why not just leave out those two exclamation marks? Is it not the same? What is the benefit of doing it like this?
score: 0
answer count: 2
has title: What is the difference between !!variable and variable
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29088919
duplicate of: http://stackoverflow.com/q/2174297
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46410556
type: Question
has answer: http://stackoverflow.com/a/29088946
has comment: http://stackoverflow.com/comment/46410565
accepted answer: http://stackoverflow.com/a/29088946

http://stackoverflow.com/a/29131511
type: Answer
has body: Xan has given you an excellent clue as to what is going on, but let me try to answer your question, because it especially relates to chrome extensions. Your callback function in getTabID runs asynchronously, meaning it doesn't block whatever other code may run. So, in closeBundle, you call getTabID, which starts to run, but closeBundle continues to run even before getTabID is finished running its callback. Therefore, tabID is still 0 when you call chrome.tabs.get, and you get an error. In short, the entire architecture of your code won't work, because of the asynchronous nature of JavaScript. One readily available solution is to wrap everything in callback functions (frequently known as callback hell). I've built chrome extensions with 5 or 6 nested callback functions. One really needs to understand this asynchronous behavior to program and debug chrome extensions, and JavaScript in general. A quick Google search will give you endless articles on the subject. Xan's comment is a good place to start. But for example in your code, some pseudo code might look something like this: function getTabnumber(){ chrome.tabs.query({'currentWindow': true}, function(tabarray){ tabnumber = tabarray.length; for(i=0;i&lt;tabnumber;i++){ chrome.tabs.query({'currentWindow': true, 'active': true}, function(tabArray){ tabID = tabArray[0].id; chrome.tabs.get(tabID , function(tab){ //here is the first problem insert[i] = tab; //for saving all Tabs in an array }); chrome.tabs.remove(tabID); //here the second one } }); }); } This code isn't tested or meant to run, just to give you an idea of what I mean by nested callbacks. Hope this helps, good luck.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46563756
answers question: http://stackoverflow.com/q/29130394
accepted answer of: http://stackoverflow.com/q/29130394
has comment: http://stackoverflow.com/comment/46488784
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/72755831
score: 2
downvote count: 0
has body: First, to answer your question, "Don't I know?". Of course not. If you are thinking of a form that is only used to add records, I could see your point but forms are also used to update records and we have no idea what the initial value is for any given record that may need to be updated. The next thing to understand is that the same concept applies to more than check boxes. For example the text input elements have a "defaultValue" property that parallels the logic of default checked property. The next point, is these properties would be better understood by novices had they been named "initialxyz" rather than "defaultxyz". Novices think that they are used to identify what should be sent to the server if not populated by the user but that is not what they are at all. They are the initial value, as sent by the server to the client, before the user starts interacting with the screen. To answer your larger question, these propertied are extremely useful in two cases. The first has already been mentioned which is the "reset" button or as I jokingly call it the "oops" button or "start over". That can occur at the record level that resets every element on the form but it can be used on a field by field basis where only the field that has focus is reset. For example, the escape key is often used for this purpose. The second use for this is to know if the form is "clean" (unchanged) or dirty (changed, in at least one small way somewhere). This is used in too commentary places that you did not think about. The first is to avoid submitting a form with no changes to the server. Why waste resources. The complementary is to pop up the "are you sure you want to lose your changes" when someone attempts to navigate away from a form with changes. You walk the form and compare the current valued to the initial value for each element. If no elements changed the form is clean and allow the user to leave without a prompt. If at least one element is different than it's initial value and t…
accepted answer of: http://stackoverflow.com/q/29062463
upvote count: 2
answers question: http://stackoverflow.com/q/29062463
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/29071419
answers question: http://stackoverflow.com/q/29071278
score: 0
has body: You can try this one, its working example. var jqXHR = $.ajax({ url: "verify.php", type: "POST", data: {code: captcha}, async: false, success: function (data) { } }); if(jqXHR.responseText=="no") { alert("Invalid Captcha"); } else { flag="yes"; } if(flag=="no") { return false; } else{ return true; } It will return after the successfully returning data from ajax request
type: Answer

http://stackoverflow.com/comment/46474022
has text: You were right, I added a timeout before searching the array and now it works. Thanks for your help!
comment on: http://stackoverflow.com/a/29109063
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29166667
upvote count: 0
answers question: http://stackoverflow.com/q/29166465
has comment: http://stackoverflow.com/comment/46551838
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/46551906
has comment: http://stackoverflow.com/comment/46552100
has body: You have the local storage API: http://diveintohtml5.info/storage.html The File API: https://developer.mozilla.org/en-US/docs/Web/API/File?redirectlocale=en-US&amp;redirectslug=DOM%2FFile Mozilla also simplified the local storage API with the local forage API: http://mozilla.github.io/localForage/ These are just some options.
downvote count: 1

http://stackoverflow.com/a/40722396
has comment: http://stackoverflow.com/comment/69171303
type: Answer
has comment: http://stackoverflow.com/comment/69119527
score: 4
upvote count: 4
has body: What you're looking for is something similar to Express's Router. In fact, Express does a good job of burying the usefulness of this feature so I'll re-post an example here: // routes/users.js: // Note we are not specifying the '/users' portion of the path here... const router = express.Router(); // index route router.get('/', (req, res) =&gt; {... }); // item route router.get('/:id', (req, res) =&gt; { ... }); // create route router.post('/', (req,res) =&gt; { ... }); // update route router.put('/:id', (req,res) =&gt; { ... }); // Note also you should be using router.param to consolidate lookup logic: router.param('id', (req, res, next) =&gt; { const id = req.params.id; User.findById(id).then( user =&gt; { if ( ! user ) return next(Boom.notFound(`User [${id}] does not exist`)); req.user = user; next(); }).catch(next); }); module.exports = router; Then in your app.js or main routes/index.js where you assemble your routes: const userRoutes = require('./routes/users') // now we say to mount those routes at /users! Yay DRY! server.use('/users', userRoutes) I'm actually disappointed to find this SO post with no other responses so I'll assume there's nothing out of the box (or even a third-party module!) to achieve this. I imagine it might not be too difficult to create a simple module that uses functional composition to remove duplication. Since each of those hapi route defs is just an object it seems like you could make a similar wrapper like the following (untested): function mountRoutes(pathPrefix, server, routes) { // for the sake of argument assume routes is an array and each item is // what you'd normally pass to hapi's `server.route routes.forEach( route =&gt; { const path = `${pathPrefix}{route.path}`; server.route(Object.assign(routes, {path})); }); } EDIT In your case since you have multiple layers of nesting, a feature similar to Express's router.param would also be extremely helpful. I am not terribly familiar with hapi so I don't know if it already has this…
downvote count: 0
answers question: http://stackoverflow.com/q/29143194
has comment: http://stackoverflow.com/comment/69324494

http://stackoverflow.com/comment/46387002
type: Comment
has text: You can't. It must be executed async for you to do that...
score: 0
comment on: http://stackoverflow.com/q/29076806
type: QuestionComment

http://stackoverflow.com/a/29067369
downvote count: 0
score: 5
accepted answer of: http://stackoverflow.com/q/29067308
answers question: http://stackoverflow.com/q/29067308
has body: You need to export it first: test.js: function print(t){ console.log(t); } exports.print = print; Then you can call it: Victors-MacBook-Pro:a kohl$ node &gt; var test = require('./test') undefined &gt; test.print("ok"); ok
type: AcceptedAnswer
upvote count: 5
type: Answer

http://stackoverflow.com/a/29142269
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29142239
type: Answer
score: 0
has body: I want to apply loading style in all this divs, can i do that? Yes, with an attribute starts with selector: [id^=loading] { display: none; } That matches any element whose id attribute starts with loading. Example: [id^=loading] { color: blue; } loading1 loading12 loading123 notloading, so not affected loading with nothing after
accepted answer of: http://stackoverflow.com/q/29142239

http://stackoverflow.com/comment/46596132
score: 0
type: QuestionComment
type: Comment
has text: So with basic jQuery as opposed to using the plugin API itself?
comment on: http://stackoverflow.com/q/29190567

http://stackoverflow.com/q/29168585
tagged with: byte
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46555605
upvote count: 1
has title: Converting Double to Bytes and Long to Bytes gives different byte arrays
downvote count: 1
linked to: http://stackoverflow.com/q/8482309
has comment: http://stackoverflow.com/comment/46556390
has comment: http://stackoverflow.com/comment/46557234
has body: I need to replicate my hashing algorithm in JavaScript that i have in C#. It requires that i convert a double to a byte array but i can't seem to figure out how the c# method BitConvert.GetBytes() is producing its data. I put in the number 448502400.0 and it outputs 0,0,0,128,154,187,186,65 aka (0x809ABBBA41). If i turn the number to a long before i run it through getBytes() it produces the correct result. 128,154,187,26,0,0,0 How would i go about turning that number (448502400) into a byte[] containing 0x809ABBBA41 in JavaScript where numbers aren't stored the same way? Just for reference it is NOT possible to change the C# code anymore. EDIT: Here are the two methods (shamelessly stolen from other questions) to turn a number into bytes. But this generates the long represenation and not the double representation i'm after. var timestampBytes = [0,0,0,0,0,0,0,0]; var i = 8; do { timestampBytes[--i] = timestamp &amp; (255); timestamp = timestamp &gt;&gt; 8; } while (i) And this one function numberToByte(/*long*/long) { // we want to represent the input as a 8-bytes array var byteArray = [0, 0, 0, 0, 0, 0, 0, 0]; for (var index = 0; index &lt; byteArray.length; index++) { var byte = long &amp; 0xff; byteArray[index] = byte; long = (long - byte) / 256; } return byteArray; } EDIT: My question has been answered in a round about way in the attached answer. This is my working code which will generate a byte[] which formats to the same byte[] as BitConvert.GetBytes(double) var bytes = []; var view = new DataView(new ArrayBuffer(8)); view.setFloat64(0, numberToTurnToDouble); bytes = bytes.concat(numberToByteArray(view.getUint32(4))); // The second half of the new number bytes = bytes.concat(numberToByteArray(view.getUint32(0))); // The first half of the number // Converts an int32 number to its byte array representation function numberToByteArray(int32) { var byteArray = [0, 0, 0, 0]; for (var index = 0; index &lt; byteArray.length; index++) { var byte = int32 &amp; 0xff; by…
type: Question
has comment: http://stackoverflow.com/comment/46556033
tagged with: c#
has comment: http://stackoverflow.com/comment/46562529
tagged with: arrays
tagged with: javascript
linked to: http://stackoverflow.com/q/4414077
score: 0
has comment: http://stackoverflow.com/comment/46556194
duplicate of: http://stackoverflow.com/q/4414077
linked to: http://stackoverflow.com/q/24564460
has comment: http://stackoverflow.com/comment/46555569
has comment: http://stackoverflow.com/comment/46556110
favorite count: 0
answer count: 0

http://stackoverflow.com/a/29099140
upvote count: 3
has comment: http://stackoverflow.com/comment/46428799
downvote count: 0
has comment: http://stackoverflow.com/comment/46428606
has comment: http://stackoverflow.com/comment/46429116
answers question: http://stackoverflow.com/q/29099123
type: Answer
has comment: http://stackoverflow.com/comment/46428726
has comment: http://stackoverflow.com/comment/46429925
has body: Your selector is wrong, change the id of your input to favorite or try this code: $('#favorite_team').on('input', function(){ alert($(this).val()); });
score: 3

http://stackoverflow.com/q/29108968
type: Question
has title: Access JavaScript array values
has answer: http://stackoverflow.com/a/29109011
tagged with: javascript
has comment: http://stackoverflow.com/comment/46447476
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29109063
has comment: http://stackoverflow.com/comment/46447929
tagged with: jquery
has answer: http://stackoverflow.com/a/29109063
has comment: http://stackoverflow.com/comment/46447794
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/46448693
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46473930
has comment: http://stackoverflow.com/comment/46447964
has body: I have a HTML code like this: &lt;body&gt; &lt;div id="vis"&gt; &lt;div id="loading-container"&gt;&lt;img src="img/loading.gif" id="loading" /&gt;&lt;img src="img/loaded.gif" id="loaded" /&gt;&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; Within the vis div, more elements are added dynamically and they all have the same tag type: &lt;svg class="example" width="800" height="400"&gt;&lt;/svg&gt; I want to get all the svg elements, which I've done like this: var visDiv = document.getElementById("vis"); var svgDiv = visDiv.getElementsByTagName("svg"); I am trying iterate through svgDiv, however it outputs a length of 0 even though there are multiple elements there. When I console.log svgDivI get: SVG: [item: function, namedItem: function] 0: svg 1: svg length: 2 __proto__: HTMLCollection This seems like a obvious question but how can I access the "0" &amp; "1" objects? svgDiv["item"][0] results in undefined. Any help is appreciated!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46468158
accepted answer: http://stackoverflow.com/a/29109011
has comment: http://stackoverflow.com/comment/46448066
has comment: http://stackoverflow.com/comment/46447489
has comment: http://stackoverflow.com/comment/46448150

http://stackoverflow.com/q/29124304
accepted answer: http://stackoverflow.com/a/29147163
tagged with: php
type: AnsweredQuestion
score: 0
has title: Jcrop & Canvas: Size of cropped area is weird & 500 Internal Server Error
type: Question
tagged with: canvas
has body: Introduction Process flow So, I'm making a web application, where users should be able to upload an image and crop it: The user selects a local image An object url is created from the image The object url is the source of an &lt;img&gt; Jcrop is applied to this &lt;img&gt; The selected crop area is drawn into a canvas A data url is created from this canvas This data url is written into a file which is stored on the server Problems The size of the cropped area stored in the canvas is multiple times bigger than the one of the original image When I eventually try to write the decoded data url into a file I get the 500 Internal Server Error Code Note: Code is simplified event_handlers.js jQuery('#my_upload_input').change(function(my_event) { my_load_image(my_event.currentTarget.files); }); jQuery(document).keyup(function(my_event) { if (my_event.which == 13) { my_crop_image(); } }); image_handling.js var my_file_glob; var my_image_glob; var my_jcrop_api_glob; function my_load_image(my_files) { var my_file_glob = my_files[0]; var my_image_glob = new Image(); my_image_glob.onload = function() { my_show_image(); }; my_image_glob.src = URL.createObjectURL(my_file_glob); } function my_show_image() { jQuery('#my_container').html('&lt;img id="my_img" src="' + my_image_glob.src + '" /&gt;'); jQuery('#my_img').Jcrop( { boxWidth: 1280, boxHeight: 720, trueSize: [my_image_glob.width, my_image_glob.height], setSelect: [0, 0, 1920, 1080], aspectRatio: 1920 / 1080, minSize: [1920, 1080], bgColor: '', allowSelect: false }, function() { my_jcrop_api_glob = this; }); } function my_crop_image() { if (typeof my_jcrop_api_glob !== 'undefined') { var my_selection = my_jcrop_api_glob.tellSelect(); var my_canvas = document.createElement('canvas'); var my_canvas_context = my_canvas.getContext('2d'); my_canvas.width = my_selection.w; my_canvas.height = my_selection.h; my_canvas_context.drawImage(my_image_glob, my_selection.x, my_selection.y, my_selection.w, my_selection.h, 0, 0, my_selection.w,…
tagged with: javascript
tagged with: internal-server-error
linked to: http://stackoverflow.com/q/9773154
answer count: 1
has answer: http://stackoverflow.com/a/29147163
tagged with: jcrop

http://stackoverflow.com/comment/46371402
score: 0
type: AnswerComment
type: Comment
has text: Still not working unfortunately. It was already wrapped within a DOM ready handler.
comment on: http://stackoverflow.com/a/29067853

http://stackoverflow.com/comment/121159056
type: AnswerComment
type: Comment
has text: ```Uncaught ReferenceError: $ is not defined```
comment on: http://stackoverflow.com/a/31680537
score: 1

http://stackoverflow.com/q/29208503
linked to: http://stackoverflow.com/q/4799078
tagged with: oop
has comment: http://stackoverflow.com/comment/46795654
type: Question
has comment: http://stackoverflow.com/comment/46630497
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46627880
answer count: 1
has title: Translating JavaScript oop code to Lua
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29217518
tagged with: lua
has body: I'm trying to translate a bunch of code from JavaScript to Lua. I'm stuck on the next bit though. I don't understand the Lua object oriented syntax. Can someone show me what the correct syntax is? Thanks! //======================================================= //======================================================= //======================================================= // The TMaze object //------------------------------------------------------------------------------ Ctor function TMaze(nHigh, nWide) { this.high = nHigh; this.wide = nWide; this.ary = TMazeArray(nHigh, nWide); this.totRooms = gnHigh * gnWide; // less (short) bottom line this.curRoomCnt = 0; // rooms that have been visited/door opened this.GetCell = function(x,y) {return this.ary[y][x];} this.SetCell = function(x,y,value) {this.ary[y][x] = value;} this.HasCellBit = function(x,y,value) {return ((this.ary[y][x] &amp; value) == value);} this.SetCellBit = function(x,y,value) {this.ary[y][x] |= value;} this.ClearCellBit = function(x,y,value) {this.ary[y][x] &amp;= ~value;} this.ToggleCellBit = function(x,y,value) {this.ary[y][x] ^= value;} this.IsEmptyCellAt = IsEmptyCellAt; // some member fns, defined below this.IsValidXY = IsValidXY; this.GetNewXY = GetNewXY; } //----------- TRUE if cell in that direction is empty and valid // function IsEmptyCellAt(x, y, dir) { var o = this.GetNewXY(x, y, dir); if (!this.IsValidXY(o.newX, o.newY)) return (false); if (this.GetCell(o.newX, o.newY) != 0) return (false); return true; // yes, it's possible to move into that cell } //------------------------------------------------------------------------------ // return -1 if that would be an invalid move (off the board) // true if X,Y is on the board // function IsValidXY(x, y) { if (y &lt; 0) return (false); if (y &gt; this.high-1) return (false); if (x &lt; 0) return (false); if (x &gt; this.wide-1) return (false); // if (y &amp; 1) { // on off Y, max X an maxY are 1 less // if (x &gt; this.wide-2) return (false);…

http://stackoverflow.com/q/29147890
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46524628
has comment: http://stackoverflow.com/comment/46519616
has comment: http://stackoverflow.com/comment/46518816
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46521043
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29157299
has comment: http://stackoverflow.com/comment/46519072
has comment: http://stackoverflow.com/comment/46519363
has comment: http://stackoverflow.com/comment/46518728
has title: Angular.js $scope and controller again
has body: I know there are many questions regarding the angular $scope by after a couple of hours I still can't figure out what is wrong. I'm using Angular.js with Ionic but the problem should be angular related. In my App I need a "add to wishlist" function. In the productDetail view when someone tapps "add to wishlist" I add this product with a service and webSQL to the database. Now when the user goes to the wishlist view I get all saves products but the view doesn't update. I have a file menu.html with an Ionic side-menu: The "LeftMenuCtrl" handels the hover for the active menu item. In my WishListView I would like to show the current added products: File wishList.html WHISH LIST EAN: {{product.ean}} And the controller: app.controller("WishlistCtrl", function($scope, $state, productService) { //gets called when the controller is loaded productService.getWishlistProducts().then(function (products) { $scope.products = products; }); //gets called when the user clicks on the navi but does not //update the $scope (or it updates the wrong $scope) $scope.updateWishList = function () { productService.getWishlistProducts().then(function (products) { $scope.products = products; }); }; }) Can anyone tell me whats wrong here please? Edit: This is the state for the menu link: .state('app.wish', { url: "/wish", views: { 'menuContent': { templateUrl: "templates/wish.html" } } }) Edit2: When I refresh the page, I see all added products. But not immediately. It's like the $scope.updateWishList = function () ... creates another $scope... Edit3: app.controller('ProductDetailCtrl', function($stateParams ,$state, $scope, productService, $ionicHistory, $ionicPopup) { $scope.addToWishlist = function(ean) { productService.addProductToWishlist(ean).then(function(response) { if(response == "OK") { var alertPopup = $ionicPopup.alert({ title: 'product added to wishlist', template: 'You can go to your wishlist to see all your marked products' }); } }); }; }) Edit4: I added a Plunker here: http://plnk…
has comment: http://stackoverflow.com/comment/46524431
tagged with: ionic-framework
type: Question
has comment: http://stackoverflow.com/comment/46519664
tagged with: javascript
has comment: http://stackoverflow.com/comment/46522384
has answer: http://stackoverflow.com/a/29152377
has comment: http://stackoverflow.com/comment/46520453

http://stackoverflow.com/a/29123386
type: Answer
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/29115021
has body: If your JavaScript is in an external file you can use the following technique to access the route path to your action. Simply attach the url to the element which invokes the ajax call as a data attribute. In the below example I attach it to an input button. &lt;input data-url="@Url.Action("city", "Home")" value="DoPost" /&gt; Then from within your event handler you can use jQuery data method to read the attribute i.e. var superUrl = $(this).data('url'); Then use this in your ajax call: url: superUrl

http://stackoverflow.com/a/29161369
has body: You need to override cakephp FormHelper class to know the which input type will be generate. Then write a custom method which will be return input type of field. //cakephp/lib/Cake/View/Helper/FormHelper.php public function inputType($fieldName, $options = array()) { $this-&gt;setEntity($fieldName); $options = $this-&gt;_parseOptions($options); return $type = $options['type']; } // cakephp/app/view/whatever.ctp &lt;?php echo $this-&gt;Form-&gt;inputType('username'); echo $this-&gt;Form-&gt;inputType('password'); ?&gt; output: text password I have write method in cakephp Helper Class, you should be override cakephp FormHelper.
answers question: http://stackoverflow.com/q/29142736
score: 0
type: Answer

continuations
tag name: continuations
tags question: http://stackoverflow.com/q/29205126
type: Tag

http://stackoverflow.com/q/29208417
tagged with: post
accepted answer: http://stackoverflow.com/a/29208577
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/46627086
tagged with: ajax
has comment: http://stackoverflow.com/comment/46627424
has answer: http://stackoverflow.com/a/29352522
has title: How to: PHP $_POST vars to AJAX $.ajax post call on a JS?
favorite count: 0
has answer: http://stackoverflow.com/a/29208577
possible better answer: http://stackoverflow.com/a/29352522
tagged with: php
downvote count: 1
type: AnsweredQuestion
has body: Ok, this could seem a little bit confusing, but the idea is next: Normal PHP page which receives POST calls, and considering those vars acts in some or other ways. No problem, normal thing. Some of the aspects which are loaded in this page (info blocks which get some big data from database), independently of POST vars and whatever, take long time to load, so I've decided to dynamically load them, instead of loading everything on loading page time. This means that in the beginning page was rendering and taking so long and right now, it renders fasts and shows some "loading..." blocks with spinning icon on them. Those blocks are basically "$.ajax" calls via POST, once $(document).ready();. Ok? No probe here too. All ok. And now the problem: some of those blocks shows one or other info accordingly to $_POST received vars. Once this wasn't AJAX, everything worked right. But now, the received from server processed page (which already used the POST vars) to the client, makes new post calls to particular scripts and those scripts doesn't have the PHP POST needed vars. Obviously you could say do something like: $.ajax{ ... data: <?php ..............?> ... } but I can't, as this is a JS file, none PHP with embedded JS on it. So the question is: What can I do? Which would be a good implementation for this particular solution? It is not a design fault, as it works nice if it doesn't uses ajax. This is not a previous ajax call that can be made on request call. It is basically loading some page parts dynamically on serving time! So what? Thank everyone so much, and I hope you can help me whit it! PS: I've came up with an idea, and it is basically, before load the main JS file, to create a petite snippet which basically transforms $_POST array to a JS object with all the bars in it. But even being it useful and probably great, I guess it basically fucks up security and obfuscation a lot!

http://stackoverflow.com/q/29171745
has body: I´m trying to integrate Craig Cavaliers liveEditor solution with an array, but cannot get it to work. My HTML is a simple foreach-loop: Heres my viewModel: var viewModel = function(){ var self = this; self.myArray = ko.observableArray(); var newmsg = new Message({ ID: 1, message: 'first message' }); self.myArray.push(newmsg); newmsg.message('2nd string'); self.myArray.push(newmsg); }; Craig´s bindingsHandlers is the following: ko.extenders.liveEditor = function (target) { target.editing = ko.observable(false); target.edit = function () { target.editing(true); }; target.stopEditing = function () { target.editing(false); }; return target; }; ko.bindingHandlers.liveEditor = { init: function (element, valueAccessor) { var observable = valueAccessor(); observable.extend({ liveEditor: this }); }, update: function (element, valueAccessor) { var observable = valueAccessor(); ko.bindingHandlers.css.update(element, function () { return { editing: observable.editing }; }); } }; And finally the css: .edit { display: none; } .editing .edit { display: block; } .editing .view { display: none; } Full fiddle: http://jsfiddle.net/AsleG/ujgn1tq8/ Where do I go wrong with this?
tagged with: knockout.js
type: Question
has title: InlineEditing with knockout array
has comment: http://stackoverflow.com/comment/46567824
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46579856
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29177105
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/46570869
has comment: http://stackoverflow.com/comment/46571738

http://stackoverflow.com/a/29089856
has comment: http://stackoverflow.com/comment/46412411
score: 0
has comment: http://stackoverflow.com/comment/46412366
has body: I have found out how to fix one of the issues - The issue I fixed is the duplication of the .after error messages. To fix this I just added $('p').remove('#after5'); inside each if statement before the if statement actually prints the .after error message out. if($('input[type=checkbox:checked').length < 1) { $('p').remove('#after5'); $('#checkboxError').html(' Please check atleast one checkbox '); return false; } else{ //This should remove the above error message! $('p').remove('#after5'); } I am still having problems printing out the data when all the validation is correct!
has comment: http://stackoverflow.com/comment/46412219
answers question: http://stackoverflow.com/q/29089737
type: Answer
has comment: http://stackoverflow.com/comment/46412639
has comment: http://stackoverflow.com/comment/46412447
has comment: http://stackoverflow.com/comment/46412290

http://stackoverflow.com/a/29152874
type: AcceptedAnswer
downvote count: 0
upvote count: 3
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/29152756
has comment: http://stackoverflow.com/comment/46553010
has body: A very simplistic solution with CSS: #sidebar { background: blue; } #sidenav { background: red; display: none; } #parent:hover #sidebar { display: none; } #parent:hover #sidenav { display: block; } &lt;div id="parent"&gt; &lt;div id="sidebar"&gt;""&lt;/div&gt; &lt;nav id="sidenav"&gt;""&lt;/nav&gt; &lt;/div&gt; There a lot of things that can be improved on from this way, but it's a good start.
answers question: http://stackoverflow.com/q/29152756

http://stackoverflow.com/comment/46627290
score: 0
type: AnswerComment
has text: Hi! Thanks. Is yours a good solution to the problem? Cause I like it but I don't know if it is somehow "redundant"... as long as after use the post data stored to session, it will prevail all the script long... and I don't like it much, as it is only useful on a particular screen...
comment on: http://stackoverflow.com/a/29208577
type: Comment

http://stackoverflow.com/comment/46544035
has text: I see. I'm not sure how that helps though. How do I know the size of the glyphs in the SVG image? I guess I can specifically design an SVG on the fly that puts the glyphs in a grid of my desired size? But I guess that only works if the characters are monospaced. If I want to create glyphs for a proportional font how does SVG help? Is there SVG api for better measurements?
comment on: http://stackoverflow.com/a/29157500
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29126888
possible better answer: http://stackoverflow.com/a/29127253
type: Question
has answer: http://stackoverflow.com/a/29127253
has comment: http://stackoverflow.com/comment/46479976
has title: What is the best way to get the first x number of words from a string javascript
has comment: http://stackoverflow.com/comment/46480103
accepted answer: http://stackoverflow.com/a/29127301
favorite count: 0
has comment: http://stackoverflow.com/comment/46480038
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/46479818
linked to: http://stackoverflow.com/q/557695
has comment: http://stackoverflow.com/comment/46480106
has body: With out using jquery, what is the easiest way to do this? If I have a string containing 600 words, and I want only the first 100 or so words and then trail off with: ... what is the easiest way to do this? I found: replace(/(([^\s]+\s\s*){40})(.*)/,"$1…"); But I don' understand regex enough to know if this is right or not.
has answer: http://stackoverflow.com/a/29127301
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46605101
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29195444
has text: Have you checked your ajax request?
score: 0

http://stackoverflow.com/comment/46390452
type: QuestionComment
type: Comment
has text: "*Every time the array known as cart hits a number that can be found in the products array...*" -- the `products` array doesn't have numbers; it has objects. Perhaps you want to compare *keys* in the `product` array to *values* in the `carts` array?
score: 0
comment on: http://stackoverflow.com/q/29078491

http://stackoverflow.com/q/29167196
has body: For a bootstrapped add-on I am creating, I am registering a content handler, for feeds, in startup() with: const registrar = Cc[ '@mozilla.org/embeddor.implemented/web-content-handler-registrar;1' ].getService( Ci.nsIWebContentHandlerRegistrar ); registrar.registerContentHandler( 'application/vnd.mozilla.maybe.feed', myUri, myName, null ); This all works as expected. However, at shutdown() I want to unregister this content handler again, because otherwise — with subsequent start-ups — I end up with multiple preference entries like: browser.contentHandlers.types.&lt;n&gt;.* But... there is no unregisterContentHandler method in nsIWebContentHandlerRegistrar. I tried a few variations of calling registerContentHandler with null values, hoping that that would do the trick, but that does not work either, unfortunately (results in newly added browser.contentHandlers.types.&lt;n+1&gt;.* values). Then I found an implementation of nsIWebContentConverterService, with the method removeContentHandler, which I thought might do the trick: const service = Cc[ '@mozilla.org/embeddor.implemented/web-content-handler-registrar;1' ].getService( Ci.nsIWebContentConverterService ); service.removeContentHandler( 'application/vnd.mozilla.maybe.feed', myUri ); However, that doesn't do anything in my case, either. Is there a way to unregister a content handler in an elegant manner? Or do I need to do it manually, by removing mentioned preference entries and possibly other related "stuff"? If the latter is applicable, what "stuff" do I need to consider removing for a thoroughly clean removal of my content handler? edit: There was a misunderstanding on my part. I didn't have a clear understanding yet of what adding/removing a Web Feed content handler actually did. I was only looking at the auto-generated list that you see when you view an rss feed in your browser, if you haven't selected a default rss viewer yet. That list is generated by the browser.contentHandlers.types.&lt;n&gt;.* entries. B…
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46600057
score: 1
tagged with: feed
has title: Can I unregister a content handler added with nsIWebContentHandlerRegistrar.registerContentHandler()?
type: Question
has comment: http://stackoverflow.com/comment/46563600
tagged with: firefox
downvote count: 0
tagged with: javascript
tagged with: firefox-addon

http://stackoverflow.com/comment/46661667
type: QuestionComment
comment on: http://stackoverflow.com/q/29203825
score: 0
has text: wahoo .. $parent.mtgFilter worked finally :) thanks a ton @squiroid
type: Comment

http://stackoverflow.com/comment/46628208
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29208828
has text: Yes. Same thing I have done. The values inside jqgrid is not displaying. While debugging i will get 2 rows. But those are not displaying here.
type: Comment

http://stackoverflow.com/comment/46525732
has text: What do you mean by "I would like to execute the Javascript file"? Which file?
comment on: http://stackoverflow.com/q/29152146
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46506543
score: 0
type: QuestionComment
has text: @scunliffe It's for viewing on a school network... they only have IE 8 unfortuntately :S
type: Comment
comment on: http://stackoverflow.com/q/29141274

http://stackoverflow.com/comment/46428518
has text: What about bounds_changed event? http://stackoverflow.com/questions/2832636/google-maps-api-v3-getbounds-is-undefined
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29098720

http://stackoverflow.com/comment/46476213
has text: Not if you want to include arguments like that. I've never seen "feinschmecker" in the spec, what operation on a function is that, exactly?
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29124928

http://stackoverflow.com/a/29072471
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46429051
has body: OK there's quite a few things wrong here so I'll inline comment: // $() will always return a function, so this will always fire if ($(".follow-1:not(.active)")) { // This is waiting for a document.ready, so you need to do this on the outside /// of your code jQuery(function(){ // This will execute SK_registerFollow immediately // and send the result to your handler. Probably not what you want jQuery('.follow-1').click(SK_registerFollow(1)); }); } else { // No need to ever have a block which 'does nothing' // do nothing } Here's a fixed version: // Wait for DOM to become ready $(function() { // Store a reference to the link, so we don't need to search for it twice var $follow = $(".follow-1"); // Test to see if the link has the active class if (!$follow.hasClass("active")) { $follow.click(); // This will trigger the appropriate onclick handler } }); jsFiddle Demo
has comment: http://stackoverflow.com/comment/46379254
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29072200
accepted answer of: http://stackoverflow.com/q/29072200

http://stackoverflow.com/q/29153858
tagged with: google-calendar-api
has comment: http://stackoverflow.com/comment/46531358
type: UnansweredQuestion
score: 0
tagged with: google-api
has comment: http://stackoverflow.com/comment/46531236
tagged with: php
has comment: http://stackoverflow.com/comment/46531708
has body: Here is my code: $gcal_path = "https://www.googleapis.com/calendar/v3/calendars/".$gcal_url_encoded_id."/events?maxResults=".$max_Results."&amp;orderBy=startTime&amp;singleEvents=true&amp;timeMax=".$time_Max."&amp;timeMin=".$time_Min."&amp;key=".$api_key; $feed = json_decode(html_entity_decode(trim(file_get_contents($gcal_path)))); I already have everything else ready in my script, including parsing the data from the json_decode. The problem is that $feed doesn't contain any data. However, I've tested the $gcal_path variable/link with a JavaScript implementation of parsing with AJAX ( e.g. xmlhttp.open("GET","&lt;?php echo $gcal_path ?&gt;",true);. and it spits out all the right JSON data. So, why is the PHP variable empty? What am I doing wrong? Extra info: Also, in the results I noticed this "etag": "\"1576214503014905\"" (the number has been changed for security purposes). How to deal with those escaped quotes, and would it inevitably effect the outcome of the json_decode function call, and $feed? Please, help.
has comment: http://stackoverflow.com/comment/46530813
tagged with: http://stackoverflow.com/tag/json
has title: How to use PHP's 'json_decode' on the new Google Calendar v3 API results?
type: Question
has comment: http://stackoverflow.com/comment/46531438
answer count: 1
has answer: http://stackoverflow.com/a/29156171
tagged with: javascript

http://stackoverflow.com/comment/46457680
has text: This question has been asked about a dozen times. Search harder for an answer. Start off with http://stackoverflow.com/questions/2749244/javascript-setinterval-and-this-solution. Or, just debug your code. Place a breakpoint inside `this.start`, and examine the value of `this`. Voila.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29114403

http://stackoverflow.com/q/29097819
tagged with: javascript
score: 4
favorite count: 0
tagged with: http-status-codes
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8571227
type: Question
has comment: http://stackoverflow.com/comment/46426150
has body: I'm trying to find a function that return HTTP Status Code from an URL, and then "make something" based on the returned statuses (404, 416, 200 etc...) Can someone help me? I've tried the other functions posted here on StackOverflow but anyone was usefull for my purpose. I need to integrate this function inside my PlayFramework web-app. Thanks a lot
upvote count: 4
tagged with: playframework
has answer: http://stackoverflow.com/a/29098041
has title: HTTP Status Code from URL in Javascript
answer count: 1
tagged with: url
downvote count: 0

http://stackoverflow.com/q/29169829
possible better answer: http://stackoverflow.com/a/29169876
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29169876
tagged with: underscore.js
score: 0
has body: So I have a huge array of objects that I need to turn into a small one. it has 50-60 objects and i need to filter into an new array of objects with just 3 of them. So it looks like myOb = {{"ob1": 1},{"ob2": 1},{"ob3": 1},{"ob4": 1},{"ob5": 1}..... and so on And I need to turn it into an obj with just ob1, ob2, and ob3 inside of it - so like myOb ={{"ob1": 1},{"ob2": 1},{"ob3": 1}} So something like - myOb = _.filter(myOb, function(object){ return ob1, ob2, ob3 (??) }); Unsure how to tackle this with underscore(or just plain javascript if underscore is not necessary). Thanks!
type: Question
has comment: http://stackoverflow.com/comment/46557988
tagged with: javascript
has answer: http://stackoverflow.com/a/29169878
answer count: 2
has title: Underscore, filter out unnecessary objects
accepted answer: http://stackoverflow.com/a/29169878

http://stackoverflow.com/comment/46594678
has text: Well, unshift simply prepends the value to the array. If you unshift an array you simply insert the array as first element.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29190141

http://stackoverflow.com/q/29151371
has body: I'm trying to create a button that on click will start a timer and on second click will stop it and change the innerHtml of "button" to the time where you stopped the timer. However it doesn't work with the code I've written below, the Interval just keeps going and it seem's like its creating multiple ones with each click. Any ideas why? var active = false; var sec = 0; function clock(){ if(active === false) { var clock = setInterval("timer()", 1000); active = true; } else if(active === true){ clearInterval(clock); document.getElementById("button").innerHTML = "You clicked at "+sec+" seconds, try again."; active = false; sec = 0; } } function timer() { sec++; document.getElementById("button").innerHTML = sec; }
answer count: 2
upvote count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29151809
has comment: http://stackoverflow.com/comment/46524376
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46524379
has answer: http://stackoverflow.com/a/29151669
accepted answer: http://stackoverflow.com/a/29151669
possible better answer: http://stackoverflow.com/a/29151809
type: Question
has title: Trying to stop Interval on a function
score: 0

http://stackoverflow.com/comment/46561698
type: AnswerComment
comment on: http://stackoverflow.com/a/29171186
type: Comment
has text: @JamieBarker It's much better now, thanks. P.S.: it was not insult or something, it's just for future visitors.
score: 0

http://stackoverflow.com/a/29149698
has comment: http://stackoverflow.com/comment/46521426
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/29149632
downvote count: 0
has body: Create a new function using Function.prototype.bind method: funcs : [ func1, func2, func3.bind(null, 5) ] bind will create a new function with the parameter that will be passes in it. Another way is to create an anonymous function, check John Bledsoe's answer.
score: 4
has comment: http://stackoverflow.com/comment/46521657
has comment: http://stackoverflow.com/comment/46521464

http://stackoverflow.com/a/29137188
has body: You need to increment top also var left = 0, top = 0; for (var i = 1; i &lt;= 10; i++) { $('&lt;div class="box" id=box' + i + '&gt;&lt;/div&gt;').appendTo('#holder'); $('#box' + i).css({ 'left': left, top: top }); left += 60; if (i % 3 == 0) {//need to increment top also need to use the modulus operator since you want to reset/increment after each 3rd element left = 0; top += 70; } } Demo: Fiddle
answers question: http://stackoverflow.com/q/29137152
score: 1
accepted answer of: http://stackoverflow.com/q/29137152
has comment: http://stackoverflow.com/comment/46499188
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46499043
type: Answer
upvote count: 1

scroller
type: Tag
tag name: scroller
tags question: http://stackoverflow.com/q/29090245

http://stackoverflow.com/comment/46389898
type: Comment
type: AnswerComment
has text: As I said, I knew it was something trivial *grabs cone of shame*.
comment on: http://stackoverflow.com/a/29072956
score: 0

http://stackoverflow.com/q/29069186
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/29069195
has body: Right now the form is submitting but it's using the default url, I want it to use the form submit event in my javascript so that it passes the .ajaxSubmit() options. Here is the javascript. $('#selectedFile').change(function() { var id = $('#selectedFile').data('id'); var options = { target: '#output', beforeSubmit: showRequest, success: showResponse, url: '/ManageSpaces/UploadImage', data: { id: id }, type: 'post' }; $("#imageform").trigger('submit'); // I want this to trigger the submit below! Not the default form submit. $('#imageform').submit(function () { $(this).ajaxSubmit(options); return false; }); }); &lt;form id="imageform" enctype="multipart/form-data"&gt; &lt;input type="file" id="selectedFile" style="display: none;" data-id='@Model.YogaSpaceId' /&gt; &lt;input type="button" value="Add Photos" class="btn" id="pictureupload" /&gt; &lt;/form&gt; action method [HttpPost] public ActionResult UploadImage(int id, HttpPostedFileBase image) { //do some stuff to save the image return Json("Saved"); }
has title: How to trigger my jquery form submit
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29069195
tagged with: javascript

http://stackoverflow.com/q/29159280
favorite count: 0
type: UnansweredQuestion
tagged with: css
upvote count: 1
type: Question
has title: How can I trigger a keyframe when the user scrolls to a certain part of a page
answer count: 2
downvote count: 0
has body: is it possible to detect where a user scrolls on a page to trigger a keyframe using pure javascript ? .animations { opacity: 0; animation: animations-keyframes 2s ease forwards; -webkit-animation: animations-keyframes 2s ease forwards; animation-delay: 0.5s; -webkit-animation-delay: 0.5s; } @keyframes animations-keyframes { to { opacity: 1; } } @-webkit-keyframes animations-keyframes { to { opacity: 1; } } I want javascript to trigger this event when the user gets to a certain part of a page for example a content section. I don't know where to start
tagged with: javascript
tagged with: keyframe
has answer: http://stackoverflow.com/a/29160110
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29159688
score: 1

http://stackoverflow.com/q/29078250
tagged with: ajax
type: UnansweredQuestion
has body: jquery: $("document").ready(function(){ alert('This is working'); $(".add_new").click(function() { $(".table").hide(); $("#frm").show(); }); $(".insert_form").submit(function(){ var sending_data = { "action": "insert" }; sending_data = $(this).serialize() + "&amp;" + $.param(sending_data); $.ajax({ type: "POST", url: "test.php", //Relative or absolute path to response.php file data: sending_data, success: function(return_data) { alert(return_data); //This is not working. } }); }); }); test.php &lt;?php echo $_POST['action']; ?&gt; HTML: &lt;form method="post" id="frm" style="display:none;" class="insert_form"&gt; &lt;input type="text" value="" required="required" placeholder="Enter your Name" name="user_name" /&gt; &lt;input type="submit" value="Submit" /&gt; &lt;input type="reset" value="clear" /&gt; &lt;/form&gt; After submitting i have to display message. I am just testing using alert() but the alert box is appearing.Please Help.
tagged with: php
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46390026
upvote count: 1
linked to: http://stackoverflow.com/q/12837364
has comment: http://stackoverflow.com/comment/46389835
type: Question
has comment: http://stackoverflow.com/comment/46395360
tagged with: javascript
tagged with: post
has title: Alert not working in firefox but working in chromium
has comment: http://stackoverflow.com/comment/46390469
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/29123824
has body: WHen working with arrays and localStorage the basics are fairly simple. To store, use JSON.stringify() to convert your javascript array to JSON, then simply use one localSTorage key to set the value. When you need to access the array, pull it from localStorage and use JSON.parse() to convert the whole string back to javascript array. Once you have pulled the data, use the array as you would any other array and then store it back to the same localStorage key when you are done manipulating it var existingArray=[ {id:1 , country:'Country1', url:'example.com'}, {id:2 , country:'Country2', url:'example2.com'} ]; localStorage.setItem('myEventsArray', JSON.stringify( existingArray)); /* on pageLoad */ var pageLoadArray = []; var storedString = localStorage.getItem('myEventsArray'); if( storedString ){ pageLoadArray = JSON.parse(storedString); if( pageLoadArray.length){ alert( pageLoadArray[0].country) } }
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29123251
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46620346
has comment: http://stackoverflow.com/comment/46620335

http://stackoverflow.com/comment/46534228
type: QuestionComment
has text: Oh an Masiorama it does not show anything
score: 0
comment on: http://stackoverflow.com/q/29156647
type: Comment

http://stackoverflow.com/comment/46646861
score: 0
has text: I'm glad to help you my friend. Don't forget to vote and mark the answers you want. If you have any problems, let me know. (And yes, about Java I will post some questions any time from now because I'm in a Java + AngularJS project)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29203558

http://stackoverflow.com/comment/46456733
type: QuestionComment
has text: initial there is a pop up dialog box where there is some information and id named top is also present there. but when user close that dialog box , url remain same i.e http://fiddle.jshell.net/_display/#top so when user refresh the browser then blank page is displayed
score: 0
comment on: http://stackoverflow.com/q/29113990
type: Comment

http://stackoverflow.com/comment/46486548
type: Comment
has text: Fair enough, let me try that.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29130305

http://stackoverflow.com/q/29161159
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/31342960
type: UnansweredQuestion
type: Question
has title: Not able to reload the page in jquery mobile 1.4.5
tagged with: jquery-mobile
has body: I need to reload the same page in jquery mobile(v 1.4.5) i tried the following but not reloaded. $( ":mobile-pagecontainer" ).pagecontainer( "change", "#editpage", { allowSamePageTransition:true,reload: true} ); and this also tried. $.mobile.pageContainer.pagecontainer( "change", "#editpage", { allowSamePageTransition:true,reload: true} ); but not get success. How to reload the same page in jquery mobile.
tagged with: javascript

http://stackoverflow.com/a/29071276
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46377192
answers question: http://stackoverflow.com/q/29071068
has body: Why not just use HTML5 way for file select? &lt;input type="file" accept="image/*, video/*, audio/* application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint"&gt; You can always add the MIME type which I've missed or tweak at your will, but this file will restrict the file type to support and hence you don't have to make an explicit check for it.
upvote count: 2

http://stackoverflow.com/comment/46423492
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29096077
has text: It seems I am -0- in jquery

http://stackoverflow.com/comment/46419315
score: 0
type: QuestionComment
type: Comment
has text: Do you have another idea. So I mean by not using eval?
comment on: http://stackoverflow.com/q/29093700

http://stackoverflow.com/q/29073961
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29074020
possible better answer: http://stackoverflow.com/a/29074022
type: Question
has answer: http://stackoverflow.com/a/29074028
has answer: http://stackoverflow.com/a/29074022
tagged with: javascript
answer count: 3
accepted answer: http://stackoverflow.com/a/29074020
has title: How to make angular show only the data that is available
downvote count: 0
favorite count: 0
has body: In my view I want to show the image of the user. I have users that log in in my app through facebook and users that log in with email and pass. When the user logs in from Facebook I take the picture from their Facebook and display it on the view, if they log in with email I take their picture that I have in the database. How can I make angularjs take the picture that i available to it. Can I do smth like this &lt;img ng-src="{{user.picture}}" ng-src="{{pic[1]}}"&gt; Put both images and if the user.picture is available it will show it, otherwise show pic[1]. Is there any other solution?
tagged with: angularjs
upvote count: 2
tagged with: facebook

http://stackoverflow.com/comment/104808092
score: 0
type: AnswerComment
type: Comment
has text: Note that for `$('body').on('click', '.my-clicker', handler);` delegations, `e.target` is sometimes referencing a child you might have clicked on (i.e. a ‹span› inside the ‹a›). In that cases, it's better to use `e.currentTarget`. ([currentTarget](https://api.jquery.com/event.currentTarget/#event-currentTarget1) vs. [target](https://api.jquery.com/event.target/#event-target1))
comment on: http://stackoverflow.com/a/29107174

http://stackoverflow.com/a/29105077
has comment: http://stackoverflow.com/comment/46444021
score: 11
has comment: http://stackoverflow.com/comment/46444213
has body: You want to write middleware, not a route handler: app.use(function(req, res, next) { if (req.session.user == null){ // if user is not logged-in redirect back to login page // res.redirect('/'); } else{ next(); } });
has comment: http://stackoverflow.com/comment/46443539
downvote count: 0
has comment: http://stackoverflow.com/comment/92751129
answers question: http://stackoverflow.com/q/29104986
type: Answer
upvote count: 11
has comment: http://stackoverflow.com/comment/107615001

http://stackoverflow.com/q/29073294
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29073564
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29074242
score: 7
has answer: http://stackoverflow.com/a/29073550
has title: Pure JavaScript fade in and out - fade in not working
favorite count: 0
has body: See below snippet. Fade out works fine, but any idea why it won't fade in? My HTML: ♥ Fade Out Fade In and the JS: var cat = document.getElementById("id10574"); cat.style.opacity = 1; function fadeout() { if (cat.style.opacity > 0) { cat.style.opacity = (cat.style.opacity - 0.01); setTimeout( fadeout, 10 ); } else { } } function fadein() { if (cat.style.opacity < 1) { cat.style.opacity = (cat.style.opacity + 0.01); setTimeout( fadein, 10 ); } else { } } document.getElementById("b1").addEventListener("click", fadeout , false); document.getElementById("b2").addEventListener("click", fadein , false); I'm really stumped on this one. Trying to make a simple effect that will work on IE8 (Sharepoint in corporate environment). Thanks!
answer count: 3
possible better answer: http://stackoverflow.com/a/29073564
accepted answer: http://stackoverflow.com/a/29073550
upvote count: 7
has comment: http://stackoverflow.com/comment/46380810

http://stackoverflow.com/q/29090846
has answer: http://stackoverflow.com/a/29092320
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
has body: When I make a .post() request such as var data = $(this).serialize(); $('form').on('submit', function(event) { event.preventDefault(); $.post('server.php', data, function(data) { $('#data').append('&lt;p&gt;' + data + '&lt;/p&gt;'); }); }); everything's working - the name from the database appends to the #data element withing the p tags. But, when I try to pass data as an object like this var data = $(this).serialize(); $.post('server.php', {id: data}, function(data) { $('#data').append('&lt;p&gt;' + data + '&lt;/p&gt;'); }); than it doesn't work. I tried changing the argument of the function within the .post() to id and probably every combination of names for .post()'s arguments and variables within the PHP file also, without success. Here's the working intact PHP file compatible with the first version of my .post() request in this question: &lt;?php $id = $_POST['id']; $connection = new mysqli('localhost', 'root', '', 'dummy_db'); $query = 'SELECT name FROM dummy_db_table WHERE id = "' . $id . '"'; $result = $connection-&gt;query($query); $row = $result-&gt;fetch_assoc(); echo $row["name"]; $connection-&gt;close(); ?&gt; Please note that the name of the input field for the ID in the HTML file is 'id'. I do understand that it is this name attribute within HTML which helps PHP determine the value of it, but how is it doing so without me specifying the connection with the PHP through form's action attribute? I'm doing this exclusively through AJAX (.post()) and AJAX is not telling PHP anything specific about THAT id field. What am I missing here? Also, how would I go about sending the object of values instead of a single one through .post()'s data attribute? Thank you.
has title: How to send data as an object through .post() in jQuery?
favorite count: 0
has comment: http://stackoverflow.com/comment/46413911
has comment: http://stackoverflow.com/comment/46413993
type: UnansweredQuestion
downvote count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/46414002
has comment: http://stackoverflow.com/comment/46414027

http://stackoverflow.com/q/29092682
type: Question
accepted answer: http://stackoverflow.com/a/29092849
tagged with: javascript
has title: Filtering on a page where line items are displayed as tiles
score: 0
has body: I have a requirement. In my page currently user details are displayed as a table and it has a filtering option, if the user type a character the table will be filtered with their name filtered with the character typed. Now this has to be redesigned to display the customers using tiles, like each customer details are displayed in rectangle with their details in it. So far so good. my question is, can I implement a filtering function on this tiles page, same way fileting has been done in the table. is there any solutions currently available ?. any suggestions will be highly appreciated.
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29092849

http://stackoverflow.com/a/29215327
has body: Try this: console.log(data.name); It appears, from your log, that the data is already a JSON object, and so needs no further parsing.
downvote count: 0
has comment: http://stackoverflow.com/comment/46640163
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29215267
score: 2

http://stackoverflow.com/a/29117091
has body: The line .setAttribute('data-main', widget[0] + widget[1] misses ")" and a ";". It should be o.setAttribute('data-main', widget[0] + widget[1]); And about the "does the script do anything" part, yes, it does. It defines a new script, fills it with something but... I fail to see the part where it is appended to the body.
has comment: http://stackoverflow.com/comment/46462156
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29117031
has comment: http://stackoverflow.com/comment/46462187
answers question: http://stackoverflow.com/q/29117031
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29068241
has body: In the swipe event handler, use the swipestart.coords[0] to get the x coordinate of where the swipe started. Then calculate 20% of the page width: $( document ).on( "swiperight", "#page1", function( e ) { var startX = e.swipestart.coords[0]; var totalWidth = $(window).width(); if (startX &lt; totalWidth/5){ $("#thePanel").panel( "open" ); } });
answers question: http://stackoverflow.com/q/29066879
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29066879

http://stackoverflow.com/q/29211352
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29211377
has comment: http://stackoverflow.com/comment/46632292
has comment: http://stackoverflow.com/comment/46632477
has body: I want a group of check boxes on a page, when you select a check box I want to clear any other check boxes of checks and just check the one you just clicked on. I have a fiddle that I thought should work, but it never checks the one you clicked on. I don't want to use radio buttons as "no selection" is valid as well $("#mytable input").change(function(){ $("#mytable input").attr('checked',false); $(this).attr('checked',true); }) jsfiddle
tagged with: checkbox
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29211377
type: Question
has title: in a group of check boxes only allow one to be selected at a time
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46632305

http://stackoverflow.com/comment/46442919
has text: thanks .. I know how explode works.. i just ask if any good solution has or not. Me too personally don't like the stuff.. bdw thanks a lot. can u please upvote the question?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29106400
type: AnswerComment

http://stackoverflow.com/q/29186014
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46587301
has answer: http://stackoverflow.com/a/29186060
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 2
has body: I'm kind of new to express, in my server: app.use(express.static(path.join(__dirname, 'includes'))); In my client javascript i'm simply giving the url: var img = $("&lt;img /&gt;").attr('src', 'http://localhost:3000/includes/images/img.png'); $(".logo-container").append(img); but still getting a 404
type: Question
has comment: http://stackoverflow.com/comment/46587315
tagged with: javascript
tagged with: express
has title: How can I properly load an image with Express's static middleware?
accepted answer: http://stackoverflow.com/a/29186060
answer count: 1

http://stackoverflow.com/a/29190711
has comment: http://stackoverflow.com/comment/46595750
has comment: http://stackoverflow.com/comment/46595936
score: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29190611
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29190611
has body: Short answer is "No." Long answer is "Noooooooooo." Kidding aside, what you are proposing is called "obfuscation" and would not be any more secure than what exists now. For example, lets assume that the Javascript was encrypted. How would the browsers decrypt it? They would need the key, right? So the un-encrypted code would be available in the browser's memory when the browser was executing it. This merely raises the bar for someone who was trying to access the code. Granted, more people may be discouraged from accessing the code, but this should not be confused with being "more secure".
has comment: http://stackoverflow.com/comment/46595890
type: Answer
has comment: http://stackoverflow.com/comment/46595738
has comment: http://stackoverflow.com/comment/46595706
upvote count: 3
has comment: http://stackoverflow.com/comment/46595644

http://stackoverflow.com/comment/46474704
type: QuestionComment
comment on: http://stackoverflow.com/q/29124061
has text: And how can I sanitize it @Alvaro ?
score: 0
type: Comment

http://stackoverflow.com/comment/46477357
has text: How can you use GoDaddy for the redirection if you don't have access to the server ? You don't do a redirection there, you display a page with frames. You can upload files on your site, right ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29125500
type: AnswerComment

http://stackoverflow.com/comment/46422529
score: 0
type: Comment
type: QuestionComment
has text: || "show_selected" will always be true
comment on: http://stackoverflow.com/q/29095751

http://stackoverflow.com/a/29119532
upvote count: 2
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29119414
downvote count: 1
has body: Try this code. if ($("accordion_in &gt; div.acc_content").length) { $('#removeArrow').removeClass('acc_head') }

http://stackoverflow.com/q/29084332
type: AnsweredQuestion
has title: jquery email extractor live from textarea
accepted answer: http://stackoverflow.com/a/29084615
type: Question
has comment: http://stackoverflow.com/comment/46401656
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46401894
has body: Okay so i have 2x textarea with different id's. I'm trying to extract the emails pasted into the first textarea and then displayed into the second textarea. I know my jquery work for extracting and sorting emails from text in a page, but i cant seem to get it to work with textarea's. My code for the textarea's is as followed: &lt;textarea id="email-extractor" class="email-extractor-textarea"&gt;&lt;/textarea&gt; &lt;textarea id="email-extracted" class="email-extractor-textarea"&gt;&lt;/textarea&gt; My code for the is as followed: &lt;script&gt; function extractEmails (text) { return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi); } function eliminateDuplicates (arr) { var i; var len=arr.length; var out=[]; var obj={}; for (i=0;i&lt;len;i++) { obj[arr[i]]=0; } for (i in obj) { out.push(i); } return out; } var emailsFullList = []; $('#email-extractor').keyup(function( index ) { var emails = extractEmails($(this).text()); if (!emails) { $('#email-extracted').text('** No emails in comment'); } else if (emails.length &lt; 3) { emailsFullList = emailsFullList.concat(emails); } else { $('#email-extracted').text('** Ignoring comment, too many email addresses ('+emails.length+').'); } }); emailsFullList = eliminateDuplicates(emailsFullList); $('#email-extracted').text(emailsFullList.join()); &lt;/script&gt;
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46401832
tagged with: email
has answer: http://stackoverflow.com/a/29084615
possible better answer: http://stackoverflow.com/a/29084621
has answer: http://stackoverflow.com/a/29084621

http://stackoverflow.com/comment/46613396
type: Comment
has text: thanks for your answer but i didn't mean this exactly!I want it to alert when user click on the button.Please take a look at code again
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29200609

http://stackoverflow.com/comment/46460841
has text: That sounds good but I need to have an alert pop up too asking users to click the check box. Thanks!
score: 0
comment on: http://stackoverflow.com/q/29116435
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29094377
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29090080
type: Answer
has body: You should take a look at the SpriteSheet-Class: http://www.createjs.com/Docs/EaselJS/classes/SpriteSheet.html In TexturePacker you can chose EaselJS as a output format, so the JSON can be used for EaselJS SpriteSheet without further modifications. Another good way to generate EaselJS SpriteSheets would be spritesheet.js (https://www.npmjs.com/package/spritesheet-js-monkiki-fork).
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29090080
type: AcceptedAnswer

http://stackoverflow.com/a/29125867
has comment: http://stackoverflow.com/comment/46479006
accepted answer of: http://stackoverflow.com/q/29125201
has body: The snippet below demonstrates one way to implement a boolean toggle using ng-click. The main point of interest is the VerificadaPades function, which actually toggles the boolean model. var eAssinatura = angular.module("pades", []); eAssinatura.controller('AdicionarEditarFormatoAssinaturaDialogController', ['$scope', function ($scope) { $scope.padesVisual = { positions: [], fields: [], selected: false, sealStamp: { isSelected: false, image: '' } } $scope.VerificaPades = function () { $scope.padesVisual.selected = !$scope.padesVisual.selected; } } ]); CAdES PAdES CAdES Selected
answers question: http://stackoverflow.com/q/29125201
has comment: http://stackoverflow.com/comment/46483418
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/46478600
type: Answer
has comment: http://stackoverflow.com/comment/46484579
has comment: http://stackoverflow.com/comment/46484756

http://stackoverflow.com/q/29169764
has comment: http://stackoverflow.com/comment/46561486
favorite count: 0
has comment: http://stackoverflow.com/comment/46557889
has answer: http://stackoverflow.com/a/29170246
has body: in my controller.js I do like this $http({ url: 'http://example.com/api.php', method: "POST", data: { 'YTParam' : 'test' } }) .then(function(response) { console.log(response.data); }, function(response) { // optional // failed } ); I even checked the network tool, the param did passed. and in my api.php I try echo $_POST["YTParam"] but in my console I see nothing? What's wrong here? I tried to echo "string", it did appeared..
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46557924
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46558783
tagged with: javascript
has comment: http://stackoverflow.com/comment/46557993
has title: $_POST doesn't work well with $http POST
has answer: http://stackoverflow.com/a/29171413
linked to: http://stackoverflow.com/q/19254029
answer count: 2
downvote count: 0
score: 1

http://stackoverflow.com/comment/46444679
comment on: http://stackoverflow.com/q/29091840
type: Comment
type: QuestionComment
has text: I would ssh in, then using meteor up deploy your app on the vps. That's how I deploy my always-running apps. Basically move your whole project over then `mup deploy`. In fact, I sftp into my vps and work directly on it, regardless of the platform/console I'm using.
score: 0

http://stackoverflow.com/comment/46469729
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29120856
has text: @GibboK I updated my answer. For me now it shows the trailing comma warning with the modifications described.

http://stackoverflow.com/a/29215854
has body: On the touchstart event, you should remove the event.preventDefault() line. This is preventing links to be clicked. Needless to say, you should keep the event.preventDefault() on the touchmove as this is preventing the scroll.
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29215742
answers question: http://stackoverflow.com/q/29215742
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/29121327
accepted answer: http://stackoverflow.com/a/29121473
type: Question
has comment: http://stackoverflow.com/comment/46469324
answer count: 1
has body: I'm trying to make a function work (trigger) for example canvas2image or could be any function via a jquery ajax call from a mobile. because I don't use a browser I made a cURL page that calls the page with canvas2image. the page with the function canvas2image sends an ajax request to a page that creates the image as .png and saved s it on the server so I created 3 pages 1 with cURL 1 with canvas2image and 1 to create and save the image. below the ajax function that appeals to the cURL function mediafunction(){ $.ajax({ url: 'http://www.server.com/curl.php', cache: false, success: function(response) { // do something }, error: function(xhr, error) { try { console.debug(xhr); console.debug(error); } catch (err) { alert(err); } } }); } the cURL code: $url="http://www.server.com/canvastoimage.php?questid=1"; $agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)'; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_URL,$url); $result=curl_exec($ch); var_dump($result); the canvas2image page: var targetDiv = $("#widget"); html2canvas(targetDiv, { onrendered: function(canvas) { var canvasData = canvas.toDataURL("image/png"), xhr = new XMLHttpRequest(); $.ajax({ url: 'saveimg.php', type: "POST", async: false, //contentType: 'application/json; charset=utf-8', dataType: "text", data: { "base64data" : canvasData }, beforeSend: function () { }, complete: function (response) { }, success: function (result) { result; }, error: function (request,error) { //alert(error); } }); } }); the save image page: if ( isset($_POST["base64data"]) &amp;&amp; !empty($_POST["base64data"]) ) { // get the dataURL $dataURL = $_POST["base64data"]; // the dataURL has a prefix (mimetype+datatype) // that we don't want, so strip that prefix off $parts = explode(',', $dataURL); $data…
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
linked to: http://stackoverflow.com/q/20554113
has title: Trigger a external function with a ajax call
tagged with: curl
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46469335
tagged with: php
has answer: http://stackoverflow.com/a/29121473

http://stackoverflow.com/q/29082950
has answer: http://stackoverflow.com/a/29083072
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46399047
has body: I have a login.jsp which gets submitted to index.jsp passing along the username and password params. How can i retrieve these params in index.jsp? The call to index.jsp is a POST request. Not really a java guy...thanks
upvote count: 0
has comment: http://stackoverflow.com/comment/46399115
answer count: 1
tagged with: jsp
has comment: http://stackoverflow.com/comment/46399080
favorite count: 0
linked to: http://stackoverflow.com/q/10197046
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/46398931
tagged with: java
downvote count: 3
tagged with: authentication
has title: JSP--how to get request parameter

http://stackoverflow.com/q/29154202
tagged with: javascript
has body: Anyone know how I can find out the cause of this error in casperjs? The test script I am trying to run when getting this is: var errors = []; casper.on("page.error", function(msg, trace) { this.echo("Error: " + msg, "ERROR"); this.echo("file: " + trace[0].file, "WARNING"); this.echo("line: " + trace[0].line, "WARNING"); this.echo("function: " + trace[0]["function"], "WARNING"); errors.push(msg); }); casper.on('resource.received', function(resource) { var status = resource.status; if(status &gt;= 400) { casper.log('Resource ' + resource.url + ' failed to load (' + status + ')', 'error'); errors.push({ url: resource.url, status: resource.status }); } }); casper.test.begin('Are we online?', 3, function suite(test) { casper.start("http://www.google.com/", function() { test.assertTitle("Google", "Connected to google, internet connection probably ok"); }); casper.thenOpen("https://mysite", function() { test.assertTitle("Log On", "Connected to mysite, server is up"); this.fill('form#logonForm', { 'Name': 'user', 'Password': 'pass', }, true); }); casper.thenOpen("https://mysite/somepage", function() { casper.test.assert(errors.length==0,'No js errors'); //THIS LINE SEEMS TO BE CAUSING THIS ERROR, NOT SURE WHY? }); casper.run(function () { test.done(); }); }); The full, complete error message is: Details for 1 failed test: In connect-to-production.js: 1968 (there is no such line, my js file has only the lines I pasted above in it, nowhere near 2000 lines) Are we online? (my test name) uncaughtError: TypeError: Attempted to Assign to readOnly property. Above this it does not behave like a normal error and says NO STACK TRACE.
has answer: http://stackoverflow.com/a/29156184
answer count: 1
has title: casperjs uncaught Error: TypeError: Attempted to assign to readOnly property
favorite count: 0
has comment: http://stackoverflow.com/comment/46533116
tagged with: casperjs
has comment: http://stackoverflow.com/comment/46531092
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46529759
score: 1
has comment: http://stackoverflow.com/comment/46529799
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46532321

http://stackoverflow.com/comment/46628983
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29209514
has text: `$('body').on("change"` doesn't look right!

http://stackoverflow.com/a/29085921
score: 0
type: AcceptedAnswer
has body: Ok the main problem I see is the way you are creating your HTML table. For the name attribute you are forcing an array, which is good but the way you have it: &lt;input type="hidden" name="tt_staff_idx[]" /&gt; &lt;input type="hidden" name="tt_idx[]"/&gt; &lt;input type="hidden" name="sb_name[]" /&gt; Will lead to this result: tt_staff_idx = array("value1", "value2", "value3", etc...) tt_idx= array("value1", "value2", "value3", etc...) sb_name= array("value1", "value2", "value3", etc...) Therefore, when you POST this information, you are probably only storing the very last value in the array. What you need to do is setup your HTML inputs in a way that it builds a multi-dimensional array so you can iterate and store in your database. I would try something like this: &lt;input type="hidden" name="data[$i][tt_staff_idx]" /&gt; &lt;input type="hidden" name="data[$i][tt_idx]"/&gt; &lt;input type="hidden" name="data[$i][sb_name]" /&gt; so that you end up with this: data= array( 0 =&gt; array( tt_staff_idx =&gt; ""; tt_idx=&gt; ""; sb_name=&gt; ""; ) 1 =&gt; array( tt_staff_idx =&gt; ""; tt_idx=&gt; ""; sb_name=&gt; ""; ) ) Once you have this you can iterate in your PHP like this: foreach($_POST['data'] as $data){ ... your INSERT to DB code }
accepted answer of: http://stackoverflow.com/q/29085146
type: Answer
answers question: http://stackoverflow.com/q/29085146
has comment: http://stackoverflow.com/comment/46410711

http://stackoverflow.com/a/29096359
has comment: http://stackoverflow.com/comment/46428750
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29085147
has body: If you are dynamically adding data to your ComboBox, this can be achieved by assigning a value to each record that is added. This means at runtime you can then display the value Dim string as String = ComboBox1.SelectedValue whilst having the ComboBox display the text in the dropdown.

ruby-on-rails
tags question: http://stackoverflow.com/q/29070641
tags question: http://stackoverflow.com/q/29189997
tags question: http://stackoverflow.com/q/29112451
tags question: http://stackoverflow.com/q/29217973
type: Tag
tags question: http://stackoverflow.com/q/29195025
tags question: http://stackoverflow.com/q/29200877
tags question: http://stackoverflow.com/q/29138226
tags question: http://stackoverflow.com/q/29103413
tags question: http://stackoverflow.com/q/29175166
tags question: http://stackoverflow.com/q/29141833
tags question: http://stackoverflow.com/q/29213678
tags question: http://stackoverflow.com/q/29198242
tags question: http://stackoverflow.com/q/29119188
tags question: http://stackoverflow.com/q/29088860
tags question: http://stackoverflow.com/q/29080103
tags question: http://stackoverflow.com/q/29130464
tags question: http://stackoverflow.com/q/29097034
tags question: http://stackoverflow.com/q/29117416
tags question: http://stackoverflow.com/q/29207681
tags question: http://stackoverflow.com/q/29189330
tags question: http://stackoverflow.com/q/29122687
tags question: http://stackoverflow.com/q/29145005
tags question: http://stackoverflow.com/q/29127748
tags question: http://stackoverflow.com/q/29153046
tags question: http://stackoverflow.com/q/29165034
tags question: http://stackoverflow.com/q/29168007
tags question: http://stackoverflow.com/q/29063443
tags question: http://stackoverflow.com/q/29140168
tags question: http://stackoverflow.com/q/29172161
tags question: http://stackoverflow.com/q/29177977
tags question: http://stackoverflow.com/q/29113540
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/29164358
tags question: http://stackoverflow.com/q/29074185
tags question: http://stackoverflow.com/q/29140243
tags question: http://stackoverflow.com/q/29062456
tags question: http://stackoverflow.com/q/29069171
tags question: http://stackoverflow.com/q/29142418
tags question: http://stackoverflow.com/q/29190286
tags question: http://stackoverflow.com/q/29109316
tags question: http://stackoverflow.com/q/29149386
tags question: http://stackoverflow.com/q/29199656
tags question: http://stackoverflow.com/q/29135107
tags question: http://stackoverflow.com/q/29208137
tags question: http://stackoverflow.com/q/29113986
tags question: http://stackoverflow.com/q/29120393
tags question: http://stackoverflow.com/q/29089020
tags question: http://stackoverflow.com/q/29142362
tags question: http://stackoverflow.com/q/29201160
tags question: http://stackoverflow.com/q/29101155
tags question: http://stackoverflow.com/q/29174091
tags question: http://stackoverflow.com/q/29135648
tags question: http://stackoverflow.com/q/29201570
tags question: http://stackoverflow.com/q/29191039

http://stackoverflow.com/a/29110446
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29089308
type: Answer
score: 1
upvote count: 1
has body: You could simplify the logic into something like this: // build a list of the sports that should be unchecked var unchecked = sportChecked.sport.concat(10); // add a checked property to each sport _.each(sports, function(sport){ sport.checked = !_.contains(unchecked, sport.id); });
answers question: http://stackoverflow.com/q/29089308
type: AcceptedAnswer

http://stackoverflow.com/a/44056472
downvote count: 0
has body: I also wanted to do the same thing. Here's my solution : The JS part : var file_data = this.files[0]; file_data.name = idaviz +'.pdf'; var form_data = new FormData(); form_data.append("file", file_data); form_data.append('extraParam','value231'); console.log(file_data); console.log('here'); var oReq = new XMLHttpRequest(); oReq.open("POST", "ajax_page.php", true); oReq.onload = function (oEvent) { if (oReq.status === 200) { console.log('upload succes',oReq.responseText); } else { console.log("Error " + oReq.status + " occurred when trying to upload your file.&lt;br \/&gt;"); } }; oReq.send(form_data); }); The PHP part: echo $_REQUEST['extraParam']; //this will display "value231" var_dump($_FILES['file']); //this will display the file object Hope it helps. Addition info about extra parameters on formData can be found here!
type: Answer
answers question: http://stackoverflow.com/q/29156417
score: 10
upvote count: 10

http://stackoverflow.com/comment/46480612
type: AnswerComment
has text: I know, I did not have the time to finetune my answer. As I said it is not perfect, but with some modifications OP should get what he wants.
type: Comment
comment on: http://stackoverflow.com/a/29110405
score: 1

http://stackoverflow.com/q/29174061
has body: I have a geodesic sphere - which was created using THREE.OctahedronGeometry - I would like to group triangular faces into hexagonal faces, so they can be selected. I'm at a loss about how to approach this problem or if it's even feasible. Any insight would be appreciated. Here's an example: createGeodesicSphere =-&gt; geometry = new THREE.OctahedronGeometry(200, 3) material = new THREE.MeshBasicMaterial({ color : 0xFFFFFF, shading : THREE.FlatShading, side : THREE.DoubleSide, vertexColors : THREE.FaceColors, overdraw : true }) # Explode geometry so each face has unique vertices explodeModifier = new THREE.ExplodeModifier() explodeModifier.modify(geometry) geodesicMesh = new THREE.Mesh(geometry , material) geodesicFaces = geometry.faces for i in [0..geodesicFaces.length-1] geodesicFaces[i].color.setRGB(Math.random(), Math.random(), Math.random()) geodesicMesh.position.x = 0 geodesicMesh.position.y = 0 geodesicMesh.position.z = 0 scene.add(geodesicMesh)
tagged with: geometry
has title: Select Hexagonal Face in OctahedronGeometry THREE.js
tagged with: three.js
downvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29176425
accepted answer: http://stackoverflow.com/a/29176425
tagged with: coffeescript
upvote count: 2
linked to: http://stackoverflow.com/q/19011166
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29107818
has comment: http://stackoverflow.com/comment/46445345
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/109477763
type: Answer
downvote count: 0
has body: You can set some boolean flag inside keypress handler when Esc is pressed, and then check it inside blur handler: ... events: { ... "keypress .edit" : "keypress", "blur .edit" : "blur" }, ... close: function() { ... }, blur: function() { if (!this.escFlag) this.close(); this.escFlag = false; }, keypress: function(e) { if (e.keyCode == 27) this.escFlag = true; }, ...
has comment: http://stackoverflow.com/comment/46445567
answers question: http://stackoverflow.com/q/29107485
has comment: http://stackoverflow.com/comment/46445784

http://stackoverflow.com/comment/46438424
has text: @clankill3r I see, that's a different ballpark altogether! It's good you edited your question to clarify this.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29103537

http://stackoverflow.com/q/29191467
tagged with: javascript
has title: How to update more tables using ajax post with dynamic accept friends buttons?
downvote count: 2
answer count: 1
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29191681
accepted answer: http://stackoverflow.com/a/29191681
tagged with: php
type: AnsweredQuestion
upvote count: 0
type: Question
has body: I have a PHP file to accepting friends request. PHP session_start(); include 'db.php'; error_reporting(0); $username= $_SESSION['username']; $i=1; $sql = "SELECT * FROM friends WHERE user2='$username' AND accepted='0' ORDER BY datemade DESC"; $user_query = mysqli_query($db, $sql); $numrows = mysqli_num_rows($user_query); if($numrows < 1){ echo " no more friend requests! "; } while ($row = mysqli_fetch_array($user_query, MYSQLI_ASSOC)) { $user1 = $row["user1"]; $logged_user= $row["user2"]; $i++; ?> HTML `<img src="user/<?php echo $user1; ?>`/profile_pictures/<?php echo $user1; ?>.jpg" width="25px" height="25px"/> <?php echo $user1 ?> <input id="rcv_user" type="hidden" name="rcv_user" value="<?php echo $logged_user; ?>"/> <input id="snd_usr" type="hidden" name="snd_usr" value="<?php echo $user1; ?>"/> Accepted or Ignore Javascript / jQuery $(document).ready(function () { $('#submit').each(function() { $(this).click(function() { var ths = $(this); var I = ths.attr("id"); var rcv_user = $(ths).siblings("#rcv_user").val(); var snd_usr = $(ths).siblings("#snd_usr").val(); var response = $(ths).siblings("#response").val(); $.post("respond_friend.php", {rcv_user:rcv_user, snd_usr:snd_usr, response:response}, function(value){ $('#child').css('background-color', 'white'); $("#submit").hide(); $("#ignore").hide(); $("#or").hide(); $("#accepted").show(); }); }); }); }); The problem here is if the user gets more than one friend request then he can only accept the first friend request and the other accept buttons don't work. After refreshing the page only the next accept button works. It takes one refresh of page to accept one friend request.
score: -2

http://stackoverflow.com/comment/46569960
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29172223
has text: Can't you just use drawImage again to cover the image previously drawn?
type: Comment

http://stackoverflow.com/a/29143945
type: AcceptedAnswer
type: Answer
has body: Actually your code is a bit "dangerous", because of variable defined in global scope and used inside functions etc... Moreover you need to cycle through the .trimmer-words elements in order to get all the strings, instead you get only the first. So I would chage your code a bit, just cycle through the elements, read the original string, use the trimWords function to cut the string and then update the element html. Here comes the code. I've kept it as much as similar as yours. function trimWords(theString){ var contentWidth = $(window).width(); //get width of browser var maxLength = 20 // maximum number of characters to extract //trim the string to the maximum length var trimmedString = theString.substr(0, maxLength); console.log(trimmedString); //re-trim if we are in the middle of a word trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" "))); return trimmedString; } $(".trimmed-words").each(function(index, item) { var theString = $(item).html(); var trimmedString = trimWords(theString); $(item).html(trimmedString); }); $(window).resize(trimWords) first first first first first first first second second second second second second third third third third third third third fourth fourth fourth fourth fourth fourth
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46518555
accepted answer of: http://stackoverflow.com/q/29143661
answers question: http://stackoverflow.com/q/29143661
upvote count: 1

http://stackoverflow.com/q/29162769
has comment: http://stackoverflow.com/comment/46545441
score: 0
has body: I have the following JavaScript function that goes through all the HTML select boxes and makes a list of the numbers between 1 and 11 that have not been selected: function onSelected(oSelected) { var sel1 = document.getElementById('preferenceSelect_0') var sel2 = document.getElementById('preferenceSelect_1') var sel3 = document.getElementById('preferenceSelect_2') var sel4 = document.getElementById('preferenceSelect_3') var sel5 = document.getElementById('preferenceSelect_4') var sel6 = document.getElementById('preferenceSelect_5') var sel7 = document.getElementById('preferenceSelect_6') var sel8 = document.getElementById('preferenceSelect_7') var sel9 = document.getElementById('preferenceSelect_8') var sel10 = document.getElementById('preferenceSelect_9') var sel11 = document.getElementById('preferenceSelect_10') var SelectorArray = new Array(); SelectorArray.push(''); for(var ii=1; ii&lt;12; ii++) { if( sel1.options[sel1.selectedIndex ].text != ii &amp;&amp; sel2.options[sel2.selectedIndex ].text != ii &amp;&amp; sel3.options[sel3.selectedIndex ].text != ii &amp;&amp; sel4.options[sel4.selectedIndex ].text != ii &amp;&amp; sel5.options[sel5.selectedIndex ].text != ii &amp;&amp; sel6.options[sel6.selectedIndex ].text != ii &amp;&amp; sel7.options[sel7.selectedIndex ].text != ii &amp;&amp; sel8.options[sel8.selectedIndex ].text != ii &amp;&amp; sel9.options[sel9.selectedIndex ].text != ii &amp;&amp; sel10.options[sel10.selectedIndex ].text != ii &amp;&amp; sel11.options[sel1.selectedIndex ].text) { SelectorArray.push(ii); } } RemoveSected(sel1, SelectorArray); RemoveSected(sel2, SelectorArray); RemoveSected(sel3, SelectorArray); RemoveSected(sel4, SelectorArray); RemoveSected(sel5, SelectorArray); RemoveSected(sel6, SelectorArray); RemoveSected(sel7, SelectorArray); RemoveSected(sel8, SelectorArray); RemoveSected(sel9, SelectorArray); RemoveSected(sel10,SelectorArray); RemoveSected(sel11,SelectorArray); } This method is fired every time an option is selected in any …
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: JavaScript function not working onsecond iteration
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46546425
tagged with: javascript

http://stackoverflow.com/q/29066590
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/46369036
has answer: http://stackoverflow.com/a/29066709
has answer: http://stackoverflow.com/a/29067000
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29067000
tagged with: javascript
has comment: http://stackoverflow.com/comment/46368921
score: 0
answer count: 3
tagged with: for-loop
upvote count: 1
downvote count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/29066711
accepted answer: http://stackoverflow.com/a/29066711
has title: Count properties of multiple objects in array
has comment: http://stackoverflow.com/comment/46368920
favorite count: 0
has body: I am looking to count elements in the multi object array. How would I do this? //constructor function function Bookdes(title, author, pages, current_page, available){ this.title = title; this.author = author; this.pages = pages; this.current_page = current_page; this.available = available; } //array of books var bookarrays = [ new Bookdes("Fast Cars", "John Burns", 205, 43, "true"), new Bookdes("Slow Cars", "Joe Fast", 70, 32, "false" ), new Bookdes("Big Cars", "Darla Jean", 234, 42, "true"), new Bookdes("Small Cars", "Dema Jones", 214, 34, "false"), new Bookdes("Cars", "Alex Best", 235, 41, "true") ]; Now how do I Count books available (true), sum of pages read (current_page), length of longest title? Thanks,

http://stackoverflow.com/q/29091944
possible better answer: http://stackoverflow.com/a/29092327
has answer: http://stackoverflow.com/a/29092327
type: AnsweredQuestion
has body: i want to when accordion element is visible span and img element display and when it invisible their not displayed. in fact user click on one of element to display it img and span add it and when user slide toggle span and img hide. $("#accordion > li > div").click(function(){ if(false == $(this).next().is(':visible')) { $('#accordion ul').slideUp(300); } $(this).next().slideToggle(300); }); $('#accordion ul:eq(0)').show(); #accordion { list-style: none; padding: 0 0 0 0; width: 170px; } #accordion div { display: block; background-color: #FF9927; font-weight: bold; margin: 1px; cursor: pointer; padding: 5 5 5 7px; } #accordion ul { list-style: none; padding: 0 0 0 0; } #accordion ul{ display: none; } #accordion ul li { font-weight: normal; cursor: auto; padding: 0 0 0 7px; } #accordion a { text-decoration: none; } Sports #20 Golf Technology #20 iPhone
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29092302
score: 0
has comment: http://stackoverflow.com/comment/46416134
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How hide/visible element in accordion
accepted answer: http://stackoverflow.com/a/29092302
has comment: http://stackoverflow.com/comment/46416080

http://stackoverflow.com/comment/46484956
score: 0
comment on: http://stackoverflow.com/q/29112531
has text: ^code gets the code in the form of a string. but eval2 gives object ErrorEvent.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46426864
score: 0
type: AnswerComment
type: Comment
has text: What @DontVoteMeDown is saying (sarcastically) is that just putting fixed code without any explanation of what you've done is not really helping anybody. It's not explaining to the OP what they've done wrong, and it means people have to read/compare every single line to see what you've actually changed to fix it
comment on: http://stackoverflow.com/a/29098161

iframe
tags question: http://stackoverflow.com/q/29139957
tags question: http://stackoverflow.com/q/29116312
tags question: http://stackoverflow.com/q/29078453
tags question: http://stackoverflow.com/q/29214664
tag name: iframe
tags question: http://stackoverflow.com/q/29188009
tags question: http://stackoverflow.com/q/29161541
tags question: http://stackoverflow.com/q/29139292
tags question: http://stackoverflow.com/q/29122050
tags question: http://stackoverflow.com/q/29167006
tags question: http://stackoverflow.com/q/29113137
tags question: http://stackoverflow.com/q/29085877
tags question: http://stackoverflow.com/q/29143045
tags question: http://stackoverflow.com/q/29066008
tags question: http://stackoverflow.com/q/29103273
tags question: http://stackoverflow.com/q/29197643
tags question: http://stackoverflow.com/q/29174956
tags question: http://stackoverflow.com/q/29146002
tags question: http://stackoverflow.com/q/29114891
tags question: http://stackoverflow.com/q/29136046
tags question: http://stackoverflow.com/q/29127362
tags question: http://stackoverflow.com/q/29073351
tags question: http://stackoverflow.com/q/29094664
tags question: http://stackoverflow.com/q/29126713
tags question: http://stackoverflow.com/q/29100139
tags question: http://stackoverflow.com/q/29207686
tags question: http://stackoverflow.com/q/29194898
tags question: http://stackoverflow.com/q/29184252
tags question: http://stackoverflow.com/q/29100643
tags question: http://stackoverflow.com/q/29063896
tags question: http://stackoverflow.com/q/29090724
tags question: http://stackoverflow.com/q/29180336
type: Tag
tags question: http://stackoverflow.com/q/29207200
tags question: http://stackoverflow.com/q/29195866
tags question: http://stackoverflow.com/q/29206774
tags question: http://stackoverflow.com/q/29103488
tags question: http://stackoverflow.com/q/29128318
tags question: http://stackoverflow.com/q/29065419
tags question: http://stackoverflow.com/q/29097858

http://stackoverflow.com/a/75464659
has body: You can draw a SVG and with javascript add be interative https://echarts.apache.org/examples/en/editor.html?c=geo-svg-lines
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29130244

http://stackoverflow.com/comment/47828940
type: Comment
has text: I am getting exception like: contentWindow undefined, ifrm.open(); // unable to open
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29837036

http://stackoverflow.com/q/29074314
score: 2
tagged with: ionic-framework
type: Question
answer count: 2
tagged with: javascript
has title: ionic slider - there is a way to change interval dynamiclly
has comment: http://stackoverflow.com/comment/67879715
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/48815562
has answer: http://stackoverflow.com/a/29074678
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has body: I want to change the interval according to the input of the user: speed : {{word.name}} what happen now is that the slide-interval="{{learnSpeed}}" get the speed from the input, but the slider not run with this interval. there is a way to do it? EDIT: when I add this code to the controller, it's not working as well : controller('learnCtrl', function($scope, $ionicSlideBoxDelegate) { $scope.$watch('learnSpeed', function (newValue, oldValue) { console.log('oldValue=' + oldValue); console.log('newValue=' + newValue); $ionicSlideBoxDelegate.update(); }); });
has answer: http://stackoverflow.com/a/34222601

http://stackoverflow.com/comment/46413042
has text: @JeremyBlalock That's correct, but definitely not the problem here.
comment on: http://stackoverflow.com/q/29090245
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46377798
comment on: http://stackoverflow.com/q/29071603
score: 0
has text: After successful submission of form the records stays there..when i refresh then the records goes from the page...i use the informal way to refresh div after the button clicked but it didn't solve my problem...now i wan to show that checkbox which was not previouly ticked...what i do
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29196185
has comment: http://stackoverflow.com/comment/46605672
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29197146
has comment: http://stackoverflow.com/comment/46605344
has title: Instant validation with JavaScript - not sure where to start
tagged with: email-validation
type: Question
has answer: http://stackoverflow.com/a/29197146
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46605246
score: 0
has comment: http://stackoverflow.com/comment/46605289
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: //PENDING body { font-family: "Raleway", sans-serif; font-size: 14pt; /* 1em */ color: white; text-align: center; background-image: url(./img/bg); } #cog { margin-top: 5%; margin-bottom: -5%; } section.hero { padding: none; margin-left: 10%; margin-right: 10%; } section.hero h1.heroText { font-size: 3em; font-weight: 100; } section.hero h1.subText { font-size: 1.5em; font-weight: 100; } div.footer { font-size: 1.75em; font-weight: 100; position: absolute; bottom: 5px; width: 100%; text-align: center; } input.nicerInput { height: 50px; width: 25%; outline: none; background-color: white; color: #aaa; font-size: 1em; text-align: center; font-family: "Raleway", sans-serif; font-weight: 100; display: inline-block; } input.submitButton { color: white; font-family: "Raleway", sans-serif; font-weight: 100; font-size: 1em; height: 56px; width: 150px; background-color: #5CCF58; text-decoration: none; text-align: center; outline: none; border: none; display: inline-block; position: relative; left: -6px; top: -1px; -webkit-transition: linear all 1s; -moz-transition: linear all 1s; -mos-transition: linear all 1s; } input.submitButton:hover { color: inherit; background-color: #28CD20; -webkit-transition: linear all 0.5s; -moz-transition: linear all 0.5s; -mos-transition: linear all 0.5s; } input.submitButton:active { color: inherit; background-color: #21B71C; -webkit-transition: linear all 0.1s; -moz-transition: linear all 0.1s; -mos-transition: linear all 0.1s; } .errorMsg { color: white; font-size: 1em; margin-left: 10%; margin-right: 10%; display: none; } .fa-spin-custom { -webkit-animation: spin 7500ms infinite linear; animation: spin 7500ms infinite linear; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .…
has comment: http://stackoverflow.com/comment/46605240

http://stackoverflow.com/q/29132755
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29133092
type: UnansweredQuestion
has body: I am trying to make an interactive map that multiple users will be able to draw on and see each others edits live. My attempts so far have not really worked so far. Essentially, in the end, I'd like to have "rooms" that multiple users can join and then write on their own maps but for now I'd like to get it just working in general. My thought process was this: get a script that auto refreshes an image on a webpage without refresh, make the canvas have a static background of the map I want people to write on, take what they've drawn and save it to a file every x milliseconds, combine the image that is constantly being updated with one that has all other edits, make that final image a second background image of the canvas that auto refreshes. Now, this is probably horrifically wrong. Here is the code I have so far: HTML/JS: title Download script.php: <?php // requires php5 define('UPLOAD_DIR', 'images/'); $img = $_POST['img']; $img = str_replace('data:image/png;base64,', '', $img); $img = str_replace(' ', '+', $img); $data = base64_decode($img); $file = UPLOAD_DIR . 'one.png'; $success = file_put_contents($file, $data); print $success ? $file : 'Unable to save the file.'; ?> combine.php: <?php $image_1 = imagecreatefrompng('images/one.png'); $image_2 = imagecreatefrompng('images/final_img.png'); imagealphablending($image_1, true); imagesavealpha($image_1, true); imagecopy($image_1, $image_2, 0, 0, 0, 0, 100, 100); imagepng($image_1, 'images/final_img.png'); ?> now I'm about to scrap this whole idea just because it's not doing anything that I want it to do and it just seems to be a huge mess. Is there a completely different way of going about what I'm trying to accomplish or is there a way to actually make this work?
upvote count: 1
tagged with: php
has title: How can I make every user on a webpage see and edit HTML canvas live?
type: Question
tagged with: canvas
downvote count: 0
answer count: 1

http://stackoverflow.com/a/29168928
type: Answer
score: 4
has body: Well, just to share my solution with everyone else, in case anyone tries to do something similar, I ended up going with a different and MUCH easier/more efficient route. Instead of using the CanvasInput library and rendering an input on the canvas itself (which actually added hidden inputs and a couple different canvases), [EDIT] I ended up creating a text input in the DOM, hiding it through CSS by default, and then upon the click event firing, the text input being displayed block and absolutely positioned. My previous solution to this had caused a memory leak and was adding multiple detached inputs to the page. That was not the best solution, so I went with having one input that is hidden or displayed depending on the situation. Here is the code (using jQuery but can just as easily be done in Pure JS): var $input = $("#textInput"); $input.css({ display: "block", position : "absolute", left : tool.startx, top : tool.starty }); $input.keyup(function (e) { if (e.which === 13) { e.preventDefault(); context.font = (10 + (tmpContext.lineWidth * 2)) + "px Georgia"; if (tool.mode === "textFill") { context.fillText($input.val(), parseInt($input.css("left")), parseInt($input.css("top"))); } else { context.strokeText($input.val(), parseInt($input.css("left")), parseInt($input.css("top"))); } context.save(); addRestorePoint(); $input.css("display", "none").val(""); } if (e.which === 27) { e.preventDefault(); $input.css("display", "none").val(""); } });
answers question: http://stackoverflow.com/q/29146433
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29146433
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46403856
comment on: http://stackoverflow.com/q/29085383
score: 0
type: Comment
type: QuestionComment
has text: So when you put in you if statement it does not work and when not it works properly?

http://stackoverflow.com/a/29184371
type: AcceptedAnswer
downvote count: 0
has body: The problem is, you are registering for form submit after the form validation. so, 1) On first click of button validation, the submit event is registered to a handler. 2) On second click of the button, the registered handler will be called. that is why it get submitted on second click. But note that you are registering again for the submit event. which means, on third click the form will be submitted twice, on fourth click the form will be submitted thrice..... and so on... Solution 1) remove the $("#frm").submit() code from the submitHandler and put it outside. 2) use e.preventDefault(); in $("#frm").submit() so the default action is prevented and page doesn't get reloaded. 3) put the AJAX code directly in submitHandler $('#btn').one("click",function(){ // prevent from multiple submits $('#frm').validate({ // validate the form before submission ...general stuff: rules, messages, etc submitHandler:function(form){ ...prepare parameters for ajax call $.ajax({ type:'POST', ...general stuff }); } }); }); $('#frm').submit(function (e) { e.preventDefault(); });
type: Answer
accepted answer of: http://stackoverflow.com/q/29183737
has comment: http://stackoverflow.com/comment/46584541
answers question: http://stackoverflow.com/q/29183737
upvote count: 5
score: 5

http://stackoverflow.com/a/29091901
answers question: http://stackoverflow.com/q/29090827
downvote count: 0
type: Answer
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29090827
has body: Target the set to as specific a keypath as possible: // single property ractive.set("table.1.name", "Tim Smith"); // multiple properties in one go: ractive.set({ "table.1.name": "Tim Smith", "table.1.age": 12, }); // you can update the object var item = ractive.get('table.1'); item.name = 'Tim Smith'; item.age = 22; ractive.set("table.1", item); That being said, Ractive has some smarts about not re-rendering things of the same value. Though it still has to do more comparisons.
type: AcceptedAnswer

http://stackoverflow.com/q/29200430
tagged with: backbone.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29200776
linked to: http://stackoverflow.com/q/7305079
type: Question
has body: Here is my jsFiddle: https://jsfiddle.net/Frankistan/dqbexhr0/1/ window.Wine = Backbone.Model.extend({ urlRoot: "api/wines", defaults: { "id": null, "name": "", "grapes": "", "country": "USA", "region": "Wisconsin", "year": "", "description": "", "picture": "none.jpg" } }); var WineCollection = Backbone.Collection.extend({ model: Wine, url: "api/wines" }); window.StartView = Backbone.View.extend({ initialize: function () { this.template = _.template($('#start-template').html()); }, render: function () { this.$el.html(this.template()); return this.el; } }); window.HeaderView = Backbone.View.extend({ events: { 'click .new': 'newWine' }, initialize: function () { this.template = _.template($('#header-template').html()); }, render: function () { this.$el.html(this.template()); return this.el; }, newWine: function () { debugger app.navigate('wines/new', true); return false; } }); window.WineListView = Backbone.View.extend({ tagName: 'ul', initialize: function () { this.collection.on('add', this.appendNewWine, this); this.collection.on('reset', this.render, this); }, render: function () { _.each(this.collection.models, function (wine) { this.appendNewWine(wine); }, this); return this.el; }, appendNewWine: function (wine) { var wineListItemView = new WineListItemView({ model: wine }).render(); this.$el.append(wineListItemView); } }); window.WineListItemView = Backbone.View.extend({ tagName: 'li', initialize: function () { this.template = _.template($('#wine-list-item-template').html()); this.model.bind('destroy', this.remove, this); this.model.bind('change:name', this.render, this); }, render: function () { console.log('ListItemView render: '); this.$el.html(this.template(this.model.toJSON())); return this.el; }, update: function () { console.log('actualizando nombre en la lista'); debugger this.$el.find('a').text(this.model.get('name')); } }); window.WineDetailView = Backbone.View.extend({ events: { "change input": "change", "click .save": "saveWine", "click .delete": "de…
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29200776
score: 0
answer count: 1
has title: Success Callback on Model destroy doesn't work
tagged with: jquery
linked to: http://stackoverflow.com/q/11805068

storage
tag name: storage
tags question: http://stackoverflow.com/q/29120459
type: Tag

http://stackoverflow.com/q/29203545
tagged with: google-chrome
has body: I have finished developing my website and I am testing it. I run a script after 1 second to check the height of the header/top and add a margin-top to the content section. but this header/top changes sizes depending on the scroll position (on runtime). So first I have to make sure the page scroll is set to (top) 0 and then run this script. Sometimes the user has scrolled down and refreshed, and the natural browser's behavior is to scroll the page to where it was. After several attempts on Google Chrome and after commenting most of my code that is triggered when page loads, I tried the same on Firefox and it works! So this code doesn't work on Chrome: $(document).scrollTop(0); // or this $(document).ready(function(){ $(this).scrollTop(0); }); I used the animate function and passed a callback to alert "Hello" and it alerts on top, then I click "Ok" and it goes back to where the scroll was before the refresh. I also tried without jQuery and nothing happens window.scrollTo(0,0); On Firefox it works fine. No Javascirpt code is running BUT the scrollTop (maybe things like social plugins, but nothing mine). Does anybody know a workaround or how to fix it? Whats the matter with Chrome?
type: Question
has title: Can't force Chrome to Scroll to top of page with Javascript
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29203635
linked to: http://stackoverflow.com/q/9316415
has comment: http://stackoverflow.com/comment/46618538
has answer: http://stackoverflow.com/a/42138596
answer count: 4
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/37814387
has comment: http://stackoverflow.com/comment/46618622
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29203796
score: 1
has comment: http://stackoverflow.com/comment/46618720
tagged with: scroll

http://stackoverflow.com/comment/46453686
score: 1
has text: @jlowcs If you tell me its due to closure, then according to my simplest understanding of closures, any nested function can access variables of outer functions. Then how come $scope is undefined inside inner function? Please help me rectify my closure concept if im wrong here.
comment on: http://stackoverflow.com/q/29111521
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29136100
has comment: http://stackoverflow.com/comment/46516390
score: 1
has comment: http://stackoverflow.com/comment/46516715
upvote count: 1
has comment: http://stackoverflow.com/comment/46517148
has comment: http://stackoverflow.com/comment/46516973
answers question: http://stackoverflow.com/q/29136052
has body: If your data is actual numbers, then just use the bitwise &amp; operator on each member. var customerOption = parseInt("0010", 2) $item.forEach(function(n, i) { if (customerOption === 0 || ((n &amp; customerOption) == customerOption)) alert(i); // show this item }); If they're strings, then you'll need to convert each item to a number first. Same as above, but... parseInt(n, 2); var $item = []; $item[0] = "0010" $item[1] = "1000" $item[2] = "0110" $item[3] = "1101" var customerOption = parseInt("0010", 2) $item.forEach(function(n, i) { if (customerOption === 0 || ((parseInt(n, 2) &amp; customerOption) == customerOption)) document.querySelector("pre").textContent += "\n0010 matched index: " + i; }); document.querySelector("pre").textContent += "\n\n" var customerOption = parseInt("0110", 2) $item.forEach(function(n, i) { if (customerOption === 0 || ((parseInt(n, 2) &amp; customerOption) == customerOption)) document.querySelector("pre").textContent += "\n0110 matched index: " + i; }); &lt;pre&gt;&lt;/pre&gt;
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29136052
type: Answer

http://stackoverflow.com/comment/46553900
has text: that turned all JS code to errors, no idea why.. anyway now i'm trying to do it with just a HTML page..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29165469

http://stackoverflow.com/comment/46714444
has text: its not possible with custom search, you'd have to redirect clients in another window to https://www.google.pl/?q=test where test is what they're searching
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29234538

http://stackoverflow.com/a/29204753
type: Answer
has body: in your controller action change below code. here in your code you are not return data from model. it return only test. die(json_encode(array('result' => 'test'))); //as per updated question die(json_encode($this->customer_model->loadCustomerDetails())); remove this header header('Content-Type: application/json'); updated javascript code var result = JSON.parse(data); var datas = ''; for (var x = 0; x < result.length; x++) { datas = ' ' + ' ' + result[x].C_email + ' ' + ' ' + result[x].C_clientint + ' ' + ' ' + result[x].C_status + ' ' + ' ' + result[x].C_clientcode + ' ' + ' ' + result[x].C_name + ' ' + ' ' + result[x].C_nic + ' ' + ' ' + ' ' + ' ' + ' '; // if((result.length - 1) === x){ $('#bdy_customer_details').append(datas); //} }
answers question: http://stackoverflow.com/q/29204570
accepted answer of: http://stackoverflow.com/q/29204570
has comment: http://stackoverflow.com/comment/46657886
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/29098178
type: AnsweredQuestion
tagged with: leaflet
type: Question
has answer: http://stackoverflow.com/a/29099364
tagged with: javascript
score: 0
has body: Let's say I have a bunch of markers (over 100) I want to add from this: module.exports = [ { value: 'Varrock', lng: 22.5, lat: -15.52249812756166, popular: 1 }, { value: 'Lumbridge', lng: 25.9661865234375, lat: -43.644025847699496, popular: 1 }, { value: 'Monastery', lng: -4.0924072265625, lat: -5.714379819235291 }, { value: 'Edgeville', lng: 2.4884033203125, lat: -6.0094592380595495, popular: 1 }, { value: 'Varrock Palace', lng: 22.412109375, lat: -6.882800241767556 }, { value: 'Digsite', lng: 46.043701171875, lat: -17.266727823520508 }, { value: 'River Salve', lng: 54.931640625, lat: -14.083301314706778 }, { value: 'Morytania', lng: 64.610595703125, lat: -13.501814172428656 }, { value: 'Mort Myre Swamp', lng: 59.820556640625, lat: -22.740723091194727 } ]; It uses browserify to get it. So, I do this: var locations = require('./locations'); What would be the best way to add all of those into LayerGroup()? I mean, because doing var fairy = L.layerGroup([One, Two, Three...]); by hand would get tiresome. So how would I go about adding all of those markers into a new layer (so I can toggle them on/off)
answer count: 1
accepted answer: http://stackoverflow.com/a/29099364
has title: JavaScript - leaflet, adding a bunch of markers

http://stackoverflow.com/comment/46397212
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29082116
has text: Good spot @OliverWatkins - a good example of the importance of good indentation in your code
score: 0

http://stackoverflow.com/comment/46414529
type: QuestionComment
comment on: http://stackoverflow.com/q/29091060
score: 0
has text: I just found it myself after adding the update. I feel stupid. I suspect it was me not noticing because of the embedded quotes being in a node.js script.
type: Comment

http://stackoverflow.com/comment/46574113
has text: Were you going to say anything else more? Since you left a ':' at the end of your last sentence.
comment on: http://stackoverflow.com/a/29136531
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29128527
has body: It sounds like you are trying to access it when it hasn't resolved yet and it's still empty. Give this a whirl: commonData.stock.$promise.then(function () { vm.colorSizes = _.uniq(commonData.stock, 'colorName'); });
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29128366
accepted answer of: http://stackoverflow.com/q/29128366
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46750594
comment on: http://stackoverflow.com/q/29163288
has text: i have the first stage of the design on my site [link](http://www.cnolimit.co.uk/map), what i'm trying to do is put an overlay div over the reception area, but i what it to stay at the position, when moving the map like a marker. so u wont be able to see the div if you drag the map away from that area.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29159012
upvote count: 1
has body: In the list of users, I would make ID the key. Then in each year bucket, I would just store a list of user ID's. So if you want to see a list of all users in 2014, you retrieve the list of user ID's, and then look up each user by ID. To store a new user you might do something like: var currentyear = "2015"; var newUser = { "id" : 1, "member_number" : 1, "name": "b", "phone": "d", "email": "f", "picture" : "", "gender" : "male", "birthdate" : "21-05-1986", "address" : "", "postal_code" : {"prefix":"4750","suffix":"248"}, "updated_on" : "1235648", "inserted_on" : currentyear, "visible" : true, "verified" : false }; var userList = new Firebase('https://foo.firebase.url//userList'); var userRef = userList.child(newUser.id); userRef.set(newUser); var bucketRef = new Firebase('https://foo.firebase.url//bucketList//' + currentyear); bucketRef.push({"id": newUser.id}); In this way, it is easy to access and update a user's data, and to get a list of users by year.
has comment: http://stackoverflow.com/comment/46587378
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29156712
type: Answer
accepted answer of: http://stackoverflow.com/q/29156712
score: 1

http://stackoverflow.com/comment/46565967
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29174037
type: Comment
has text: post your html css and javascript please

http://stackoverflow.com/comment/46400398
score: 0
has text: I tried plugging that code in but it behaved the same as before.
comment on: http://stackoverflow.com/q/29082444
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46468677
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29112801
has text: Why do you set your content type to Json in asp page?! it seems there is no data to push back
type: Comment

http://stackoverflow.com/comment/46481995
has text: The posted HTML is invalid. Also what is failing with your example code?
comment on: http://stackoverflow.com/q/29128016
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46620532
type: QuestionComment
has text: The code you're using is jQuery (`$.blah`) not d3.js (`d3.blah`). Here's [an answer I recently gave to someone else on tooltip how-to's](https://stackoverflow.com/questions/25955408/show-label-when-mouse-over-a-circle/25957385#25957385).
comment on: http://stackoverflow.com/q/29202363
score: 0
type: Comment

http://stackoverflow.com/q/29137218
tagged with: arrays
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29137942
has comment: http://stackoverflow.com/comment/46499089
has comment: http://stackoverflow.com/comment/46532736
has title: How do I create a hierarchy tree using 2 one-dimensional arrays in javascript?
type: AnsweredQuestion
tagged with: recursion
has answer: http://stackoverflow.com/a/29137942
type: Question
has body: I'm trying to create a tree using two arrays - the first array contains integers that need to be converted into a hierarchy/tree/nested array, and the second array contains the numbers which trigger the branching. I've been successful in slicing the first array into branches as a basic test, but I think I'm missing something in the recursive function makeBranch needed to nest the arrays correctly. This works: var sequence = [0, 2, 1, 3, 4, 9, 7, 14, 13, 15, 23, 21, 22, 17, 20, 19, 17, 23, 24, 16, 11, 6, 10, 5], breaks = [ 0, 17, 23 ]; var tree = []; for (var i = 0, imax = sequence.length; i&lt;imax; ++i) { var val = sequence[i]; if (breaks.lastIndexOf(val) != -1) { tree.push([]); } tree[tree.length-1].push(val); } console.log(tree); // **** First test - passes Using the same arrays, and it produces a very strange result: var tree = makeBranch(sequence, 0, breaks); console.log(tree); // **** Second test - fails function makeBranch(sequence, i, breaks) { var branch = []; for (var imax = sequence.length; i&lt;imax; ++i) { var val = sequence[i]; if (breaks.lastIndexOf(val) != -1) { branch.push( makeBranch(sequence.slice(i+1), i+1, breaks) ); } branch.push(val); } return branch; } Basically, I'd like to turn this array: [0, 2, 1, 3, 4, 9, 7, 14, 13, 15, 23, 21, 22, 17, 20, 19, 17, 23, 24, 16, 11, 6, 10, 5] into this (or something similar): [0, 2, 1, 3, 4, 9, 7, 14, 13, 15, [23, 21, 22, [17, 20, 19], [17]], [23, 24, 16, 11, 6, 10, 5]] Any help would be appreciated.

http://stackoverflow.com/comment/46558774
type: Comment
type: QuestionComment
has text: @epascarello i got this error on browser console:Uncaught TypeError: Cannot read property 'top' of undefined
score: 0
comment on: http://stackoverflow.com/q/29170022

http://stackoverflow.com/comment/46504597
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29139229
has text: is there a way I can change my approach to make it work somehow?
score: 0

http://stackoverflow.com/q/29111626
has comment: http://stackoverflow.com/comment/62272858
has comment: http://stackoverflow.com/comment/96064325
has comment: http://stackoverflow.com/comment/46452439
has comment: http://stackoverflow.com/comment/46452432
possible better answer: http://stackoverflow.com/a/29111723
has answer: http://stackoverflow.com/a/54635956
has answer: http://stackoverflow.com/a/29111723
tagged with: javascript
has title: JavaScript Promise then() ordering
upvote count: 15
has body: I'm still learning JavaScript Promises, and I came across a behavior I don't understand. var o = $("#output"); var w = function(s) { o.append(s + "&lt;br /&gt;"); } var p = Promise.resolve().then(function() { w(0); }).then(function() { w(1); }); p.then(function() { w(2); return new Promise(function(r) { w(3); r(); }).then(function() { w(4); }); }).then(function() { w(5); }); p.then(function() { w(6); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="output"&gt;&lt;/div&gt; I would expect these statements to run in order--that is, the that output would be 0 1 2 3 4 5 6 Instead, the output is 0 1 2 3 6 4 5 Even removing the inner Promise gives, what seems to me to be, contradicting results. 1 is output before 2, but 6 is output before 5. Can someone explain this to me? Something I have noticed is that reassigning p each time gives us the order I would expect.
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29111897
favorite count: 0
tagged with: promise
type: Question
linked to: http://stackoverflow.com/q/42360477
has comment: http://stackoverflow.com/comment/46452426
score: 15
has comment: http://stackoverflow.com/comment/46452417
answer count: 3
accepted answer: http://stackoverflow.com/a/29111897

http://stackoverflow.com/q/29073416
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/29073544
has body: I have a design requirement in html and CSS, In my website user can access few components without logging in ,if user tries to access any feature which needs login authentication,a small window has to be embedded on top of existing page and all remaining features has to be blurred(not accessible until user login).. asking for user login details... I was adding a sample image for reference.... Some one suggest me how to achieve this..... thank you.
favorite count: 0
has comment: http://stackoverflow.com/comment/46381060
has answer: http://stackoverflow.com/a/29073568
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46381092
score: 1
linked to: http://stackoverflow.com/q/20712195
type: Question
has comment: http://stackoverflow.com/comment/46381138
has comment: http://stackoverflow.com/comment/46381009
tagged with: javascript
has title: Popup Login form on top of index html
upvote count: 2

http://stackoverflow.com/q/29090514
type: UnansweredQuestion
tagged with: bacon.js
type: Question
has comment: http://stackoverflow.com/comment/46711510
has comment: http://stackoverflow.com/comment/46473398
has body: I was trying baconjs's tutorial. https://baconjs.github.io/tutorials.html#content/tutorials/2_Ajax But, I got the error at "Bus.plug" var cart = ShoppingCarEt([]) var cartView = ShoppingCartView(cart.contentsProperty) var newItemView = NewItemView() cart.addBus.plug(newItemView.newItemStream) Error: Uncaught Error: not an Observable : [object Object] shopBundle.js:145 assertObservable shopBundle.js:2650 Bus.plug I use follows baconjs@0.7.53 jquery@2.1.3 bacon-jquery-bindings@0.2.8 webpack 1.7.3 What am I doing wrong? Thanks. Edit: 2015/3/25 Cause is that newItemView.newItemStream is not Observable. (newItemView.newItemStream instanceof Bacon.Observable returns false.) And newItemView.newItemStream is EventStream EventStream {takeUntil: function, sampledBy: function, combine: function, flatMapLatest: function, fold: function…} Isn't all EventStream an Observable? I have made newItemStream as follows: var $button = $('#addButton'); var $nameField = $('#nameText'); var newItemProperty = Bacon.$.textFieldValue($nameField); var newItemClick = $button.asEventStream('click'); var newItemStream = newItemProperty.sampledBy(newItemClick); Following is work fine. It was my miss when first time question. /* And, I try more simple code. It has same error. */ var someStream = Bacon.interval(1000).map(function() { return new Date().getTime(); }); var bus = new Bacon.Bus(); bus.log(); bus.plug(someStream);
has answer: http://stackoverflow.com/a/29255500
tagged with: javascript
has comment: http://stackoverflow.com/comment/46706626
score: 0
has title: bacon.js Bus.plug: Uncaught Error: not an Observable : [object Object]
answer count: 1
has comment: http://stackoverflow.com/comment/46518732

http://stackoverflow.com/a/29071597
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29071302
has comment: http://stackoverflow.com/comment/46426714
has body: JavaScript has no privileges reading files from the disc. You can't make a cross-domain request from a local file because it's not on a domain. You need to host C:\index.html on a local webserver instance in order for it to work. Or start Chrome with the following parameters. --disable-web-security -–allow-file-access-from-files You should also add the following to your service response: response.setHeader("Access-Control-Allow-Origin", "*");

http://stackoverflow.com/comment/46519004
score: 0
type: Comment
has text: @Nick: Learn more about how `this` works: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this , http://www.quirksmode.org/js/this.html
type: AnswerComment
comment on: http://stackoverflow.com/a/29148219

http://stackoverflow.com/comment/46412026
type: Comment
has text: nope.. but i think i will create a button or something to call. because it works with other div id's
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29089584

http://stackoverflow.com/comment/46604794
type: Comment
has text: True. I missed that because I just inputed `[].__proto__` which prints as []. I gues the console doesn't console.log its results.
comment on: http://stackoverflow.com/q/29195856
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46500691
comment on: http://stackoverflow.com/q/29138096
score: 0
has text: ...Wow, well that was surprisingly simple! Thank you so much for talking the time to read and answer my question :D I'm sure you saved me a lot of time and headache. Thanks again!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29214934
downvote count: 1
type: Question
has body: I have a project with brunch/jade/backbone that uses an index.html file which calls in everything using backbone, and jade. index.html (parts): [...] The vendor.js file includes the generated (using brunch) jquery.js, backbone.js, and other libraries I need there. So it is included before usin the script. My layout.jade: body [blah...blah] script(src="data/credentials.js") data/credentials.js: var username="blah"; var password="bluh"; // alert("test"); $(document).ready(function(){ $("#credentials").html( ' ' + username + ' ' + ' ' + password + ' ' + ); }); I see that the js file is included in the final html file, but the ready function is never executed, whatever I tried. Funnily, if I uncomment the alert, I see no popup neither. So why is this file found, loaded, but does not execute? I thought each js file that is loaded within an html file is executed there? So the alert function should fire, shouldn't it? What did I do wrong here?
has comment: http://stackoverflow.com/comment/46640101
has comment: http://stackoverflow.com/comment/46640485
tagged with: brunch
has comment: http://stackoverflow.com/comment/46641222
tagged with: document-ready
has comment: http://stackoverflow.com/comment/46639308
has comment: http://stackoverflow.com/comment/46640339
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46640613
has comment: http://stackoverflow.com/comment/46640652
has title: $(document).ready not called in brunch/jade/backbone project
tagged with: pug
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46640082
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29215260

http://stackoverflow.com/a/29189138
has body: This is my solution My example HTML Hit me Hit me Hit me Hit me JavaScript function start(){ //Get necesary elements var list = document.getElementsByTagName("li"); //Adding event for(var i in list){ list[i].addEventListener("click", changeStyle); } } function changeStyle(){ var params = this.dataset.params.split(","), wrapper = document.getElementById("wrapper"); wrapper.style.backgroundColor = params[0]; wrapper.style.color = params[1]; }
type: Answer
answers question: http://stackoverflow.com/q/29188961
score: 0

http://stackoverflow.com/a/29156096
score: 0
type: AcceptedAnswer
type: Answer
has body: Okay I realized I need to use "spawn" and not "exec" to do this: var express = require('express'); var app = express(); app.listen(3000); app.get('/', function(request, response) { response.send("Hey"); var spawn = require('child_process').spawn; var java = spawn('java', ['-jar', 'misc.jar']); java.stdout.on('data', function(data) { console.log(data); }); }); However, I notice that express with "response" is not allowing my to push data. So, I need to figure out that last part of my question as I believe to do this I need to use AJAX/Socket.IO
accepted answer of: http://stackoverflow.com/q/29154736
answers question: http://stackoverflow.com/q/29154736

http://stackoverflow.com/comment/46425403
type: QuestionComment
comment on: http://stackoverflow.com/q/29097352
type: Comment
has text: Note depending on your requirements special chars can also include ü,ã,ê,ç,à,é,º,ª, etc
score: 0

http://stackoverflow.com/a/29111453
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29110138
has comment: http://stackoverflow.com/comment/46473089
answers question: http://stackoverflow.com/q/29110138
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You have a few issues here (in addition to a mismatch of state.countryid and country.id): First, track by comes after the filter (or, in other words, filter comes right after the array, since it filters the array). Second, you are right - the built-in filter filter only works on arrays, not objects. For objects, you'd need a custom filter. And lastly, filter filter doesn't accept an expression to evaluate (filter:state.countryid = user.country.id, not to mention that this "expression" that you tried to provide doesn't compare ===, but assigns =). filter accepts as a parameter either a string - to match any property against, an Object specifying which property to match against which value, or a predicate function. In your case, an object is what you need. To put this thing together you get: select state
has comment: http://stackoverflow.com/comment/46455467
score: 1
has comment: http://stackoverflow.com/comment/46474263

http://stackoverflow.com/q/29114194
has answer: http://stackoverflow.com/a/29114224
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29114224
type: AnsweredQuestion
has body: I have several buttons that use the same implementation but need to pass a different parameter to the function. This if for an mp3 player for context. My idea should be easy to follow, but I cannot get the syntax to work. Hope someone can help. The button in HTML: &lt;input id="songToPlay" type="button" value="Click To Play!"/&gt; Then the javascript onclick call: document.getElementById('songToPlay').onclick = playSongByThisBand; The method playSongByThatBand(): function playSongByThisBand() { playSongByAnyBand(theIntegerThatRepresentsThisBand); } The method playSongByAnyBand(parameter): function playSongByAnyBand(anIntegerThatRepresentsABand) { currentSongIndex=anIntegerThatRepresentsABand; //other implementation ect... } An alternative approach I tried is: function playSongByAnyBand(anIntegerThatRepresentsABand) { currentSongIndex=anIntegerThatRepresentsABand; someObject = function() {other implementation ect...} } var functionIWantToExecutre = new playSongByAnyBand(anIntegerThatRepresentsABand) functionIWantToExecute.someObject(); I cannot get playSongByAnyBand to execute. I could implement each button separately but that is even more redundant that my approach already. Can anyone help me with the syntax to implement multiple buttons this way?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46457873
possible better answer: http://stackoverflow.com/a/29114426
has title: How to pass parameters to function using buttons
has comment: http://stackoverflow.com/comment/46457076
score: 0
has answer: http://stackoverflow.com/a/29114426

http://stackoverflow.com/comment/46576999
comment on: http://stackoverflow.com/a/29180098
score: 0
type: Comment
has text: i tried your code.but did not get output. Include jquery files also.
type: AnswerComment

http://stackoverflow.com/q/29108304
type: UnansweredQuestion
downvote count: 1
score: -1
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/46446486
type: Question
has title: How to incorporate angular javascript shown below in codeigniter?
upvote count: 0
tagged with: javascript
has body: I have been trying unsuccessfully to create a dynamic(chained) drop down list for many days in codeigniter, have gone throught lots of tutorials but one way or the other failed to do it. My third post on the same topic over here. I have found this tutorial(code) which gives thisoutput which is what I am exactly trying to achieve. Will I be able to use this codes in codeigniter 2.x. I did a bit of google search and found this but I fail to understand the part when the tutorial reach AppController.js portion (dont know where and how it is used). Please someone tell me how I can have a similar dropdown list? Thank You for the support!
has comment: http://stackoverflow.com/comment/46446481
answer count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/29108345

http://stackoverflow.com/comment/46550518
type: Comment
has text: same bro,only the last string was caught,anyway i think i need put the stringf on ajax and return it.
comment on: http://stackoverflow.com/a/29165402
score: 0
type: AnswerComment

http://stackoverflow.com/a/29160405
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29160182
score: 2
accepted answer of: http://stackoverflow.com/q/29160182
upvote count: 2
has body: I have a way to always ensure the child scope's variable IS the same as the parent scope's variable: use Object so they use the same reference. I have made some changes, you can use: JS angular.module('myapp', []) .controller('HomeCtrl', function($scope) { $scope.aaa = {a:10}; //change here. $scope.clickMe2 = function() { $scope.aaa.a++; //here. } }) .controller('TestCtrl', function($scope) { $scope.clickMe1 = function() { $scope.aaa.a = $scope.$parent.aaa.a || 9; //here. $scope.aaa.a++; //here. } }) HTML {{ aaa.a }} //here. Click Parent {{ aaa.a }} //and here. Click Child

http://stackoverflow.com/a/29171274
answers question: http://stackoverflow.com/q/29167373
type: Answer
has body: You can use this function: var timerId = setInterval(function() { alert("tick"); }, 2000); setTimeout(function() { clearInterval(timerId); alert('tick'); }, 5000);
score: 0

http://stackoverflow.com/a/29110843
has comment: http://stackoverflow.com/comment/46616248
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29110431
has body: You might not be getting the right tag, or the dataBlock object. Instead of doing var tag = session.substring(session.indexOf("_") + 1);, use split() operator: var tag = session.split("_")[1]; Next, I am not sure if you meant to use your dataBlock as a 3-D array, but if you did, be very careful as you're handling a lot of data inside it. I would recommend using console.log(dataBlock['coverType_'+tag]) first, then console.log(dataBlock['coverType_'+tag]['coverType_'+tag]) to verify if it has the data you need. If not, the "other function" giving the dataBlock object is broken.
type: Answer
answers question: http://stackoverflow.com/q/29110431

http://stackoverflow.com/q/29113797
score: 0
has body: I have my code below. I have var viewData in my constructor appVM as null and in activate I am filling it with some value. Now I have to use activate scope of viewData instead of outer scope. what my self var of Lis should be assign with for the same. var appVM = function () { this.viewData = null; this.subscription = ko.observable(); this.activate = function (viewActivationData) { var self = this; self.viewData = viewActivationData.viewData; }; appVM.prototype.list = function () { var self = this; getEmpLists(self.viewData.empId); };
answer count: 1
has title: accessing element of inner function scope instead of outer in knockout
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29126063
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/46473015
tagged with: javascript
tagged with: scope

http://stackoverflow.com/a/41436767
has body: Quite a late answer and possibly not 100% what you were looking for: The dropdown width of my select-element covered nearly half the width of the screen. It looks like the width of the dropped-down list is being controlled by the number of characters between <?php SOME PHP-CODE ?> After I replaced: <?php $maxi=$results['numcountries']+1; <?php for ($i = 0; $i<= $maxi; $i++) { if($results['Country'][$i]->countryname===$results['contact']->country){ ?> <option value='<?php echo $results['Country'][$i]->countryname ?>' selected='selected' ><?php echo $results['Country'][$i]->countryname; ?> <?php } else { ?> <option value='<?php echo $results['Country'][$i]->countryname ?>' ><?php echo $results['Country'][$i]->countryname ?> <?php } } ?> with: <?php $maxi=$results['numcountries']+1; ?> <?php for ($i = 0; $i<= $maxi; $i++) { $val= $results['Country'][$i]->countryname; if($results['Country'][$i]->countryname===$results['contact']->country){ ?> <option value='<?php echo $val?>' selected='selected' ><?php echo $val ?> <?php } else { ?> <option value='<?php echo $val?>' ><?php echo $val ?> <?php } } ?> the dropdown width corresponds to the width of the select-element.
score: 0
answers question: http://stackoverflow.com/q/29183717
type: Answer

http://stackoverflow.com/q/29077213
answer count: 1
has body: I am working on a js app which loads some xml files stored in another server. I am using ofcourse XHR to load and access their content. As a first level I just acces the top level file which contains the name of the elements and I show them in a thumbnail format. My idea is to show the title of the files and the number of items that every element contain. Also and in the second level when the user clicks on one of the elements(thumbnails) I load the content of the clicked element. So I am wandering if my process is performant or not since I load or access the files two times the first when I show the number of items an element contain and in a second time when the user clicks on the element and iI shows its content. Please what do you think? Is there another good solution? Thanks a lot for your answers :)
type: UnansweredQuestion
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/29077252
type: Question
tagged with: performance
tagged with: javascript
has comment: http://stackoverflow.com/comment/46391078
score: 0
has title: XHR Performance

http://stackoverflow.com/q/29145938
has comment: http://stackoverflow.com/comment/46620388
has title: How to generate links towards right side in force layout D3.js
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29203762
tagged with: javascript
favorite count: 0
type: Question
score: 3
has body: How to generate links arc angles towards right side in force layout D3.js, as shown in the image: I have tried the following: path.attr("d", function(d) { var x1 = d.source.x, y1 = d.source.y, x2 = d.target.x, y2 = d.target.y, dx = x2 - x1, dy = y2 - y1, if (x1 === x2) { dr = Math.sqrt(dx * dy + dy * dy); return "M" + d.source.x + "," + d.source.y + "A" + dr + "," + dr + " 0 0,1 " + d.target.x + "," + d.target.y; } }); But seems some on left and some on right. Please help me out of this.
tagged with: http://stackoverflow.com/tag/svg
upvote count: 3
tagged with: d3.js
has answer: http://stackoverflow.com/a/29203762
answer count: 1

http://stackoverflow.com/q/29150114
type: AnsweredQuestion
tagged with: dom
type: Question
linked to: http://stackoverflow.com/q/11764714
answer count: 2
possible better answer: http://stackoverflow.com/a/29150185
has body: I want to find elements with javascript with delay. In first step I made this and it works. function mytag() { var elements = document.getElementsByTagName('div'); for (var i=0, im=elements.length; im&gt;i; i++) { if (elements[i].className ==='hi'){ alert('found'); }} } In the second step, I made some changes to code to put delay between iteration. I followed this link but cannot make it to work . Whats wrong? function mytag() { var elements = document.getElementsByTagName('div'); for (var i=0, im=elements.length; im&gt;i; i++) { (function(i){ setTimeout(function(){ if (elements[i].className ==='hi'){ alert('found!'); } }, 3000 * i); }(i)); } }
tagged with: javascript
tagged with: jscript
score: 0
has answer: http://stackoverflow.com/a/29150201
accepted answer: http://stackoverflow.com/a/29150201
has title: javascript run function with delay inside the iteration
has answer: http://stackoverflow.com/a/29150185

http://stackoverflow.com/q/29133140
tagged with: chai
has title: How to test a custom module running node-fluent-ffmpeg (an async module)?
has body: How do I test a custom module which is simply running a node-fluent-ffmpeg command with Mocha&amp;Chai? // segment_splicer.js var config = require('./../config'); var utilities = require('./../utilities'); var ffmpeg = require('fluent-ffmpeg'); module.exports = { splice: function(raw_ad_time, crop) { if (!raw_ad_time || !crop) throw new Error("!!!!!!!!!! Missing argument"); console.log("@@@@@ LAST SEGMENT IS BEING SPLITTED."); var segment_time = utilities.ten_seconds(raw_ad_time); var last_segment_path = config.akamai_user_base + 'segment' + (segment_time + 1) + "_" + config.default_bitrate + "_av-p.ts?sd=10&amp;rebase=on"; var command = ffmpeg(last_segment_path) .on('start', function(commandLine) { console.log('@@@@@ COMMAND: ' + commandLine); }) .seekInput('0.000') .outputOptions(['-c copy', '-map_metadata 0:s']) .duration(crop) .on('error', function(err, stdout, stderr) { throw new Error('@@@@@ VIDEO COULD NOT BE PROCESSED: ' + err.message); console.log('@@@@@ VIDEO COULD NOT BE PROCESSED: ' + err.message); }) .output('public/' + 'segment' + (segment_time + 1) + "_" + config.default_bitrate + "_av-p.ts").run(); } } Here is what I tried: // test/segment_splicer.js var expect = require('chai').expect; var segment_splicer = require('../lib/segment_splicer'); describe('Segment Splicer', function() { it('should work', function(done) { expect(segment_splicer.splice(1111111, 20)).to.throw(Error); done(); }); }); I get this: 1) Segment Splicer should work: AssertionError: expected undefined to be a function Because I receive undefined from segment_splicer.spice method. Thank you!
type: Question
tagged with: testing
tagged with: javascript
tagged with: mocha.js
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29133292
tagged with: node.js

http://stackoverflow.com/q/29162847
has answer: http://stackoverflow.com/a/29162952
tagged with: date
possible better answer: http://stackoverflow.com/a/29162952
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29162929
type: Question
has comment: http://stackoverflow.com/comment/46544954
has title: why date operations are strange in javascript
has body: I am new to Java Script and I am developing a web page and the web page would have interactive contents depending on the date selected via datepicker. I am using var date = new Date(), and the date creation is working fine when i use my machine in India. But when when i use the same new Date() in American time zone VMs via my Indian machine, the date returned is one day previous than entered in the date picker. So, i suppose locales and timezones are coming into picture. Is there any way that i could get the same date as entered in the date picker without the consideration of locales and timezones?
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29162929

http://stackoverflow.com/comment/46562479
has text: Thanks for your answer, i've updated the code, you can see the handler there
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29171498

http://stackoverflow.com/comment/46620884
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29204791
has text: could you please post a fiddle.
score: 0

http://stackoverflow.com/a/29146317
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29146220
upvote count: 2
answers question: http://stackoverflow.com/q/29146220
type: AcceptedAnswer
has body: Use a filter to get the matched elements which doesn't contain the getLocation value. var getLocation = $location.$$path.replace('/',''); var isCustom = ['about', 'services', 'volunteer', 'contact', 'give', 'blog']; var matchedResult = isCustom.filter(function(value) { return value.indexOf(getLocation) &lt; 0 }); As question somewhat not clear, I assume you're trying to find if a string is present in the array item. var getLocation =$location.$$path.replace('/', ''); // assuming it to be admin var isCustom = ["/adminabout","adminservices","about","services"] // matches if the string is present in any part of the array item var matchedResult = isCustom.filter(function(value) { return value.indexOf(getLocation) !== -1 }); console.log(matchedResult); //["/adminabout", "adminservices"]
has comment: http://stackoverflow.com/comment/46516164
has comment: http://stackoverflow.com/comment/46516575
has comment: http://stackoverflow.com/comment/46520516
has comment: http://stackoverflow.com/comment/46520192
type: Answer
has comment: http://stackoverflow.com/comment/46520232
score: 2
has comment: http://stackoverflow.com/comment/46520104

http://stackoverflow.com/q/29085874
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29086940
has title: jquery datatable gives error when rendering
tagged with: datatable
has body: I'm trying to fill JQuery Datatable with data via ajax: HTML Id Name Quantity Status Javascript $(document).ready(function () { var options = { "processing": true, "ajax": { "url": "ProductMaterials.ashx?action=get", "type": "POST", "data": { "productId": $('#product_id').val() }, "columns": [ { "data": "Id" }, { "data": "MaterialName" }, { "data": "Quantity" }, { "data": "Status" } ] }, }; table = $('#table-productMaterials').DataTable(options); }); Generic handler output: {"data": [{"Id":1,"Quantity":15.00,"Status":"1","MaterialName":"Iron","ProductName":"French onion soup"},{"Id":3,"Quantity":14.00,"Status":"1","MaterialName":"Nails","ProductName":"French onion soup"}]} error message when reloading data: DataTables warning: table id=table-productMaterials - Requested unknown parameter '0' for row 0. For more information about this error, please see http://datatables.net/tn/4 I refered to this page and read an example but can't seem to get this resolved. What I'm making wrong?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29086940
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46512926
comment on: http://stackoverflow.com/q/29145005
type: Comment
type: QuestionComment
has text: @meagar, i am using ajax, so in my view i have autofill.js.erb which is executed in respond_to autofill method in controller
score: 0

http://stackoverflow.com/a/47971870
score: 0
has body: The prototype.constructor property is set to reference the constructor function so that objects instantiated by that constructor can check which constructor function was used to create them.
type: Answer
answers question: http://stackoverflow.com/q/29116041

http://stackoverflow.com/comment/47840467
comment on: http://stackoverflow.com/a/29204207
type: Comment
has text: Yeah, that's a great script. However, it still requires a js file to be on both the contained page and the parent page (which could be problematic in some cases).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/58429720
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29199237
has text: Hello thanks for the attention but this is an old question on which I have found solution. Don't know why fiddles are broken

http://stackoverflow.com/comment/46638494
comment on: http://stackoverflow.com/q/29214476
type: Comment
has text: the JavaScript is on the name form but in a separate script. How could I structure it then?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46446486
type: QuestionComment
score: 1
has text: this question really has nothing to do with `php` or `codeigniter`
type: Comment
comment on: http://stackoverflow.com/q/29108304

http://stackoverflow.com/comment/46512410
type: AnswerComment
has text: yes it is true. you can access any element of that page from your webpart, that why i wrapped the html with a div.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29141071

http://stackoverflow.com/comment/46555371
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29150292
has text: I notice that you change the error code from 404 to 500, I am right ? if so, it changes the full picturre, now your action method PostComment is been hit on debug probally ? If yes, which line it throws the exception ?

http://stackoverflow.com/q/29195296
has title: Check login error Android-WebView Javascript
tagged with: android-webview
has comment: http://stackoverflow.com/comment/46630940
has body: How to check in Android WebView if login failed or successful? The login webpage shows following message when login fails due to incorrect username and/or password. &lt;div id="errorMsgId1427032461760" class="errorMessage"&gt; How to check this using JavaScript? (calling next activity works but it always calls next activity. So I want to run this check). EDIT: I tried by adding JavaScript Interface to webView.loadURL() but it didn't work. webView.loadUrl("javascript: if(document.body.innerHTML.toString().indexOf('Invalid') &gt; -1){\n" + " JSInterface.changeActivity() ;"); EDIT 2: How to use this? if(document.body.innerHTML.toString().indexOf("invalid") &gt; -1){ alert("invalid'"); and then call Intent if alert isn't called. (Alert can be any function). EDIT 3: I tried with onConsoleMessage, but it doesn't work. Here's code: webView.setWebChromeClient(new WebChromeClient() {@ Override public boolean onConsoleMessage(ConsoleMessage cm) { String a = cm.toString(); if (a.equalsIgnoreCase("Success")) { Toast.makeText(Login.this, "Login Successful", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(Login.this, Upload.class); Login.this.finish(); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } if (a.equalsIgnoreCase("Error")) { Toast.makeText(Login.this, "Please enter correct credentials", Toast.LENGTH_LONG).show(); } return true; } }); and in onPageFinished method as: webView.setWebViewClient(new WebViewClient() { @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void onPageFinished(WebView view, final String url) { webView.loadUrl("javascript: if (document.querySelectorAll('[type=submit]').length) {\n" + " var x = document.querySelectorAll('[type=submit]');\n" + " x[0].addEventListener(\"click\", function() {\n" + " if (document.body.innerHTML.toString().indexOf(\"Invalid\") &gt; -1) console.log(\"Error\");\n" + " else console.log(\"Success\");\n" + " });};"); return true; } }); webView.getSettings().…
score: 0
tagged with: webview
answer count: 1
has comment: http://stackoverflow.com/comment/46791657
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3298597
has answer: http://stackoverflow.com/a/29208406
linked to: http://stackoverflow.com/q/29240160
tagged with: javascript
has comment: http://stackoverflow.com/comment/46631338
type: Question
tagged with: android

http://stackoverflow.com/a/29074678
score: 0
has body: I think what you may have to do from your controller is call $ionicSlideBoxDelegate.update(); from your controller when the user changes the value of the interval.
has comment: http://stackoverflow.com/comment/46384502
type: Answer
answers question: http://stackoverflow.com/q/29074314
has comment: http://stackoverflow.com/comment/46385334
has comment: http://stackoverflow.com/comment/46385091
has comment: http://stackoverflow.com/comment/46385425

http://stackoverflow.com/q/29080295
has comment: http://stackoverflow.com/comment/46393889
score: 0
has body: I've got a jQuery script as follows: $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() &gt; 100) { $('#algemeen').css('position','fixed'); $('#algemeen').animate({ top: '0px', left: '70%', width: '10%' }, 200); } else { $('#algemeen').css('position','absolute'); $('#algemeen').animate({ top: '300px', left: '100px', width: '200px' }, 200); } }); }); As you can see, I've got this div '#algemeen' that changes its position when the page is scrolled 100px down. The problem is, it's very laggy and it often stays in its 'downscroll' position when I've scrolled up. Is there a better way to achieve my goal? Thanks in advance!
answer count: 2
tagged with: function
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29081485
type: AnsweredQuestion
tagged with: scroll
has title: Alternative for jQuery scroll function?
possible better answer: http://stackoverflow.com/a/29080576
tagged with: scrolltop
type: Question
has answer: http://stackoverflow.com/a/29080576
has answer: http://stackoverflow.com/a/29081485

http://stackoverflow.com/comment/46635705
type: AnswerComment
type: Comment
has text: Damn, you're right. I was so busy looking for the difficult answer I missed the obvious
comment on: http://stackoverflow.com/a/29213141
score: 1

http://stackoverflow.com/q/29126131
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/29126155
tagged with: addeventlistener
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has body: I'm doing something phenomenally dumb here I'm sure of it; It's been several hours and I'm beginning to lose the will to live. What's worse is I've used this before successfully in a canvas but even that example isn't helping me. html file (index.html) &lt;body style="margin: 0px;"&gt; &lt;div ID="testclick"&gt; &lt;style&gt; #testclick{ width:100px; height:100px; background-color:black; } &lt;/style&gt; &lt;/div&gt; &lt;script language="javascript" src="test.js" &gt;&lt;/script&gt; &lt;/body&gt; javascipt file (test.js) (function(){ var el = document.getElementByID("testclick"); el.addEventListener("click", sockClicked, false); function sockClicked(){ console.log("HAR"); }; })(); Error Message: Uncaught TypeError: undefined is not a function I've googled and read several occurences of this error was combined with addEventListener. Ive also read several tutorials on how to use getElementByID as well as addEventListener. But still no joy. Someone please save me from this endless turmoil. ;(
has title: unable to get document.getElementByID("testclick").addEventListener to work
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29126220
downvote count: 2
upvote count: 1
type: Question

http://stackoverflow.com/a/29068366
score: 12
answers question: http://stackoverflow.com/q/29068088
has comment: http://stackoverflow.com/comment/46372233
upvote count: 12
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/78096833
has body: Rotate the circle with a transformation? #timeline{ position:fixed; width:500px; height:500px; top:50%; left:50%; margin-top:-250px; margin-left:-250px; overflow:hidden; pointer-events: all; z-index:99999; } #bluecircle{ stroke-dasharray:1510; stroke-dashoffset:1510; -webkit-transition:all 1s ease; transition:all 1s ease; } #bluecircle:hover{ stroke-dashoffset:0; } &lt;div id="timeline"&gt; &lt;svg x="0px" y="0px" width="500px" height="500px" viewBox="0 0 500 500"&gt; &lt;circle id="greycircle" fill="none" stroke="#727272" stroke-width="2" stroke-miterlimit="10" cx="249.85" cy="248.065" r="239.024"/&gt; &lt;circle id="bluecircle" fill="none" stroke="#2C75FF" stroke-width="3" stroke-miterlimit="10" cx="249.85" cy="248.065" r="239.024" transform="rotate(-90 249.85 248.065)"/&gt; &lt;/svg&gt; Edit: Updated with CSS
type: Answer
has comment: http://stackoverflow.com/comment/61260649
accepted answer of: http://stackoverflow.com/q/29068088

state
tag name: state
tags question: http://stackoverflow.com/q/29069836
type: Tag
tags question: http://stackoverflow.com/q/29166025

http://stackoverflow.com/a/29157884
downvote count: 1
answers question: http://stackoverflow.com/q/29157830
score: 0
type: Answer
has body: If removing methods from the prototype is what you want, consider creating a new object and transferring over all of the old object's properties. If stripping out properties that are a function is what you want, loop through the object and check if the property is a function: for(key in ob) { if(typeof ob[key] === 'function') { delete ob[key]; } } Or perhaps what you hope to accomplish is the combination of them both.
upvote count: 1

http://stackoverflow.com/comment/46606121
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29196641
type: AnswerComment
has text: Could be a problem with the initTinymce() function could you execute the function initTinymce() manually in the console of the browser after the ajax call to check if there is an error shown

http://stackoverflow.com/comment/46393755
comment on: http://stackoverflow.com/q/29078708
score: 0
type: Comment
type: QuestionComment
has text: like mutation.target.textContent will give me the text within the element that has changed, but I've had trouble finding out a way to know for example, the id or class of the element that has changed or if the element has no id or class, a way to pinpoint exactly where that element that changed is, within the document

http://stackoverflow.com/comment/46453554
has text: @guest271314 sorry I was giving an example id and forgot to change it round, my original hasn't got that error.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29112167

http://stackoverflow.com/comment/46671911
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29209667
has text: @YepMe I'm sure you can do that manually using the call history available (through `calls`), but I don't know of a built-in way.

http://stackoverflow.com/comment/46579059
score: 1
has text: @Madhu IE8 used their own spec back then. Today they return the standardized button id. Question remains, why are you checking this?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29181069

http://stackoverflow.com/comment/46488967
comment on: http://stackoverflow.com/a/29131084
type: Comment
has text: @NitaiJ.Perez: Yeah, exactly. I'm afraid the main answer is "you can't do that" (change just the guts of a function).
score: 0
type: AnswerComment

http://stackoverflow.com/q/29074347
tagged with: chromium
tagged with: google-chrome
has body: I am experimentation with V8 engine, i am not a C programmer and it is very difficult for me .But i need this thing for myself I change a function RUNTIME_FUNCTION(Runtime_Typeof); (runtime-object.cc) And now if to create proxy in JS: prx = Proxy.create({ get:function(k,v){ if( v == '%type_of%'){ return 'string' } ....... } }) typeof prx -&gt; "string" Ok, i want this effect BUT if try to make compare: typeof prx == 'string' -&gt; false =( typeof prx == 'object' -&gt; true (x = typeof prx) == 'string' -&gt; true After many hours i found this: In V8 (full-codegen-x64.cc) exist this func void FullCodeGenerator::EmitLiteralCompareTypeof It is look like an optimizator for expression typeof prx == "string" || "number" || "object" and etc.. if (String::Equals(check, factory-&gt;number_string())) { ... } else if (String::Equals(check, factory-&gt;string_string())) { and etc... it do not call Runtime_Typeof and typeof prx -&gt; "string" typeof prx == 'string' -&gt; false =( How can i check if typeof prx it is proxy, then v8 must to call Runtime_Typeof.. if typeof prx -&gt; string, then typeof == 'string' must be true! Help me please
linked to: http://stackoverflow.com/q/29102874
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29075349
tagged with: c++
type: UnansweredQuestion
has title: Typeof in V8 engine
tagged with: v8

http://stackoverflow.com/comment/46526861
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29152665
has text: I maybe missing it, but I don't see a slider on that theme page.

http://stackoverflow.com/q/29097858
accepted answer: http://stackoverflow.com/a/29098047
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29098047
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: iframe
type: Question
has title: Javascript/jQuery - replace a video iframe with a placeholder image
tagged with: javascript
score: 0
has body: I've had one question involving this piece of code answered by the very helpful people here, but now I have another one which is slightly different. I have a placeholder image which sits in a carousel slide, which when clicked on gets replaced by a youtube video using the default youtube iframe embed. What I would like to do is, after a user has clicked on the image and has played the video, when they click away from the carousel slide the video is embedded in (for example, by clicking on a carousel arrow or pagination dot) it resets it back to how it was before the video was displayed. I hope that makes sense. Basically, I need help reverse engineering this code so that the video gets replaced again by it's placeholder image on a click of another element/div. Here is the HTML: &lt;div class="youtube_video"&gt; &lt;img src="img/video_poster_carousel.jpg" width="986" height="308"&gt; &lt;!-- &lt;iframe width="986" height="555" src="https://www.youtube.com/embed/Wt_Ruy_ejPY?enablejsapi=1&amp;list=PL027E2B6D9900A88F&amp;showinfo=0&amp;controls=1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt; --&gt; &lt;/div&gt; And the CSS: /* video */ .youtube_video { position: relative; padding-bottom: 31.65%; height:0; } .youtube_video img { position: absolute; display: block; top: 0; left: 0; /*width: 100%; height: 100%;*/ z-index: 20; cursor: pointer; } .youtube_video:after { content: ""; position: absolute; display: block; background: url(play-button.png) no-repeat 0 0; top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; } .youtube_video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* image poster clicked, player class added using js */ .youtube_video.player img { display: none; } .youtube_video.player:after { display: none; } And the Javascript: $(function() { var videos = $(".youtube_video"); videos.on("click", function(){ var elm = $(this), conts = elm.contents(), le = conts.length, ifr = null; for(var i = 0; i&lt;le…

http://stackoverflow.com/q/29184977
answer count: 3
accepted answer: http://stackoverflow.com/a/29185056
has answer: http://stackoverflow.com/a/29185016
has comment: http://stackoverflow.com/comment/46585569
tagged with: angularjs
has title: Angular method returning unrendered code?
possible better answer: http://stackoverflow.com/a/29185004
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29185004
score: 0
has answer: http://stackoverflow.com/a/29185056
type: Question
has comment: http://stackoverflow.com/comment/46585533
tagged with: javascript
has body: I have some angular partials that seem to render properly in the DOM: &lt;button ng-click="doThisThing('{{ item.id }}')"&gt; Renders into this: &lt;button ng-click="doThisThing('1234')"&gt; And my method in my controller: $scope.doThisThing = function(id) { console.log(id) } Outputs this: {{ item.id }} Why isn't my function receiving the proper id?

http://stackoverflow.com/comment/46637489
has text: Why don't you show the code in question where calls are made?
score: 0
comment on: http://stackoverflow.com/q/29213488
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29117867
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46468583
score: 1
has comment: http://stackoverflow.com/comment/46469267
tagged with: openlayers-3
type: Question
has title: unbind doesn't work
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: openlayers
has answer: http://stackoverflow.com/a/29122004
accepted answer: http://stackoverflow.com/a/29122004
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 1
has body: Why i'm unable to unbind event in openlayers 3? I'm trying to draw circle interactivily. For unbind event I'm using map.un('click',function(){ ... }); M.on('click',function(e){ if(!$pec.hasClass('active')) { deactive(true); return false;} if( !isDrawing ){ isDrawing = true; var center = e.coordinate; var circle = new ol.geom.Circle([center[0],center[1]],10000,'XY'); var feature = new ol.Feature(circle); var vectorSource = new ol.source.Vector(); vectorSource.addFeature(feature); c = new ol.layer.Vector({ source: vectorSource }); c.circle=circle; M.addLayer(c); $('body').css('cursor','crosshair'); } else { isDrawing = false; deactive(false); $('body').css('cursor','default'); finishDraw('circle',c); } }); M.on('pointermove',function(e){ if(isDrawing){ c.circle.setRadius(distanceTo(c.circle.getCenter(),e.coordinate)); } }); function deactive(all){ M.un('click',function(){ log('deactive click');}); M.un('pointermove',function(){}); if(c &amp;&amp; all) M.removeLayer(c); isDrawing = false; } How to solve it ? I have more unbinds like this and all wont work -.-

http://stackoverflow.com/a/29101269
upvote count: 3
has comment: http://stackoverflow.com/comment/46432840
downvote count: 1
has comment: http://stackoverflow.com/comment/46432901
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29101238
has body: You do not define a string using string, you define everything using var: var myString = "I am a string"; var myNumber = 1000; Java and JavaScript do have their differences!

http://stackoverflow.com/a/29179340
has body: The solution I found was to add position: relative in the css for .volleyCommentStatus, .volleyReplyStatus. It seems it was inheriting position: static which I assume was causing the retina screen problem.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29114436
answers question: http://stackoverflow.com/q/29114436
type: Answer

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/29148308
tags question: http://stackoverflow.com/q/29172783
tags question: http://stackoverflow.com/q/29192278
tags question: http://stackoverflow.com/q/29076748
tags question: http://stackoverflow.com/q/29113962
tags question: http://stackoverflow.com/q/29155579
tags question: http://stackoverflow.com/q/29204983
tags question: http://stackoverflow.com/q/29141472
tags question: http://stackoverflow.com/q/29169649
tags question: http://stackoverflow.com/q/29155084
tags question: http://stackoverflow.com/q/29124435
tags question: http://stackoverflow.com/q/29147752
tags question: http://stackoverflow.com/q/29070836
tags question: http://stackoverflow.com/q/29127370
tags question: http://stackoverflow.com/q/29130542
tags question: http://stackoverflow.com/q/29079686
tags question: http://stackoverflow.com/q/29088494
tags question: http://stackoverflow.com/q/29109039
tags question: http://stackoverflow.com/q/29176949
tags question: http://stackoverflow.com/q/29150287
tags question: http://stackoverflow.com/q/29106261
tags question: http://stackoverflow.com/q/29190180
tags question: http://stackoverflow.com/q/29207527
tags question: http://stackoverflow.com/q/29155228
tags question: http://stackoverflow.com/q/29161065
tags question: http://stackoverflow.com/q/29182609
tags question: http://stackoverflow.com/q/29079856
tags question: http://stackoverflow.com/q/29155195
tags question: http://stackoverflow.com/q/29113036
tags question: http://stackoverflow.com/q/29156730
tags question: http://stackoverflow.com/q/29062557
tags question: http://stackoverflow.com/q/29165611
tags question: http://stackoverflow.com/q/29153858
tags question: http://stackoverflow.com/q/29093107
tags question: http://stackoverflow.com/q/29168330
tags question: http://stackoverflow.com/q/29076571
tags question: http://stackoverflow.com/q/29104260
tags question: http://stackoverflow.com/q/29081454
tags question: http://stackoverflow.com/q/29087536
tags question: http://stackoverflow.com/q/29098827
tags question: http://stackoverflow.com/q/29120273
tags question: http://stackoverflow.com/q/29089189
tags question: http://stackoverflow.com/q/29063666
tags question: http://stackoverflow.com/q/29105765
tags question: http://stackoverflow.com/q/29071036
tags question: http://stackoverflow.com/q/29076958
tags question: http://stackoverflow.com/q/29111833
tags question: http://stackoverflow.com/q/29102026
tags question: http://stackoverflow.com/q/29190320
tags question: http://stackoverflow.com/q/29095426
tags question: http://stackoverflow.com/q/29094418
tags question: http://stackoverflow.com/q/29192121
tags question: http://stackoverflow.com/q/29077413
tags question: http://stackoverflow.com/q/29090255
tags question: http://stackoverflow.com/q/29084275
tags question: http://stackoverflow.com/q/29207641
tags question: http://stackoverflow.com/q/29150088
tags question: http://stackoverflow.com/q/29216497
tags question: http://stackoverflow.com/q/29211068
tags question: http://stackoverflow.com/q/29192837
tags question: http://stackoverflow.com/q/29163608
tags question: http://stackoverflow.com/q/29070315
tags question: http://stackoverflow.com/q/29136944
tags question: http://stackoverflow.com/q/29137123
tags question: http://stackoverflow.com/q/29204126
tags question: http://stackoverflow.com/q/29114847
tags question: http://stackoverflow.com/q/29207171
tags question: http://stackoverflow.com/q/29145454
tags question: http://stackoverflow.com/q/29158904
tags question: http://stackoverflow.com/q/29196149
tags question: http://stackoverflow.com/q/29099886
tags question: http://stackoverflow.com/q/29179583
tags question: http://stackoverflow.com/q/29133392
type: Tag
tags question: http://stackoverflow.com/q/29077598
tags question: http://stackoverflow.com/q/29195270
tags question: http://stackoverflow.com/q/29150358
tags question: http://stackoverflow.com/q/29120215
tags question: http://stackoverflow.com/q/29215088
tags question: http://stackoverflow.com/q/29204267

http://stackoverflow.com/comment/46388485
type: AnswerComment
type: Comment
has text: Hi, sorry, there was a little bug in my code, here the link to the working fiddle http://jsfiddle.net/fmszrtez/
comment on: http://stackoverflow.com/a/29072622
score: 0

http://stackoverflow.com/comment/54603422
score: 0
comment on: http://stackoverflow.com/q/29119401
has text: did you ever find a solution for this? I'm in the same boat
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46543950
has text: Have you looked into ajax?
score: 1
comment on: http://stackoverflow.com/q/29162308
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29145724
tagged with: servlets
has comment: http://stackoverflow.com/comment/46540959
has comment: http://stackoverflow.com/comment/46514081
answer count: 0
type: Question
has body: My_javascript_page window.onload = loadResTimeData; function loadResTimData() { var e = window.performance.getEntriesByType("resource"); if (window.console) { console.log("Resource Timming"); var perf_data = ""; var name, load, connection, request, fetch; for (var i in e) { if (e[i].name == "document") { continue; } name = e[i].name.replace(/^.*\/|\.$/g, '') + ":"; load = e[i].duration; request = e[i].responseEnd - e[i].requestStart; fetch = e[i].responseEnd - e[i].fetchStart; var s1={"Name": name, "CONNECTION":connection, "REQUEST":request, "LOAD":load, "FETCH":fetch}; var String1=JSON.stringify(s1); console.log("Resource:" + name); console.log("User Time:" + load); console.log("Connection:" + connection); console.log("Request Time:" + request); console.log("Fetch Time:" + fetch); $.ajax({ type:"POST", url:"Final", //Final is my servlet page data:String1, datatype: "json" }); } } } } This code calculates different response times when a web page is loaded and sends the data back to the servlet page. This data i am printing on console(Console.log values), I want to send it to my servlet page in json format. I tried doing it using jquery ajax, but the value didnot get passed to my servlet page. Now I came accross various links where many people gave example on how to do it. But problem is that all examples will be trigerred by clicking on the button. For that i need a form or may be some other thing But in my application I want the data to be passed to my servlet page once the window.onload function is trigerred; where I dont need a form or textfield. Also please let me know what exactly do i need to call at my server end(request.getparameter(???)) I am sharing the links i referred. http://www.mysamplecode.com/2012/04/jquery-ajax-request-response-java.html http://www.javacodegeeks.com/2014/09/jquery-ajax-servlets-integration-building-a-complete-application.html JSP_page JSP Page onclick=' window.onload'; Also I had people telling me to use cookies. I created cookies b…
score: 0
tagged with: java
has comment: http://stackoverflow.com/comment/46540972
has title: send values from javascript page to servlet page at run-time
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/46441430
score: 0
type: AnswerComment
has text: @Heidi that means you have to prepare all the divs beforehand (or at least some mechanism to map the CSS with each one). I guess you could loop through all the prepared divs instead.
type: Comment
comment on: http://stackoverflow.com/a/29105690

http://stackoverflow.com/comment/46409648
comment on: http://stackoverflow.com/a/29086651
type: Comment
score: 0
has text: hey there - you mispelled Session... also is it worth doing `return Session.get(key) || null;` ? ie. will there be an exception if the var doesn't exist?
type: AnswerComment

http://stackoverflow.com/comment/46511178
type: Comment
comment on: http://stackoverflow.com/q/29120562
type: QuestionComment
has text: Sir i have tried the same like you explained but the same error is there and my second function in my code it works well which is called on onClick event
score: 0

http://stackoverflow.com/q/29093380
score: -3
tagged with: php
has body: if(isset($_SESSION['jobSess'])) { $jobSlug=$_SESSION['jobSess']; header('Location:http://cablingjobs.com/jobs/view/'.$jobSlug.'/'); exit; } I put above code in my staging site of wpengine.Its perfectly working. But when when using same on live site it doesn't redirect. i.e. header() is not working properly. May be the issue is cache cause when i see source of site. each link having some content. for example: src='http://3bceom1dyooq2orklp30o45s.wpengine.netdna-cdn.com/wp-includes/js/thickbox/thickbox.js?ver=3.1-20121105' what is this 3bceom1dyooq2orklp30o45s in above link ?
downvote count: 3
tagged with: wordpress
type: Question
has title: My Code is not working on Live Server
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29093572
favorite count: 0
has comment: http://stackoverflow.com/comment/46418207
type: UnansweredQuestion

http://stackoverflow.com/q/29121557
has comment: http://stackoverflow.com/comment/46471221
tagged with: android
has comment: http://stackoverflow.com/comment/46509285
answer count: 0
type: UnansweredQuestion
score: 0
has body: I have a created an expandablelistview in an android fitness app, when an exercises is pressed on, an image of the exercise and description in displayed, however I would like to add a button underneath each image. How can this be done? .java code package com.example.myfitnessbuddy; import java.util.ArrayList; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ExpandableListView; public class ChestActivity extends ActionBarActivity { private ExpandListAdapter ExpAdapter; private ArrayList&lt;Group&gt; ExpListItems; private ExpandableListView ExpandList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chest); ExpandList = (ExpandableListView) findViewById(R.id.expList); ExpListItems = SetStandardGroups(); ExpAdapter = new ExpandListAdapter(ChestActivity.this, ExpListItems); ExpandList.setAdapter(ExpAdapter); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.chest, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } public ArrayList&lt;Group&gt; SetStandardGroups() { String[] input_names = {"Bench Press (Bands)","Bench Press (Barbell)","Bench Press Close Grip (Barbell)" ,"Bench Press (Dumbbell)","Bench Press (Machine)","Bent Over Crossover" ,"Decline Chest Press (Machine)","Fly (Cable)","Fly (Dumbbell)" ,"Incline Chest Press (Dumbbell)","Pec Deck","P…
tagged with: expandablelistview
tagged with: eclipse
type: Question
has title: Add button to an expandablelistview
tagged with: button
tagged with: javascript

http://stackoverflow.com/comment/46459137
comment on: http://stackoverflow.com/q/29115417
score: 0
type: Comment
type: QuestionComment
has text: I don't want to clutter the codebase with underscores under every other type token. In the above code, you have to write `var a: Car = new Car_()`which is pretty terrible. Ideally I'd be able to write something like `declare var Car = class Car {}`.

http://stackoverflow.com/q/29213678
type: Question
tagged with: capybara
tagged with: javascript
tagged with: minitest
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/30949744
has title: Minitest/Capybara: Green test turns red when switching to JS driver
has body: I have a green test: test "study page &amp; question screen" do assert_title "Study | Word Up" assert page.has_selector?('h3', text: "STUDY"), "Panel title missing or wrong" assert page.has_selector?("div.progress-bar"), "Progress bar missing or with wrong class" end 16:24:23 - INFO - Running: test/integration/study/study_test.rb Started StudyTest test_answer_screen PASS (0.98s) test_study_page_&amp;_question_screen PASS (0.27s) Finished in 1.26314s 2 tests, 2 assertions, 0 failures, 0 errors, 0 skips As I have a lot of (on-page) Javascript code on the same page that I also want to test. Therefore I tell Capybara to use a driver capable of Javascript. For example webkit, but I've tried poltergeist and selenium as well. test "study page &amp; question screen" do Capybara.javascript_driver = :webkit Capybara.current_driver = Capybara.javascript_driver assert_title "Study | Word Up" assert page.has_selector?('h3', text: "STUDY"), "Panel title missing or wrong" assert page.has_selector?("div.progress-bar"), "Progress bar missing or with wrong class" end Suddenly the test is red. Although I haven't done anything else but changing the driver. 16:28:21 - INFO - Running: test/integration/study/study_test.rb Started StudyTest test_answer_screen PASS (1.12s) test_study_page_&amp;_question_screen ERROR (5.11s) Capybara::ExpectationNotMet: Capybara::ExpectationNotMet: expected "" to include "Study | Word Up" How is that possible?
type: UnansweredQuestion
tagged with: ruby-on-rails

http://stackoverflow.com/comment/46378613
comment on: http://stackoverflow.com/q/29072182
type: Comment
type: QuestionComment
has text: have you try **foreach( $arrayValue as $key => $value)**
score: 0

http://stackoverflow.com/q/29168433
has title: How to perform a “variable” ES6 import?
has answer: http://stackoverflow.com/a/73347610
has answer: http://stackoverflow.com/a/54358230
has comment: http://stackoverflow.com/comment/46555375
has body: Is it possible to import something into a module providing a variable name while using ES6 import? I.e. I want to import some module at a runtime depending on values provided in a config: import something from './utils/' + variableName; Note that I’m using Node.js, but answers must take compatibility with ECMAScript modules into consideration.
type: Question
has answer: http://stackoverflow.com/a/66567728
has answer: http://stackoverflow.com/a/61464699
has answer: http://stackoverflow.com/a/54028788
upvote count: 156
tagged with: javascript
tagged with: es6-modules
score: 155
possible better answer: http://stackoverflow.com/a/48133721
has answer: http://stackoverflow.com/a/29168531
has answer: http://stackoverflow.com/a/48133721
has answer: http://stackoverflow.com/a/36530495
favorite count: 0
answer count: 12
has answer: http://stackoverflow.com/a/45053491
has answer: http://stackoverflow.com/a/29168567
has answer: http://stackoverflow.com/a/40725695
accepted answer: http://stackoverflow.com/a/29168531
downvote count: 1
linked to: http://stackoverflow.com/q/30340005
has answer: http://stackoverflow.com/a/39617937
type: AnsweredQuestion

http://stackoverflow.com/a/29145638
score: 5
answers question: http://stackoverflow.com/q/29142362
upvote count: 5
type: AcceptedAnswer
downvote count: 0
has body: You need to use Capybara's assert_selector: assert_selector "title", text: "Study | Word Up" If you are trying to assert the document's title from the head element and not the body, then you need to use assert_title: assert_title "Study | Word Up"
type: Answer
has comment: http://stackoverflow.com/comment/116614593
has comment: http://stackoverflow.com/comment/46515760
accepted answer of: http://stackoverflow.com/q/29142362

http://stackoverflow.com/q/29178649
tagged with: javascript
favorite count: 0
type: Question
has body: I'm having real trouble testing the behaviour of my CSS :hover pseudoclass. I've tried the following approach, as well as wrapping the test.assertEquals in an event listener as casper.on('mouse.move', function(){test.assertEquals(...);}) to no avail. I've also tried multiple combinations of casper.mouse.move and casper.mouseEvent('mouseover', rightArrowId); with no result either. The relevant part of my tests is the following. I'm just testing a webpage running on localhost and all my other tests run just fine. ... var rightArrowId = "#right"; casper.test.begin("On hover, navigation widgets change their opacity", function(test) { casper.then(function() { casper.capture("aboutToMove.png"); casper.mouse.move(rightArrowId); test.assertEquals(customAsserts.isOpaque(rightArrowId), true, "On hover, the 'right' widget becomes opaque"); }); casper.then(function() { casper.capture("afterMove.png"); }); casper.run(function() { test.done(); }); ... var customAsserts = { isOpaque: function(selector) { return casper.evaluate(function(selector) { return (document.querySelector(selector).style.opacity === "1"); }, selector); } }; In addition, the screenshots show that the mouse is actually moving, since I can see the hover effect in the second picture but not in the first one. The relevant CSS, which gets loaded when the page is loaded, is this: #right { opacity: 0.35; } #right:hover { opacity: 1; }
tagged with: css
tagged with: casperjs
has title: Testing CSS ':hover' pseudo-class
accepted answer: http://stackoverflow.com/a/29180893
upvote count: 2
answer count: 1
tagged with: hover
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29180893
downvote count: 0

http://stackoverflow.com/q/29141541
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46507180
accepted answer: http://stackoverflow.com/a/29142569
upvote count: 1
has body: I am working on MVC 4.0 I am creating a login page , I have used a Loading GIF to display after clicking of login button and before loading of actual page. My problem is even the login fields are empty and I click Login button, the animation starts showing. Loading animation should only be seen on successful login. Button: Javascript= Please Help !!
downvote count: 1
type: AnsweredQuestion
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/46507988
has comment: http://stackoverflow.com/comment/46506636
type: Question
has comment: http://stackoverflow.com/comment/46507525
has answer: http://stackoverflow.com/a/29142569
has comment: http://stackoverflow.com/comment/46507751
has comment: http://stackoverflow.com/comment/46506858
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has title: no loading div on click if login fields are empty?

http://stackoverflow.com/comment/46470827
type: AnswerComment
has text: I was missing this point **passing a variable to a function will result in trying to read the value of the variable and hence throw an error if it does not exist**
comment on: http://stackoverflow.com/a/29119029
type: Comment
score: 0

http://stackoverflow.com/a/29111891
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46453061
has comment: http://stackoverflow.com/comment/46453418
has comment: http://stackoverflow.com/comment/46453355
has comment: http://stackoverflow.com/comment/46453110
has comment: http://stackoverflow.com/comment/46454239
upvote count: 1
has comment: http://stackoverflow.com/comment/46453665
has body: This function will convert RGBA colors to RGB: function RGBAtoRGB(r, g, b, a, backgroundR,backgroundG,backgroundB){ var r3 = Math.round(((1 - a) * backgroundR) + (a * r)) var g3 = Math.round(((1 - a) * backgroundG) + (a * g)) var b3 = Math.round(((1 - a) * backgroundB) + (a * b)) return "rgb("+r3+","+g3+","+b3+")"; } Convert the background RGBA to RGB and fill the background with RGB. Convert the foreground RGBA to RGB and fill the foreground text with RGB.
has comment: http://stackoverflow.com/comment/46454291
answers question: http://stackoverflow.com/q/29108950
type: Answer
has comment: http://stackoverflow.com/comment/46453868
has comment: http://stackoverflow.com/comment/46453498
has comment: http://stackoverflow.com/comment/46454487

http://stackoverflow.com/q/29113962
has answer: http://stackoverflow.com/a/29114091
has body: Ok so im in a situation with Angularjs/Javascript. I have a list of items from json and they all have sub categories. So what i need to happen is when my list is shown, if the user chooses this item in that list, then everything in the sub category that is related will show. Example Group [ { Item 1: { sub 30, }, Item 2: { sub 53, }, Item 7: { sub 21, }, Item 2: { sub 97, }, }] As you can see, there are two "Item 2"'s. If the user chooses Item 2 then sub 53, and 97 will show. I wouldn't know how to execute the condition statement or if there is any way to do this the 'Angular way'
has comment: http://stackoverflow.com/comment/46456797
has title: Javascript complicated if statement
has comment: http://stackoverflow.com/comment/46456671
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46456659
has answer: http://stackoverflow.com/a/29114044
has answer: http://stackoverflow.com/a/29114293
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46456765
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
possible better answer: http://stackoverflow.com/a/29114044
downvote count: 1
type: Question
tagged with: conditional-statements
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29114293
score: 0
answer count: 3

http://stackoverflow.com/q/29153034
has body: My element updates its options using the onclick() listener when clicked. The problem is the listener is firing when an option is clicked as well, so the user is unable to select anything in the updated list. groupSelect.onclick = function() { PopulateList(); } I'd like to run my function only when the select element is clicked(when the menu has not dropped down yet) but not when a specific option is clicked. How can I do so? I'm writing the JS part using NodeJS.
tagged with: javascript
score: 0
answer count: 1
tagged with: listener
has title: Fire onclick on element but not on
linked to: http://stackoverflow.com/q/6207929
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has comment: http://stackoverflow.com/comment/46527513
tagged with: node.js
has answer: http://stackoverflow.com/a/29153125
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/46561281
comment on: http://stackoverflow.com/q/29171563
type: Comment
has text: Have you tried this : http://stackoverflow.com/questions/25830615/jquery-drag-and-drop-not-working-in-firefox-works-fine-in-chrome-and-safari
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46590467
comment on: http://stackoverflow.com/q/29186951
has text: Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29211683
upvote count: 1
tagged with: javascript
has body: Is there a preference between using d3.selectAll() and svg.selectAll() when var svg = d3.select("#someChart") .append("svg") .attr("width", w) .attr("height", h); when dealing with(creating, removing) elements in the svg tag?
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has answer: http://stackoverflow.com/a/29215921
accepted answer: http://stackoverflow.com/a/29215921
has title: d3 vs. svg When Dealing with Element
has comment: http://stackoverflow.com/comment/46633024
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/46482623
comment on: http://stackoverflow.com/a/29126910
type: AnswerComment
score: 1
type: Comment
has text: @onum Do you really want to quit your entire node application if a user cancels the request?

http://stackoverflow.com/a/29153334
has comment: http://stackoverflow.com/comment/46528666
has body: Take a look at the demo included with raty You can see here how they are declaring the path to the images: $('#starHalf').raty({ half : true, path : null, starHalf : 'demo/images/star-half-mono.png', starOff : '../lib/images/star-off.png', starOn : '../lib/images/star-on.png' }); https://github.com/wbotelhos/raty/blob/master/demo/index.html#L3702 If you already are using gulp to copy the images to your /images/ folder you can set the path to /images/ or not alter the path and set the option for the images directly like the demo does above.
type: Answer
has comment: http://stackoverflow.com/comment/46529686
score: 1
has comment: http://stackoverflow.com/comment/46529149
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29152536
downvote count: 0
has comment: http://stackoverflow.com/comment/46529646
has comment: http://stackoverflow.com/comment/46528357
answers question: http://stackoverflow.com/q/29152536
type: AcceptedAnswer

http://stackoverflow.com/q/29189896
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29190059
has body: I created a little jQuery plugin. The purpose is to.. General a jQueryUI autocomplete If "Create New Account" is then clicked, a dialog is generated. User enters something in the field and clicks "save" and a couple of inputs are populated. It works mostly, but upon clicking "save", the original input is focused. I've tried about everything to blur the input, but have had no success, and would appreciate any advice. How can I blur the input upon saving the dialog? Thank you http://jsbin.com/daxaju/1/ Testing
downvote count: 0
answer count: 1
favorite count: 0
tagged with: jquery-ui-dialog
accepted answer: http://stackoverflow.com/a/29190059
has title: Preventing focus on input when using jQuery Dialog
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
tagged with: jquery-ui

http://stackoverflow.com/q/29157675
linked to: http://stackoverflow.com/q/9304342
has comment: http://stackoverflow.com/comment/46536026
has comment: http://stackoverflow.com/comment/46535985
has answer: http://stackoverflow.com/a/29157746
has comment: http://stackoverflow.com/comment/46535903
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29157744
has comment: http://stackoverflow.com/comment/46535888
has comment: http://stackoverflow.com/comment/46536057
possible better answer: http://stackoverflow.com/a/29157746
type: Question
has comment: http://stackoverflow.com/comment/46535986
tagged with: javascript
has body: I have a javascript file that is pulling in data - all well and good. However - I'd like to add a href class to the data that is outputted via AJAX. var craeteLink = function(cellValue, text) { return jQuery('&lt;a/&gt;', { href: cellValue, text: text, target: "_blank", rel: "nofollow" })[0].outerHTML; The above is the snippet of code that I believe makes the JS do its' magic with creating links but does anyone know the code to get the class to work? I tried class: but that didnt work.... Thanks!
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29157744
has title: Inserting href class to JS file (using createLink) Any ideas?

http://stackoverflow.com/comment/46361588
comment on: http://stackoverflow.com/a/29062735
has text: right, I have realized it right before you commented and changed it
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29178139
answers question: http://stackoverflow.com/q/29178109
type: Answer
score: 2
downvote count: 0
has body: in Jquery here's how to call an element; instead of document.getElementById('addfield0') just use $('#addfield0') example when getting the value: $('#addfield0').val() note: make sure you reference your jquery Downlaod jquery here
upvote count: 2

http://stackoverflow.com/comment/46580146
type: AnswerComment
type: Comment
has text: See my edits. You could nearly pass any content as children of the LI.
comment on: http://stackoverflow.com/a/29181667
score: 0

http://stackoverflow.com/q/29176293
has answer: http://stackoverflow.com/a/29176497
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46571845
type: Question
accepted answer: http://stackoverflow.com/a/29176497
has title: I want to get an attribute from the textarea that uses the onkeypress event
tagged with: javascript
has body: I have the following code: &lt;div&gt; &lt;form name="comentario" id="&lt;?php echo $id?&gt;" action="funcion_enviar_comentario.php" method="post"&gt; &lt;input hidden="hidden" type="text" id="inputid" name="inputid" value="&lt;?php echo $id?&gt;"&gt; &lt;textarea class=estilotextarea1 id="comentario&lt;?php echo $id?&gt;" onkeypress="process1(event,this)" name="&lt;?php echo $id?&gt;" placeholder="Introduce tu comentario aquí..."&gt;&lt;/textarea&gt; &lt;script&gt; function process1(e) { //var ide= document.getElementById("comentario &lt;?php echo $id?&gt;").name; //var submit= document.getElementById("enviado&lt;?php echo $id?&gt;"). var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { $('form#comentario&lt;?php echo $id?&gt;').submit(); } } &lt;/script&gt; &lt;/form&gt; &lt;/div&gt; I want the function process1 to take the attribute name from the textarea that it is triggering the event(this code is inside a PHP while query) to store it in a variable so I can use that variable to submit the form which id matches the variable. Thanks in advance.
score: 0
answer count: 1

http://stackoverflow.com/comment/46424202
type: Comment
comment on: http://stackoverflow.com/a/29096412
has text: Weird, it works here, maybe because im using the picture element from html5
score: 0
type: AnswerComment

http://stackoverflow.com/a/29127770
has body: When calling tinymce.get you need to pass the tinymce editor id as paramter. That editor id equaly the source id of the editor element - but if there is none 'content' will be used by default. So all you need to do is to call tinymce.get('content').getContent(); In case this does not work you will need to find out what editor id(s) your editor(s) has/have using the following (browser console suffices): for (x in tinymce.editors) { console.log('Editor id:', tinymce.editors[x].id); } Now try the first piece of code and use the proper editor id(s).
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29106141
has comment: http://stackoverflow.com/comment/46606279
accepted answer of: http://stackoverflow.com/q/29106141

http://stackoverflow.com/a/29074714
upvote count: 1
downvote count: 1
has body: As @ketan wrote, The ID of an element should be unique. HTML works with it being non-unique, but it's a bad practice. You should consider using jquery in your javascript, then you can select all the elements with css style selectors, like $(".navigation"), and change them all together. For example, you can easily change your code to the one line: $(".navigation").hide() which will hide all elements with the navigation class.
answers question: http://stackoverflow.com/q/29074543
score: 0
type: Answer

http://stackoverflow.com/q/29216169
favorite count: 0
has comment: http://stackoverflow.com/comment/46641944
has comment: http://stackoverflow.com/comment/46641722
has comment: http://stackoverflow.com/comment/46641750
has comment: http://stackoverflow.com/comment/46642022
has title: In Vanilla JS - Change a variable once a user finishes typing
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29216376
upvote count: 1
has comment: http://stackoverflow.com/comment/46642111
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29216376
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: Without using jQuery - I am trying to simply change a var based on a input's value - when the user finishes typing then update the div value. Is there a way to do it without writing a function to fire onchange? Something like if a change happen change var. &lt;div&gt; &lt;input type="text" maxlength="12" id="inNum" /&gt; &lt;/div&gt; &lt;div id="rooms"&gt;&lt;/div&gt; var disNum = document.getElementById('inNum').onchange; document.getElementById('rooms').innerHTML = disNum.value;
has comment: http://stackoverflow.com/comment/46641740

http://stackoverflow.com/comment/46518731
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29114990
type: Comment
has text: Hi, Julio How has it been

http://stackoverflow.com/q/29093164
possible better answer: http://stackoverflow.com/a/29093335
has answer: http://stackoverflow.com/a/29093335
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/46417888
type: Question
has answer: http://stackoverflow.com/a/29093287
has answer: http://stackoverflow.com/a/29093337
tagged with: arrays
has body: I have an object array based on priority I need to form an object array. Below is the code that I tried var data_res = [{ "ACTION_TYPE": "CREATE", "EXECUTION_TYPE": "N_EXECUTION" }, { "ACTION_TYPE": "CREATE", "EXECUTION_TYPE": "R_PRE_EXECUTION" } ]; var arr = ["R_PRE_EXECUTION", "S_PRE_EXECUTION", "N_EXECUTION"]; for (var i = 0; i &lt; data_res.length; i++) { for (var temp in arr) { if (data_res[i].RULE_EXECUTION_TYPE.indexOf(arr[temp])&gt;-1) { console.log("data") console.log(JSON.stringify(data_res[temp])) } } The output that I'm getting is data undefined data {"ACTION_TYPE":"CREATE","EXECUTION_TYPE":"N_EXECUTION"} I want the data based on my array arr. Like first R_PRE_EXECUTION data must be formed then S_PRE_EXECUTION and then N_PRE_EXECUTION, don't know where I'm going wrong.
tagged with: javascript
tagged with: sorting
score: 0
answer count: 3
has title: Get value of an array based on priority
accepted answer: http://stackoverflow.com/a/29093287

http://stackoverflow.com/a/55397917
type: Answer
answers question: http://stackoverflow.com/q/29154339
has body: Browsers are very forgiving when it comes to whitespace and line breaks in conditionals. You can honestly get away with a lot of things (for better or worse haha). Right now these two formats are the industry standard. Personally, I like the syntax in the second syntax more. Syntax A if ( a === 123 &amp;&amp; b === 'abc' ) { ... } Syntax B if ( a === 123 &amp;&amp; b === 'abc' ) { ... } AirBnb's preferred syntax: https://github.com/airbnb/javascript/issues/1380
downvote count: 0
score: 30
upvote count: 30

http://stackoverflow.com/a/29187222
score: 0
has body: You can transform tabular data to nested data using supergroup or Underscore.Nest
type: Answer
answers question: http://stackoverflow.com/q/29187124

http://stackoverflow.com/a/29069247
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46373732
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29069221
has body: If CodeValue is the ID of the textarea. add .value into it: $.modal(document.getElementById('CodeValue').value)
answers question: http://stackoverflow.com/q/29069221

http://stackoverflow.com/q/29090649
tagged with: javascript
has body: This is a repost from StackExchange's GameDev section, yet, I find that the problem seems more applicable to StackOverflow because it pertains more to CSS, JS, and positioning techniques rather than JavaScript topics (mostly UnityScript and Phaser) discussed on the former. I've been making a roguelike-style game in HTML5 without using canvas (only divs) with pure JS (fiddle!). I've been trying to enlarge the tile size (font size) while keeping the player centered within the camera. For some reason, when the tile size isn't equal to the map size, the camera will be slightly off. Note that the 3D effect is on purpose; I believe it adds some much needed depth, and just looks super cool. :D When tileScale (line 4 in the fiddle) is 9 (very undesirable; the dots on the player's y axis should be aligned, not at a slight angle): When tileScale is 25 (on point!): Here's some relevant (trimmed) code: window.onresize = function(){ game.viewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); game.viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); game.windowSize = Math.min(game.viewportWidth, game.viewportHeight); // Droid Sans Mono has a ratio of 3:4 (width:height), conveniently. // This may be problematic. I'm not sure. game.tileWidth = game.windowSize*.6 / game.tileScale; game.tileHeight = game.windowSize*.8 / game.tileScale; } // Update the camera position (needs help?) this.updateCamera = function(){ // Get player coordinates (-.5 because we need to get the player tile center) // times the tileWidth plus the game window (inner square) size divided by two. var left = ((-game.player.x-.5)*game.tileWidth+game.windowSize/2)+"px"; var top = ((-game.player.y-.5)*game.tileHeight+game.windowSize/2)+"px"; game.planeContainer.style.left = left; game.planeContainer.style.top = top; } How can I ensure that the dots in the center of the screen will be always lined up, instead of on a slight angle? My current eviden…
tagged with: roguelike
has answer: http://stackoverflow.com/a/29107042
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
type: UnansweredQuestion
has title: Properly centering div based on child element
upvote count: 1
score: 1
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29122557
has answer: http://stackoverflow.com/a/29186742
type: Question
accepted answer: http://stackoverflow.com/a/29186742
has body: I've got an Angular 1.3 application using ngRoute module. I'd like to be able to define a controller in the same file as the view, but for some reasons, Angular does not recognize it: view.html: module.js: angular.module("app", ["ngRoute"]); // ... index.html: The above setup throws an error: Argument 'fooController' is not a function, got undefined. Tt worked before 1.3, when controllers could be defined as global functions. Also, the problem does not appear when $controllerProvider.allowGlobals(); is called during module configuration and controllers are defined as global functions. I know it's not the best idea to define a controller in the HTML file, but in this case I have a good reason for this. Any help will be appreciated. EDIT: Here's the plunker showing the problem: http://plnkr.co/edit/JU350xL7X9ryF3S72o6s Click on the link there to change the route and take a look at the browser's console.
tagged with: javascript
score: 0
answer count: 2
has title: Controller definition inside Angular's ng-view
has comment: http://stackoverflow.com/comment/46471673
possible better answer: http://stackoverflow.com/a/29122840
tagged with: angularjs
has answer: http://stackoverflow.com/a/29122840
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46471826

http://stackoverflow.com/q/29174622
has comment: http://stackoverflow.com/comment/46567106
has body: I have the following function: "use strict"; $(document).ready(function(){ $("#slider,input[type='range']").on("mousemove touchmove ",function(){ $("#test").html($(this).val()) }); }); function AddClass(){ var q=0; var p=prompt("Enter the class(es) you want to add seperated by a ','"); var to_be_added=[]; to_be_added=p.split(","); for (var j=0;j<to_be_added.length;j++){ if(to_be_added[j][0] === "."){ to_be_added[j]=to_be_added[j].slice(1);//check if the first character of each class inside an array contains "." and remove it } } for (var k=0;k<to_be_added.length;k++){ $("#slider").addClass(to_be_added[k]); q++; } return "q"; } function delclass(){ var q=0; var p=prompt("Enter the class(es) you want to remove seperated by a ','"); var to_be_added=[]; to_be_added=p.split(","); for (var j=0;j<to_be_added.length;j++){ if(to_be_added[j][0] === "."){ to_be_added[j]=to_be_added[j].slice(1);//check if the first character of each class inside an array contains "." and remove it } } for (var k=0;k<to_be_added.length;k++){ $("#slider").removeClass(to_be_added[k]); q++; } return "Hello"; } html: Delete The problem is that after running the above code i don't get anything in the console.Not even undefined.Any ideas?Jquery is included and $("#slider") is correct. Update If call the function from the console i will get "Hello" in the console but when i use button to call that function i get nothing
has comment: http://stackoverflow.com/comment/46567107
has comment: http://stackoverflow.com/comment/46567258
has comment: http://stackoverflow.com/comment/46567140
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29174902
has comment: http://stackoverflow.com/comment/46567225
score: 0
has comment: http://stackoverflow.com/comment/46567089
has comment: http://stackoverflow.com/comment/46567323
answer count: 1
favorite count: 0
tagged with: return
has title: function won't return q -Javascript
has comment: http://stackoverflow.com/comment/46567379
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29174902
has comment: http://stackoverflow.com/comment/46567488
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/46595569
has text: @benjour, Actually Yep. You could create a pattern and set the ball's `fillStyle` to that pattern--just like in the duplicate answer that Ken references. ;-)
comment on: http://stackoverflow.com/q/29190226
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29085459
score: 2
has body: Convert it to a string first and if the length of that string is shorter than 2 add a 0 in front of it. Example: if (currentMinutes.toString().length == 1) { currentMinutes = "0" + currentMinutes; }
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29085373
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/29085373

http://stackoverflow.com/q/29151675
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: I have tried several things with no success. I have a video on top of which i have a div that serves as an overlay, on click the video will play. everything works normally but when in fullscreen, the overlay wont be display, no matter what the css is. This only happens in chrome and in safari. this is what i have. 00:00/00:00 file with css: .play-overlay { position: relative; z-index: 100000000; opacity: 0.6; } #play-pause-overlay{ cursor: pointer; width: 100%; position: absolute; height: 100%; background: url('//PlayIconOverlay.png') no-repeat center; z-index: 100000; opacity: 0.5; }
has answer: http://stackoverflow.com/a/29151722
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/92462454
tagged with: css
tagged with: video
has title: overlay on html wont show in fullscreen
score: 1
type: Question
tagged with: fullscreen
tagged with: javascript

http://stackoverflow.com/q/29190471
tagged with: javascript
score: 4
upvote count: 4
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46595787
has body: I guess due to misuse the following piece of code creates a memory leak, I can't understand why, I've recorded short screencast to demonstrate the problem, you can find it here: https://www.youtube.com/watch?v=IWCcOI5kN1c&feature=youtu.be Here is the failing code, what it does is it just dynamically compiles the html stored in variable called content, but as soon as you start changing content variable via the textarea, the code starts creating $watch'es the situations gets even worser as soon as you increase the amount of bindings, for each binding Angular creates new scope (which is obviously right) but it doesn't remove the old ones and they are kept in the memory AngularJS Plunker The value of $scope.variable === "{{ variable }}" The value of $scope.content === "{{ content }}" The value of $scope.content is ng-model'ed via the following textarea: Instead of rendering the value of the $scope.content field which is currently equal to "{{ content }}" I need to render compiled and evaluated value which should be equal to "{{ variable }}" Look! It works:
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: memory-leaks
has comment: http://stackoverflow.com/comment/46615048
has answer: http://stackoverflow.com/a/29191029
has title: Angular JS $compile service causes $watch memory leak
type: Question

http://stackoverflow.com/q/29208290
tagged with: cordova
type: UnansweredQuestion
upvote count: 1
tagged with: intel-xdk
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I'm trying to load my JSON data into a webSQL server using .getJSON() and .each to itterate through the records in my database. function createDB(){ var db = openDatabase('Json', '1.0', 'local version of Json db', 2 * 1024 * 1024); db.transaction(function (tx) { tx.executeSql('CREATE TABLE categorie (categorie_id INTEGER, cat_naam TEXT)'); $.getJSON("http://localhost:8080/Json/welcome/categorie", function(data){ $.each(data, function(index) { console.log(data[index].categorie_id); tx.executeSql('INSERT INTO categorie (categorie_id, cat_naam) VALUES (?,?)', [data[index].categorie_id, data[index].cat_naam]); }); }); }); } But after the id gets writen into the log the javascripts stops running. I have no idea what I'm doing wrong, according to some documentation and tutorials I've read I should be doing the syntax allright, but maybe it has something to do with the fact that I'm using those 2 functions(.getJson and .each) in conjunction with the transactions. Also this application is inside of an Intel XDK project using AppFramwork and Cordova.
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: web-sql
score: 1
has answer: http://stackoverflow.com/a/29214515
has title: Storing JSON data in WebSQL server

http://stackoverflow.com/comment/46472489
score: 0
type: AnswerComment
type: Comment
has text: i delete it but again nothing.
comment on: http://stackoverflow.com/a/29121491

http://stackoverflow.com/a/29217419
has comment: http://stackoverflow.com/comment/46644670
has comment: http://stackoverflow.com/comment/46644351
has comment: http://stackoverflow.com/comment/46685159
has comment: http://stackoverflow.com/comment/46643963
type: Answer
answers question: http://stackoverflow.com/q/29217311
has comment: http://stackoverflow.com/comment/46685688
has comment: http://stackoverflow.com/comment/46643762
has comment: http://stackoverflow.com/comment/46644100
has comment: http://stackoverflow.com/comment/46644534
has body: Just give it some time. These can be quite slow.
score: 0
has comment: http://stackoverflow.com/comment/46644695
has comment: http://stackoverflow.com/comment/46644220

http://stackoverflow.com/comment/46449549
type: QuestionComment
comment on: http://stackoverflow.com/q/29110014
score: 0
has text: Could you show us the code relevant to the `Bootstrap tabs` implementation?
type: Comment

http://stackoverflow.com/comment/46421673
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29094420
has text: what is the use case o removing quotes, as per the joson specification http://tools.ietf.org/html/rfc4627 it is better to keep quotes if you want to use as JSON

http://stackoverflow.com/q/29126463
has comment: http://stackoverflow.com/comment/46479124
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29126699
has comment: http://stackoverflow.com/comment/46482017
type: AnsweredQuestion
has body: I really need some help here... I´m trying for hours now and can´t get it to work... I have a .json file with 100 products like this: [{ "ean": "3613132010420", "brand": "NewBrand", "desc": "A description", "feature1": "", "feature2": "", "feature3": "", "feature4": "", "feature5": "", "img": "", "metric": { "gender": "female", }, "score":"" }, { "ean": "3613132010420", "brand": "NewBrand", "desc": "A description", "feature1": "", "feature2": "", "feature3": "", "feature4": "", "feature5": "", "img": "", "metric": { "gender": "female", }, "score":"" }] I read the json with $http and put everything in $scope.products. The data is shown in a list, everything is fine. Now I want to filter the products and alter the score variable (after swipe on a option slider). The view should then also be updated due to the angular data-binding. How can I change this variable in the $scope? This is what I tried and nothing works: $('.find-style-slider .slick-list').bind('touchstart click', function(){ angular.forEach($scope.products, function(value, key) { $scope.products[key].score = '25'; //nothing happens var obj = { score: '25' }; $scope.products[key].push(obj); //Uncaught TypeError: undefined is not a function $scope.products.splice(key, 0, obj); //no error but $scope variable does not change $scope.products[key].unshift(obj); //Uncaught TypeError: undefined is not a function }); }); Do I need to update something or $apply()? I would be thankful for any help/hint... Edit: I think the $scope is not working like I thought.... I fill the $scope.products with a service: productService.initDb().then(function(products) { $scope.products = products; }); When I put this var obj = { score: '25' }; $scope.products.splice(0, 0, obj); INSIDE the initDb function then the first elements gets updated! But not outside. The question is now: WHY? And how can I access the $scope.products from outside the service function? I thought the $scope is the same for the whole controller... confused
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has comment: http://stackoverflow.com/comment/46480109
type: Question
linked to: http://stackoverflow.com/q/15424910
tagged with: javascript
has comment: http://stackoverflow.com/comment/46479305
has comment: http://stackoverflow.com/comment/46479287
has answer: http://stackoverflow.com/a/29126699
has comment: http://stackoverflow.com/comment/46479803
has title: Angularjs $scope is confusing me
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46479348
favorite count: 0

http://stackoverflow.com/comment/46719475
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29206081
has text: You are probably adding your `markers` directly to the `map` - there is no need to do this, the clustering does it for you, just create `dataPoints`. Alternatively set the `minZoom` as shown in this [spiderify example](http://stackoverflow.com/questions/27185693/how-to-distinct-two-markers-placed-at-the-same-coordinates-in-nokia-here-map/28064566#28064566)

http://stackoverflow.com/comment/46445941
score: 0
type: Comment
type: QuestionComment
has text: one shim: `console=window.console||{log: String};`
comment on: http://stackoverflow.com/q/29108092

http://stackoverflow.com/a/29147472
has comment: http://stackoverflow.com/comment/46518549
has body: You can wrap both functions into one $('document').ready( function() { var _title = function(element) { var allow = document.title.search("IT Distribution - "); if(allow&gt;-1){ document.getElementById(element).style.display="block"; } }; _title('tesbanner'); _title('navLogout2'); });
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29147264
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29147264
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29170970
tagged with: angularjs
has body: I wanted to write a unit test to confirm my "otherwise" logic was working correctly. This is how I expected to do it: it('should handle unknown routes properly', inject(function($location, $rootScope) { $location.path('/unknown'); $rootScope.$digest(); expect($location.path()).toBe('/yikes'); })); However, what I discovered is that I had to inject $route to make this test work. Keep in mind, the unit test code didn't have to use $route but apparently it needed to be instantiated to make $location work properly. Here's a plunkr if you're interested in more details. Why does $route have to be included when unit testing $location only? I see lots of discussion that seems to be related: issue 1213 relevant commit
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29185998
upvote count: 2
tagged with: unit-testing
type: Question
has title: Why does $route have to be included when unit testing $location only?
has answer: http://stackoverflow.com/a/29185998
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jasmine
favorite count: 0

http://stackoverflow.com/a/29197513
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29098437
accepted answer of: http://stackoverflow.com/q/29098437
has body: The scriptcam was ditched due to more problems occuring, decided to use the JSQRcode code instead, i appreciate your help guys :)

http://stackoverflow.com/q/29198178
has answer: http://stackoverflow.com/a/29198406
accepted answer: http://stackoverflow.com/a/29198406
score: 0
has body: I need to dynamically control the Meteor collection by passing in an argument to the below function. The below function works, though would like to know if this is acceptable in the Javascript world, of if there is a better/best practices way to accomplish this. Any feedback is much appreciated. -Chris function sortableListItems(divIDString, CollectionName) { //pass in collection name this.$(divIDString).sortable({ CollectionName.update({_id: Blaze.getData(el)._id}, {$set: {fontRank: newFontRank}}); // Collection name is replaced here by one of the arguments }); } sortableListItems('#typography-items-js', TypographyCollection);
answer count: 1
tagged with: meteor
has title: Meteor - Dynamically change collection name from function argument
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46455150
comment on: http://stackoverflow.com/a/29112996
type: Comment
has text: I should have been explicit. In your controller you'll need to defined the $scope.data object at the top. myApp.controller('catalogueController', ['$scope', 'Search', function($scope, Search) { $scope.data = {inventory: []};
score: 0
type: AnswerComment

http://stackoverflow.com/q/29117931
favorite count: 0
has answer: http://stackoverflow.com/a/34611424
has comment: http://stackoverflow.com/comment/46465478
linked to: http://stackoverflow.com/q/27609872
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/73973025
score: 1
has title: Google Maps, draw lines between more than 8 waypoints
has comment: http://stackoverflow.com/comment/46463480
type: Question
linked to: http://stackoverflow.com/q/19848826
tagged with: google-maps
tagged with: javascript
has comment: http://stackoverflow.com/comment/46465506
has body: We have json. In json have 10 latitude and 10 longitude.We tried draw line between those points.But We got Status code google.maps.DirectionsResult.MAX_WAYPOINTS_EXCEEDED.So after deleted two points.Now We tried to draw the lines between 8 points it's working nice. But in json some time come 50 to 100 latitude and longitude.We tried like this var aa=waypts[0].location.k; var bb=waypts[0].location.D; var cc=waypts[waypts.length-1].location.k var dd=waypts[waypts.length-1].location.D; var start1= new google.maps.LatLng(aa,bb); var end1=new google.maps.LatLng(cc, dd); var request = { origin: start1, destination: end1, waypoints: waypts, optimizeWaypoints: true, travelMode: google.maps.TravelMode.DRIVING }; debugger; directionsService.route(request, function(response, status) { debugger; if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); var route = response.routes[0]; } }); first tell me how to draw line between more then 8 points.Please guide me
linked to: http://stackoverflow.com/q/8779886
tagged with: google-maps-api-3
tagged with: directions
upvote count: 2
answer count: 3
linked to: http://stackoverflow.com/q/15315347
downvote count: 1
linked to: http://stackoverflow.com/q/4418875
has answer: http://stackoverflow.com/a/38866447
has answer: http://stackoverflow.com/a/29118021

http://stackoverflow.com/q/29184737
has comment: http://stackoverflow.com/comment/46585319
downvote count: 0
has comment: http://stackoverflow.com/comment/46587044
has title: Angular's one time binding alternative
has comment: http://stackoverflow.com/comment/46587291
has comment: http://stackoverflow.com/comment/46587165
linked to: http://stackoverflow.com/q/18790333
has comment: http://stackoverflow.com/comment/46586934
favorite count: 0
has comment: http://stackoverflow.com/comment/46598210
has comment: http://stackoverflow.com/comment/46585678
tagged with: angularjs
has body: Recently I've walked through several StackOverflow questions related to AngularJS optimization techniques: AngularJS really slow at rendering with about 2000 elements? How does data binding work in AngularJS? Most of the answers were proposing an optimization technique called One-time binding, but my use case dictates that I can't use this approach, all of my data is interactive, the changes are pushed from server to client, plus there's quite a lot of data is required to be displayed. When server notification happens UI updates are required. So if I were to use the one-time binding it would break my page. I've tried to analyse the reasons that make AngularJS slow in my case and I've found out that it's not the dirty checking itself that is slowing down the process. Modern javascript engines are able to dirty check tens of thousands object properties in just milliseconds. The root reason that make AngularJS slow is $watch expression itself, each $watch call is backed up with setTimeout calls plus some AngularJS internal overhead. The main problem is that these calls pass control to browser's internal message loop, which from program's perspective does nothing except imposing latency into each step of data displaying process. So my question is the following: in contrast to one-time binding, I would like to have a way to group my one way binding expressions {{ someObj.someProperty }} into one $watch call, something like {{ myBulkWatch::someObj.someProperty1 }} {{ myBulkWatch::someObj.someProperty2 }} ... {{ myBulkWatch::someObj.somePropertyN }} I understand that there's no such functionality yet, but maybe it's possible to at least emulate the feature with existing Angular's instruments? Any thoughts on this subject? Thank you in advance!
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9682092
has comment: http://stackoverflow.com/comment/46585591
has comment: http://stackoverflow.com/comment/46587304
has comment: http://stackoverflow.com/comment/46585574
tagged with: data-binding
has comment: http://stackoverflow.com/comment/46587097
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46586016
upvote count: 1
has comment: http://stackoverflow.com/comment/46586583
has comment: http://stackoverflow.com/comment/46586251
type: Question
linked to: http://stackoverflow.com/q/15183095
tagged with: javascript
has comment: http://stackoverflow.com/comment/46586792

http://stackoverflow.com/q/29064430
type: Question
has body: some channels still seem to have the old comment system. im trying to create a script that makes every comment section be like that. it can be seen on videos like this: youtube.com/watch?v=oV27GvzUE-k the html is a bit different than at normal comment sections, but when i copied and pasted the html in the place of a removed new comment section (with Customize your web), it still turns into the new one. i know it SHOULD be possible to get the old style back, because if i paste the video url (for example tPEE9ZwTmy0) in the url used to open the comment frames from, it looks like the new one. for example: a new style comment frame : https://apis.google.com/u/0/wm/4/_/widget/render/comments?usegapi=1&amp;first_party_property=YOUTUBE&amp;href=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtPEE9ZwTmy0 the video url of the example video i gave that has the old comment system, pasted at the end of the url above: https://apis.google.com/u/0/wm/4/_/widget/render/comments?usegapi=1&amp;first_party_property=YOUTUBE&amp;href=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoV27GvzUE-k so the comments are probably "render"ed differently in the first place. its not even in a frame when it looks like the old one, but it can be opened like that too. so i would be grateful if someone would tell me what causes a video to have the old style of comment section. thank you in advance
tagged with: javascript
has title: what causes youtube old comment section
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29064460
type: UnansweredQuestion
tagged with: youtube

http://stackoverflow.com/a/29070498
has comment: http://stackoverflow.com/comment/46376149
has comment: http://stackoverflow.com/comment/46376219
score: 4
has body: you can unbind the click handler in success call back using jQuery .success(function(data){ $("#register_pointer").unbind( "click" ) // unbind the click $("#register_pointer").css( 'pointer-events', 'none' ); //this will also prevent all the events like hover,mouse over etc. }); you can get them back whenever you want as given below $("#register_pointer").bind( "click" ); $("#register_pointer").css( 'pointer-events', '');
answers question: http://stackoverflow.com/q/29070382
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/29128343
score: 5
has comment: http://stackoverflow.com/comment/46482534
upvote count: 5
tagged with: addeventlistener
tagged with: javascript
has answer: http://stackoverflow.com/a/52533125
answer count: 3
tagged with: canvas
linked to: http://stackoverflow.com/q/12886286
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29128594
has title: How do I capture a keydown event on the canvas without interfering with the rest of my website?
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29128594
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46482814
has answer: http://stackoverflow.com/a/29128600
has comment: http://stackoverflow.com/comment/46483219
has comment: http://stackoverflow.com/comment/46482995
has body: I am working on a canvas game using a few tutorials and tweaking them for some AI interaction. The game works great except my event listeners are just added to the document at the moment. When I moved the game to my actual website this became an issue because I needed to e.preventDefault to keep the page from scrolling around. Not a big deal until people wanted to type into my contact form and they couldn't use the space bar or arrow keys. Simple enough fix seems to be adding the event listener only to my canvas. However, when I use canvas.addEventListener() with the same parameters that I was using it before I can't make the canvas pay attention to the events. They don't seem to register at all. I've tried clicking on the canvas to get it "focussed" but that doesn't seem to do anything. So the question is how can I make the canvas and only the canvas listen to keydown events? This works but breaks my forms addEventListener('keydown', function(e) { keysDown[e.keyCode] = true; switch(e.keyCode) { case 37: case 38: case 39: case 40: case 32: e.preventDefault(); break; default: break; } }, false); This doesn't work var canvas = document.getElementById('world'); canvas.addEventListener('keydown', function(e) { keysDown[e.keyCode] = true; switch(e.keyCode) { case 37: case 38: case 39: case 40: case 32: e.preventDefault(); break; default: break; } }, false);
type: Question
accepted answer: http://stackoverflow.com/a/29128600

http://stackoverflow.com/comment/46621941
score: 0
comment on: http://stackoverflow.com/q/29205031
type: QuestionComment
type: Comment
has text: What are you trying to do? Can you show the result you want after processing the data.

http://stackoverflow.com/comment/46608453
score: 0
type: Comment
type: QuestionComment
has text: @ConorO'Brien: StackOverflow.
comment on: http://stackoverflow.com/q/29197865

http://stackoverflow.com/q/29188406
tagged with: function
tagged with: javascript
has title: Cant get this code to run in browser using firefox
score: 0
answer count: 1
type: UnansweredQuestion
has body: trying to get this code to run in broser i saved it and when i try to open it nothing happens i can't see the prompt up box any help would be appreciated thanks. Im using a switch to try to get a prompt to pop up &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtmll/DTD/xhtmll-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; var secretNumber = prompt("Pick a number between 1 and 5:", ""); secretNumber = parseInt(secretNumber); switch (secretNumber) { case 1: document.write("Too low!"); break; case 2: document.write("Too low!"); break; case 3 document.write("You guessed the secret number!"); break; case 4 document.write("Too high!"); break; case 5 document.write("Too high!"); break; default: document.write("you did not enter a number between 1 and 5!"); break; } document.write("&lt;br /&gt;Execution continues here"); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has answer: http://stackoverflow.com/a/29188571
tagged with: loops
type: Question

http://stackoverflow.com/q/29068054
tagged with: innerhtml
possible better answer: http://stackoverflow.com/a/29068095
upvote count: 4
has body: I have created the following JS code. When the HTML document loads, the script displays the three location data sets properly. Javascript Beginner Now that I got that down I need to understand how I can make this data appear within a specified div, like div id=whatever? Right now it just appears within the body. Also, I know this code is rough and thus, wonder what is the best way to write this?
accepted answer: http://stackoverflow.com/a/29068083
type: AnsweredQuestion
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/29068083
tagged with: javascript
has answer: http://stackoverflow.com/a/29068095
score: 4
answer count: 2
has title: Using innerHTML to display JSON/object data in a certain div
favorite count: 0

http://stackoverflow.com/a/29092044
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46417083
has body: Try this... console.log(myFunction.name); Be aware that this is not supported by IE yet as mentioned here
answers question: http://stackoverflow.com/q/29091913
downvote count: 0

file-upload
tags question: http://stackoverflow.com/q/29064876
tags question: http://stackoverflow.com/q/29168920
tags question: http://stackoverflow.com/q/29156417
type: Tag
tags question: http://stackoverflow.com/q/29165026
tags question: http://stackoverflow.com/q/29068562
tag name: file-upload
tags question: http://stackoverflow.com/q/29170752
tags question: http://stackoverflow.com/q/29155697
tags question: http://stackoverflow.com/q/29069850
tags question: http://stackoverflow.com/q/29115780

http://stackoverflow.com/a/29199090
has comment: http://stackoverflow.com/comment/46610534
type: Answer
upvote count: 10
has body: The difference is hoisting. When you use a function declaration statement (i.e. what's being used in the proposed solution), its definition is "hoisted" to the top of the scope (read: function) that contains it, and therefore even if you try to reference it before the code that defines it, it will be available. You are using a variable assignment to define your functions. This means that write will not have a value until the var write = statement executes. You are trying to use it before that, when write still has the value undefined. What this means is that you can get your code to work simply by moving the location where you define your functions: module.exports = function (counter) { var counts = {}; var write = function (row, _, next) { counts[row.country] = (counts[row.country] || 0) + 1; next(); }; var end = function (done) { counter.setCounts(counts); done(); }; var input = through(write, end); return duplexer(input, counter); }; n.b. Do not confuse function declaration statements with named function expressions. named function expressions are unhoisted, just like anonymous functions: var boom = getNumber(); var getNumber = function getNumber() { return 3; };
downvote count: 0
score: 10
answers question: http://stackoverflow.com/q/29199067
has comment: http://stackoverflow.com/comment/52844927
accepted answer of: http://stackoverflow.com/q/29199067
type: AcceptedAnswer

http://stackoverflow.com/q/29102708
has title: jasmine: scope of this
upvote count: 6
favorite count: 0
has answer: http://stackoverflow.com/a/29102899
has answer: http://stackoverflow.com/a/29106781
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29102899
type: Question
tagged with: testing
answer count: 2
score: 5
accepted answer: http://stackoverflow.com/a/29106781
tagged with: javascript
has body: From the jasmine documentation (http://jasmine.github.io/2.0/introduction.html): The this keyword Another way to share variables between a beforeEach, it, and afterEach is through the this keyword. Each spec’s beforeEach/it/afterEach has the this as the > same empty object that is set back to empty for the next spec’s beforeEach/it/afterEach. My understanding of this in Javascript is, that this is bounded to the scope of the actual function. So I would expect that it would be bound to the context different contexts (the ones depending on the function) inside beforeEach/it/afterEach. e.g. describe('Spec', function (){ var eachThis = null; beforeEach(function(){ eachThis = this; }); it('check this', function(){ except(this).toEqual(eachThis); } }; So this test should pass. Did jasmine change the behavior of this or did i get something wrong?

http://stackoverflow.com/a/29135560
type: Answer
has body: You can trigger the click event manually, by selecting the close button element $('#lightbox-demo + .content footer label[for="lightbox-demo"]').click() Demo: Fiddle It is much easier if you can give an ID to the close button Close then $('#lightbox-demo-close').click() Demo: Fiddle
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29135479
answers question: http://stackoverflow.com/q/29135479
has comment: http://stackoverflow.com/comment/46496339
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/51271494
accepted answer of: http://stackoverflow.com/q/29134222
has comment: http://stackoverflow.com/comment/122807045
has comment: http://stackoverflow.com/comment/134430584
type: Answer
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29134222
has body: My 2 cents: use regex to identify the pattern and increment the last part. function incrementAlphanumeric(str) { const numPart = str.match(/(0?[1-9])+$|0?([1-9]+?0+)$/)[0]; const strPart = str.slice(0, str.indexOf(numPart)); const isLastIndexNine = numPart.match(/9$/); // If we have a leading zero (e.g. - 'L100A099') // or there is no prefix - we should just increment the number if (isLastIndexNine || strPart != null) { return strPart + numPart.replace(/\d+$/, (n) =&gt; ++n ); } // Increment the number and add the missing zero else { return strPart + '0' + numPart.replace(/\d+$/, (n) =&gt; ++n ); } } works with the following formats for example: TEST01A06 TEST-100-A100 TEST0001B-101 TEST001A100 TEST001A91 TEST1101 TEST1010 1010 Demo Repl - https://repl.it/@EdoMagen/Increment-alphanumeric-string

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/29164368
tags question: http://stackoverflow.com/q/29097648
tags question: http://stackoverflow.com/q/29073931
tags question: http://stackoverflow.com/q/29171458
tags question: http://stackoverflow.com/q/29115855
tags question: http://stackoverflow.com/q/29076706
tags question: http://stackoverflow.com/q/29073409
tags question: http://stackoverflow.com/q/29206774
tags question: http://stackoverflow.com/q/29078446
type: Tag
tags question: http://stackoverflow.com/q/29132108

http://stackoverflow.com/comment/46403807
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29085461
has text: I think you should try to use something like ajax, rather than refreshing the whole page.
type: Comment

http://stackoverflow.com/comment/46479190
has text: I believe you didn't read my question. I need to change the tab back to tab 2 after the form on tab 2 is submitted. And your demo doesn't even work.
comment on: http://stackoverflow.com/a/29114862
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46567923
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29175094
has text: Inside the event callback trigger `setTimeout()` and put your code in its callback.
score: 0

http://stackoverflow.com/comment/46676213
has text: Yup, settimeouts aren't very reliable, imo. This is a more concrete solution.
type: Comment
comment on: http://stackoverflow.com/a/29193693
score: 0
type: AnswerComment

http://stackoverflow.com/a/29116039
has comment: http://stackoverflow.com/comment/46460572
upvote count: 3
has comment: http://stackoverflow.com/comment/46460785
has body: check my updated FIDDLE .add data-index attribute to .box div. so when hover event call script will get index using $(this).attr('data-index');. HTML : Javascript : $('.box').hover(function() { index = $(this).attr('data-index'); $('.box-'+index).stop().animate({bottom:'0'}); $('.dul-'+index).stop().animate({top:'0px'}); }, function() { $('.box-'+index).stop().animate({bottom:'-100px'}); $('.dul-'+index).stop().animate({top:'-100px'}); } );
has comment: http://stackoverflow.com/comment/46461144
accepted answer of: http://stackoverflow.com/q/29115891
answers question: http://stackoverflow.com/q/29115891
type: AcceptedAnswer
downvote count: 0
score: 3
type: Answer

http://stackoverflow.com/q/29180857
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46578191
has answer: http://stackoverflow.com/a/29180912
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29181029
favorite count: 0
has answer: http://stackoverflow.com/a/29180965
has title: How to get all classes that contain icon-(icon-name) and append
has body: $('a[class*=icon-]').append(""); With the code i have now i can turn: into But i want to append the selected class "icon-edit" to the span class. Because i want something like this: var icon-name = $('a[class*=icon-]') $('a[class*=icon-]').append(""); To get this result: fiddle: https://jsfiddle.net/y9uvj91g/
has comment: http://stackoverflow.com/comment/46578235
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29180965
possible better answer: http://stackoverflow.com/a/29180912

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/29129873
tag name: webbrowser-control

http://stackoverflow.com/q/29090869
linked to: http://stackoverflow.com/q/4631774
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/12775021
has comment: http://stackoverflow.com/comment/46415171
has title: JavaScript Closures, Really simple example with jsFiddle
has comment: http://stackoverflow.com/comment/46414323
linked to: http://stackoverflow.com/q/750486
type: Question
tagged with: closures
tagged with: javascript
has comment: http://stackoverflow.com/comment/46414638
has comment: http://stackoverflow.com/comment/46415595
has comment: http://stackoverflow.com/comment/46413969
score: 0
has comment: http://stackoverflow.com/comment/46414574
has comment: http://stackoverflow.com/comment/46413985
has comment: http://stackoverflow.com/comment/46415643
has comment: http://stackoverflow.com/comment/46414395
has comment: http://stackoverflow.com/comment/46415757
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46413977
has comment: http://stackoverflow.com/comment/46415619
tagged with: bind
has body: I'm pulling my hair out trying to understand javascript closures. I'm looking closely at this example. My actual code is in node.js but I don't think that's a major issue (except for error codes..) Here's my slimmed down code: var jsonsymbols = { "id5": "WFC", "id4": "AMZN", "id3": "BABA", "id2": "YHOO", "id1": "GOOG", "id0": "AAPL" }; // assume an unknown number of stock symbols.. var count = 0; var outputPrices = {}; for (key in jsonsymbols) { outputPrices['newid' + count]['price'] = get_price(jsonsymbols[key], count, function() { console.log(" Dummy function"); // callback function is used when looking up only one stock. }); count++; } console.log("\ncount = " + count); console.log("\noutput = " + JSON.stringify(outputPrices)); function get_price(symbol, countindex, callback) { setInterval(function() { // do nothing... The actual function makes a http call to another server // and does stock price lookup. We can only look up one stock at a time, // hence the repeated calls. }, 1000); return 124.12; callback(); }; (hmmm. I'm new to this snippet stuff. I've also created a jsfiddle ) Current error code is Uncaught TypeError: Cannot set property 'price' of undefined I'm obviously missing something stupid. Is there any way to have my cake and drink beer too? I'm learning how this asynchronous stuff works, unfortunately I have a very difficult time beginning the learning process in pure abstract concepts. I need a concrete example to start, and from that I can extrapolate back to the abstract. Anybody been here before? Why doesn't this work? thx.
has comment: http://stackoverflow.com/comment/46413954
answer count: 0
has comment: http://stackoverflow.com/comment/46414760
has comment: http://stackoverflow.com/comment/46414096
has comment: http://stackoverflow.com/comment/46413949

http://stackoverflow.com/q/29150645
type: UnansweredQuestion
tagged with: windows
has comment: http://stackoverflow.com/comment/46523620
answer count: 0
has comment: http://stackoverflow.com/comment/46523828
has comment: http://stackoverflow.com/comment/46523202
type: Question
tagged with: asp-classic
has body: I have a JS file, that contains a couple of functions that allow me to send details off from a 'contact us' form to Salesforce. When executing the sendToSalesForce() function from the JS console in the browser, everything works great, I get a debug email back to my address. Now when executing the function when I click the submit button on the page, the sendToSalesForce() function is executing (iv'e stepped through the whole thing) although I don't get any debug emails back, so therefore, the form is not submitting. When clicking the submit button, the JS that executes is something like: var form = document.createElement("form"); form.method = "POST"; form.action = "https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"; for(var i = 0; i &lt; elements.length; i++) { var element = document.createElement("input"); element.name=elements[i].name; element.value=elements[i].value; element.setAttribute("type", "hidden"); form.appendChild(element); alert(element.value); }; document.body.appendChild(form); form.submit(); At the top of the contact-us form (ASP page): &lt;% If Request.Form("submitform") = "1" Then Call ProcessForm Else %&gt; &lt;%=Content.Item("A")%&gt; &lt;% Call DisplayForm End If %&gt; Although by the time it posts back to the asp page, I would have expected it to have submitted by form element created by my Javascript?? Is there something I am missing... Hope theres enough information here... Thanks, James.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46568679
tagged with: salesforce
has title: Javascript, form element not submitting
has comment: http://stackoverflow.com/comment/46571637

http://stackoverflow.com/a/29099563
has comment: http://stackoverflow.com/comment/46558130
score: 0
answers question: http://stackoverflow.com/q/29099268
type: Answer
has body: Origin mismatch is normally caused by the Javascript origins not being set correctly in the API project console. You need to make sure that the Javascript origins match the domain from which your requests are coming and to which you are returning the user after sign in. More details can be found in the developer documentation in the "Create a client ID and client secret" section. Note: A common mistake here is to add javascript origins for http:// but not https:// (or vice versa). If you want to allow users to access your site from both then you need to list both in the javascript console. Note : You must include the port number of your server in the javascript origins if a port number appears in the url when users access your site. need to set javascript origin in google console api As origin=https://example.com scope=https://www.googleapis.com/auth/plus.login response_type=code token id_token gsession access_type=online redirect_uri=postmessage cookie_policy=single_host_origin proxy=oauth2relay554026710 origin=http://example.com state=1995523240|0.4607792083184853 display=page client_id=102180630313.apps.googleusercontent.com authuser=0

http://stackoverflow.com/q/29180984
tagged with: youtube
tagged with: embed
type: AnsweredQuestion
has title: JavaScript function that alternates YouTube embed sources? (No iframe)
accepted answer: http://stackoverflow.com/a/29181083
has body: The intention is upon clicking a button for the YouTube video embed code (without iframe) to generate another YouTube video embed code - here is my HTML: Click Here! + I basically need the embedded YouTube video (above) to be replaced by another YouTube video. I don't want to have to use jQuery either. Here is the JavaScript I have currently:
tagged with: src
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29181083
tagged with: alternate
upvote count: 1

http://stackoverflow.com/comment/46597088
comment on: http://stackoverflow.com/q/29191525
type: Comment
type: QuestionComment
score: 0
has text: Will you always have months of **the same** year in your `data` array?

http://stackoverflow.com/q/29062657
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29064381
score: 1
has body: I would like to know how to handle both local and sync storage in the right way in Chrome extension please. This is my case: I'm working on an extension for only a specific site (for now), which contains a content-script and a popup. The popup contains options where the user can make changes, then the values are sent to the content-script to show the changes on the page. I'm looking to make as less saving and retrieving storage tasks as possible, and that in the end it will get saved in the sync storage and not just in local. The sync storage got a per-minute limit, where the local one doesn't. I know how to listen to the popup closed call from the content-script using a long-lived connection and listen to the onConnect and onDisconnect, and then I can do a save task, but is there a better way to save reading and writing to the storage? All I can think of was having a background script where I can store the changes in variables and then just send them back and forward to and from the content-script and popup, so it's like having a storage without actually using the storage, but then how can I detect when the user leaves the specific domain and then do the single saving task, and also close/stop the background/event script?
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29064381
tagged with: google-chrome-extension
answer count: 1
favorite count: 0
upvote count: 1
has title: Synchronizing sync and local chrome.storage

http://stackoverflow.com/q/29124407
tagged with: javascript
favorite count: 0
tagged with: extjs
has title: Extjs gridpanel display 25 rows max due to localstorage proxy. How to change this limit value?
downvote count: 0
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29129670
tagged with: sencha-cmd
tagged with: gridpanel
has body: I have a grid panel and its code is: { xtype: 'gridpanel', x: 10, y: 10, autoScroll : true, // height: 300, width: 300, title: 'Grid Panel', store: 'peopleStore', columns: [ { xtype: 'gridcolumn', dataIndex: 'name', text: 'Name' }, { xtype: 'gridcolumn', dataIndex: 'gender', text: 'Gender' }, { xtype: 'numbercolumn', dataIndex: 'age', text: 'Age' } ] } My store structure is : Ext.define('ThemeApp.store.peopleStore', { extend: 'Ext.data.Store', model: 'ThemeApp.model.peopleModel', storeId: 'peopleStore', proxy: { type: 'localstorage', id: 'PeopleInfo' } }); I have a add row button. But only 25 rows are displayed and remaining rows goes behind these 25 rows. Does anyone knows about this problem?
upvote count: 1
has answer: http://stackoverflow.com/a/29129670
answer count: 1

http://stackoverflow.com/comment/106112380
comment on: http://stackoverflow.com/a/60000219
type: Comment
has text: @SebastianSpeitel mentioned in the title **Refreshing part of my php page**, which means that just need refresh some content, not completely reloaded.
score: 0
type: AnswerComment

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/29153691
type: Tag

http://stackoverflow.com/comment/67267491
score: 0
comment on: http://stackoverflow.com/a/29172435
type: AnswerComment
has text: This helped me :)
type: Comment

http://stackoverflow.com/q/29179291
tagged with: express
score: 0
has answer: http://stackoverflow.com/a/29186178
tagged with: express-4
type: UnansweredQuestion
has body: Here's my initial config: var session = require('express-session'); var cookieParser = require('cookie-parser'); app.use(session({ saveUninitialized: true, resave: false, genid: function(req) { return Services.misc.generateUUID() }, secret: secret.toString() })); app.use(cookieParser(secret)); Then in my controller (it's routed through a dead simple router to a controller, which then renders appropriate actions based on a Rails-like naming convention) I'll do something like this: var TestController = { noaction: function(req, res) { var locals = { billy: 'the goat' } console.log('req session'.red, req.session); res.cookie('test_cookie', 'Wu Tang Clan'); this.services.render.view(req, res, this, 200, locals); } module.exports = TestController; Note that this.services.render.view is just a service so that I don't have to write res.render('./app/controllers' + controller + '/' + action) Note the res.cookie line in the controller (docs on express.js). That's what the official docs say to do and in fact, it's then set in the browser: However, the line above res.cookie is a log and I would imagine we'd have test_cookie in it, but: All I get is a standard blank cookie every time, even though it's set browser-side and supposedly sending. My question is: How do I properly set and receive cookies in Express 4?
has answer: http://stackoverflow.com/a/29179572
tagged with: cookies
tagged with: session
has title: Can't get cookies to send with request in Express 4
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/46639887
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29215088
has text: You decode the JSON string, manipulate the object, and then encode and store it back into localstorage again …
score: 2

http://stackoverflow.com/q/29065656
score: 1
has title: JavaScript RegEx Ignore String
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29066885
tagged with: javascript
linked to: http://stackoverflow.com/q/28991178
has answer: http://stackoverflow.com/a/29069870
accepted answer: http://stackoverflow.com/a/29066885
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/29069870
has body: I have search results returned from the server and a regex that highlights the result using words in the search query. words = searchQuery.split(' '); $.each(words, function() { var word = this.trim(); var regex = new RegExp('(' + word + ')(?!>|b>)', 'gi'); searchResult = searchResult.replace(regex, "$1"); }); This works fine, until I search something like this: Search term: "script with javascript" Search result: "javascript is a programming language..." It should highlight the whole word like "javascript is a programming language...". However, since the string has changed from "javascript" to "javascript", it no longer matches the second word in the search query. It also produces weird values when the value of word is "b", "/", "<" or ">". My question is how I can ignore the and tags in the regex and match only the original search query? i tried using lookahead, but it didn't work.
has comment: http://stackoverflow.com/comment/46367637
favorite count: 0
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/comment/46630001
has text: I'm not entirely sure how timezones work in javascript, but shouldn't the 4th at midnight UTC be some time on the 3rd anywhere in the US? ie, this is to be expected, and the original behaviour (without the `Z`) is down to different browsers parsing it differently (one as local, one as UTC)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29210048
score: 0

http://stackoverflow.com/comment/46625088
type: Comment
has text: **Sorry @Ondkloss**, I wanted to address you with this post. http://jsfiddle.net/uqa0t3xw/6/
comment on: http://stackoverflow.com/a/29198455
score: 0
type: AnswerComment

http://stackoverflow.com/q/29148634
has title: Put .txt file in a textarea
type: UnansweredQuestion
tagged with: input
tagged with: file
has comment: http://stackoverflow.com/comment/46519615
has answer: http://stackoverflow.com/a/29148706
has body: I have this textarea: &lt;input id="inputOuvrirFichier" type="file" onchange="handleFiles(this.files)" name="files[]" accept=".txt"&gt; I need to put the contents of a .txt file into this textarea. This is my function : function handleFiles(file){ document.getElementById("titre").click(); console.log(file);} How can i get the text contain in the file please ? (Javascript) Thanks.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46520080
tagged with: javascript
has answer: http://stackoverflow.com/a/29149113
score: 0

http://stackoverflow.com/comment/46593797
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29189643
has text: The return value from a set-timeout callback is not used by anything. (It's run asynchronously.) What are you trying to return to?
score: 0

angular-ui-router
tags question: http://stackoverflow.com/q/29190321
tags question: http://stackoverflow.com/q/29130716
tags question: http://stackoverflow.com/q/29155680
tags question: http://stackoverflow.com/q/29125695
tags question: http://stackoverflow.com/q/29197104
tags question: http://stackoverflow.com/q/29200248
tags question: http://stackoverflow.com/q/29093163
tags question: http://stackoverflow.com/q/29083827
tags question: http://stackoverflow.com/q/29135180
tags question: http://stackoverflow.com/q/29101645
tags question: http://stackoverflow.com/q/29190863
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/29087322
tags question: http://stackoverflow.com/q/29074185
tags question: http://stackoverflow.com/q/29086029
tags question: http://stackoverflow.com/q/29141073
tags question: http://stackoverflow.com/q/29209565
tags question: http://stackoverflow.com/q/29200161
tags question: http://stackoverflow.com/q/29207231
tags question: http://stackoverflow.com/q/29069836
tags question: http://stackoverflow.com/q/29106324
tags question: http://stackoverflow.com/q/29199341
tags question: http://stackoverflow.com/q/29206729
type: Tag

http://stackoverflow.com/comment/75257709
score: 2
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/41015840
has text: Hi, Your solution works great, but when i used it in React Native(build mode), it throws an error: **Invalid character '`'**, though it works when i run in debug mode. Looks like, babel issue, any help?

http://stackoverflow.com/comment/46543497
type: QuestionComment
has text: Thanks, I didn't know the difference. @VinayK, can you post your comment as an answer. Like this I can validate it.
comment on: http://stackoverflow.com/q/29145765
type: Comment
score: 0

http://stackoverflow.com/comment/46409083
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29088084
type: Comment
has text: what I am trying to do is replace the current url with a new one and when the new link loads in a new window .. the current page goes to another page ...

http://stackoverflow.com/comment/46371419
has text: Have you tried to run your example isolated? Because I have and it works...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29067818

http://stackoverflow.com/comment/46380709
comment on: http://stackoverflow.com/a/29069040
has text: I render my table later on in the code and the columns & data are displayed fine as is the footerView. I'm simply trying to figure out how to call the specific footerView function at any given time
type: AnswerComment
score: 0
type: Comment

object-literal
tag name: object-literal
type: Tag
tags question: http://stackoverflow.com/q/29087854

http://stackoverflow.com/comment/46414778
has text: ember-cli? What versions of the ember things?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29090325

http://stackoverflow.com/q/29089912
downvote count: 0
has answer: http://stackoverflow.com/a/29090041
favorite count: 0
has answer: http://stackoverflow.com/a/29090082
possible better answer: http://stackoverflow.com/a/29090004
tagged with: http://stackoverflow.com/tag/html
tagged with: append
has title: Append image to td element with no id or value
score: 1
has body: I have an array of image elements, I use a function to randomize the array and I would like to append them back to the HTML table in their randomized order. However I am trying to avoid giving each td element it's own id because there are quite a few...I am wondering if it's possible to append the image to the td element with it not having a id. The HTML table has about 12 rows that would be like this: etc... JS function randomizePieces(myArray) { for (var i = myArray.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = myArray[i]; myArray[i] = myArray[j]; myArray[j] = temp; } return array; }
has comment: http://stackoverflow.com/comment/46412317
upvote count: 1
accepted answer: http://stackoverflow.com/a/29090082
type: AnsweredQuestion
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/46412335
answer count: 3
has answer: http://stackoverflow.com/a/29090004

http://stackoverflow.com/a/29090570
score: 0
has body: Maybe think about what your own scripts are doing...If you include scripts which reference google maps on every page of your site the you will get that error on pages that do not have the library loaded..
answers question: http://stackoverflow.com/q/29090543
type: Answer
has comment: http://stackoverflow.com/comment/46413634

matter.js
tags question: http://stackoverflow.com/q/29133903
type: Tag
tag name: matter.js

http://stackoverflow.com/comment/58400494
type: Comment
comment on: http://stackoverflow.com/a/29085474
type: AnswerComment
score: 14
has text: "It might be faster" - Do you have any source on that? I'm imagining a simple hash-map must be faster than a full blown object, but I have no proof. :)

http://stackoverflow.com/q/29090700
downvote count: 0
has body: My end goal is to create a HTML list. the List is defined in a JSON String. Example:- {“cluster”: [ {“name”:”SEIR”,”cluster”:[ {“name”:”TR 0.25”,”cluster”:[ {“name”:”RR 0.30”,”member”:[“sim1”,”sim5”,”sim10”]}, {“name”:”RR 0.35”,”member”:[“sim3”,”sim7”,”sim15”]}, {“name”:”RR 0.40”,”member”:[“sim6”,”sim9”,”sim25”]} ]}, {“name”:”TR 0.5”,”cluster”:[ {“name”:”RR 0.30”,”member”:[“sim1”,”sim5”,”sim10”]}, {“name”:”RR 0.35”,”member”:[“sim3”,”sim7”,”sim15”]}, {“name”:”RR 0.40”,”member”:[“sim6”,”sim9”,”sim25”]} ]} ]}, {“name”:”SIR”,”cluster”:[ {“name”:”TR 0.25”,”cluster”:[ {“name”:”RR 0.30”,”member”:[“sim1”,”sim5”,”sim10”]}, {“name”:”RR 0.35”,”member”:[“sim3”,”sim7”,”sim15”]}, {“name”:”RR 0.40”,”member”:[“sim6”,”sim9”,”sim25”]} ]}, {“name”:”TR 0.5”,”cluster”:[ {“name”:”RR 0.30”,”member”:[“sim1”,”sim5”,”sim10”]}, {“name”:”RR 0.35”,”member”:[“sim3”,”sim7”,”sim15”]}, {“name”:”RR 0.40”,”member”:[“sim6”,”sim9”,”sim25”]} ]} ]} ]} the expected output HTML list would look like: SEIR TR 0.25 RR 0.25 sim1 sim5 sim10 RR 0.50 sim3 sim7 sim15 TR 0.25 RR 0.25 sim1 sim5 sim10 RR 0.50 sim6 sim9 sim25 . . . . . I have written the following javascript code function appendClusterNode(data){ var liNode = document.createElement('li'); var textNode = document.createTextNode(data.name); liNode.appendChild(textNode); if(data['cluster']){ alert('Cluster Present'); var newULNode = document.createElement('ul'); var tempNode; for (var cluster = 0 ; cluster < data.cluster.length ; cluster++){ alert(data.cluster[cluster].name); tempNode = appendClusterNode(data.cluster[cluster]); newULNode.appendChild(tempNode); } liNode.appendChild(newULNode); }else{ if('member'){ var ulNode = createElement('ul'); var tempLINode; for (var member = 0 ; member < data.member.length ; member++){ tempLINode = document.createElement('li'); tempLINode.appendChild(document.createTextNode(data.member[member])); ulNode.appendChild(tempLINode); } liNode.appendChild(ulNode); } } return liNode; } function appendRootNode(node, data){ v…
favorite count: 0
has answer: http://stackoverflow.com/a/29130334
type: Question
accepted answer: http://stackoverflow.com/a/29130334
upvote count: 2
has title: Generating nested UL list using JSON and Javascript
tagged with: http://stackoverflow.com/tag/json
answer count: 1
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46412714
score: 0
type: Comment
type: QuestionComment
has text: I am not so experience with mognodb but i did this in order to get one array with objects as result. If you don't mind i would be very happy if you would correct me. I updated question.
comment on: http://stackoverflow.com/q/29085377

http://stackoverflow.com/q/29121621
has title: Test context missing in before and after test hook in nightwatch js globals
type: UnansweredQuestion
has body: I have multiple nightwatch tests with setup and teardown in every single test. I am trying to unify it into globalModule.js in before after(path set in globals_path in nightwatch.json). //globalModule.js before:function(test, callback){ // do something with test object } //sampletest.js before: function(test){ .. }, 'testing':function(test){ .... } My problem is test context is not available in globalsModule.js. How do i get it there? Can someone let me know?
tagged with: node.js
has answer: http://stackoverflow.com/a/29228318
tagged with: selenium
type: Question
tagged with: nightwatch.js
answer count: 1
tagged with: javascript
score: 0
tagged with: global

http://stackoverflow.com/comment/46602871
comment on: http://stackoverflow.com/q/29194780
type: Comment
type: QuestionComment
has text: While not the cause of the problem, there is no need to put a name before function. Change 'function ctrl2' to just 'function'. Save a few bytes of typing.
score: 1

http://stackoverflow.com/comment/46495862
comment on: http://stackoverflow.com/q/29134955
has text: @z416175 I do see how the `size` var _squares_ the size of the board and thought that was useful. As a beginner I want to make sure I understand the reasoning, and can read/step through the code.
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/46547682
score: 0
type: AnswerComment
has text: you can use another test instead like k > -1. if k is a number more than -1 it will give you the title field, else(if its a string) just give you the value.
comment on: http://stackoverflow.com/a/29164175
type: Comment

http://stackoverflow.com/q/29203927
tagged with: servicestack
tagged with: servicestack-razor
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46656553
tagged with: css
answer count: 0
has title: JavaScript and CSS minifier not working in Servicestack
type: Question
has comment: http://stackoverflow.com/comment/46619315
tagged with: javascript
score: 0
has body: In the latest version of Servicestack, minifier was introduced. So, tried them in project. I am able to minify razor pages but not the javascript or css file I am adding into them. I have copy pasted the code public override List&lt;IVirtualPathProvider&gt; GetVirtualPathProviders() { var existingProviders = base.GetVirtualPathProviders(); var memFs = new InMemoryVirtualPathProvider(this); //Get existing Local FileSystem Provider var fs = existingProviders.First(x =&gt; x is FileSystemVirtualPathProvider); //Process all .html files: foreach (var file in fs.GetAllMatchingFiles("*.html")) { var contents = Minifiers.HtmlAdvanced.Compress(file.ReadAllText()); memFs.AddFile(file.VirtualPath, contents); } //Process all .css files: foreach (var file in fs.GetAllMatchingFiles("*.css") .Where(file =&gt; !file.VirtualPath.EndsWith(".min.css"))) //ignore pre-minified .css { var contents = Minifiers.Css.Compress(file.ReadAllText()); memFs.AddFile(file.VirtualPath, contents); } //Process all .js files foreach (var file in fs.GetAllMatchingFiles("*.js") .Where(file =&gt; !file.VirtualPath.EndsWith(".min.js"))) //ignore pre-minified .js { try { var js = file.ReadAllText(); var contents = Minifiers.JavaScript.Compress(js); memFs.AddFile(file.VirtualPath, contents); } catch (Exception ex) { //As JSMin is a strict subset of JavaScript, this can fail on valid JS. //We can report exceptions in StartUpErrors so they're visible in ?debug=requestinfo base.OnStartupException(new Exception("JSMin Error {0}: {1}".Fmt(file.VirtualPath, ex.Message))); } } //Give new Memory FS the highest priority existingProviders.Insert(0, memFs); return existingProviders; } And while debugging it I found out that. It is indeed minifying the files but some how it is not getting there in out put. I have also tried debug and release and even with deployed version. But JavaScript and CSS that are I am adding there as reference are still in beutified format only. Am I doing something wrong?

http://stackoverflow.com/a/29133774
has comment: http://stackoverflow.com/comment/46493578
has comment: http://stackoverflow.com/comment/46493283
has body: Let's see if I understand you correctly. You need to define a tolerance: var a = [28.82, 28.91, 29.11, 30.11, 32.22, 32.23, 32.24]; function check(range) { // range = 28.90; for (var i = 0; i &lt; a.length; i++) { if (Math.abs(a[i] - range) &lt;= 0.01) { // do stuff here... } } } a[i] - range will produce the difference between the value and number you're seeking. 0.01 is the set tolarance.
upvote count: 2
has comment: http://stackoverflow.com/comment/46493376
answers question: http://stackoverflow.com/q/29133686
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/29142374
tagged with: javascript
has title: How to loop a function for a progress bar on a slideshow?
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29142406
tagged with: jquery
has answer: http://stackoverflow.com/a/29142406
has answer: http://stackoverflow.com/a/29142400
has body: I have a slideshow that changes images with an interval of 5000. The function to show the progress bar between one image and the other is as follows: function timebar(){ $('#timebar').stop().css({width:0}); $('#timebar').animate({width:'100%'},5000); } I call this after the slideshow has loaded so that they process at the same time. I want this function to loop so that the timebar is reset for each slide: function timebar(){ $('#timebar').stop().css({width:0}); $('#timebar').animate({width:'100%'},5000); setTimeout(timebar(),5000); } However, when this is done, I get the error Maximum call stack size exceeded. How can I have this function repeat every 5000ms?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29142400
type: Question

http://stackoverflow.com/comment/46615989
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29201785
has text: I see. In that case then, I would suggest going the Session variable route and having a different session variable for each of your three auction items. This way, you can control the exact output of your template helper and keep the information for your auction items completely independent from eachother.

http://stackoverflow.com/a/29116175
type: Answer
has body: Modified your javascript slightly and this should work. var colorArray = ["#aa3333", "#33aa33", "#3333aa", "#aaaa33", "#33aaaa", "#aa33aa", "#aa6633", "#66aa33", "#33aa66"]; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function chooseRandomColor() { var randomInt = getRandomInt(0, colorArray.length); return colorArray[randomInt]; } changeElementColor = function(elementString) { console.log(elementString); var obj = document.getElementsByClassName(elementString); console.log(obj); var color = chooseRandomColor(); console.log(color) obj[0].style.backgroundColor = color; } [class^="button"] { background-color: #333333; float: left; margin: 5px; color: #aaaaaa; text-align: center; display: table; } [class^="button"] span { display: table-cell; vertical-align: middle; text-align: center; } .button1 { background-color: #3333ff; } .sm-sq-butt { font-size: 10px; height: 60px; width: 60px; } .md-sq-butt { font-size: 20px; height: 120px; width: 120px; } HOME
answers question: http://stackoverflow.com/q/29115848
score: 0

http://stackoverflow.com/q/29196339
tagged with: javascript
has comment: http://stackoverflow.com/comment/46605485
has body: var cars = ["nano", "bmw"]; var bikes = ["pulsar", "splander"]; var con = []; var foundCars = []; var foundBikes = []; var notFoundTransport =[]; for(var i = 0; i&lt;cars.length; i++){ con = prompt("enter your tranport name"); if(con[i] == cars[i]){ foundCars.push(con[i]); } } for(var i = 0; i&lt;2; i++){ alert(foundCars[i]); } Why it shows the undefined value after alerting foundcars array eg, nano bmw it's alert, undefined, undefined Please let me know where I am wrong.
answer count: 3
has answer: http://stackoverflow.com/a/29196533
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29196423
has answer: http://stackoverflow.com/a/29196423
score: 0
has answer: http://stackoverflow.com/a/29196428
accepted answer: http://stackoverflow.com/a/29196533
has comment: http://stackoverflow.com/comment/46605556
has title: Why my program alerting undefined value
type: Question

http://stackoverflow.com/q/29208793
has body: Hope this is not a stupid question but I am running out of ideas... So i have this modal : 1.scala.html &lt;div class="feat" id="cor" data-toggle="tooltip" data-placement="bottom" title="add conference role"&gt;&lt;div data-toggle="modal" data-target="#conf-role-menu-modal"&gt;Conference Role&lt;/div&gt;&lt;/div&gt; &lt;div class="modal fade" id="conf-role-menu-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body-conf-role-menu"&gt; &lt;script type="text/javascript"&gt; $(function(){ $(".modal-body-conf-role-menu").load("@routes.Application.areaConferenceRole(id,idenv)"); }); &lt;/script&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; And with the script from my modal body, I try to load this page : 2.scala.html @(id:String, idenv:String) @Main("Add area") { &lt;form action="@routes.Application.areaPostConferenceRole(id,idenv)" method="POST"&gt; First Name: &lt;input type="text" name="first_name" id="first" class="form-control"&gt; Last Name : &lt;input name="last_name" class="form-control"&gt; &lt;script type="text/javascript"&gt; $( document ).ready(function() { // Handler for .ready() called. $( "#first" ).focus(function() { alert( "Handler for .focus() called." ); }); }); &lt;/script&gt; &lt;/form&gt; } The page it is loaded ok. I see it in my modal ... The problem is that the scripts from my page 2.scala.html won't work. I do not understand why... they work if I try them outside from the page I try to load inside my modal ..…
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/37970468
type: Question
tagged with: modal-dialog
tagged with: javascript
has comment: http://stackoverflow.com/comment/46646036
has comment: http://stackoverflow.com/comment/46627765
answer count: 3
tagged with: playframework
downvote count: 0
tagged with: load
has answer: http://stackoverflow.com/a/48258947
favorite count: 0
has answer: http://stackoverflow.com/a/77778005
has title: scripts wont work inside my bootstrap modal
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/q/29094910
tagged with: javascript
type: Question
tagged with: regex
has body: The regex: "12 DOse Flaschentomaten".split(/(\d+(?:\s(?:Dose|TL|EL)){0,})\s+(.*)/gi) Gives me in the regex tool (https://www.regex101.com/) two groups: 12 DOse Flaschentomaten Which is what I want. But in the javascript console this array ["", "12 DOse", "Flaschentomaten", ""] Side Questions: If I want to use an external array for the filter words do I have to define it as a string: var filterWords = "sp, ts, spoon"; Can I use the i tag for not case sensitive also only on groups?
has title: Javascript Regex Split After Certain Word or Number
has comment: http://stackoverflow.com/comment/46421120
has comment: http://stackoverflow.com/comment/46421489
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46421206
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29095517
has comment: http://stackoverflow.com/comment/46421071

http://stackoverflow.com/comment/46436533
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29103076
has text: In order to fully diagnose this problem it would be necessary to have version numbers (for IE and jQuery) and also the URLs of the page you are writing and the service URL it's connecting to. But I think you might be suffering from the same problem as this question: http://stackoverflow.com/questions/17550248/ajax-cross-domain-request-ie-8 (i.e. cross origin requests not working in IE8 and 9 with jQuery)

http://stackoverflow.com/comment/46529066
has text: Um, should there be two 1305s?
type: Comment
comment on: http://stackoverflow.com/q/29153897
type: QuestionComment
score: 2

http://stackoverflow.com/q/29191677
type: UnansweredQuestion
type: Question
has title: d3.js x is NaN?
has comment: http://stackoverflow.com/comment/46597778
score: 0
tagged with: javascript
has body: When I use the d3.js, I get a problem. The root in my js code is my JSON variable. I cannot find any x nor y, why? So, where is the problem? Forgive me for my poor English. And my js code is: var diameter = 960, format = d3.format(",d"); var pack = d3.layout.pack() .size([diameter - 4, diameter - 4]) .value(function(d) { return d.size; }); var svg = d3.select("#mainBox1").append("svg") .attr("width", diameter) .attr("height", diameter) .append("g") .attr("transform", "translate(2,2)"); var root = JSON.parse(jsonPath); console.log(root); { var node = svg.datum(root).selectAll(".node") .data(pack.nodes) .enter().append("g") .attr("class", function(d) { return d.children ? "node" : "leaf node"; }) .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); node.append("title") .text(function(d) { return d.name; }); node.append("circle")enter code here .attr("r", function(d) { return d.r; }); node.filter(function(d) { return !d.children; }).append("text") .attr("dy", ".3em") .style("text-anchor", "middle") .text(function(d) { return d.name.substring(0, d.r / 3); }); }
has comment: http://stackoverflow.com/comment/46597590
answer count: 0
tagged with: d3.js

http://stackoverflow.com/a/29175528
score: 1
has comment: http://stackoverflow.com/comment/46569345
has comment: http://stackoverflow.com/comment/46571208
has comment: http://stackoverflow.com/comment/46569537
has comment: http://stackoverflow.com/comment/46638298
upvote count: 1
has comment: http://stackoverflow.com/comment/46570936
type: Answer
has comment: http://stackoverflow.com/comment/46570813
has comment: http://stackoverflow.com/comment/46569499
has comment: http://stackoverflow.com/comment/46569088
answers question: http://stackoverflow.com/q/29175143
has body: You should be able to do this in 1 line of JavaScript: document.querySelector("body").innerText
has comment: http://stackoverflow.com/comment/46588172
has comment: http://stackoverflow.com/comment/46568902
downvote count: 0

http://stackoverflow.com/q/29157077
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30209093
tagged with: google-chrome
type: Question
answer count: 2
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/30209093
has answer: http://stackoverflow.com/a/29202954
accepted answer: http://stackoverflow.com/a/29202954
tagged with: css
has body: I've been playing with jquery-ui resizable and have been testing mainly in chrome. So what I have is a "main" window that is designed to be resizable and draggable, but situated at the bottom right of the screen by default. #main { position: absolute; bottom: 0; right: 0; width: 300px; height: 200px; } However the resizing portion of the code has been giving me trouble, after 2 days of playing with my code my friend loaded the page and said it worked for him. I didn't believe him and tried it myself, and it wouldn't work. Then he told me he was using Firefox, so I tried there and the code executed perfectly. I'm trying to go for as much support as possible, and really want it to work perfectly in chrome as well. The code I'm using is pretty basic, and I don't think there's a problem with how I execute it. // $("#main").draggable({handle: "h1:first-of-type", containment: "parent"}); $("#main").resizable({ handles: "n,s,e,w", maxWidth: 500, minWidth: 100, minHeight: 50, containment: "parent" }); However, I do think this is a problem with jQuery and chrome, because if you add the "draggable" and drag the window first the resizing works perfectly. I assume dragging is setting some variable that resize isn't doing, however I couldn't tell the difference while debugging the elements themselves. I assume the issue occurs because of the "bottom" and "right" css attributes that are applied to "main." I'm thinking jQuery is failing to do some sort of computing when executing their "resize" code, which exists in the "draggable" code. However I'm not familiar enough with their code to even tell what's different, if it's even a problem in their code. I have created a jsfiddle to demonstrate the problem, for simplicity I commented out the draggable component from the fiddle (use Google chrome for specific case): http://jsfiddle.net/feildmaster/t4h7x594/ So now I ask, do you think the problem I have is with my own code, jQuery, or chrome? Is it fixable on my own end? Should I toss…
has title: jQuery resize on elements that have been positioned with css don't resize correctly in chrome

http://stackoverflow.com/comment/46644148
has text: They're actually the same thing. using ':' is just syntactic sugar and includes the 'self' argument automatically
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/29217518
type: Comment

http://stackoverflow.com/comment/46498729
type: AnswerComment
score: 0
type: Comment
has text: Thanks Arun, the error is gone now. I will check on it later again to see if it is still gone or came back. With previous changes the errors were also gone and came back.
comment on: http://stackoverflow.com/a/29137014

http://stackoverflow.com/comment/46565078
has text: You need one more set of parentheses to get the `^` and `$` to work correctly. (As written there are two gloabl alternatives - one beginning with the `^` and the other ending with the `$` - both anchors need to apply to both alternatives.)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29171340
type: Comment

http://stackoverflow.com/comment/46396339
score: 0
comment on: http://stackoverflow.com/a/29066925
type: Comment
type: AnswerComment
has text: @LucyWalsh - then the input to your function is not causing you to set the `burn` value appropriately. So, either the arguments you pass to your function or the logic in your function is not what it should be. Not much we can do without knowing exactly what you are passing to the function.

http://stackoverflow.com/q/29075209
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: ui-grid angularjs inside bootstrap nav-tab
has comment: http://stackoverflow.com/comment/46387729
linked to: http://stackoverflow.com/q/29024437
downvote count: 0
score: 1
has body: I have bootstrap 3 in angularjs as this I get the grid as below Why is that so? If I take grid out of the tab, it works well. Also on resize the window, it renders well. Why not on page load? How do i overcome it? It would be better if I get some standard solution instead of some window resize event handling.
type: Question
has answer: http://stackoverflow.com/a/36501978

http://stackoverflow.com/comment/46640145
has text: Almost a duplicate of [How do I remove an object from an array with JavaScript?](http://stackoverflow.com/q/3396088/218196)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29215088

http://stackoverflow.com/q/29078694
has comment: http://stackoverflow.com/comment/46391587
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: sorting
has body: I've checked the forum to see if i'll have an answer to this question but so far, i haven't. I have this 2 dimensional array that i want to sum up their values if they are the same. Here is an example. CAR CAH 394 CAR CAH 96 CAR CAP 268 DOR CAF 71 DOR CAP 96 DOR CAP 268 VAC GILAB 71 After sorting the array, i have the above values. How can i add up all the duplicates in the arraylist. In this case, it will affect CAR|CAH and DOR|CAP. So instead of returning the duplicates, its goint to return one with the combined sum.
has comment: http://stackoverflow.com/comment/46390787
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29079202
has comment: http://stackoverflow.com/comment/46390907
accepted answer: http://stackoverflow.com/a/29079202
type: Question
has title: Returning sum of duplicate elements in javascript array
score: 0

http://stackoverflow.com/a/29132731
score: 3
has body: It's because this refers to the window object. If you want this to be bound to the clicked element, you could invoke the function with the .call() method and pass this. Example Here &lt;tr onclick="showDetails.call(this)"&gt;&lt;/tr&gt; Alternatively, you could also just pass a reference to this as a parameter: Example Here &lt;tr onclick="showDetails(this)"&gt;&lt;/tr&gt; function showDetails(el) { $(".hiddenContent").hide(); $(el).find(".hiddenContent").show(); } The better approach would be to use unobtrusive JavaScript and attach an event listener to the tr elements instead: Example Here $('tr').on('click', function () { $(".hiddenContent").hide(); $(this).find(".hiddenContent").show(); });
accepted answer of: http://stackoverflow.com/q/29132659
has comment: http://stackoverflow.com/comment/46491501
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29132659
type: Answer
upvote count: 3

php
tags question: http://stackoverflow.com/q/29120126
tags question: http://stackoverflow.com/q/29126342
tags question: http://stackoverflow.com/q/29083855
tags question: http://stackoverflow.com/q/29122509
tags question: http://stackoverflow.com/q/29172378
tags question: http://stackoverflow.com/q/29192444
tags question: http://stackoverflow.com/q/29081235
tags question: http://stackoverflow.com/q/29155552
tags question: http://stackoverflow.com/q/29134796
tags question: http://stackoverflow.com/q/29091610
tags question: http://stackoverflow.com/q/29097101
tags question: http://stackoverflow.com/q/29092584
tags question: http://stackoverflow.com/q/29126790
tags question: http://stackoverflow.com/q/29124304
tags question: http://stackoverflow.com/q/29145965
tags question: http://stackoverflow.com/q/29116491
tags question: http://stackoverflow.com/q/29130244
tags question: http://stackoverflow.com/q/29184211
tags question: http://stackoverflow.com/q/29215960
tags question: http://stackoverflow.com/q/29078285
tags question: http://stackoverflow.com/q/29121531
tags question: http://stackoverflow.com/q/29077001
tags question: http://stackoverflow.com/q/29163593
tags question: http://stackoverflow.com/q/29106494
tags question: http://stackoverflow.com/q/29062828
tags question: http://stackoverflow.com/q/29117764
tags question: http://stackoverflow.com/q/29204482
tags question: http://stackoverflow.com/q/29217216
tags question: http://stackoverflow.com/q/29092448
tags question: http://stackoverflow.com/q/29132755
tags question: http://stackoverflow.com/q/29214977
tags question: http://stackoverflow.com/q/29091336
tags question: http://stackoverflow.com/q/29091693
tags question: http://stackoverflow.com/q/29183451
tags question: http://stackoverflow.com/q/29130742
tags question: http://stackoverflow.com/q/29207074
tags question: http://stackoverflow.com/q/29175076
tags question: http://stackoverflow.com/q/29152615
tags question: http://stackoverflow.com/q/29141760
tags question: http://stackoverflow.com/q/29095016
tags question: http://stackoverflow.com/q/29095184
tags question: http://stackoverflow.com/q/29106237
tags question: http://stackoverflow.com/q/29186376
tags question: http://stackoverflow.com/q/29084672
tags question: http://stackoverflow.com/q/29172733
tags question: http://stackoverflow.com/q/29142352
tags question: http://stackoverflow.com/q/29090846
tags question: http://stackoverflow.com/q/29088839
tags question: http://stackoverflow.com/q/29068640
tags question: http://stackoverflow.com/q/29103290
tags question: http://stackoverflow.com/q/29203032
tags question: http://stackoverflow.com/q/29217697
tags question: http://stackoverflow.com/q/29199422
tags question: http://stackoverflow.com/q/29069875
tags question: http://stackoverflow.com/q/29081324
tags question: http://stackoverflow.com/q/29088881
tags question: http://stackoverflow.com/q/29114345
tags question: http://stackoverflow.com/q/29176293
tags question: http://stackoverflow.com/q/29175334
tags question: http://stackoverflow.com/q/29156417
tags question: http://stackoverflow.com/q/29119921
tags question: http://stackoverflow.com/q/29104819
tags question: http://stackoverflow.com/q/29064714
tags question: http://stackoverflow.com/q/29111889
tags question: http://stackoverflow.com/q/29065808
tags question: http://stackoverflow.com/q/29185548
tags question: http://stackoverflow.com/q/29098098
tags question: http://stackoverflow.com/q/29180992
tags question: http://stackoverflow.com/q/29201967
tags question: http://stackoverflow.com/q/29167802
tags question: http://stackoverflow.com/q/29088717
tags question: http://stackoverflow.com/q/29141788
tags question: http://stackoverflow.com/q/29209045
tags question: http://stackoverflow.com/q/29127689
tags question: http://stackoverflow.com/q/29179864
tags question: http://stackoverflow.com/q/29071762
tags question: http://stackoverflow.com/q/29091310
tags question: http://stackoverflow.com/q/29157483
tags question: http://stackoverflow.com/q/29108677
tags question: http://stackoverflow.com/q/29125741

http://stackoverflow.com/q/29173548
tagged with: image
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29173704
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29173704
downvote count: 0
has title: Set element width to image inside it
has body: I have a page that displays an image, along with some metadata about it. The image and metadata should be centered in the page. I'd like the div containing the metadata to be exactly as wide as the image. Sorta like so: Unfortunately, it's not possible for me to reliably determine the image's width before serving the page. Right now I'm using a listener on load: $('.image-container img').one('load', function() { $('.image-container, .image-container *').css('max-width', $(this).width()); }); This works, but if the image is large and takes a while to load, the page looks crappy until it finishes. So I'm looking for either: A way to use CSS to express that the container should be exactly as wide as the image inside it. An event that fires as soon as the browser gets enough information to know the image's width (which is pretty early on, from what I can see). Thanks!
score: 1
has comment: http://stackoverflow.com/comment/46565383
has comment: http://stackoverflow.com/comment/46565178
type: Question
has comment: http://stackoverflow.com/comment/46565336
tagged with: javascript

http://stackoverflow.com/q/29111457
score: 2
type: AnsweredQuestion
type: Question
has body: &lt;input id="a" type="radio" name="radioButton"&gt; &lt;input id="b" type="radio" name="radioButton"&gt; &lt;input id="c" type="radio" name="radioButton"&gt; &lt;input id="d" type="radio" name="radioButton"&gt; Lets say I have four radio buttons and how do I make the first-child to be checked as default by using just javascript, no jQuery please. This is what I have done but did not work. Thanks in advance. document.querySelectorAll('[name=radioButon]:first-child').checked = true;
has answer: http://stackoverflow.com/a/29111501
answer count: 1
tagged with: javascript
tagged with: radio-button
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/29111501
favorite count: 0
upvote count: 2
has title: checked first radio button as default using javascript only
tagged with: input
tagged with: css

http://stackoverflow.com/a/29140965
has body: You can't select elements based on data in D3. I would assign a unique ID based on the data to each element and select according to that.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29131537
score: 1
answers question: http://stackoverflow.com/q/29131537
upvote count: 1

http://stackoverflow.com/a/29208159
accepted answer of: http://stackoverflow.com/q/29207740
answers question: http://stackoverflow.com/q/29207740
has comment: http://stackoverflow.com/comment/46635078
upvote count: 1
has comment: http://stackoverflow.com/comment/46627250
has comment: http://stackoverflow.com/comment/46627120
has body: There is a couple of things that should/may be corrected in your code. Missing angular.bootstrap(document, ['MyApp']);. Because when you use requireJS, angular.bootstrap() is a need. Instead of angular got init right when script load, require got init first. And this it will cause your app crashed. In order to make it work you need to wait require init => then it will load angular up and init angular => after everything done, bootstrap your app. define() supposed to wrapped all code of a module/file require() Use to call a module/file. RequireJS use for seperating your modules into files. So it will be easier to management and possibly improve load time of your app if you config it nicely. By puting a many modules in a files. You just ruined the using purpose of requireJS. (e.g. I have built an app that got the total amount of code, plugins and html at around 3MB. But at the first page loading, it only 400kb, cool heh?) You can try something like following: requirejs.config({ baseUrl: 'bower_components', paths: { 'angular': '../bower_components/angular/angular', 'angular-resource': '../bower_components/angular-resource/angular-resource', 'app' : '../scripts/app' // 'app' is the module name. It got defined by define() block, and can be loaded by either require() or define() block }, shim: { 'angular': { exports: 'angular' }, 'angular-resource': { deps: ['angular'], } }, }); require(["app"], function(app) { console.log(app); app.controller("MyCtrl", ['$scope', '$resource', function($scope, $resource) { console.log("hello"); // this doesn't work $scope.items = [1, 3, 4, 5]; } ]); angular.bootstrap(document, ['MyApp']); }); and inside your app.js define(["angular", "angular-resource"], function(angular) { var app = angular.module('MyApp', ['ngResource']); return app; });
score: 1
has comment: http://stackoverflow.com/comment/46628887
has comment: http://stackoverflow.com/comment/46626833
has comment: http://stackoverflow.com/comment/46626586
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29194396
answers question: http://stackoverflow.com/q/29194125
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0
has body: When using media queries, it isn't usually wise to set the height of the device, just the width. The orientation of the device sets the width, so the media query will still work if you change between portrait and landscape. You could have the calendar wrapper 100% but a maximum of 700px, which makes each day at 100px fit inside it perfectly, then if the screen is less than 700px you could move them into a vertical arrangement. I have thrown together an example here just using one simple media query > https://jsfiddle.net/pfg1dxfy/ You will see that by grabbing the bar between the javascript window and the results window and resizing it, the tables will change based on the width. I have also added a simple clear fix, you need this when floating elements. In the CSS it is .clear {clear:both;} and you then include it after all of the floated elements with .calendar{ margin: 0; padding: 0; list-style: none; float:left; width: 100px; } .clendar-wrapper{ width: 100%; max-width: 700px; margin: auto; } @media (max-width: 699px) { .calendar{ width: 100%; float: none; margin: 30px 0; } }
accepted answer of: http://stackoverflow.com/q/29194125
score: 1

http://stackoverflow.com/q/29152358
has answer: http://stackoverflow.com/a/29152432
has body: Iv'e got a few angular vars : $scope.clicks_17 = 0; $scope.clicks_18 = 0; $scope.clicks_19 = 0; Then i want to access them like that, with dynamic variables : $scope.more = function(){ date = new Date; var h = date.getHours(); $scope.clicks_'+h' += 1; } But i can't make it work .. Any idea ? It means that the variable "h" needs to be "glued" at the end of the variable "clicks_". Thank you !
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/4244896
score: 0
duplicate of: http://stackoverflow.com/q/4244896
accepted answer: http://stackoverflow.com/a/29152432
tagged with: angularjs
type: AnsweredQuestion
has title: Angular Dynamic variable renaming
type: Question

http://stackoverflow.com/a/29165114
type: Answer
has comment: http://stackoverflow.com/comment/46558271
has comment: http://stackoverflow.com/comment/46550920
score: 0
answers question: http://stackoverflow.com/q/29165047
has body: Use SVGResize event to detect resize of element https://developer.mozilla.org/en-US/docs/Web/Events/SVGResize

http://stackoverflow.com/comment/46450729
has text: ouh ok. Thanks jlowcs. I will try it :)
comment on: http://stackoverflow.com/q/29110618
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29158788
tagged with: jquery
score: 1
has title: Javascript click on each input get value from it
accepted answer: http://stackoverflow.com/a/29158969
favorite count: 0
upvote count: 1
possible better answer: http://stackoverflow.com/a/29158906
has answer: http://stackoverflow.com/a/29158906
has answer: http://stackoverflow.com/a/29158969
has comment: http://stackoverflow.com/comment/46544025
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46538751
has body: Below is my code &lt;div class="control"&gt; &lt;input type="button" value="big" /&gt; &lt;input type="button" value="blink" /&gt; &lt;input type="button" value="bold" /&gt; &lt;input type="button" value="fixed" /&gt; &lt;input type="button" value="italics" /&gt; &lt;input type="button" value="small" /&gt; &lt;input type="button" value="strike" /&gt; &lt;input type="button" value="sub" /&gt; &lt;input type="button" value="sup" /&gt; &lt;/div&gt; Then I want to get value from each input when click on it. The problem is that I don't know how to write it in javascript. If in jQuery something like this: $('.control input[type=button]').click(function() { console.log($(this).val()); }); How can I convert the code above to javascript?
has comment: http://stackoverflow.com/comment/46537825
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

jquery-events
tags question: http://stackoverflow.com/q/29125559
tag name: jquery-events
tags question: http://stackoverflow.com/q/29216370
tags question: http://stackoverflow.com/q/29082521
tags question: http://stackoverflow.com/q/29073409
type: Tag
tags question: http://stackoverflow.com/q/29113135
tags question: http://stackoverflow.com/q/29217788
tags question: http://stackoverflow.com/q/29105850
tags question: http://stackoverflow.com/q/29078385
tags question: http://stackoverflow.com/q/29098169
tags question: http://stackoverflow.com/q/29178288

http://stackoverflow.com/a/29242558
score: 3
has comment: http://stackoverflow.com/comment/46768944
upvote count: 3
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29201272
has body: var r = window.getSelection().getRangeAt(0); - gives the range inside the selection. r.startOffset, r.endOffset - gives you the bounds of the range in selection. If the div you are interested in has a id then you can get the element by: var objDiv = document.getElementById("divId"); var r = document.createRange(); r.selectNodeContents(objDiv); If the element doesn't have an id, then there are other means to get the object. See here: Finding HTML Elements And now you can get the bounds of range r using the startOffset and endOffset properties.
downvote count: 0
has comment: http://stackoverflow.com/comment/46731704
answers question: http://stackoverflow.com/q/29201272

http://stackoverflow.com/comment/46528273
has text: @Grundy It works the same inside an `ng-repeat` (I presume thats what you're talking about). Ill update my example to make it clearer
comment on: http://stackoverflow.com/a/29153541
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29116511
answers question: http://stackoverflow.com/q/29098937
accepted answer of: http://stackoverflow.com/q/29098937
score: 0
has body: My bad. Was calling done() twice in the bearer strategy.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29172226
score: 1
type: Question
has title: Show only items that have userid as child
has body: Here's the rules that I have: { "rules": { "deck":{ ".read":true, ".write":true, ".indexOn": "user" } } } Currently when I run: deckRef.once('value', function(dataSnapshot) { console.log(dataSnapshot.ref()); }); I get all my data returned: { "deck" : { "-JkpwAnieKjQVsdtPD4m" : { "deckName" : "Deck 1", "user" : "simplelogin:1" }, "-Jkq4unexm-qwhO_U2YO" : { "deckName" : "Deck 2", "user" : "simplelogin:1" }, "-Jkq5-II1q5yM6w3ytmG" : { "deckName" : "Deck 3", "user" : "simplelogin:6" }, "-Jks5mbMHmPB9MwnnOCj" : { "deckName" : "Deck 4", "user" : "simplelogin:1" } } } But I want to prevent anyone from accessing the items that don't match the user id. I tried changing the deck portion to: "deck": { ".read":"data.child('user').val() === auth.uid" } But this returns nothing. Ideally I'd like it to return just items 1,2 and 4 if user "simplelogin:1" in logged in or item 3 if "simplelogin:6" is logged in.
tagged with: javascript
has answer: http://stackoverflow.com/a/29172555
accepted answer: http://stackoverflow.com/a/29172555
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46639786
tagged with: firebase
tagged with: firebase-security
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14296625

http://stackoverflow.com/comment/46670960
has text: To define the value of y, you must do y=something. ie y=0. This is never done in your code. The y in the function is another y, look at variable scope.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29208056
type: AnswerComment

http://stackoverflow.com/comment/46547393
score: 0
has text: I don't need to get those spans. I can get them with `contains()`. I need to get the parent `button` :)
comment on: http://stackoverflow.com/a/29164086
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29166643
has body: I am trying to implement a "Share this on Facebook" functionality. Here is my code: HTML JavaScript function openPopupWindow(url) { window.open(url,'targetWindow', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480'); } AngularJS $scope.currentUrl = document.URL; I am using ui-sref to navigate between states and as a result, each URL that shows up in my browser will look something like this: http:// hostName:port/#/stateName That hashtag breaks the functionality I am trying to implement, meaning it will try to locate the page called stateName on Facebook. The resulting link of what I am trying to share becomes http:// www.facebook.com/stateName instead of http:// hostName:port/#/stateName. My question is: Is it possible to solve this without getting rid of the # in the URL? Thanks
has title: URL not working due to hashtag ('#') special character present
has answer: http://stackoverflow.com/a/29166709
tagged with: javascript
type: Question
answer count: 2
downvote count: 0
tagged with: url
possible better answer: http://stackoverflow.com/a/29166815
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29166815
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29166709
tagged with: http://stackoverflow.com/tag/html
tagged with: php
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/a/29122857
answers question: http://stackoverflow.com/q/29122811
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: Writing in.some.namespace.hello.apply(in.some.namespace.hello, some_args] looks verbose and errorprone. (In the below I've changed in. to n. because you can't declare a variable called in and I wanted to provide some live examples.) Three options, none of them really exciting: ;-) Use with, despite its bad rep and incompatibility with strict mode Write yourself a utility function Use a disposable variable and don't mind some really funky-looking syntax Use with: with (n.some) { namespace.hello.apply(namespace, some_args); } Slightly less repetition, though there's still some, and you have to use with, which is disallowed in strict mode. Utility function Example utility function: function callWith(obj, name, args) { return obj[name].apply(obj, args); } var n = { some: { namespace: { hello: function(a, b, c) { alert(this.name + " says " + [a, b, c].join(", ")); }, name: "namespace" } } }; callWith(n.some.namespace, "hello", [1, 2, 3]); (Be careful doing that if you use a minifier that renames methods, as it probably won't update the string.) Disposable variable and really funky syntax I want to be clear that I'm not recommending this, just flagging it up as an option: If you have a variable you keep lying around for this purpose, you can do this: (o = n.some.namespace, o.hello.apply(o, [1, 2, 3])); E.g.: var o; var n = { some: { namespace: { hello: function(a, b, c) { alert(this.name + " says " + [a, b, c].join(", ")); }, name: "namespace" } } }; (o = n.some.namespace, o.hello.apply(o, [1, 2, 3])); Arguably that's an abusage of the comma operator. At the very least. :-)

http://stackoverflow.com/q/29114343
possible better answer: http://stackoverflow.com/a/29114453
score: 0
has answer: http://stackoverflow.com/a/29114453
answer count: 3
tagged with: string
has title: show the location of each occurence of the character 'e' in a string
tagged with: character
has answer: http://stackoverflow.com/a/29137984
has answer: http://stackoverflow.com/a/29137648
type: AnsweredQuestion
tagged with: loops
type: Question
has body: WORKED UP AN ANSWER. SCROLL TO BOTTTOM I'm having trouble trying to display this character. For the most part, I have the code structure set but I'm having trouble storing the correct values in the arrays. Getting stuck and burned out! wordString = 'i, always, have, fruit, for, breakfast, consisting, of, a, small, fruit, bowl, with, yogurt, on, top, of, the, fruit, but, if, it, is, doughnuts, I, always, have, two, sometimes, they, have, sprinkles, and, sometimes, not, i, never, have, cereal, or, eggs, this, breakfast, regimen, is, very, healthy, especially, the, doughnuts.'; var wordPosition = []; var letterAppearance = wordString.match(/e/g); var positionStart = 0; for(i = 0; i &lt;= letterAppearance.length; i++) { positionStart = wordPosition[i]; if(positionStart === 0) { positionString = wordString.substr(positionStart, wordString.length) } else { positionString = wordString.substr(wordPosition[i], wordString.length) } wordPosition[i] = positionString.indexOf('e'); } Thanks for the help ahead of time EDIT Okay so I've worked on this a bit more and have something a bit simpler but have not yet gotten it to work. My values are not quite correct other than the 1st couple in the array var wordPosition = []; var letterAppearance = wordString.match(/e/g); var positionStart = 0; for( i = 0; i &lt;= letterAppearance.length; i++){ wordPosition[i] = wordString.indexOf('e')+ positionStart; positionStart = wordPosition[i]; } Heres are the values that I get. 14,28,42,56,70,84,98,112,126,140,154,168,182,196,210,224,238,252,266,280,294,308,322,336,350,364 EDIT ANSWER FOUND Okay, after working on it some more I've gotten the correct code for the answer. Here it is in the simplest form. locations = " letter 'e' occurs at locations: "; for (i = 0; i &lt;= wordString.length; i++){ character = wordString.substr(i,1); if(character === 'e'){ locations = locations + i.toString() + ","; } }
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29137648

http://stackoverflow.com/comment/46643030
type: Comment
has text: It worked, rather than using str.search I used .test which I was using before. var n = /\/[a-z0-9_\.-]*(SDK)[a-z0-9_\.-]*\.tar\.gz$/i.test(string); this is the regular exp I am using. Thanks.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29214844

http://stackoverflow.com/comment/46451246
has text: The problem needs to be specified more precisely. Do you know how many characters and/or words you want to appear on each line?
type: Comment
comment on: http://stackoverflow.com/q/29110922
score: 0
type: QuestionComment

http://stackoverflow.com/a/66567728
answers question: http://stackoverflow.com/q/29168433
score: 6
has body: I had similar problem using Vue.js: When you use variable in import(variableName) at build time Webpack doesn't know where to looking for. So you have to restrict it to known path with propriate extension like that: let something = import("@/" + variableName + ".js") That answer in github for the same issue was very helpful for me.
downvote count: 0
upvote count: 6
type: Answer

http://stackoverflow.com/q/29104708
has title: How do I update data embedded in the HTML script tag?
type: Question
has comment: http://stackoverflow.com/comment/46439893
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/46439801
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46439866
has comment: http://stackoverflow.com/comment/46439790
has body: I have a simple html page with Json-ld data embedded in the script tag. How do I update this data on the submit of a form? Here is some of the code of the page (data + load function). What I'm missing is the saveData function that updates the data embedded in the script section. Thank you, &lt;script id="person" type="application/ld+json"&gt; { "@context": "http://schema.org", "@type": "Person", "givenName": "Marco", "familyName": "Van Basten" } &lt;/script&gt; &lt;script&gt; function loadData() { var person = document.getElementById("person").textContent; var jsonld = JSON.parse(person); document.getElementById("givenName").value = jsonld.givenName; document.getElementById("familyName").value = jsonld.familyName; }
has comment: http://stackoverflow.com/comment/46439502
has answer: http://stackoverflow.com/a/29105737
accepted answer: http://stackoverflow.com/a/29105737
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46439478

http://stackoverflow.com/a/29069365
type: Answer
answers question: http://stackoverflow.com/q/29069355
has body: Hello you can add a class name for the HTML. then you can get each HTML by classname..
score: 0

http://stackoverflow.com/comment/46465655
has text: The person data i get from server is an array. Do i need to create another object and decorate each property as ko.observable? Is there a way to decorate whole object like ko.observable(object) instead of wiring each property?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29119008

http://stackoverflow.com/comment/46605552
comment on: http://stackoverflow.com/q/29187574
type: Comment
type: QuestionComment
has text: Okay, 404's can be good. if you're getting a status 404 in the console, keep the developer tools open, refresh the page, and pull up the Network tab. Scan through the list of Statuses. Most of them should be 200 (OK) or 304 (Not Modified.) Whatever is the 404 (cannot find file) may be the culprit for why it isn't working.
score: 0

http://stackoverflow.com/a/29143681
score: 0
has body: There are many ways to stop user supplied malicious data inserting into database. Regarding your situation, you can do the following steps: Check the incoming ajax calls generated from your server. Add CSRF through out in your application Always clean inserted data into your database which is called SQL Injection, you can read about SQL injection in OWSAP Always use htmlentities() Search for htmlentities php function to display output on the screen Thanks, I hope this will surely help you to understand the security.
type: Answer
answers question: http://stackoverflow.com/q/29143155

http://stackoverflow.com/comment/46539776
type: Comment
comment on: http://stackoverflow.com/a/29159850
has text: Oh wow, I didn't even notice close the tags! That solved it. I'll change the things you suggested as well. Thanks.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46635376
score: 0
has text: How many buttons are you trying to coordinate? Your post only mentions a single button, but your comment suggests multiple buttons...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29212355

http://stackoverflow.com/q/29198152
tagged with: lotus-notes
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46609579
has title: How to do a full refresh (submit form) per CSJS in XPages
accepted answer: http://stackoverflow.com/a/29205730
type: Question
has comment: http://stackoverflow.com/comment/46634523
has answer: http://stackoverflow.com/a/29205730
tagged with: javascript
has comment: http://stackoverflow.com/comment/46634485
score: 0
answer count: 1
tagged with: xpages
has body: I need to submit a form with full refresh per CSJS in an event. I know the solution to click the submit button. But is there a way to do it directly with JavaScript on client? Thank you!

http://stackoverflow.com/comment/46515268
type: Comment
has text: Unfortunately Chrome seems to be unpermissive on this subject. My solution does not work on Chrome, neither does the "close() then open()" trick
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29145222

http://stackoverflow.com/q/29070382
tagged with: javascript
upvote count: 13
favorite count: 0
has answer: http://stackoverflow.com/a/29070422
tagged with: angularjs
has body: Can anyone help me with how to disable anchor tag on http call success and enable it on error and vice versa This is my Html page Create New Account This is my controller $scope.MqUser=[]; $scope.getMqUser = function() { usSpinnerService.spin('spinner-1'); MQDetailsService.getUserDetails().success(function(data, status) { console.log(data); usSpinnerService.stop('spinner-1'); $scope.createQ = false; $scope.MqUser = data; console.log("Success in getting the user list"); console.log($scope.MqUser); //I want the anchor tag to get disabled here using angular directive. }).error(function(data,status){ //I want the anchor tag to get enabled here using angular directive. $scope.createQ = true; console.log(data); if(status == 0){ $scope.networkError(); } else{ $scope.fetchuserFail(data.message); } usSpinnerService.stop('spinner-1'); console.log("Failed to load the user list "+status); }) } $scope.getMqUser();
type: UnansweredQuestion
score: 13
answer count: 4
tagged with: anchor
has answer: http://stackoverflow.com/a/29073620
has title: How to disable anchor tags on http call success
downvote count: 0
has answer: http://stackoverflow.com/a/29070473
type: Question
has answer: http://stackoverflow.com/a/29070498
linked to: http://stackoverflow.com/q/7000927

http://stackoverflow.com/comment/46613151
score: 0
type: AnswerComment
type: Comment
has text: No,the properties could differ.
comment on: http://stackoverflow.com/a/29200450

http://stackoverflow.com/comment/46535888
type: QuestionComment
comment on: http://stackoverflow.com/q/29157675
has text: do you want to just add a class to the anchor element?
score: 0
type: Comment

http://stackoverflow.com/comment/46539283
has text: My final answer in UPDATE 3. Thanks.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29141952
type: AnswerComment

http://stackoverflow.com/comment/46374028
has text: This out this example: http://www.w3schools.com/json/json_http.asp. It's the same with what you want to do.
score: 2
comment on: http://stackoverflow.com/q/29069434
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29149169
type: Question
has title: How to loop and render elements in React.js without an array of objects to map?
tagged with: reactjs
accepted answer: http://stackoverflow.com/a/29149361
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/37544100
has body: I'm trying to convert a jQuery component to React.js and one of the things I'm having difficulty with is rendering n number of elements based on a for loop. I understand this is not possible, or recommended and that where an array exists in the model it makes complete sense to use map. That's fine, but what about when you do not have an array? Instead you have numeric value which equates to a given number of elements to render, then what should you do? Here's my example, I want to prefix a element with an arbitrary number of span tags based on it's hierarchical level. So at level 3, I want 3 span tags before the text element. In javascript: for (var i = 0; i &lt; level; i++) { $el.append('&lt;span class="indent"&gt;&lt;/span&gt;'); } $el.append('Some text value'); I can't seem to get this, or anything similar to work in a JSX React.js component. Instead I had to do the following, first building a temp array to the correct length and then looping the array. React.js render: function() { var tmp = []; for (var i = 0; i &lt; this.props.level; i++) { tmp.push(i); } var indents = tmp.map(function (i) { return ( &lt;span className='indent'&gt;&lt;/span&gt; ); }); return ( ... {indents} "Some text value" ... ); } Surely this can't be the best, or only way to achieve this? What am I missing?
possible better answer: http://stackoverflow.com/a/37544100
downvote count: 0
has answer: http://stackoverflow.com/a/48365976
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/55679549
has answer: http://stackoverflow.com/a/65284557
has answer: http://stackoverflow.com/a/29149361
has comment: http://stackoverflow.com/comment/54774296
score: 194
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/54773549
upvote count: 194
has answer: http://stackoverflow.com/a/34908476
has answer: http://stackoverflow.com/a/50183395

http://stackoverflow.com/a/29116834
answers question: http://stackoverflow.com/q/29113974
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: When you "remove" the url you are actually saving an empty string. localStorage.url = "" so your value checking is failing. I would also recommend tweaking the if logic to be clearer. Use something like this: if (url === undefined || url === null || url === "") { element.src = alturl; } else { element.src = url; } Optionally you can rely on JavaScript's truthiness. if (url) { element.src = url; } else { element.src = alturl; }
accepted answer of: http://stackoverflow.com/q/29113974

http://stackoverflow.com/comment/46545135
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29162771
has text: ...And it also crashes in a normal eventListener.

http://stackoverflow.com/comment/46544655
type: AnswerComment
score: 0
has text: How do i pull event data "e.data" in this?
type: Comment
comment on: http://stackoverflow.com/a/29162653

http://stackoverflow.com/q/29122687
has body: When running the code below I get the following exception: uninitialized constant ActionView::CompiledTemplates::Current Controller: class UserStepsController < ApplicationController include Wicked::Wizard steps :finishing_step def show @user = Current.user render_wizard end def update render_wizard end private def finish_wizard_path current_user.update_attributes(complete: true) redirect_to root_path end end Form: <%= form_for Current.user, url: wizard_path do |f| %> <%= f.label :first_name, "First Name" %> <%= f.text_field :first_name %> <%= f.label :middle_name, "Middle Name" %> <%= f.text_field :middle_name %> <%= f.label :last_name, "Last Name" %> <%= f.text_field :last_name %> <%= f.label :phone_number, "Phone Number" %> <%= f.text_field :phone_number %> <%= f.label :date_of_birth, "Date of Birth" %> <%= f.date_select :date_of_birth, start_year: 1900 %> <%= f.label :address_first_line, "Address (first line)" %> <%= f.text_field :address_first_line %> <%= f.label :address_second_line, "Address (second line)" %> <%= f.text_field :address_second_line %> <%= f.label :city, "City" %> <%= f.text_field :city %> <%= f.label :nationality, "Nationality" %> <%= country_select(:user, :nationality, {selected: "UG"}) %> <%= f.label :avatar %> <%= f.file_field :avatar %> <%= f.label :terms_of_service, "Agree to Terms of Service" %> <%= f.check_box :terms_of_service %> <%= f.submit "Register" %> <% end %> <%= render "devise/shared/links" %>
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/29122853
type: Question
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29122853
has title: uninitialized constant ActionView::CompiledTemplates::Current
tagged with: ruby-on-rails

http://stackoverflow.com/comment/46389617
has text: In my csv file I do not have first row as you defined in your sample CSV. I need to find out data-type of each column from csv and put a new row at top of csv file and add data-types.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29075184

http://stackoverflow.com/comment/46493623
type: QuestionComment
comment on: http://stackoverflow.com/q/29134039
has text: it's a function. you have to call it.
score: 0
type: Comment

http://stackoverflow.com/comment/46634363
comment on: http://stackoverflow.com/q/29212238
score: 0
type: Comment
has text: Have you tried using `$(this)` inside the `if`-statement in your javascript code?
type: QuestionComment

http://stackoverflow.com/a/29167921
has body: You need to make a variable and use ng-class e.g. $scope.page is your variable assign is value depending on page if(currentpage==exterior)$scope.page=1 if(currentpage==interior)$scope.page=2 if(currentpage==gallery)$scope.page=3 if(currentpage==discover)$scope.page=4 Then use the directive like this: and if you want to hide buttons there is a better way, use ng-hide instead of ng-class, e.g:
has comment: http://stackoverflow.com/comment/46559090
type: Answer
has comment: http://stackoverflow.com/comment/46557828
downvote count: 0
answers question: http://stackoverflow.com/q/29167750
score: 1
upvote count: 1

http://stackoverflow.com/q/29067988
has answer: http://stackoverflow.com/a/29080888
has comment: http://stackoverflow.com/comment/46371519
accepted answer: http://stackoverflow.com/a/29080888
has title: Does Angular use DOM diffing or must it "re-render" every list item?
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/29064684
tagged with: dom
score: 9
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/46371533
answer count: 1
tagged with: javascript
has body: I'm new to Angular, but I've already heard (and read) some "rumors" about its rendering model and how it is different from for example React. I've read some posts of Angular experts who claim that if you have to render long lists with Angular, it could be slow because Angular would re-render the whole list if something changes, while React (for example) "won't re-render the whole list from scratch once it has already been rendered but it will keep track of rendered DOM elements internally and upon new invocation create new virtual DOM, compare it to the previous one and only apply the changes" (quoted from a random blog post about Angular rendering issues) So as I started learning Angular, my first thing was trying this out. And it seems that I cannot reproduce the problem... Here is a dummy Plunker which I created to reproduce the issue. You can add new items to a list of messages which is rendered with ng-repeat like this: &lt;table&gt; &lt;tr ng-repeat="m in messages" class="{{name}}"&gt; &lt;td&gt;{{m.message}}&lt;/td&gt; &lt;td&gt;{{m.date}}&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; You can click on a button which could update one such item, and you can update another property which is totally unrelated to the list (name) Now if I open developer toolbar, and modify an item's HTML attributes inside the table and then I click on "add a new message", my modifications don't get lost or overwritten by Angular - it seems that Angular doesn't re-render the DOM fully. It seems to be pretty smart. Has Angular started to use DOM diffing lately? (My demo uses Angular 1.4.0 beta) Just because from the DOM rendering point of view, I just don't see the big difference between React and Angular. Could you show me a use case which show the drawback of Angular's rendering model?
favorite count: 0
has comment: http://stackoverflow.com/comment/46371623
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46372101
upvote count: 9
tagged with: angularjs

http://stackoverflow.com/q/29099108
has comment: http://stackoverflow.com/comment/46428742
has answer: http://stackoverflow.com/a/29099214
accepted answer: http://stackoverflow.com/a/29099214
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46428561
answer count: 1
has body: I'm trying to parse JSON data from an external json file (an Array). But noting is being returned. I'm getting an error (F12) Invalid character. What might be the issue here? How can I fix this? var myAr; $.ajax({url: 'test.json'}).done(function(d) { myAr = JSON.parse(d); // Invalid character }); external file: [ [ "Parrot", "Green"], [ "Swan", "White"] ]
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Invalid character error when parsing JSON

http://stackoverflow.com/q/29204513
accepted answer: http://stackoverflow.com/a/29204749
possible better answer: http://stackoverflow.com/a/29204624
has title: Javascript conduct Math operations using formula entered in textfield
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/29204749
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46620362
tagged with: jquery
has answer: http://stackoverflow.com/a/29204624
favorite count: 0
downvote count: 2
has body: I have multiple inputs like a1, a2, a3 etc. What I'd like to do is to enter the formula in another field and conduct the math operation accordingly. For example: (a1+a3)*a2, and according to the field values the sum is calculated. The values and formulas are dynamic so I have to somehow parse the formula in order to do this operation. Any thoughts how can I proceed?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46620401

http://stackoverflow.com/q/29173908
tagged with: css
accepted answer: http://stackoverflow.com/a/29173965
type: AnsweredQuestion
has title: How to create a form that flys out onto the screen using javascript/css
score: 0
has answer: http://stackoverflow.com/a/29173970
tagged with: forms
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29173965
possible better answer: http://stackoverflow.com/a/29173970
has body: I am relatively new to web programming (not programming, but yes to web). I am trying to figure out how to build a form that is off screen then when clicked, it moves onto the screen to allow the user to fill in some fields and submit the form field data. I found a good example of what I'd like to do on pcmag.com. They have a 'subscribe' link on the right side of the screen, then when you click it the form moves onto the screen from off the screen to be filled in and submitted. I'd have posted images, but as this is my first post here, it looks like I'm not allowed to. Thanks for any pointers/direction. Chris
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29198654
answers question: http://stackoverflow.com/q/29181215
score: 3
upvote count: 3
downvote count: 0
has body: Batch them up: var posts = []; for(i = 0; i &lt; images.length; i++){ var caption = convert(captions[i]); //change image to base64 $.post("base64.php", {base64: images[i]}, function(data){ var image = data; var post = new Post(); post.set("post", id); post.set("number", i + 1); post.set("by", by); post.set("title", title); post.set("description", description); post.set("caption", caption); post.set("views", 0); post.set("type", "image"); var parseImage = new Parse.File("image.png", {base64: image}); post.set("image", parseImage); // push to array for batch saving posts.push(post); }); } Parse.Object.saveAll(posts) .then(function() { console.log('all saved'); }, function(error) { console.error(error); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29181215
type: Answer

http://stackoverflow.com/a/29139709
score: 3
upvote count: 3
type: AcceptedAnswer
has body: I think you might just need a sort. // Just setting up object array to match example: var gridinfo = [ { id: "grid_75", order: 5, row: 4 }, { id: "grid_74", order: 1, row: 1 }, { id: "grid_91", order: 9, row: 1 }, { id: "grid_85", order: 5, row: 7 }, { id: "grid_78", order: 5, row: 1 } ] // This sort is what does all the magic.. it first sorts by row, then order. // I lifted this bit of javascript ninjutsu from: // http://www.sitepoint.com/sophisticated-sorting-in-javascript/ gridinfo.sort(function(a, b) { if(a.row === b.row) { return a.order &lt; b.order ? -1 : a.order &gt; b.order ? 1 : 0; } return a.row - b.row; }); // Display sorted array: for(var k=0; k&lt;gridinfo.length; k++) { document.write('id: '+gridinfo[k].id+'&lt;br&gt;'); document.write('row: '+gridinfo[k].row+'&lt;br&gt;'); document.write('order: '+gridinfo[k].order+'&lt;br&gt;'); document.write('-------&lt;br&gt;'); }
accepted answer of: http://stackoverflow.com/q/29130969
type: Answer
answers question: http://stackoverflow.com/q/29130969
downvote count: 0

http://stackoverflow.com/q/29129564
score: 1
has comment: http://stackoverflow.com/comment/46567087
has comment: http://stackoverflow.com/comment/46491633
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29132533
has title: CKEditor - How to check if textarea is empty on event?
tagged with: javascript
tagged with: ckeditor
has body: I'm trying to check if the textarea is empty using an event However, you can't add events like you usually would with jQuery or Javascript to a CKEditor and getting the value is not as easy as document.getElementById("TEXT_AREA_ID").value. I was wondering if there is a workaround for CKEditors to do this?
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29132533
type: AnsweredQuestion

typeahead
type: Tag
tag name: typeahead
tags question: http://stackoverflow.com/q/29182418
tags question: http://stackoverflow.com/q/29182231

http://stackoverflow.com/q/29066822
downvote count: 2
has body: I have multiple lis in an unordered list which when clicked gives me a summernote div. The problem is that all these lis have the same summernote div meaning when I click on a li and change the text in the summernote div the text changes for all the divs. My list: Topic Topic Topic My summernote code: Type something... $('#editor').summernote(); Every li I click in my list will have the same summernote div will appear. How can I fix this? My button code; $("#add").click(function() { $("#courseNav").append(" added "); });
tagged with: css
has title: Why do I have the same summernote div appear for all the lis in my list?
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/29066874
type: Question
tagged with: javascript
tagged with: jquery
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29066874
tagged with: summernote

http://stackoverflow.com/comment/46439128
has text: uncaught exception: Not a valid URL: http://localhost/gold6/processEntry.php @j08691
comment on: http://stackoverflow.com/q/29103466
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29190020
tagged with: jquery
has comment: http://stackoverflow.com/comment/46594515
has comment: http://stackoverflow.com/comment/46594587
tagged with: ajax
has comment: http://stackoverflow.com/comment/46594688
has comment: http://stackoverflow.com/comment/46594596
has comment: http://stackoverflow.com/comment/46594593
has comment: http://stackoverflow.com/comment/46594715
type: Question
has comment: http://stackoverflow.com/comment/46594533
tagged with: php
has comment: http://stackoverflow.com/comment/46594745
has comment: http://stackoverflow.com/comment/46594651
has comment: http://stackoverflow.com/comment/46594574
has body: Problem: All the other portions of the program works. When I add data:$("#friendadd").val() it won't update the table. I believe the problem might be with the value form? I've seen others use it to get the value of textboxes but shouldn't it still work when using a submit button? Purpose: each user on the website has an add-as-friend button next to it. When you click on that button, I want to put the userid of that user into a database "friends". Javascript PHP and HTML; $ctk_values are each of the users <?php for($i=0; $i<$ctk->rowCount(); $i++){ echo " ";//PP, Later add clickable profile echo " Attributes "; echo " ".$ctk_values[$i][0]." ";//UN echo " ".$ctk_values[$i][1]." ";//UL echo " ".$ctk_values[$i][5]." ";//UA ?> <input type="submit" value="<?php echo $ctk_values[$i][4];?>"> <?php }//Ends for loop ?> <?php } } ?> getuser.php <?php if(!isset($_SESSION)){ session_start(); } require "conn.php"; $gtu = $dbh->prepare("INSERT INTO friends (AskerId, AcceptorId, mutual, type) VALUES(:AskerId, :AcceptorId, :mutual, :type)"); $gtu->execute(array( 'AskerId'=>$_SESSION['UserId'], 'AcceptorId'=>$_POST['friendadd'], 'mutual'=>false, 'type'=>'friend' )); ?>
score: 0
has title: Ajax: Data passing through button value not working
has comment: http://stackoverflow.com/comment/46594730
has comment: http://stackoverflow.com/comment/46594662
has comment: http://stackoverflow.com/comment/46594572
answer count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/46591932
comment on: http://stackoverflow.com/q/29187993
type: QuestionComment
type: Comment
has text: hi ive pasted the code below..but i dont know how to get text inside tags thats inside a clicked list
score: 0

http://stackoverflow.com/q/29117711
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/29119298
tagged with: javascript
tagged with: fabricjs
has comment: http://stackoverflow.com/comment/46470648
tagged with: canvas
answer count: 1
downvote count: 0
has title: With two overlapping canvases, can I pass mouse events to the bottom one?
favorite count: 0
has body: I am trying to draw some guide lines via fabric.js like the online editor app on printio.ru. So far, I placed 2 canvases with the same size in one page, the top one is to be a static workcanvas which used to draw some guide lines and the bottom canvas will contain some interactive objects. This seems to be how they do it in the page on the link above. However, I can't work with those objects on the bottom canvas because the top canvas interrupts mouse events. Is there a way to let the mouse events to pass through to the bottom canvas? I am thinking of something like canvas.mouseenabled=false on the top canvas - is that possible? I have thought of an alternative solution: place the guide lines and other objects in one single canvas. I don't like that solution because it adds things that I don't want to the bottom canvas and, in that case, I have to add some line instances instead of just draw line by context2d, which I think will give me low performance
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2

http://stackoverflow.com/comment/46471547
type: Comment
comment on: http://stackoverflow.com/a/29114453
has text: I dont really know which program language you re using but that should work 99% sure. Anyway, your wordPosition[] havent got a fixed size, maybe there is a problemas there, as I said it will depend on the language
type: AnswerComment
score: 0

http://stackoverflow.com/a/29085474
has comment: http://stackoverflow.com/comment/59816571
has comment: http://stackoverflow.com/comment/137543583
has comment: http://stackoverflow.com/comment/103744276
answers question: http://stackoverflow.com/q/29085197
has comment: http://stackoverflow.com/comment/92063843
has comment: http://stackoverflow.com/comment/59796016
has comment: http://stackoverflow.com/comment/112006148
score: 74
has body: You can't. The keys of a map can be anything, including objects. But JSON syntax only allows strings as keys. So it's impossible in a general case. My keys are guaranteed to be strings and my values will always be lists In this case, you can use a plain object. It will have these advantages: It will be able to be stringified to JSON. It will work on older browsers. It might be faster.
upvote count: 90
has comment: http://stackoverflow.com/comment/129202181
has comment: http://stackoverflow.com/comment/58400494
downvote count: 16
has comment: http://stackoverflow.com/comment/57020709
has comment: http://stackoverflow.com/comment/58400620
type: Answer
has comment: http://stackoverflow.com/comment/57878372
has comment: http://stackoverflow.com/comment/59830526
has comment: http://stackoverflow.com/comment/58400949
has comment: http://stackoverflow.com/comment/132921653

http://stackoverflow.com/comment/46393879
type: AnswerComment
comment on: http://stackoverflow.com/a/29080310
score: 0
type: Comment
has text: I know ;) You should feel lucky that your question didn't get vote down, it happens a lot with questions like this, but I'm always glad to help !

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/29186951
tag name: datetimepicker
tags question: http://stackoverflow.com/q/29106037
tags question: http://stackoverflow.com/q/29201624

http://stackoverflow.com/q/29160622
answer count: 1
has body: I have a single page app '(Backend in Python/Django)' where my functions return json response and that json response handled by angular js in front end . I am using angular ajax call to hit the function. Now we all know that on ajax call url in address bar do not get changed. But in angular js we can set url using $location.path(). So it keeps the history of url I have visited and on browser back button it changes the url in address bar to previous one . But it do not change the content of the page. My angular ajax call : app.controller('myController', function($scope,$http, $location, $route, $timeout){ $scope.formData={} $scope.getAllBrainframes=function(id){ if(id){ $scope.url = '/get-brainframe/'+id+'/'; }else{ $scope.url = '/get-brainframe/'; } $http.post($scope.url) .success(function(data,status){ .success(function(data,status){ $scope.title = data[0].title $scope.brainframes = data; $location.path($scope.url); $scope.parent= data[0].id; }) .error(function(data,status){ }); } }); As I am setting $location.path() on ajax success , so it appends the current visited url in address bar and keeps history of every url i have visited. But when I click on browser back button it changes the url in address bar to previous one but not the content. Now is there any function that i can trigger when I click on browser back button or how I can change the content of page ? EDIT : above ajax success function edited . My html : 0 "> {$ brain.count_children $}{$ brain.brainframe_child.title $} <p ng-if = "brainframe.brainframes.length < 1 "> No brainframes are available.
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: ajax
has title: Issues with $location in Angularjs
tagged with: angularjs
type: Question
tagged with: django
score: 0
has answer: http://stackoverflow.com/a/29161851
has comment: http://stackoverflow.com/comment/46544620

http://stackoverflow.com/q/29120323
answer count: 1
type: UnansweredQuestion
tagged with: node.js
has title: Express.js res.render and res.json
has answer: http://stackoverflow.com/a/29120609
has body: i have some problem with express.js. I want to render my template on first request, and then get some data from routs. My routing look like: app.use(function (req, res, next) { res.render('index.jade'); next(); }); app.get('/', function(req, res){ res.json({a:1}); }) app.get('/contacts', function(req, res){ res.json({a:1}); }) app.get('/emails', function(req, res){ res.json({a:1}); }) The problem is that every request i do, set response to html/text by my middleware, and i can't get to other routs. Mb some one know how i can render template only once, and than be able to get to the other routs (i try to do SPA with express and backbone)
type: Question
tagged with: javascript
tagged with: express
score: 0

http://stackoverflow.com/comment/46492346
comment on: http://stackoverflow.com/q/29133267
score: 0
type: Comment
type: QuestionComment
has text: I should add that the json above is outputted by getData.php. Thanks again!

http://stackoverflow.com/comment/46503465
comment on: http://stackoverflow.com/a/29138767
type: Comment
has text: That's what I wanted to do. I am trying combination of different chart. The problem occurs when I try to mix column and bar chart.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46433757
score: 1
has text: Your code is synchronous while your file reading process is not. You need to implement the onreadystatechange function (and check for readyState = 4)
comment on: http://stackoverflow.com/q/29101857
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29211158
downvote count: 0
score: 9
type: Question
has title: Rspec & Capybara: Setting focus to an element using jQuery doesn't apply `:focus` CSS
answer count: 2
tagged with: capybara
tagged with: rspec
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29264963
has body: I have jump links for blind and keyboard users in my webpage which are moved out of the viewport to hide them visually; when they gain focus, they are moved into the viewport. I want to test this behaviour using RSpec and Capybara, but it somehow doesn't work. it 'moves the focus to the navigation when activating the corresponding link', js: true do expect(page).not_to have_css '#main:focus' page.evaluate_script "$('#jump_to_content &gt; a').focus()" click_link 'Jump to content' expect(page).to have_css '#main:focus' end The JavaScript in evaluate_script doesn't seem to be executed properly. I tried the same JS ($('#jump_to_content &gt; a').focus()) in the Chrome console, and I'm a bit unsure about the result, because while in the console, the link doesn't appear, but when clicking into the browser view, it appears for a part of a second and disappears again (it disappears because it doesn't have the focus anymore then). In my opinion it should be displayed directly after executing the JS. This makes me a bit insecure about all this. Any help is highly appreciated. Update I meanwhile have come to the conclusion that the behaviour of Chrome is normal: focus is kept in the console, so the element in fact doesn't really receive focus and doesn't show. I have also come to the conclusion that Capybara doesn't seem to be able to handle focusing an element (and applying :focus styles) properly. I have created the following CSS rules: a#jump_to_navigation color: black &amp;:focus color: red For testing this, I have set up this very specific test: visit root_path selector = 'a#jump_to_navigation' # Initial style expect(page.evaluate_script('document.activeElement.id')).to eq '' # Make sure the link isn't focused yet expect(page.evaluate_script("$('#{selector}').css('color')")).to eq 'rgb(0, 0, 0)' # Color initially is black # Set focus page.evaluate_script("$('#{selector}').focus()") # Focused style expect(page.evaluate_script('document.activeElement.id')).to eq 'jump_to_nav…
upvote count: 9
has answer: http://stackoverflow.com/a/41588813
accepted answer: http://stackoverflow.com/a/41588813
tagged with: phantomjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29264963

http://stackoverflow.com/q/29212037
has title: Node.js and Mongodb security + encryption options for source code
tagged with: encryption
upvote count: 1
has answer: http://stackoverflow.com/a/29675586
type: Question
type: AnsweredQuestion
tagged with: javascript
has body: I opened this thread cause i'm having hard time deciding on some issues i have with my project. The issues are: Encrypting source code files(not obfuscation, need encryption that can be ran). Encrypting documents stored in mongodb, mainly username and passwords. Mongodb login - is it possible to demand a username &amp; password to open connection to the server? Little bit of info: My project is to be installed on customer servers, so it's very important that the code will not be viewable and hopefully uncrackable(minimum security). 1 - For the first item, i found JXCORE and it seems promising, but i was unsuccessful at finding proof or reviews of users who used it in production. Anyone can recommend other methods? or if anyone can review the option i listed i'll appriciate it. 2 - For encryption i want to use AES256 and i found the library crypto-js to be able to answer the requirements. Unfortunately, it doesn't provide assistance with node.js(none that i could find). For example when i run this code, i want to see both the encrypted and the decrypted items: var AES = require("crypto-js/aes"); var temp = AES.encrypt("Message", "secret password").ciphertext.toString(); console.log(temp); console.log(AES.decrypt(temp, "secret password")); Only the encrypted ciphertext is presented, not sure how to access the decrypted text. On a side note, does anyone recommend using SHA3 combined with AES256? What is the recommended approach for securing username&amp;password mongodb DB? If you got a documentation link or useful tutorial for crypto-js in node.js please link in the comments. My JS skills aren't pro so it might be in there and i fail to see it, so apologizes if this was a noob thread. Thanks.
tagged with: mongodb
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/29675586
score: 1
has comment: http://stackoverflow.com/comment/46644500
favorite count: 0
has comment: http://stackoverflow.com/comment/46650117
tagged with: cryptojs
tagged with: node.js

http://stackoverflow.com/comment/46500633
score: 0
type: Comment
type: QuestionComment
has text: @Mark Getting error 'Object doesn't support property or method 'getScreenCTM'' in Internet explorer 11
comment on: http://stackoverflow.com/q/29128697

http://stackoverflow.com/comment/46414298
has text: Marked as best answer for the system I am using, both options presented work
comment on: http://stackoverflow.com/a/29088866
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29126737
tagged with: recaptcha
has body: I have some problem to get value change event on textarea. I`m working on reCAPTCHA, in client side I have textarea where Google lib injects token and i cant take that textarea change event. Here is the code in question: var el = $("#dod"); el.on("change", function() { alert($(this).val()); }); $("#bb").click(function() { $("#dod").val('other event value'); }); other event Demo: http://jsfiddle.net/ovosg22g/1/ I can take event of typical change of textarea value (when im typing or paste text into my element) but when other 'action' changes my element value event doesn`t fire. Can you explain why it is happening? And tell me what i have to do to catch that event? One more i need that for form validation, i want enable submit button only when captcha is correct (in this case when google lib inject token to textarea)
has comment: http://stackoverflow.com/comment/46523247
upvote count: 2
has comment: http://stackoverflow.com/comment/46510295
has comment: http://stackoverflow.com/comment/46479853
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46503019
score: 2
tagged with: textarea
answer count: 0
downvote count: 0
has title: How to get event of change value on textarea?
has comment: http://stackoverflow.com/comment/46516800
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46502986
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46479837

http://stackoverflow.com/comment/46491585
type: QuestionComment
comment on: http://stackoverflow.com/q/29132642
has text: Side note: Some people say exceptions should be used for *exceptional* things, and input validation isn't exactly exceptional.
score: 0
type: Comment

http://stackoverflow.com/q/29196714
accepted answer: http://stackoverflow.com/a/29196860
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46606610
has comment: http://stackoverflow.com/comment/46606247
tagged with: css
has title: How to sequence CSS transform commands, one after another
type: AnsweredQuestion
has body: So I'm trying to move and rotate an object using CSS translate commands. I've found how to do the two translations simultaneously, but I want the object to rotate immediately, and then move toward another coordinate. If anyone has any suggestions they are well recieved :) $rotate(d); move(s * 2, point2[0], point2[1]); function move(s, x, y) { $(".boat").css({ '-webkit-transform': 'translate('+x+'px, '+y+'px)', 'transform': 'translate('+x+'px, '+y+'px)', 'transition': 'transform '+s+'ms', '-webkit-transition-timing-function': 'linear', 'transition-timing-function': 'linear', '-webkit-transition-delay': '2s', /* Safari */ 'transition-delay': '2s' }); } function rotate(d) { $(".boat").css({ '-webkit-transform': 'rotate('+d+'deg)', 'transform': 'rotate('+d+'deg)' }); }
upvote count: 1
downvote count: 1
type: Question
tagged with: transform
has answer: http://stackoverflow.com/a/29196860
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46606167

http://stackoverflow.com/comment/46489650
score: 0
type: Comment
type: QuestionComment
has text: @charlietfl: I have add additional question. Can you please look at it ?
comment on: http://stackoverflow.com/q/29111199

http://stackoverflow.com/q/29206123
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29206149
has body: How select the div using sort-helper custom attr? I know attr('sort-helper') can only get the value.
has answer: http://stackoverflow.com/a/29206149
has title: custom attr selector using jquery
has answer: http://stackoverflow.com/a/29206154
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29206216
answer count: 3
has comment: http://stackoverflow.com/comment/46622975
score: 0
accepted answer: http://stackoverflow.com/a/29206154

http://stackoverflow.com/comment/46409628
score: 0
has text: Please show the actual code exactly as it is in the form where it does not work. You've shown us the calling structure of what doesn't work, but not the whole actual code that doesn't work. You're obviously doing something wrong. We can only identify what if you show us the actual code. Personally, I don't see why you're making your code this complicated.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29088375

http://stackoverflow.com/comment/46527665
comment on: http://stackoverflow.com/q/29153046
type: Comment
has text: Unfortunately that did not work... I got an `SyntaxError: Unexpected number` error
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46390434
score: 0
type: Comment
type: QuestionComment
has text: I updated my first post with a new try (using your link). But not working too. :/
comment on: http://stackoverflow.com/q/29077877

http://stackoverflow.com/comment/46402986
type: Comment
type: QuestionComment
has text: Punch [javascript timer](http://www.w3schools.com/js/js_timing.asp) into your favorite search engine.
comment on: http://stackoverflow.com/q/29085101
score: 3

http://stackoverflow.com/comment/46469420
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29121221
has text: I know, I've looked at tons of examples, at they're the same. I'm going to put the line where I call the API and the Places library (maybe somethings wrong there...)

http://stackoverflow.com/comment/46403621
type: AnswerComment
type: Comment
has text: What `INSERT` query are you referring to specifically?
comment on: http://stackoverflow.com/a/29085405
score: 0

http://stackoverflow.com/q/29160665
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29160877
possible better answer: http://stackoverflow.com/a/29160877
has answer: http://stackoverflow.com/a/29160726
accepted answer: http://stackoverflow.com/a/29160696
tagged with: javascript
tagged with: jquery
answer count: 3
has title: how to restrict user to select only two days back date as well current date in date picker jquery mobile
score: 0
has body: How to restrict to user to select current date or at-least past two days back date from date picker calendar? My code is: $('#date1').datepick({dateFormat: 'dd-mm-yyyy'}); var date1= $("#date1").val(); html code is: &lt;input type="text" id="date1" name="date" placeholder="Date"/&gt;
has answer: http://stackoverflow.com/a/29160696

http://stackoverflow.com/a/29116309
downvote count: 0
has comment: http://stackoverflow.com/comment/46474303
type: Answer
has body: You can use ngHide with a one time binding:
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29116018

http://stackoverflow.com/q/29082636
has body: I am working on a project that is supposed to take csv data that is being written in real time and display it on an html page. I am using Javascript, and the JQuery, HighCharts, and PapaParse libraries. Here is my JSFiddle with my code: https://jsfiddle.net/m5n8xdo9/3/ I know it doesn't look right, but I don't know how to make it look like it looks on my computer. Should I use a different hosting site? When I hardcode dummy data into the chart like this: //Altitude $(function () { $('#altGraph').highcharts({ chart: { type: 'line' }, title: { text: 'Payload Altitude' }, subtitle: { text: 'Altitude (m) vs. Time (s)' }, xAxis: { categories: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] }, yAxis: { title: { text: 'Altitude (m)' } }, plotOptions: { line: { dataLabels: { enabled: true }, enableMouseTracking: false } }, series: [{ name: 'Altitude', data: //dummy data here }] }); }); it all works and looks nice. But when I use papaparse to parse the csv into arrays of data, and pass an array of data to the corresponding chart like so: //Altitude $(function () { $('#altGraph').highcharts({ chart: { type: 'line' }, title: { text: 'Payload Altitude' }, subtitle: { text: 'Altitude (m) vs. Time (s)' }, xAxis: { categories: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] }, yAxis: { title: { text: 'Altitude (m)' } }, plotOptions: { line: { dataLabels: { enabled: true }, enableMouseTracking: false } }, series: [{ name: 'Altitude', data: altitude }] }); }); the charts show up blank. On my computer, after you choose a file the charts show up, though empty of data points. That's my problem. I was thinking that maybe since the charts are written to the page before the data is uploaded, that would be why the data isn't showing up. I am currently at a loss as to how to fix this.
has title: Highcharts chart not displaying data from csv file
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46400793
type: Question
has answer: http://stackoverflow.com/a/29099284
tagged with: highcharts
has comment: http://stackoverflow.com/comment/46404236
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/46599094
comment on: http://stackoverflow.com/a/29192614
score: 0
type: Comment
has text: I apologize for not making it clearer. I need the first list element to appear when the document loads and not without a 6000 ms delay. I will revise my question.
type: AnswerComment

http://stackoverflow.com/comment/46483476
type: AnswerComment
comment on: http://stackoverflow.com/a/29108829
has text: I'm not sure what you are saying isn't quite right - but your summary accurately states what is happening. I was trying to say above - they are not the same (primitive vs String object) and the only reason you can treat them the same is because the primitive is cast to the object under the covers. The console.log of the String object is showing you the internal representation of the object "Chrome displays it that way because that is what the String object is" (from the answer).
score: 0
type: Comment

http://stackoverflow.com/a/29073523
upvote count: 1
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29072992
has body: I just do something like this as mention in document and it work: $http.get('someUrl'). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. }); Here the sample: angular.module('myApp', []) .controller('JustCtrl', function($scope, $http) { $scope.ptis = []; // Simple GET request example : $http.get('https://gist.githubusercontent.com/idhamperdameian/239cc5a4dbba4488575d/raw/0a2ea4c6c120c9a8f02c85afcf7a31941ef74d3a/ptis.json'). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available $scope.ptis = data; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt; &lt;div ng-app="myApp" ng-controller="JustCtrl"&gt; &lt;span ng-repeat="p in ptis"&gt; {{p.name}}, {{p.description}}, etc...&lt;br&gt; &lt;/span&gt; &lt;/div&gt; Or you may prefer to this demo.

http://stackoverflow.com/q/29096165
has body: I've got a navbar with several tabs on it. When the screen size becomes small enough these tabs disappear and collect in the form of a clickable button, navbar-collapse, which expands showing the tabs in a vertical manner. I was able to have the elements in the dropdown centered with text-align: center, but this does not seem to affect the tabs when the navbar is fullsize. Is there a way to center the tabs both on fullsize and mobile (on the dropdown) which I was already able to do. Here's the JSFiddle: http://jsfiddle.net/sushiknives/c1zjbrmj/ One note on the JSFiddle: you need to drag the result page far left to see what the page would look like full-size.
type: Question
has answer: http://stackoverflow.com/a/29098043
accepted answer: http://stackoverflow.com/a/29098043
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Center navbar tabs for full size screens and within navbar-collapse for mobile screens
tagged with: twitter-bootstrap
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/a/29094642
has body: try some thing like this $("#buttonLink").click (function() { //try this var brtag= document.createElement("br"); //then brtag.id = "your_id" brtag.setAttribute("class", "your_class"); //and so on //then do rest of your stuffs }); it might work ...(do let me know it it works !)
upvote count: 2
has comment: http://stackoverflow.com/comment/46420818
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29094491
downvote count: 0

http://stackoverflow.com/q/29214004
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46643920
type: Question
has comment: http://stackoverflow.com/comment/46644575
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has body: I have a series from Jan - Dec, the requirement is to update the last data point to grayscale colors. So I have created additional data series assigning grayscale colors to the series. Can I be able to join the colored series with grayscale colored series http://jsfiddle.net/hgj7sfhp/33/ for example, London colored and London grayscale should be joined, like continuouss series after November, without any break in the series. I have London & Berlin in December points in the chart, but i wanted to attached to the colored series, is it possible ? Also group the legend of colored series and grayscale series. London, Berlin LondonGray, BerlinGray $(function () { var grayblue = '#1D1D1D'; var grayred = '#4C4C4C'; dataLondon = [ 48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 45.6, 90.4]; dataBerlin = [ 42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 23.6, 29.1] highcharts(dataLondon, dataBerlin, 0); function highcharts(dataLondon, dataBerlin, number) { $('#container').highcharts({ chart: { type: 'line' }, title: { text: 'Monthly Average Rainfall' }, subtitle: { text: 'Source: WorldClimate.com' }, xAxis: { categories: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], plotBands: { color: 'Red', from: 10.5, to: 10.55, label: { text: 'I am label' } } }, yAxis: { min: 0, title: { text: 'Rainfall (mm)' } }, tooltip: { headerFormat: '{point.key} ', pointFormat: ' {series.name}: ' + ' {point.y:.1f} mm ', footerFormat: ' ', shared: true, useHTML: true }, colors: ['#0000FF', '#FF0000'], plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'London', data: dataLondon }, { name: 'Berlin', data: dataBerlin }, { name: 'London', data: [null,null,null,null,null,null,null,null,null,null,null,10], color: '#1D1D1D' }, { name: 'Berlin', data: [null,null,null,null,null,null,null,null,null,null,null, 51.1], color: '#4C4C4C' }] }); } });
has comment: http://stackoverflow.com/comment/46639068
score: 0
has comment: http://stackoverflow.com/comment/46638664
has comment: http://stackoverflow.com/comment/46644244
has comment: http://stackoverflow.com/comment/46643828
has comment: http://stackoverflow.com/comment/46749629
answer count: 0
has title: Change the color of the series line dynamically by month

http://stackoverflow.com/a/29121805
score: 1
type: AcceptedAnswer
upvote count: 1
has body: JavaScript : x.style.width; x.style.height; x.style.background-image; Jquery: $('#x').css('width'); $('#x').css('height'); $('#x').css('background-image');
answers question: http://stackoverflow.com/q/29121725
type: Answer
accepted answer of: http://stackoverflow.com/q/29121725
downvote count: 0

http://stackoverflow.com/a/29195323
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46603530
accepted answer of: http://stackoverflow.com/q/29194736
has body: You can add parents in result tree in straightforward way. But for adding children you will have to use recursion. Refer following solution. var result_tree = []; var test_data = [ [ null, "A" ], [ "A", "B" ], [ "A", "C" ], [ null, "D" ], [ "D", "E" ], [ "D", "F" ], [ "B", "G" ] ]; function create_tree(test_data) { test_data.forEach(function (node) { // create new root parent node if node does not have any parent if (node[0] === null) { result_tree.push( { parent: node[1], } ) } // else search for existing parent and attach child to it else { search_and_attach_child(result_tree, node[0], node[1]); } }); } function search_and_attach_child(tree, parent, child) { if (!tree) { return; } tree.forEach(function (node) { if (node.parent === parent) { if (node.child) { node.child.push({parent: child}) } else { node.child = [{parent: child}] } } else { search_and_attach_child(node.child, parent, child); } }) } create_tree(test_data); console.log(JSON.stringify(result_tree));
answers question: http://stackoverflow.com/q/29194736
score: 0

http://stackoverflow.com/comment/46612512
type: QuestionComment
comment on: http://stackoverflow.com/q/29200120
score: 1
type: Comment
has text: An ` ` is a self-closing tag, your HTML is invalid.

http://stackoverflow.com/comment/46779169
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109932
has text: Could you please give details about `OnLoadPageByURL(s.data.urlPath);`?
score: 0

http://stackoverflow.com/a/29065359
score: 2
has comment: http://stackoverflow.com/comment/46368118
has comment: http://stackoverflow.com/comment/46368302
has comment: http://stackoverflow.com/comment/46367419
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46367538
has comment: http://stackoverflow.com/comment/46367841
accepted answer of: http://stackoverflow.com/q/29065230
answers question: http://stackoverflow.com/q/29065230
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/46367648
has body: start and run functions of CasperJS can only be used once, but there is also the thenOpen function to open a URL in a step. All then* and wait* functions are step functions. By calling them, you essentially schedule the steps that those functions represent. Furthermore, you can nest CasperJS steps. So that the steps further down in the script, but higher up in the tree will only be executed when all the nested steps are finished. // last step of test1.js casper.then(function() { this.getElementsInfo('.title').forEach(function(element) { // skip elements that don't have a href attribute... if (!element.attributes.href) { return; } // here come the contents of test2.js casper.thenOpen(element.attributes.href, function() { this.click('.responsivewrapper'); }).then(function(){ ... }).then(function(){ this.echo(yt_links.join('\n')).exit(); this.echo(yt_links.length + ' link(s) found'); }); }); }); I used the builder/promise pattern to make the code example a little shorter.
has comment: http://stackoverflow.com/comment/46367576

http://stackoverflow.com/comment/46484976
type: QuestionComment
comment on: http://stackoverflow.com/q/29129514
has text: I don't see why this is downvoted. It's a valid question.
score: 0
type: Comment

http://stackoverflow.com/comment/46448981
type: QuestionComment
comment on: http://stackoverflow.com/q/29109400
has text: Please open your console and post the error message
score: 0
type: Comment

http://stackoverflow.com/comment/46506589
score: 0
comment on: http://stackoverflow.com/q/29141036
type: Comment
type: QuestionComment
has text: @MichaelDibbets you should avoid to link to `w3schools` they still suffer from inaccuracies. It is valid to leave the `-moz-` prefix out in the example and that the `-webkit-` is still required, but they do not mention why. It for sure is in this case a minor problem, but there are many question of beginners here on SO referencing a w3school page they learn from, asking why something is not working. And if you look then on that w3schools page you will most of the time see that it was a misunderstanding because of an inaccuracy.

http://stackoverflow.com/comment/46418798
comment on: http://stackoverflow.com/a/29093591
has text: Thanks this worked! Looking back at it it's so obvious but all the documentation made me nuts! I'll check it as an answer in 5 minutes.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29160699
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46541116
has answer: http://stackoverflow.com/a/29160981
accepted answer: http://stackoverflow.com/a/29160981
type: Question
tagged with: pagination
score: 0
answer count: 1
has body: I want to highlite pagination link on click. Please help me in this CSS Pagination Style Template #tnt_pagination { display:block; text-align:left; height:22px; line-height:21px; clear:both; padding-top:3px; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:normal; } #tnt_pagination a:link, #tnt_pagination a:visited{ padding:7px; padding-top:2px; padding-bottom:2px; border:1px solid #EBEBEB; margin-left:10px; text-decoration:none; background-color:#F5F5F5; color:#0072bc; width:22px; font-weight:normal; } #tnt_pagination a:hover { background-color:#DDEEFF; border:1px solid #BBDDFF; color:#0072BC; } #tnt_pagination .active_tnt_link { padding:7px; padding-top:2px; padding-bottom:2px; border:1px solid #BBDDFF; margin-left:10px; text-decoration:none; background-color:#DDEEFF; color:#0072BC; cursor:default; } #tnt_pagination .disabled_tnt_pagination { padding:7px; padding-top:2px; padding-bottom:2px; border:1px solid #EBEBEB; margin-left:10px; text-decoration:none; background-color:#F5F5F5; color:#D7D7D7; cursor:default; } #tnt_pagination a.highlite { font-weight:bold; } Prev 1 2 3 4 5 6 7 8 9 10 Next I want to highlite pagination link on click. Here is simple example for pagination in which i used 1 to 10 link and i also disable prev link using css. But my problem is that every link is highlite on loading page but i want to highlite only active link on click on pagination link Please help me in this
tagged with: javascript
has title: Want to highlite pagination link on click. here is my code

http://stackoverflow.com/q/29124091
possible better answer: http://stackoverflow.com/a/29125164
answer count: 3
has comment: http://stackoverflow.com/comment/46474446
downvote count: 0
favorite count: 0
has body: I want to turn this: Lorem ipsum dolor sit amet Ipsum dolor sit amet, consetetur eirmod tempor invidunt ut labore into this: Lorem ipsum dolor sit amet Ipsum dolor sit amet, consetetur eirmod tempor invidunt ut labore To accomplish that I split the paragraphs, applied a regex, and finally joined them again: data = data.split('\n\n') for (var i = 0; i < data.length; ++i) { data[i] = data[i].replace(/(.+)/g, ' $1 ') } data = data.join("") Unfortunately the output is this: Lorem ipsum dolor sit amet Ipsum dolor sit amet, consetetur eirmod tempor invidunt ut labore Each line of the paragraph is being considered as a single paragraph. How can I modify my code so I get the desired result?
upvote count: 2
has comment: http://stackoverflow.com/comment/46474421
has title: How to match new lines as one?
accepted answer: http://stackoverflow.com/a/29124210
tagged with: regex
has answer: http://stackoverflow.com/a/29125164
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29124210
has comment: http://stackoverflow.com/comment/46474568
type: Question
has answer: http://stackoverflow.com/a/29124721
tagged with: javascript

http://stackoverflow.com/comment/46595890
score: 0
has text: Really interesting answers in here (and in the comments, everywhere!). So in a nutshell, it can be probably done, but there's no reason to and there's not much of a benefit to it. After all, even machine code is "open source" code in a way, isn't it? Ha. Like you say, just harder and more annoying to understand and modify. And to implement stuff like this to the way browsers work would just be... pretty much a waste of time, not make anything any more secure and very complex, requiring a sort of consensus amongst many browser vendors, standards, etc. Alright, that was a big nutshell.
comment on: http://stackoverflow.com/a/29190711
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29136412
downvote count: 0
answers question: http://stackoverflow.com/q/29135180
type: Answer
upvote count: 1
score: 1
has body: Try navigating to your quickcontact or settings states directly, instead of changing the url to trigger them. You can use ui-router's ui-sref directive to trigger state transitions. Assuming the states are named settings and quickcontact: quickcontact settings

http://stackoverflow.com/a/29141225
score: 0
answers question: http://stackoverflow.com/q/29130244
type: Answer
upvote count: 1
downvote count: 1
has body: You can manipulate the SVG with JS and CSS and this way add more interactions with the SVG. SVG is XML an can be traversed with JS as normal DOM tree, so you can create functions to handle your requirements. You can even place the SVG you've created as Layer in Google Maps. The article uses simple example for FloorMaps. Interface with SVG

http://stackoverflow.com/q/29135569
has title: Generating JSON of directory structure for consumption by Webix tree widget
tagged with: python
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29163648
tagged with: http://stackoverflow.com/tag/json
type: UnansweredQuestion
tagged with: webix
has answer: http://stackoverflow.com/a/29176966
has body: I'm working on a project using Webix and Python/Flask and I'm hitting a brick wall with rendering a treeview widget. My problem is properly constructing the JSON needed by the widget. I'm trying to generate the directory structure of a given example: Structure: . ├── dirone │ └── file ├── dirthree │ ├── somedir │ │ └── anotherfile │ └── somefile ├── dirtwo └── somefile Desired output: [ { "value": "dirone", "path": "dirone", "type": "folder", "children": [ { "value": "file", "path": "dirone/file", "type": "file" } ] }, { "value": "dirtwo", "path": "dirtwo", "type": "folder", "children": [] }, { "value": "dirthree", "path": "dirthree", "type": "folder", "children": [ { "value": "somefile", "path": "dirthree/somefile", "type": "file" }, { "value": "somedire", "path": "dirone/file", "type": "folder", "children": [ { "value": "anotherfile", "path": "dirthree/somedir/anotherfile", "type": "file" } ] } ] }, { "value": "somefile", "path": "somefile", "type": "file" } ] I've been banging my head against this for the past two hours trying to get a method that can render it. Does any have a method that generates the structure? Any help will be greatly appreciated!
tagged with: javascript
type: Question

http://stackoverflow.com/q/29093707
has body: I have implemented auto complete search in my site. The problem is that response is coming properly but it do not iterate all elements in elements. Always shows one element in HTML but coming multiple from response. On the top search see if you type only river it comes with river records but do not show all in one ul li means li iteration is not working. Here is my Jquery code: Here is HTML Code:
answer count: 3
upvote count: 1
tagged with: jquery-autocomplete
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29093791
has answer: http://stackoverflow.com/a/29093773
favorite count: 0
has title: Auto complete search is not working properly, do not iterate all elements in $.each ul li shows on time in response
linked to: http://stackoverflow.com/q/3015335
possible better answer: http://stackoverflow.com/a/29093773
has answer: http://stackoverflow.com/a/29093791
has answer: http://stackoverflow.com/a/29093934
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/29143693
has comment: http://stackoverflow.com/comment/46510369
score: 1
tagged with: jquery
favorite count: 0
type: Question
has body: I have these possible folder names in a url: firstname+lastname firstname-lastname firstname lastname Firstname+Lastname I need a way to catch these, the common element would be firstname and lastname (so I don't care about the + - or space), but I do need to convert them toLowerCase(); Can this be done with a regex? (I am not particularly sophisticated in my use of regex, I can use basic match() functions. My other thought was to store these variants in an array and return true if any of the items match one of the array items. I was looking at this solution: http://snook.ca/archives/javascript/testing_for_a_v In this case though I think my array and statement would look something like this: var strArray = ['firstname','lastname']; strArray.toLowerCase(); var href = document.location.href; var secondaryDir = href.split("/")[4]; if (secondaryDir in strArray){ console.log('Its true!'); // do magic here } Not sure if there is a better way to test this? (I've tagged this question with jquery as that is what I am using, although I think all the code here is vanilla js). EDIT Actually I don't need to worry about converting the array to lower case as I can do this against the secondaryDir variable (I think).
tagged with: regex
has answer: http://stackoverflow.com/a/29143833
upvote count: 1
answer count: 1
has title: Return true if any variation of strings matches in URL
tagged with: if-statement
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29143833
tagged with: arrays
downvote count: 0

http://stackoverflow.com/comment/100236323
type: Comment
has text: I understood the generating the QR code but can you please mention how to read the QR code and extract the text from it. Is it just any random qr scanner works?
comment on: http://stackoverflow.com/a/45126813
score: 0
type: AnswerComment

http://stackoverflow.com/q/29197627
score: 0
type: UnansweredQuestion
has body: I have to build a twitter visualization app using node.js and I am following the tutorial http://blog.safe.com/2014/03/twitter-stream-api-map/ I followed the steps and now, when I run node server.js after being in the directory in which server.js is stored, Nothing happens. And at localhost:8081 the program does not work. THe directory structure is twitter --&gt; node_modules, public, server.js I used npm to install the required packages and used forever to run the server. I have tried some fixes I found here and there on the net, nut nothing is working. Thanks a lot for your help. Here is the server.js : //Setup web server and socket var twitter = require('twitter'), express = require('express'), app = express(), http = require('http'), server = http.createServer(app), io = require('socket.io').listen(server); //Setup twitter stream api var twit = new twitter({ consumer_key: 'XXX', consumer_secret: 'XXX', access_token_key: 'XXX', access_token_secret: 'XXX' }), stream = null; //Use the default port (for beanstalk) or default to 8081 locally server.listen(process.env.PORT || 8081); //Setup rotuing for app app.use(express.static(__dir + '/public')); //Create web sockets connection. io.sockets.on('connection', function (socket) { socket.on("start tweets", function() { if(stream === null) { //Connect to twitter stream passing in filter for entire world. twit.stream('statuses/filter', {'locations':'-180,-90,180,90'}, function(stream) { stream.on('data', function(data) { // Does the JSON result have coordinates if (data.coordinates){ if (data.coordinates !== null){ //If so then build up some nice json and send out to web sockets var outputPoint = {"lat": data.coordinates.coordinates[0],"lng": data.coordinates.coordinates[1]}; socket.broadcast.emit("twitter-stream", outputPoint); //Send out to web sockets channel. socket.emit('twitter-stream', outputPoint); } else if(data.place){ if(data.place.bounding_box === 'Polygon'){ // Calculate the center of the bounding box for the…
has comment: http://stackoverflow.com/comment/46617803
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/46611780
tagged with: web-applications
tagged with: twitter
type: Question
has comment: http://stackoverflow.com/comment/46611889
tagged with: server
has title: Running node js server on ubuntu
tagged with: javascript

http://stackoverflow.com/comment/46796347
type: Comment
has text: thanks a lot, I had managed to find and fix the issue before your answer, but definitely sounds like a good option too
type: AnswerComment
comment on: http://stackoverflow.com/a/29292721
score: 0

http://stackoverflow.com/comment/46400789
has text: You wanna tell me you seriously dont see the else clause in the if statement? Or am i missing something...
comment on: http://stackoverflow.com/q/29083754
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46571738
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29171745
has text: I have never understood where´s the console on jsfiddle...? Regarding knockout it is set as framework. even changing this to an external resource doesn´t change anything. And liveEditor is not a plugin, all the code is there with the bindingHandler and the extender.

http://stackoverflow.com/q/29098756
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29098793
tagged with: ajax
downvote count: 2
answer count: 1
has body: I am trying to implement a "like" button for my website. I am using Codigniter, Ajax and Jquery. When the like button is clicked data should be entered to database and if unlike button is pressed data should delete from database. But I am facing a problem in model, data is not added to database when I click like button. Please help me to find a solution. This is my Jquery file "likeitem.js" function likeItem(postId) { if ($("#likeItem_"+postId).text() == "Like") { $("#likeItem_"+postId).html('Unlike'); var purpose = "Like"; } else { $("#likeItem_"+postId).html('Like'); var purpose = "UnLike"; } $.ajax({ type : "POST", url : "http://localhost/codeig_smarty/index.php/user/likeItem", data : "postId=" + postId + "purpose=" + purpose, success : function() { } }); return false; } This is my model "usermodel.php" public function itemLike() { $id = $this->session->userdata('userID'); $postId = $this->input->post('postId'); $purpose = $this->input->post('purpose'); if($purpose=="Like") { // echo 'test'; // exit(); $data = array( "userID" => $id, "postTextID" => $postId, ); $this->db->insert('like', $data); } else { echo 'hai'; } } This is my view file "home.tpl" Like This is my Controller "user.php" public function likeItem() { $this->usermodel->itemLike(); }
has answer: http://stackoverflow.com/a/29098793
favorite count: 0
tagged with: php
type: AnsweredQuestion
upvote count: 0
has title: If condition not working in model of codeigniter
tagged with: codeigniter
type: Question
score: -2

http://stackoverflow.com/q/29116435
favorite count: 0
has answer: http://stackoverflow.com/a/29120309
has answer: http://stackoverflow.com/a/29116548
has title: How to check if checkbox has been checked when hovering over an submit / anchor and display an alert prompting users to do so
has comment: http://stackoverflow.com/comment/46461597
upvote count: 1
possible better answer: http://stackoverflow.com/a/29116548
type: AnsweredQuestion
has body: I am a little lost in working on this and need some help please. I have a checkbox for terms and conditions that needs to be pressed before users can be registered. I have written some pseudo code in how I think it should be programmed. //If user hovers over anchor //Check to see if check box is checked //If not checked //Display alert saying "You need to check the terms and conditions" //Else if - do not allow user to use anchor //Else if user does check the box allow anchors to be used submitted Hope that make sense. Here is some of the code I have written but I am getting nowhere! Please help :) $("#checkbox1").click(function() { $("#id-reg-submit").attr("disabled", !this.checked); }); This above code is what I am using at the moment for users to actually click the box and prevents the moving forward in the sign up process. What I need to do is get this to interacted with the other links (social media signup) and the submit button, thus this is what I have so far: $(".wp-social-login-provider").hover(function(){ alert("Click The Terms &amp; Conditions!"); }); if($("#checkbox1").click(function() { $("#id-reg-submit").attr("disabled", !this.checked); });){ $(".wp-social-login-provider").hover(function(){ alert("Click The Terms &amp; Conditions!"); }); }else{ alert("hi"); } I have been playing with code hover on and off stated trying to figure this out and have wrapped some code in an if else statement. if({$("#checkbox1").click(function() { $("#id-reg-submit").attr("disabled", !this.checked); }); &amp;&amp; $( "a.wp-social-login-provider" ).hover( function() { $( this ).append( $( "&lt;span&gt; ***&lt;/span&gt;" ) ); }, function() { $( this ).find( "span:last" ).remove(); } ); )} else{ alert.("huhuuhu"); } As you can tell I need a little help! Can anyone help me please? Cheers, Max.
score: 1
has comment: http://stackoverflow.com/comment/46461678
has comment: http://stackoverflow.com/comment/46460841
has comment: http://stackoverflow.com/comment/46460876
accepted answer: http://stackoverflow.com/a/29120309
type: Question
has comment: http://stackoverflow.com/comment/46460805
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29116663
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/46500054
comment on: http://stackoverflow.com/q/29137521
type: Comment
type: QuestionComment
has text: first ng-app code should work, other will be ignore, place `ng-app` in html element would be good
score: 0

http://stackoverflow.com/q/29136052
has answer: http://stackoverflow.com/a/29136111
has comment: http://stackoverflow.com/comment/46497134
has body: Here is what i have... some array item have option that is binary like $item[0] = 0010 $item[1] = 1000 $item[2] = 0110 $item[3] = 1101 each bit represent some option what i need is to compare it to the customer request option let's say it's 0010 so i need the logic to show only $item[0] and $item[2] because second byte is 1. BUT, when there is no customer options check : 0000 i must show them all only when some options are show there must be filter... i should have listen more in my math class... i am clueless now, please help ! note : everything come from here : http://jsfiddle.net/yHxue/ but i dont understand this line : markers[m].setMap(((markers[m].props &amp; props)&gt;&gt;&gt;0===props)? ((props)?map:null): null);, so i have rewritten it, mine don't work !
type: Question
has comment: http://stackoverflow.com/comment/46497166
possible better answer: http://stackoverflow.com/a/29136111
has comment: http://stackoverflow.com/comment/46497139
has answer: http://stackoverflow.com/a/29136158
has comment: http://stackoverflow.com/comment/46497185
score: 1
has answer: http://stackoverflow.com/a/29136100
accepted answer: http://stackoverflow.com/a/29136100
has answer: http://stackoverflow.com/a/29136210
has title: javascript Binary operation don't work for options
upvote count: 1
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46497122
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/29136147
type: AnsweredQuestion
tagged with: binary
downvote count: 0

http://stackoverflow.com/a/29176028
has comment: http://stackoverflow.com/comment/46569987
has body: You should provide only property name to orderBy filter. Try this: ng-options="provider.long_name for provider in providers | orderBy:'long_name' track by provider.uid" Check documentation about orderBy filter, especially expression argument.
has comment: http://stackoverflow.com/comment/46570618
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29175989
has comment: http://stackoverflow.com/comment/46569887
accepted answer of: http://stackoverflow.com/q/29175989
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29201410
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29201051
downvote count: 0
type: Answer
has body: The syntax error is because you are missing an ending bracket at line 18 (of the posted code). This: else { should be: } else { The missing bracket means that there is no matching if before the else. Some other problems in the code, but perhaps not all of them: You are missing semicolons at the end of many statements. They are not required when the statement ends where the line ends, but they are recommended. You have a problems with comparisons like these: if(meetAnt = yes) { The comparison operator is == (or ===), and you are missing delimiters around the string value, so it would be interpreted as a variable name. It should be: if(meetAnt == "yes") { In comparisons like these you get unexpected results: if(dayFight &lt; 40) { The variable contains a string, so the value 40 is converted to the string "40" for the comparison, and they are compared as strings instead of numbers. That means that for example "100" &lt; "40". You should parse the input string to a number: dayFight = parseInt(dayFight, 10); With comparisons like this the syntax is wrong: else if(40&lt;=dayFight=&gt;60) { Comparing one value using two operators doesn't work, and there is no =&gt; operator. You need two conditions: else if(40 &lt;= dayFight &amp;&amp; dayFight &lt;= 60) { In comparisons like this you have used the || operator wrong (and the wrong comparison operator and the missing string delimiters): if(postion = wings || mushroom) { It's used between conditions, not to compare multiple values in one condition: if(postion == "wings" || postion == "mushroom") { When you put a statement after return, that statement will not be executed as the code exits the function at the return statement: return true; console.log("congratulations you have killed the aint eater!") Reorder them: console.log("congratulations you have killed the aint eater!") return true;

http://stackoverflow.com/q/29207831
upvote count: 1
type: Question
has title: How to get Google refresh_token in Javascript API?
answer count: 2
tagged with: ngcordova
has answer: http://stackoverflow.com/a/29212128
tagged with: javascript
downvote count: 0
has body: I'm building a system which people can authenticate to read their gmail. I've got it working perfectly well on my website using OAuth2 in Python; in the response from google I get an access_token, a token_type, an expires_in and (most importantly) a refresh_token. I now want to get the same working in Javascript (for an app I'm building using Ionic). So I use ngCordovaOauth to authenticate with the following code: $cordovaOauth.google( 'xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com', ['https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/gmail.readonly'], { 'access_type': 'offline', 'approval_prompt': 'force' } ) .then(function(result){ console.log("Response object -&gt; " + JSON.stringify(result)); }, function(error){ console.log('Error -&gt; ' + error); }); As expected, this produces the following screen on my phone: But in the json I get back there is no refresh_token: {"access_token":"xxxx.xxxxxxxxxxxx","token_type":"Bearer","expires_in":"3599"} Does anybody know why I don't get the refesh_token when using the Javascript api? All tips are welcome!
favorite count: 0
tagged with: cordova
tagged with: oauth
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/29157626
tagged with: gmail
has answer: http://stackoverflow.com/a/29210453
linked to: http://stackoverflow.com/q/28276712
score: 1

http://stackoverflow.com/comment/46597525
comment on: http://stackoverflow.com/q/29191788
type: Comment
type: QuestionComment
has text: I have no idea what you're trying to achieve. At least format your tables so they are readable.
score: 1

http://stackoverflow.com/q/29086299
has comment: http://stackoverflow.com/comment/46456352
has comment: http://stackoverflow.com/comment/46488220
has comment: http://stackoverflow.com/comment/46405470
has answer: http://stackoverflow.com/a/29177281
has comment: http://stackoverflow.com/comment/46405459
type: Question
score: 3
has comment: http://stackoverflow.com/comment/46406372
tagged with: javascript
has comment: http://stackoverflow.com/comment/46530749
has body: I'm trying to trigger a controller for this URL http://crm.dev/accounts, I'm just using an anonymous function in this example for the controller, but the alert inside doesn't get triggered. I can't figure out why, guess it is something stupid I'm missing? I don't want to use a template or view, I just need to get my controller fired. Please note that I've already set $locationProvider.html5Mode(true);. 'use strict'; angular.module('crm', [ 'ngSanitize', 'ngRoute', 'angularMoment', 'ui.bootstrap', 'ui.select', 'ui.bootstrap.datetimepicker' ]); angular.module('crm').config(function(uiSelectConfig) { uiSelectConfig.theme = 'bootstrap'; }); angular.module('crm').constant('angularMomentConfig', { preprocess: 'utc', timezone: 'Europe/Berlin' }); angular.module('crm').config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $routeProvider. when('/accounts', { controller: function($scope) { alert('TEST'); } }). otherwise({ redirectTo: '/' }); // enable html5Mode for pushstate ('#'-less URLs) $locationProvider.html5Mode(true); $locationProvider.hashPrefix('!'); }]);
tagged with: angular-routing
answer count: 1
downvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Why is AngularJS router not triggering?
upvote count: 4
has comment: http://stackoverflow.com/comment/46557910

http://stackoverflow.com/comment/46406180
type: Comment
has text: @Dagon But it doesn't mean that the question has nothing to do with PHP. jQuery shows that answer can use this library if needed. And HTML is implied probably, because there is a form submission.
score: 0
comment on: http://stackoverflow.com/q/29086494
type: QuestionComment

http://stackoverflow.com/comment/46419957
comment on: http://stackoverflow.com/q/29094328
score: 0
has text: `"name" : this[0]` ?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46556807
type: Comment
comment on: http://stackoverflow.com/a/29163239
has text: onclick event functions don't work anymore for column 5, look this example please http://jsfiddle.net/chcLmmps/16/ I create a new question because multi_filter have conflicts with onclick events http://stackoverflow.com/questions/29169327/onclick-event-not-work-with-multi-select-filter-javascript
score: 0
type: AnswerComment

http://stackoverflow.com/a/29164845
accepted answer of: http://stackoverflow.com/q/29164542
score: 2
has comment: http://stackoverflow.com/comment/46548640
has comment: http://stackoverflow.com/comment/46548869
type: AcceptedAnswer
downvote count: 0
has body: I have made some change in your code: HTML &lt;input type="text" my-input ng-disabled="disabled" /&gt; JS angular.module('myApp',[]) .controller('MyCtrl', function ($scope) {}) .directive('myInput', ['$compile', function($compile) { return { scope: true, link: function(scope, element, attrs) { scope.disabled = false; element.bind('dblclick', function() { scope.disabled = !scope.disabled; alert(scope.disabled); scope.$apply(); }); } }; }]); See: http://plnkr.co/edit/g0qtbFJb1V4OxcXNRTVf?p=preview EDIT (add the ng-disabled from inside the directive): HTML &lt;input type="text" my-input/&gt; JS angular.module('myApp',[]) .controller('MyCtrl', function ($scope) {}) .directive('myInput', ['$compile', function($compile) { return { scope: true, link: function(scope, element, attrs) { scope.disabled = false; element.attr('ng-disabled', 'disabled'); element.removeAttr('my-input'); $compile(element)(scope); element.bind('dblclick', function() { scope.disabled = !scope.disabled; scope.$apply(); }); } }; }]); See: http://plnkr.co/edit/g0qtbFJb1V4OxcXNRTVf?p=preview
has comment: http://stackoverflow.com/comment/46557430
type: Answer
has comment: http://stackoverflow.com/comment/46551514
has comment: http://stackoverflow.com/comment/46548842
upvote count: 2
answers question: http://stackoverflow.com/q/29164542
has comment: http://stackoverflow.com/comment/46555171

http://stackoverflow.com/q/29078231
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/29078415
has answer: http://stackoverflow.com/a/29078700
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has title: Disabling all input elements except some in a form using jQuery
has comment: http://stackoverflow.com/comment/46389753
possible better answer: http://stackoverflow.com/a/29078279
has answer: http://stackoverflow.com/a/29078279
has body: I am trying to disable almost all input elements in a form using jquery, but I need some input elements to be enabled. For example: $(document).ready(function () { $("#document :input[name!='tloEnable']).attr("disabled", true); }); This works great on the elements I have with the same name 'tloEnable'. However there are a few other elements that have different name attributes (filename, notifyUsers, notifyTeam). How can I include them too while disabling the remaining input elements? $(document).ready(function () { $("#document :input[name!='tloEnable], [name!='filename'], [name!='notifyUsers'], [name!='notifyTeam']).attr("disabled", true); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46389740
has comment: http://stackoverflow.com/comment/46389971
has answer: http://stackoverflow.com/a/74312958
has answer: http://stackoverflow.com/a/29078415
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/46389853
downvote count: 0

http://stackoverflow.com/q/29200660
answer count: 2
has answer: http://stackoverflow.com/a/29200762
has body: everyone! So I have this intern code: 'Home page navigation bar: first load': function() { return util.createPage(this, '/') .then(function(){console.log('masuk');}); } I want to debug like that, but instead of printing masuk, I want to print all of the HTML source code of the page I made. How can I do that? Thanks.
tagged with: javascript
downvote count: 0
tagged with: intern
has answer: http://stackoverflow.com/a/29210288
favorite count: 0
type: UnansweredQuestion
has title: How to print the HTML source code from createpage in intern js
score: 1
upvote count: 1
type: Question
tagged with: testing

http://stackoverflow.com/comment/46504935
score: 0
has text: well then you have to follow the answer you got below.
type: QuestionComment
comment on: http://stackoverflow.com/q/29140491
type: Comment

http://stackoverflow.com/comment/46392415
type: AnswerComment
comment on: http://stackoverflow.com/a/29079262
type: Comment
has text: I've updated my question to show the full method I'm currently doing. I'm currently having to do a second ajax call directly to mapbox to get the geoJSON which I don't want to do.
score: 1

http://stackoverflow.com/a/29101688
answers question: http://stackoverflow.com/q/29101659
type: Answer
score: 0
has body: You have to escape characters which have special meaning or are not allowed in JavaScript string literals (such as new lines). The json_encode function will do that for you. var temp = &lt;?php echo json_encode($pressDescription); ?&gt;;

http://stackoverflow.com/comment/46539033
type: QuestionComment
has text: If you are using only two variables send it like `url = url + "?id="+id+"?name="+name;` as two parameters.
comment on: http://stackoverflow.com/q/29145829
score: 0
type: Comment

http://stackoverflow.com/q/29109835
score: 0
has comment: http://stackoverflow.com/comment/46449285
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46449390
has answer: http://stackoverflow.com/a/29110052
has comment: http://stackoverflow.com/comment/46449381
has comment: http://stackoverflow.com/comment/46449167
has comment: http://stackoverflow.com/comment/46449565
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29110052
has comment: http://stackoverflow.com/comment/46449314
type: Question
has comment: http://stackoverflow.com/comment/46449395
has body: I have the following.... HTML Select Activity Paintball Laser Tag Splatball Airsoft JS (function ($) { $('#activity').change(function() { var options = ''; if($(this).val() == '1') { options = ' Morning: 09.30 - 12.30 All Day: 09:30 - 16:00 Afternoon: 13:00 - 16:00 '; } else if ($(this).val() == '2'){ options = ' Session 1: 09:30 - 11:30 Session 2: 12:00 - 14:00 Session 3: 14:30 - 16:30 '; } else if ($(this).val() == '3'){ options = ' Session 1: 09:30 - 11:30 Session 2: 12:00 - 14:00 Session 3: 14:30 - 16:30 Session 4: 16:30 - 18:30 '; } else if ($(this).val() == '4'){ options = ' Full Day: 09:30 - 16:30 '; } $('#session').html(options).show(); }); })(jQuery); I am trying to only get the certain options showing in the second select box, based on the first selection, but I cant get the bloody thing to work. Not seeing any errors in devtools either.
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Show select options based on choice from previous se;lection
has comment: http://stackoverflow.com/comment/46449246

http://stackoverflow.com/q/29120935
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29123318
score: 1
tagged with: pagination
tagged with: jqgrid
linked to: http://stackoverflow.com/q/28249340
has title: Refreshing jqGrid doesn't save current page position with infinite scroll enabled
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jqgrid-asp.net
has body: Example from http://www.trirand.net/demo/javascript/jqgrid/loading_data/scrollbar/index.html Versions of Guriddo jqGrid JS: 4.7.0 and 4.7.1 (function ($) { 'use strict'; $(function () { $('#jqGrid').jqGrid({ url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&amp;qwery=longorders', mtype: 'GET', datatype: 'json', page: 1, colNames: ['Order ID', 'Customer ID', 'Order Date', 'Freight', 'Ship Name'], colModel: [{ name: 'OrderID', key: true, width: 75 }, { name: 'CustomerID', width: 150 }, { name: 'OrderDate', width: 150 }, { name: 'Freight', width: 150 }, { name: 'ShipName', width: 150 }], width: 750, height: 250, rowNum: 20, scroll: 1, // set the scroll property to 1 to enable paging with scrollbar - virtual loading of records emptyrecords: 'Scroll to bottom to retrieve new page', // the message will be displayed at the bottom pager: '#jqGridPager' }); }); })(jQuery); When I call 2 times: $('#jqGrid').trigger('reloadGrid', { page: 3 }); first time request: the page param is 3 as expected. second time request: the page param is 1 !? The same problems I see at refresh button with refreshstate: 'current', It doesn't work at all.
has answer: http://stackoverflow.com/a/29123318
has comment: http://stackoverflow.com/comment/46468435
upvote count: 1
linked to: http://stackoverflow.com/q/29162609
type: Question

http://stackoverflow.com/comment/46670900
score: 0
comment on: http://stackoverflow.com/q/29150516
has text: Ok I'm getting somewhere in my code I added a button which will attach the event
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46383538
comment on: http://stackoverflow.com/a/29074617
has text: @Alex: The example above just picks one element. To change them all, you'll want `querySelectorAll` (which returns a list) and a loop over the list.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29128366
tagged with: ngresource
has comment: http://stackoverflow.com/comment/46482859
type: Question
has title: Lodash and AngularJS ngResource promise don't work well
has comment: http://stackoverflow.com/comment/46482813
tagged with: angularjs-scope
score: 0
answer count: 1
has body: I use lodash within my AngularJs app and it works well for local collections/arrays. When I try to use it like so it doesn't work: vm.colorsSizes = _.uniq(commonData.stock, 'colorName'); where commonData.stock is an array that resolves from an ngResource call. angular .module("common.services") .factory("commonData", ["stockResource", commonData]); function commonData(stockResource) { return { stock: stockResource.query() } } Why this happens and how can I fix it?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29128527
tagged with: angularjs
has answer: http://stackoverflow.com/a/29128527
tagged with: lodash
has comment: http://stackoverflow.com/comment/46482546
has comment: http://stackoverflow.com/comment/46482744
type: AnsweredQuestion

http://stackoverflow.com/a/29135816
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29135648
score: 1
has body: I don't know what you're trying to accomplish with this part of your declaration: var blogsjs = { myBlog: this } but, this will NOT be set to blogsjs. It will be whatever it was in the above function. In Javascript, this is only set on a function call. It is NOT set in a Javascript literal declaration so you cannot statically declare a property that refers to the object itself. Javascript just does not support that. You can add properties after the object is constructed that contain references to the object if desired. If you want myBlog to be initialized to point to blogsjs, then you will have to do that after the object is defined: var blogsjs = { init: function() {...}, another: function() {...} }; blogsjs.myBlog = blogsjs; In addition, this line of code won't work: myBlog.another(); because myBlog is a property of an object, not a variable. It must be referenced with its parent object.
accepted answer of: http://stackoverflow.com/q/29135648
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29161573
downvote count: 0
has body: MongoDB does not presently have any method of referencing the existing values of fields in a singular update statement. The only exceptions are operators such as $inc an $mul which can act on the present value and alter it according to a set rule. This is in part due to the compatibility of the "phrasing" of operations to act over multiple documents, whether that is the case or not. But what you are asking for is some "variable" operation that allows the "length" of an array to be tested and used as in "input parameter" to another method. This is not supported. So the best you can do is read the document content and test the length of the array in code, then perform the $slice update as you first surmized, or alternately you could use the aggregation framework to work out the "possible lengths" of arrays ( assuming a lot of duplication ) and then work on "multi" updates for those documents that match the conditions, of course assuming that you want to do this over more than a single document. First form: var bulk = db.collection.initializeOrderedBulkOp(); var count = 0; db.collection.find().forEach(function(doc) { if ( doc.order.length &gt; 2 ) { bulk.find({ "_id": doc._id }) .updateOne({ "$push": { "order": { "$each": [], "$slice": doc.order.length - 2 } } }); count ++; } if ( (count % 1000) == 0 &amp;&amp; ( count &gt; 1 ) ) { bulk.execute(); bulk = db.collection.initializeOrderedBulkOp(); } }); if ( count % 1000 != 0 ) bulk = db.collection.initializeOrderedBulkOp(); Second form: var bulk = db.collection.initializeOrderedBulkOp(); var count = 0; db.collection.aggregate([ { "$group": { "_id": { "$size": "$order" } }}, { "$match": { "$_id": { "$gt": 2 } }} ]).forEach(function(doc) { bulk.find({ "order": { "$size": doc._id } }) .update( "$push": { "order": { "$each": [], "$slice": doc._id - 2 } } }); count ++; if ( count % 1000 == 0 ) { bulk.execute(); bulk = db.collection.initializeOrderedBulkOp(); } }); if ( count % 1000 != 0 ) bulk = db.collection.initializeOrdere…
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29122673

http://stackoverflow.com/a/29196898
has comment: http://stackoverflow.com/comment/46624921
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/46607049
has comment: http://stackoverflow.com/comment/46607122
has comment: http://stackoverflow.com/comment/46607176
answers question: http://stackoverflow.com/q/29170694
has comment: http://stackoverflow.com/comment/46624847
has comment: http://stackoverflow.com/comment/46624793
has comment: http://stackoverflow.com/comment/46607088
accepted answer of: http://stackoverflow.com/q/29170694
type: AcceptedAnswer
has body: The reason components.{{1}} is not working is because the double curlies in Angular is just meant to evaluate an expression. 1 is just a number, so you'll get components.1 everytime. If I understand what you need correctly, you need to have a corresponding component based on type. So if type.id === 1 then your type is Video. In order to achieve that in Angular dynamically, you should just have: translate="{{components[type.id]}}" Fiddle
has comment: http://stackoverflow.com/comment/46624889
upvote count: 3
has comment: http://stackoverflow.com/comment/46624567
type: Answer

http://stackoverflow.com/comment/46413905
has text: I'm not using github.com/thnew/Pdf2Png. I am using my own files. Inside the pdfToPng.js i do use the node module "spindrift" but im also doing other things. And I'd like to keep those 2 imported files independent. If i use a callback wouldn't that make one of them dependent on the other?
comment on: http://stackoverflow.com/a/29090701
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29070627
tagged with: angularjs-directive
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29110916
accepted answer: http://stackoverflow.com/a/29110916
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Need to update model from within AngularJS directive using touch screen
tagged with: angularjs
type: AnsweredQuestion
has body: I use ng-repeat to create a series of input fields on a form: I use some css to hide the standard input:type=number spinners, using the following directive to create buttons more suitable for use on a touch screen device. directives.directive('prefixNumericInput', ['$compile', function ($compile) { function getInputElement(attrs, element) { var inputTagType = attrs['cpNumericInput'].length ? attrs['cpNumericInput'] : 'input'; return element.find(inputTagType); } function getInputValue(element) { var currentValue = element[0].valueAsNumber; return isNaN(currentValue) ? 0 : currentValue; } return { restrict: 'A', templateUrl: 'html-templates/numeric-input.html', replace: false, transclude: true, require: '^form', scope: { prefixName: '@' }, link: function (scope, element, attrs, formController, transcludeFn) { transcludeFn(function (clone) { var placeholder = element.find('placeholder'); placeholder.replaceWith(clone); }); var intervalId, inputElement = getInputElement(attrs, element); inputElement.addClass('form-control'); // Add our buttons after the input's parent element $(inputElement[0].parentElement).after($compile(' ' + ' + ' + ' - ')(scope)); function increment() { inputElement[0].value = 1 + getInputValue(inputElement); scope.$parent.$digest(); } function decrement () { var currentValue = getInputValue(inputElement); inputElement[0].value = currentValue > 0 ? currentValue - 1 : 0; } scope.increment = increment; scope.decrement = decrement; scope.incrementStart = function () { increment(); intervalId = setInterval(increment, 100); } scope.stop = function () { clearInterval(intervalId); } scope.decrementStart = function () { decrement(); intervalId = setInterval(decrement, 100); } } }; }]); The template is as follows: {{prefixName}} This works well except for one issue. We only need one of the input fields to have a value. When the form is submitted another directive is run (cf. the number-validation above). This simply checks if any of the model values have s…
type: Question

http://stackoverflow.com/a/29068726
has body: var span = $("strong span").detach(); var strong = $("strong").contents().wrap("").end().append(span).contents().unwrap(); var span = $("strong span").detach(); var strong = $("strong").contents().wrap("").end().append(span).contents().unwrap(); hello allhello this text has no span
answers question: http://stackoverflow.com/q/29068550
has comment: http://stackoverflow.com/comment/46372811
has comment: http://stackoverflow.com/comment/46372843
score: 0
type: Answer

http://stackoverflow.com/comment/46480607
has text: Yeah searching through tags isn't an option, it's kind of a mess. Searching by class I might as well do parentNode anyway.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29126643
type: Comment

http://stackoverflow.com/comment/46498843
has text: Should I execute "node sid.js" using some system command inside the while? Is this doable? If so, how?
comment on: http://stackoverflow.com/q/29136611
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29138994
has answer: http://stackoverflow.com/a/29139130
tagged with: php
type: AnsweredQuestion
has title: Making Key Value pair for the form elements in JavaScript
has body: I have a module where the forms created are dynamic. So the number of inputs can defer always. Also, the array key can also defer. My current method of posting form is this: name = form_options[option_1] value = 1 On submitting the form using POST, I get the form as array in $_POST, which looks like this. form_options( option_1 =&gt; 1 ) But, now I am trying to implement the same thing using AJAX. So, I would need a common module to get all form values. I found a way to do it. var objectResult = $('#options_form').serializeArray(); console.log(objectResult); This gives me a result like this: 0: Object name: "form_options[option_1]" value: "1" How can parse this result to get an array like $_POST array, which I can send as data in AJAX. P.S: All the form elements have name field as form_options[key]
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29139130
score: 1
tagged with: forms
possible better answer: http://stackoverflow.com/a/29139073
answer count: 3
has answer: http://stackoverflow.com/a/29139073
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29139086

http://stackoverflow.com/comment/46508728
score: 0
has text: in the alert box, just print_r($post) ? You can't echo an array.
comment on: http://stackoverflow.com/q/29142713
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46451962
type: QuestionComment
has text: What is a `foo.baz`? There is no definition of that type of object and you can't make one without a definition for one. There's no constructor for it. There's no prototype for it. As you've worded your question, it really doesn't make any sense. Perhaps you could describe better what you're trying to accomplish.
comment on: http://stackoverflow.com/q/29111349
score: 0
type: Comment

http://stackoverflow.com/q/29196338
tagged with: evaporate.js
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29254412
has body: I'm trying to use this: https://github.com/uqee/angular-evaporate to create a multipart uploader. The issue I'm having is creating the signature since I'm using PHP. Are there any working examples anyone could point me to?
type: Question
tagged with: amazon-s3
tagged with: javascript
score: 0
has title: evaporate js with php signing url for s3
answer count: 1

http://stackoverflow.com/comment/46631122
type: Comment
type: QuestionComment
has text: the array length property does work though? hResponse.length = 3
comment on: http://stackoverflow.com/q/29209226
score: 0

http://stackoverflow.com/q/29065436
tagged with: javascript
has title: HTML Canvas Functions from Select Option
has body: I am trying to create a a simple html page that displays a canvas with a background as a college map. There is a dropdown list and the user can select a room they are trying to get too and lines will be displayed on the canvas depending on which room is selected. I am trying to call these different lines depending on the selection but am struggling to find why this is not working Please select B223 C174 B170
tagged with: canvas
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29065794
type: Question
tagged with: http://stackoverflow.com/tag/html
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/29065794

http://stackoverflow.com/a/29150117
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29149873
answers question: http://stackoverflow.com/q/29149873
has body: The problem is an id has to be unique. Instead you need to select the classname for each image. Or you can use the parent and select the img tag from there: $('#container').on('mousein', 'img', function(){ $(this).addClass('start_animation'); }); In the above example I've used an event delegation mouseover on the #container and it will automatically apply this event to the img selector. Now typically the hover() function takes 2 function parameters for the mousein/mouseout event. So to get rid of the class after mouseout you'll have to bind that event as well. $('#container').on('mouseout', 'img', function(){ $(this).removeClass('start_animation'); });
type: AcceptedAnswer

http://stackoverflow.com/comment/46834366
comment on: http://stackoverflow.com/a/29274894
type: Comment
type: AnswerComment
has text: Thanks for the help on both accounts.
score: 0

http://stackoverflow.com/q/29216004
favorite count: 0
has comment: http://stackoverflow.com/comment/46641664
answer count: 0
has body: I have a search box which dynamially creates rows of html for search results. I am attempting to focus on the first element via jquery but something is not working var inputEl = $('#stock-results input[name=quantity]:first'); inputEl.focus(); inputEl.css({ border: "solid 1px #ff6633", padding: "20px" }).focus(); i can see that the style of the input box is changing as indicates above, but i just cant get the cursor to focus on the input box; any ideas? EDIT: BTW, thi only happens the first time i search, if I search again it focuses fine. Also i noticed if i add an alert after the focus call, then when i close the alert the focus goes in the correct element
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46641762
type: Question
has title: focus on dynamic input element
has comment: http://stackoverflow.com/comment/46642284
has comment: http://stackoverflow.com/comment/46641494
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46526314
type: QuestionComment
type: Comment
score: 2
has text: Not entirely sure what you want to do with the JSON stuff, where are you supposed to get the "yellow" out of `flower: "yellow"`?
comment on: http://stackoverflow.com/q/29152372

http://stackoverflow.com/comment/46383708
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29075009
has text: i want when the user drag the item on the sepecified location it store it's ID and when they again drop the item to source they remove the ID from the textbox.

http://stackoverflow.com/comment/46450584
score: 0
type: Comment
has text: where should i do this?
comment on: http://stackoverflow.com/a/29110614
type: AnswerComment

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/29182231
type: Tag

http://stackoverflow.com/a/29090130
has comment: http://stackoverflow.com/comment/46412709
type: Answer
has comment: http://stackoverflow.com/comment/46412666
has body: Firstly, to use xhr.dt datatables > 1.10 should be used. Secondly, the data should be of the following structure. { "draw":1, "recordsTotal":2, "recordsFiltered":2, "data":[ [ "3", "7", "122.2.55.11", "2015-03-16 10:10:42" ], [ "2", "8", "122.2.55.11", "2015-03-17 00:05:40" ] ] } Here is a demo
has comment: http://stackoverflow.com/comment/46413591
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46413679
answers question: http://stackoverflow.com/q/29089901
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29089901
upvote count: 2

http://stackoverflow.com/a/29128547
has body: By "xml sheet" I assume you mean an XML document. Is your JavaScript running in the browser or in Node.js? If you're executing JavaScript in Node.js and using MarkLogic 8.0, you can use the new Node.js API: http://docs.marklogic.com/guide/node-dev in particular, the patch request: http://docs.marklogic.com/jsdoc/documents.html#patch If you're executing JavaScript in the browser, you can use the REST API: http://docs.marklogic.com/guide/rest-dev and POST a patch request using the browser's XMLHttpRequest object: http://docs.marklogic.com/REST/PATCH/v1/documents As an alternative to the patch request, you can retrieve the XML document, modify it, and write it back to the server. You can find an answer about parsing XML in the browser here: Cross-Browser Javascript XML Parsing Hoping that helps
downvote count: 0
answers question: http://stackoverflow.com/q/29122317
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/a/29137614
answers question: http://stackoverflow.com/q/29137480
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46528180
type: Answer
score: 2
has body: Hello I could not really understand what you were trying to do here, but guessed that you wanted to get the value of the data variable which you have set for each button. I recreated your scenario EDIT - Updated the Javascript code and now it seems to be working as per your requirements HTML $('.byalpha').on('click', { 'letter': function(element) { return $(element).data('letter'); } }, function(e) { $('#picked_letter').html(e.data.letter(this)); }); Letter : Javascript $('.byalpha').on('click', {'letter': function (element) { return $(element).data('letter'); } }, function (e) { $('#picked_letter').html(e.data.letter(this)); } ); here is a link for the working sample http://jsfiddle.net/70fje1mh/2/
has comment: http://stackoverflow.com/comment/46514427
accepted answer of: http://stackoverflow.com/q/29137480

gmail
type: Tag
tags question: http://stackoverflow.com/q/29207831
tag name: gmail

http://stackoverflow.com/comment/46382249
type: Comment
has text: Hey Alexander, Thanks for your answer I already tried that and it return me the P tag but, after doing it again I found out that childNodes may contain the answer, so thanks :)
comment on: http://stackoverflow.com/a/29074005
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46619934
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/368813/html-form-readonly-select-tag-input see this answer
comment on: http://stackoverflow.com/q/29204353
score: 0

http://stackoverflow.com/q/29078944
tagged with: leaflet
has comment: http://stackoverflow.com/comment/46391592
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29079714
tagged with: javascript
has comment: http://stackoverflow.com/comment/46391619
has body: I recently followed this tutorial to determine if a point shown by a marker sits inside a defined polygon: https://www.mapbox.com/mapbox.js/example/v1.0.0/point-in-polygon/ Works great, but they pull in the polygon geoJSON data with ajax and apply it to the map. I have a mapbox map already built with a polygon area drawn. I'm using their API to display my map. I now need to access the geoJSON data to determine if a point is within an area. How can I access that data through the API? Here's how I pull in the map, the geoJSON and a function to test if a point is in a geoJSON area: //mapbox connection var mapID = "&lt;map-id&gt;"; L.mapbox.accessToken = "&lt;my-token&gt;"; //init map var map = L.mapbox.map("mapData", mapID, { attributionControl: false, zoomControl: false }).setView([53.799, -1.548], 13, { pan: { animate: true }, zoom: { animate: true } }); //get geoJSON var geoJson; $http.get("https://a.tiles.mapbox.com/v4/" + mapID + "/features.json?access_token=" + L.mapbox.accessToken).success(function(data){ geoJson = data; }); //determine point in polygon function determinePointInPolygon(){ var coords = [-1.3, 5.2]; var layer = leafletPip.pointInLayer(coords, L.geoJson(geoJson), true); if (!layer.length) //point not in polygon else //point is in polygon }
accepted answer: http://stackoverflow.com/a/29079714
tagged with: mapbox
tagged with: angularjs
score: 0
possible better answer: http://stackoverflow.com/a/29079262
tagged with: geojson
has answer: http://stackoverflow.com/a/29079262
has title: Get geoJSON data from mapbox API to determine point in polygon
type: AnsweredQuestion

http://stackoverflow.com/a/29092302
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29091944
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46417448
accepted answer of: http://stackoverflow.com/q/29091944
upvote count: 1
has body: What i could interpret was you are looking for something like this http://jsfiddle.net/L034j1gh/ #accordion { list-style: none; padding: 0 0 0 0; width: 170px; } #accordion div { display: block; background-color: #FF9927; font-weight: bold; margin: 1px; cursor: pointer; padding: 5 5 5 7px; } #accordion ul { list-style: none; padding: 0 0 0 0; } #accordion ul{ display: none; } #accordion ul li { font-weight: normal; cursor: auto; padding: 0 0 0 7px; } #accordion a { text-decoration: none; } #accordion > li > div>img{ display:none; } $("#accordion > li > div").click(function(){ if(false == $(this).next().is(':visible')) { $(this).children('img').show(); $('#accordion ul').slideUp(300); } else { $(this).children('img').hide(); } $(this).next().slideToggle(300); }); $('#accordion ul:eq(0)').show(); $('#accordion > li:first-child > div>img').show(); Sports #20 Golf Technology #20 iPhone

http://stackoverflow.com/q/29076958
has body: I have a JSON file that has an object array that basically plots lines on a canvas. I am trying to write a script that shows, in the console, what points a line has when I click on it. I figured that the following script would work, but it doesn't. Does anyone have an idea of how I can do this? JSON [{ "lines": { "width": 3, "stroke": "#FFFFFF", "x1": [825.853, 804.33, 590.5, 890.682, 379.421, 582.81, 853.391, 575.932, 566.508, 834.161, 770.832, 504.225, 584.83, 601.055, 549.104, 477.494, 597.43, 640.386, 867.994, 563.965, 621.281, 904.754, 853.391, 475.435, 360.025, 478.058, 843.323, 818.653, 819.061], "y1": [476.233, 485.06, 467.266, 84.389, 269.767, 257.901, 120.505, 399.223, 577.706, 409.69, 257.348, 366.667, 403.409, 482.969, 257.638, 367.334, 141.663, 258.163, 258.163, 258.163, 177.563, 84.389, 120.505, 111.271, 84.389, 84.389, 84.389, 499.195, 409.69], "x2": [866.613, 804.33, 646.069, 209.797, 379.421, 582.81, 869.23, 575.932, 611, 849.251, 770.832, 504.225, 622.517, 601.055, 504.225, 477.494, 597.43, 816.364, 938.393, 604.272, 621.281, 946.752, 843.323, 212.46, 360.025, 478.058, 843.323, 804.33, 803.378], "y2": [515.418, 514.898, 467.266, 84.389, 308.815, 214.216, 120.505, 377.24, 577.706, 409.69, 111.778, 466.158, 403.409, 434.29, 257.638, 484.136, 111.271, 258.163, 258.163, 258.163, 203.205, 84.389, 120.505, 111.271, 236.059, 331.048, 136.993, 499.195, 409.69], "x3": [866.613, 646.592, 646.069, 209.797, 344.739, 380.026, 869.23, 793.075, 611, 849.251, 621.281, 548.612, 622.517, 589.5, 504.225, 548.717, 480.333], "y3": [534.787, 514.898, 394.513, 577.706, 308.815, 214.216, 99.814, 377.24, 498.668, 499.195, 111.778, 466.158, 467.789, 434.29, 330.985, 484.136, 111.271], "x4": [645.021, 646.592, 804.436, 566.508, 344.739, 380.026, 896.501, 793.075, 590.25, 833.488, 621.281], "y4": [534.787, 483.493, 394.513, 577.706, 557.043, 235, 99.814, 84.389, 498.668, 499.195, 141.663], "x5": [645.021, 592, 804.436, 566.508, 556.571, 380.026, 896.501], "y5": [586.081, 483.…
has title: How would I get specific points from an object array?
type: Question
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29077243
tagged with: javascript
linked to: http://stackoverflow.com/q/28842520
has comment: http://stackoverflow.com/comment/46387397
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46387531
has comment: http://stackoverflow.com/comment/46387481
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46388475

http://stackoverflow.com/comment/46595195
type: AnswerComment
has text: thanks for that - I hate that # symbol - if i redirect the routes on the node server will that redirect it?
type: Comment
comment on: http://stackoverflow.com/a/29190370
score: 0

http://stackoverflow.com/q/29082116
has comment: http://stackoverflow.com/comment/46397344
answer count: 1
tagged with: web
has answer: http://stackoverflow.com/a/29082144
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I create a web app that looks like this: When i click the run model, i want that the form :"Dashbord", will open. The JS code: &lt;script&gt; window.onload = function () { function newDoc() { window.location.href("#http://127.0.0.1:8100/#dashboard"); } } &lt;/script&gt; When The "Run Model" button onClick activate the function: newDoc(). The problem is: that in my URL path it is written: http://127.0.0.1:8100/#dashboard but the 'Dashboard' form is not logged. it stays in the same page. What should i do?
has comment: http://stackoverflow.com/comment/46397212
has comment: http://stackoverflow.com/comment/46397177
type: Question
has title: window.location.href not working on my form
tagged with: javascript
score: 0

http://stackoverflow.com/a/29194172
score: -1
has comment: http://stackoverflow.com/comment/46601995
has comment: http://stackoverflow.com/comment/46602315
type: Answer
answers question: http://stackoverflow.com/q/29193997
downvote count: 1
has body: Something like this will work: $(function() { var setTitle = function() { var title = Math.random().toFixed(2) + ' &amp; ' + Math.random().toFixed(2); $('title').html(title); }; setInterval(setTitle, 4000); }); Change the title variable as you need to. Documentation and examples at http://www.w3schools.com/jsref/met_win_setinterval.asp
has comment: http://stackoverflow.com/comment/46602289
upvote count: 0
has comment: http://stackoverflow.com/comment/46602059

http://stackoverflow.com/comment/46624528
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29206581
has text: I have used your query. But it still saves the first record only. I think its Ajax problem that it is not passing those two records to the servlet. How can I pass those two records or more than two records to the servlet through Ajax.
score: 0

http://stackoverflow.com/q/29063357
has title: HTML5 EventSource raises error even though request is 200 OK
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
has comment: http://stackoverflow.com/comment/140244066
answer count: 0
has comment: http://stackoverflow.com/comment/140250055
type: UnansweredQuestion
score: 6
has body: I've got the following JS-Snippet: var source = new EventSource( "http://localhost:8081/resources" ); source.onmessage = function() { console.log( "Event received!" ); }; source.onerror = function( error ) { console.log( "Eventsource error" ); console.log( error ); }; source.open = function() { console.log( "Eventsource open" ); }; My server is emitting a simple test event once. In chrome's network tab I can see the event coming in as text/event-stream and a status code of 200. Nevertheless, my onmessage callback doesn't get called. Instead, I get the onerror callback, but with not a lot of useful error information. Another thing that puzzles me, is the fact that chrome seems to re-request the event every 3 seconds or so. I get log output on the server suggesting that and also the error event is occuring every 3 seconds. If it helps, all of this is taking place in a CORS scenario. The same is happening in Firefox, only I can't see the requests in the network tab, I think Firefox just doesn't display SSE-Events there.
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/29138226
tagged with: css
has body: I have a select2 input text &lt;div class="col-sm-3"&gt; &lt;%= f.input_field :lender_id, collection: Lender.all.pluck(:code, :id), class: 'form-control', id: 'select-banker-field', prompt: 'Please Select Banker', disabled: (f.object.new_record? ? false : true ) %&gt; &lt;/div&gt; As seen, the input field doesnt show the text label entirely. I want for either the select2 input field width to be auto based on the length of the characters OR for the text to be able to wrap within the input field box. I know that I can set width = 100% or i could change the div to col-sm-6 and it will show the entire text value but I dont want it that way as i have already defined width but i can compromise on the height This is my javascript but it still doesnt work $("#select-banker-field").select2({ containerCss : {"display":"block"}; minimumResultsForSearch: -1 }); Any help appreciated mucho gracias
answer count: 0
type: Question
has title: select2 input field wrap characters around text rails
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46538419
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46512842
tagged with: ruby-on-rails

http://stackoverflow.com/q/29205132
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: slickgrid
upvote count: 1
has body: I've started using SlickGrid and have to implement a kind of functionality where I need to show sub-row inside a parent row of SlickGrid. Here's the scenario Here's Asia, Europe is having sub categories in Services Column and these service columns are expandable/collapsible I'm trying to customize this for first column. Is any other link/source available to refer to accomplish the feature.
type: Question
has title: Displaying sub-data rows inside a row in SlickGrid Table
tagged with: javascript
has answer: http://stackoverflow.com/a/29291727
answer count: 1

http://stackoverflow.com/comment/46545809
has text: Hm, the desired output is a little complex to get... I'm not sure how I'd approach that right now.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29161993

http://stackoverflow.com/q/29090033
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46446687
has comment: http://stackoverflow.com/comment/46446918
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has title: active of a Xlink anchor SVG
has answer: http://stackoverflow.com/a/29110263
tagged with: fullpage.js
has comment: http://stackoverflow.com/comment/46414248
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/46448663
has comment: http://stackoverflow.com/comment/46448283
type: Question
has body: I have 4 anchor xlink inside my SVG and I want to get the active event of each, how can I call it in JS? That looks like that: $(document).ready(function() { $('#fullpage').fullpage({ anchors: ['firstPage', 'secondPage', '3rdPage', '4thPage', 'lastPage'], menu: '#timeline', scrollingSpeed: 1000, onLeave: function(index, nextIndex, direction){ $('#bluecircle').css('stroke-dashoffset', (1510/4)*(4-(nextIndex-1))); } }); }); html { image-rendering: optimizeQuality; -webkit-font-smoothing: antialiased; -ms-interpolation-mode: nearest-neighbor } body { height:100%; margin:0; padding:0; overflow:hidden; font-family: 'source_sans_prolight'; } div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre, form,fieldset,input,textarea,p,blockquote,th,td { padding: 0; margin: 0; } ul, a { list-style:none; text-decoration:none; } .intro{ font-size:20px; } /********** menu ************/ #header { position: fixed; right: -60px; top: 0; width: 60px; height: 100%; -webkit-transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); -moz-transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); -o-transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); -webkit-transition-property: -webkit-transform, right; -webkit-backface-visibility: hidden; z-index:120; } #menu-burger-wrapper { position: absolute; left:-66px; top: 0; -webkit-transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); -moz-transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); -o-transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) } /********** essai************/ #menu-burger-wrappr.is-opened { -webkit-transition: all 1s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: all 1s cubic-bezier(0.77, 0, 0.175, 1); -o-transition: all 1s cubic-bezier(0.77, 0, 0.175, 1); transition: all 1s cubic-bezier(0.77, 0, 0.175, 1); -webkit-transform: translateX(-276px); -moz-transform:translateX(-276px); -ms-transform: translateX(-276px);…
has comment: http://stackoverflow.com/comment/46447295

http://stackoverflow.com/comment/72978981
has text: @PierreArnaud that is to be expected, as it is no longer a native class when compiled - so a native class check is not what you want - instead you could use `isClass` from the [`typechecker` package](https://github.com/bevry/typechecker) which checks for both native and conventional classes.
comment on: http://stackoverflow.com/a/32235645
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/comment/46438110
score: 0
type: Comment
type: QuestionComment
has text: Rather than chaining multiple `.parent()` methods, you should use the method `.closest()` - http://api.jquery.com/closest/ `$('a[href="' + this.location.pathname + '"]').closest('.dropdown').addClass('active');`
comment on: http://stackoverflow.com/q/29104021

http://stackoverflow.com/comment/46442521
has text: @jack.the.ripper see this ```if (_.includes(sportChecked.sport, params.sport))```, there is the part where I need to exclude the id I mentioned
comment on: http://stackoverflow.com/q/29104974
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29090202
upvote count: 1
has body: I'm using lodash _.sortedIndex to determine the position the element should go. If the array being checked is small enough it works perfectly. However that array can grow quite large and after it has increased size _.sortedIndex returns the last element of the array instead of the actual position var checkObject = {name: John, lastname: doe} var arrayOfObjects = [1...25]; //The objects would be similar layout to checkObject var position = _.sortedIndex(arrayOfObjects, checkObject, 'name') This works fine, and the position returned would be the appropriate spot. However in the instance below: var checkObject = {name: John, lastname: doe} var arrayOfObjects = [1...75]; //The objects would be similar layout to checkObject var position = _.sortedIndex(arrayOfObjects, checkObject, 'name') It seems to either return its correct position or just return 76 Is there a way to ensure that the returned position is correct? This is call called from a function inside angular using the following: $scope.$evalAsync( function (data) { someFunctionToCheckIndex(data) } );
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/48374897
has comment: http://stackoverflow.com/comment/48372434
score: 1
tagged with: lodash
has comment: http://stackoverflow.com/comment/65206318
favorite count: 0
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: lodash _.sortedIndex returns last index element

http://stackoverflow.com/q/29170451
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29170534
has body: Say I have the following 2x2 array: var aTest = [ ['test00','test01'], ['test10','test11'] ] I can return all of the nested arrays from the first (zero-eth), parent array. i.e.: aTest[0] returns ['test00', 'test01'] However, I can't do the same thing for the nested array without looping. i.e. I would like to do: aTest[][0]: [['test00'],['test10']] Am I mistaken? Is there no way to achieve this without loops: var aTemp = new Array(); for ( var i = 0; i &lt; aTest.length; i++ ) { aTemp[i] = new Array(); aTemp[i][0] = aTest[i][0]; };
answer count: 2
downvote count: 0
favorite count: 0
type: AnsweredQuestion
has title: Returning nested arrays from multi-dimensional array
has answer: http://stackoverflow.com/a/29170534
has comment: http://stackoverflow.com/comment/46559457
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46559793
type: Question
has comment: http://stackoverflow.com/comment/46559220
possible better answer: http://stackoverflow.com/a/29170889
has answer: http://stackoverflow.com/a/29170889

http://stackoverflow.com/q/29126787
tagged with: javascript
has answer: http://stackoverflow.com/a/29127394
has title: AngularJS ng-repeat shows undefined for prototype function
has comment: http://stackoverflow.com/comment/46480226
score: 0
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46480435
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46480519
tagged with: angularjs-scope
has body: I'm running into an issue where a function is returning undefined in a select. &lt;select name="supervisor" ng-model="editJudge.superID" ng-options="supervisor.legalProID as supervisor.fullName for supervisor in supervisors" class="form-control"&gt; Here's my function to load supervisors. function getLegalProfessionalsBroken() { LegalProfessionalResource.query({isValid: true}).$promise.then(function(legalProfessionals) { $scope.supervisors = _.map(legalProfessionals, function(legalProfessional) { return new LegalProfessional(legalProfessional); }); }); } And here's my LegalProfessional class. function LegalProfessional(obj) { var properties = $.extend({ legalProID: null, firstName: null, lastName: null, middleName: null, email: null, isActive: true, insertedDate: null, insertedBy: null, modifiedDate: null, modifiedBy: null, deletedDate: null, deletedBy: null, typeID: null, superID: null }, obj); this.legalProID = properties.legalProID; this.firstName = properties.firstName; this.lastName = properties.lastName; this.middleName = properties.middleName; this.email = properties.email; this.isActive = properties.isActive; this.insertedDate = properties.insertedDate; this.insertedBy = properties.insertedBy; this.modifiedDate = properties.modifiedDate; this.modifiedBy = properties.modifiedBy; this.deletedDate = properties.deletedDate; this.deletedBy = properties.deletedBy; this.typeID = properties.typeID; this.superID = properties.superID; } LegalProfessional.prototype = { fullName: function() { return this.lastName + ', ' + this.firstName; } }; When I run it like this I'm getting 'undefined, undefined' for all of the options. If I put a breakpoint in it looks like 'this' is scoped to the html element rather than LegalProfessional. I can comment out the fullName function from my LegalProfessional class and then change my getLegalProfessionals class to add fullName and things work as expected. function getLegalProfessionals() { LegalProfessionalResource.query({isValid: true…
type: Question

http://stackoverflow.com/a/29192159
type: Answer
answers question: http://stackoverflow.com/q/29191978
upvote count: 5
has comment: http://stackoverflow.com/comment/46619117
has comment: http://stackoverflow.com/comment/46610403
has comment: http://stackoverflow.com/comment/46609644
has comment: http://stackoverflow.com/comment/46611387
type: AcceptedAnswer
downvote count: 1
score: 4
accepted answer of: http://stackoverflow.com/q/29191978
has body: You must use bounds as an option of L.tileLayer, and not maxBounds. Bounds reference Also, it seems you've loaded a wrong file for the leaflet.css in JSFiddle, the correct source is this: http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css Finally, avoid to use percent sizes in JSFiddle, use pixel ones instead. Here's a working JSFiddle: http://jsfiddle.net/1zyL4q4a/4/ L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png' , { bounds: mybounds, maxZoom: 18, minZoom: 16, attribution: '&amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors' }).addTo(map);
has comment: http://stackoverflow.com/comment/46618697

http://stackoverflow.com/comment/46398518
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29082736
has text: Yes, if you use any ES6 features and want to run them in a browser that doesn't support them yet, you need to compile them to ES5 as well. The `harmony` flag does that. (It doesn't actually have anything to do with JSX).

http://stackoverflow.com/a/29108816
type: Answer
upvote count: 1
has body: You can put the entire code block inside a function, and call it again if you don't get the answer you want. function askQuestion() { var choice1 = prompt("a question").toLowerCase; if (choice1 === option) { alert("Something"); } else { alert("that's not possible"); //go back to the original prompt askQuestion(); } }
answers question: http://stackoverflow.com/q/29108220
downvote count: 0
score: 1

http://stackoverflow.com/comment/46385083
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29075474
type: AnswerComment
has text: Thanks, I used a part of your code to make my code a lot shorter.

http://stackoverflow.com/comment/108759409
has text: @taranaki The camera must only be added to the scene if it has a child object.
comment on: http://stackoverflow.com/a/29087983
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46410474
comment on: http://stackoverflow.com/q/29088777
type: Comment
type: QuestionComment
score: 0
has text: @arkascha I tried, but it's so damn huge and I don't really know what to look for.

http://stackoverflow.com/a/29090396
has body: This is perhaps a partial answer, but it might help guide you in a useful direction. It's worth understanding what mongoose is and what it does. Mongoose is an ODM (not an ORM—read here for the difference. TL;DR: ODM is to NoSQL as ORM is to SQL; non-relational DB to relational DB.) Mongoose helps abstract some of the boilerplate boring stuff like validations; stuff you want when dealing with a data in or being written into a database. The basis of this validation comes from mongoose.Schema with which you define what each model should contain and what each property on a model should be cast as (i.e. username should be a string, updatedOn should be a datestamp.) If you want your code to be database-agnostic (that is, not requiring any specific database), Mongoose is not what you're looking for. If not being tied to any specific DB is important to you, you should try looking for a database agnostic ORM/ODM. At the moment, Waterline comes to mind. It should be mentioned that, if you don't care about validations, data casting, etc. that mongoose provides, you could just roll vanilla MongoDB queries and stick whatever JSON-compatible JavaScript object into your (NoSQL) database. But this is not recommended unless you fully understand what you lose / risk in doing so. I might also argue that, the authenticate method has no place being in your model and should instead exist in a position previous to any model/database interaction (e.g. in a controller or the equivalent if you're not following MVC conventions.)
has comment: http://stackoverflow.com/comment/46425858
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/29088039
type: Answer
answers question: http://stackoverflow.com/q/29088039

http://stackoverflow.com/comment/46592168
has text: Got it working. Can't remember what it was that I changed, but it works now. Thanks for steering me back on track!
comment on: http://stackoverflow.com/q/29176558
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29119076
has comment: http://stackoverflow.com/comment/46465105
has title: Fixed height footer scrolling effect
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29119304
type: Question
linked to: http://stackoverflow.com/q/16670931
tagged with: javascript
tagged with: jquery
has body: I'm finding a solution. When the user lands on the page scroll down normally when the main page scroll ends I have a fixed height footer with scroll bar. I want to scroll the fixed height footer to the end without the taking the mouse on the section. Using Bootstrap but this feature is completely different. Hide the scrolling bar of the fixed height footer Scroll the content to the bottom with mouse scroll no matter if the user mouse is on the section or not. Reset the footer position to the top when the user scroll the main page. Here is the image to clear the understanding. Image link Call Us +56465454 Share Get Our Free Course Sign Up Say Hello Sitename Address Twitter @twitter COPYRIGHT 2015 ARTIOS. All rights reserved. CSS #sidebar{ float: left; width: 100%; height: 300px; border: 0px solid #000; overflow: hidden; } #scroller{ float: left; width: 101%; height: 300px; overflow: scroll; }
score: 0

http://stackoverflow.com/a/29204031
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46619653
accepted answer of: http://stackoverflow.com/q/29204007
score: 1
has comment: http://stackoverflow.com/comment/46619659
upvote count: 1
answers question: http://stackoverflow.com/q/29204007
has body: Yes, it is also possible with Audio - in browsers that implement Blob URLs, anyway. The browser simply (and universally) knows how to 'read' blob URLs, as it does any valid URL. Only, instead of making a request it accesses the local blob cache. Data URLs work in the same manner and are probably easier to use when 'transferring data from the server' - as their name implies they contain all the data embedded within the URL. For downloading previously shared content, consider keeping the Audio stream a separate resource and using normal URLs / resources. Anyway, for the details like how to actually capture the data, see Capturing Audio &amp; Video in HTML5.
type: AcceptedAnswer

http://stackoverflow.com/comment/46461677
has text: What does this mean: _"how to handle AJAX to complete and later to move to looping"_
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29116954

http://stackoverflow.com/comment/46616694
score: 0
comment on: http://stackoverflow.com/a/29202305
type: Comment
has text: Okay thank you I'll try to implement this version. And I would love to use JSON but the data I'm retrieving is plain txt. I'm using this to build an E-reader app for people with add. It takes a plain txt book url from gutenburg.org and displays the text in individual lines to make reading easier. I'm hoping to evolve it later to have motion-text auto scroll settings too.
type: AnswerComment

http://stackoverflow.com/q/29107546
type: Question
linked to: http://stackoverflow.com/q/14474122
linked to: http://stackoverflow.com/q/23641355
linked to: http://stackoverflow.com/q/4532721
tagged with: javascript
tagged with: facebook-share
score: 0
has title: Facebook Share Dialog - Open Graph Story - Local Dev Javascript SDK
tagged with: facebook-opengraph
answer count: 0
has comment: http://stackoverflow.com/comment/46453687
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46526952
tagged with: facebook
has comment: http://stackoverflow.com/comment/46453365
has body: Admittedly, there are dozens of related questions to this: facebook-javascript-connect-with-localhost-domain facebook-development-in-localhost given-url-is-not-permitted-by-the-application-configuration facebook-share-dialog-failing-to-recognize-custom-reference-objects-when-posting Unfortunately, none of them solves my problem. I'm trying to publish custom open graph stories using the Share Dialog - so I don't have to ask users for post permissions (at some point down the line we may automate this) from my web app using the javascript SDK. Basically I have a custom action called take: "my-app-namespace.take" and objects hosted at http://dev.myapp.com:3000/open/actions/:action_name. Each of these actions has the requisite metadata to describe itself. &lt;meta property='fb:app_id' content='app_id'/&gt; &lt;meta property='og:type' content='my-app-namespace:take'/&gt; &lt;meta property='og:title' content='my_object_title'/&gt; &lt;meta property='og:image' content='an_image'/&gt; &lt;meta property='og:url' content='self_url'/&gt; When the share button gets clicked the following Javascript is called: FB.ui({ method: 'share_open_graph', action_type: 'my-app-namespace.take', action_properties: JSON.stringify({ object:'http://dev.myapp.com:3000/open/actions/renewable_energy' }) }, function(response){}); And after a lot of fiddling I haven't been able to get anything other than the following: Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. My production app is hosted at https://myapp.com. My development URL is http://dev.myapp.com:3000. The development app is registered as a test app for the production app. I've created the Facebook Actions, Objects, and Custom stories in both the production and development app. They also have their own namespaces, which are dynamically generated (ie the dev…
linked to: http://stackoverflow.com/q/17717430

http://stackoverflow.com/q/29089189
has answer: http://stackoverflow.com/a/29089666
upvote count: 0
has body: I'm attempting to build a web app using Spotify's web API however, I find their tutorial lacking. The way it works is data is requested using POST and GET functionality and sent back using JSON. Seems easy enough, want to get information about an artist? Just call GET https://api.spotify.com/v1/artists/0OdUWJ0sBjDrqHygGUXeCF and you get a nice JSON document with information about the requested artist. The problem is I don't know how to make that GET call. jQuery has get and post methods both with "data" parameters but I'm not sure on the syntax necessary, especially when it comes to exchanging an authorization code for an access token. If you visit Spotify's authorization guide and scroll to step 4 of the Authorization Code Flow you can see I need to make a POST call to https://accounts.spotify.com/api/token. The call must have 3 request body parameters and 1 header parameter and upon succession a JSON file with the appropriate data is in the response body. My question is how do I make POST and GET calls that have body parameters and header parameters and how do I extract the JSON data from the response body after a successful call?
type: UnansweredQuestion
has title: Using POST and GET to Exchange Data Through Endpoints
tagged with: http://stackoverflow.com/tag/json
score: -1
tagged with: post
type: Question
tagged with: get
tagged with: spotify
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29153972
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46529138
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29153880
has body: Look for this: if((empty($user) or empty($password) or empty($email)){ ^ ^ opened an extra '(' missing ')' You are missing a closing parenthesis since you began with TWO opening (. Is it obviously? You need a meticulous attention on how many parenthesis you have in your IF Statement...

http://stackoverflow.com/q/29095184
type: UnansweredQuestion
tagged with: php
has title: How do I pass one of the many PHP variables I have to JavaScript?
upvote count: 0
linked to: http://stackoverflow.com/q/23740548
has answer: http://stackoverflow.com/a/29095259
type: Question
has body: I am currently using AJAX to pass the PHP output to JavaScript, but I want to pass only one of the PHP variables to JavaScript and I don't know how to obtain it from the general this.responseText property. I've tried searching Stackoverflow/Google but most questions/answers talk about returning the entire PHP output. What I want is not the entire PHP output (I've got that settled already), but one variable from the PHP code. This is the PHP output I have now: echo $hex; echo '&lt;br&gt;'; echo 'R: ' . $r . ' G: ' . $g . ' B: ' . $b; What I want is to get just the $hex variable. How do I obtain it? EDIT To those who marked it as a duplicate: I have read the replies to that question, but I felt like it didn't exactly answer my question, so I posted a new one. In the Ajax example, there is only 1 output (42) and it is in this.responseText. I am outputting a couple of sentences using this.responseText but I also want one of the variables in it for a separate javascript function. How do I extract it from this.responseText?
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/29095227
duplicate of: http://stackoverflow.com/q/23740548
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/77656946
has comment: http://stackoverflow.com/comment/138165337
has body: JSON.stringify(errorCodes, (_, value) =&gt; value instanceof Map || value instanceof Set ? Array.from(value) : value );
score: 0
answers question: http://stackoverflow.com/q/29085197
has comment: http://stackoverflow.com/comment/138169012
type: Answer

http://stackoverflow.com/a/29123341
answers question: http://stackoverflow.com/q/29123083
type: Answer
has comment: http://stackoverflow.com/comment/46476049
downvote count: 0
has body: Following would work in c# *(python one is equivalent) driver.FindElement(By.Id("username")).sendKeys(email); driver.FindElement(By.Id("password")).sendKeys(password).submit();
score: 1
has comment: http://stackoverflow.com/comment/46477529
has comment: http://stackoverflow.com/comment/46478949
upvote count: 1
has comment: http://stackoverflow.com/comment/46475488

http://stackoverflow.com/q/29156619
has answer: http://stackoverflow.com/a/29175815
tagged with: php
has body: When the code below completed, the data returned is in an array but not anything I can reference correctly. AJAX: $.ajax({ url: './FILE.php', type: 'post', data: {'action': 'allfolders'}, success: function(data, status) { var folders = data; }, error: function(xhr, desc, err) { } }); // end ajax call PHP: //Fetching from your database table. $query = "SELECT * FROM folders ORDER BY folderName"; $result = fetchRecords($query); echo json_encode($result); RESULTS Returned to ajax: data = "[{"lat":"latval","lon":"longval","value":"25"}]" Need: a standard array that can be used to populate a table or treeview.
has comment: http://stackoverflow.com/comment/46533959
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/46533893
score: -2
has comment: http://stackoverflow.com/comment/46534163
answer count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/46568865
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46533933
favorite count: 0
has comment: http://stackoverflow.com/comment/46568840
has title: Return PHP array to javascript - format
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/q/29088860
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
accepted answer: http://stackoverflow.com/a/29088904
favorite count: 0
tagged with: ruby
upvote count: 2
tagged with: ruby-on-rails
type: AnsweredQuestion
has title: Ruby On Rails Ajax Submit submitting twice
has answer: http://stackoverflow.com/a/29088904
type: Question
has body: So I decided to make a blog in RoR and all is good I got the comments to submit and what not but when I went to "update" the submit method to allow for the page not to be refreshed when the comment is posted (ajax) however now whenever I go to post a comment on the pages for some reason it loops the send from the comment submit and I get two comments with the same message appearing at the same time. Comments <%= render :partial => @post.comments %> <%= form_for [@post, Comment.new], :remote => true do |f| %> <%= f.label :body, "New comment" %> <%= f.text_area :body %> <%= f.submit "Add comment", disable_with: "Adding Comment..." %> <% end %> That is the show point, as you can see I tried to see if disabling the button with disable_with would help but it has not. and below is the comment_controller class CommentsController < ApplicationController def create @post = Post.find(params[:post_id]) @comment = @post.comments.create!(comment_params) respond_to do |format| format.html { redirect_to @post } format.js end end private def comment_params params.require(:comment).permit(:commenter, :body, :post_id) end end Thanks for any advice.

http://stackoverflow.com/q/29150571
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29152441
has title: Insert an event with a different date other than the current date on mysql with Fullcalendar
type: Question
answer count: 2
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has body: I have Fullcalendar implemented which shows events from the mysql table (title+datetime) and also insert new events by clicking on a day within calendar. The problem is that it only inserts events in the current day,even though the user has clicked on a future date or month. I want the user to be able to insert future events in the same way that I have now. Fullcalendar script which show events (events.php) and insert by clicking in the day (title) sending this info to "add_event.php" $(document).ready(function() { var calendar = $('#calendar').fullCalendar({ editable: true, events: "http://localhost/test-fullcalendar/php/eventos.php", lang: "es", selectable: true, selectHelper: true, select: function(start, end, allDay) { var title = prompt('Evento a insertar:'); if (title) { start = moment(event.start).format('YYYY-MM-DD HH:mm:ss'); end = moment(event.end).format('YYYY-MM-DD HH:mm:ss'); $.ajax({ url: 'php/add_evento.php', type: 'POST', data: {title: title, start: start, end: end}, success: function(json) { alert("Evento insertado"); console.log("Enviando: ", title, start, end); } }); calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay }, true ); } calendar.fullCalendar('unselect'); } }); });
score: 0
has answer: http://stackoverflow.com/a/29152570

http://stackoverflow.com/comment/46477334
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29125201
type: QuestionComment
has text: I need to do the function of ng-model on ng-click. Ng-model is boolean, right? How can I do this on ng-click?

http://stackoverflow.com/q/29080355
possible better answer: http://stackoverflow.com/a/29080463
tagged with: javascript
has answer: http://stackoverflow.com/a/29081142
type: AnsweredQuestion
has title: Get HTML Code of Element (innerHTML + element tags)
type: Question
has body: How to get HTML code of element in JavaScript with current element tags? For example sometext var x = document.getElementsByClassName('big')[0] and now I want get HTML code of x : ' sometext ' not only: ' sometext ' like innerHTML. Is there simpler method than that? var div = document.createElement("div"); div.id='_fooo'; var parent = x.parentNode; parent.insertBefore(div, x); div.appendChild(x); document.getElementById('_fooo').innerHTML
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29081142
linked to: http://stackoverflow.com/q/13629410
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29080463
has comment: http://stackoverflow.com/comment/46394158

http://stackoverflow.com/comment/46488853
has text: I think t's related to another issue. With your suggestion and in a form that has not been ajaxed, it does work fine. But my form is in a modal whose fields are ajaxed from a second page. In that scenario, it fails. I created another post for that separate issue. Thanks again.
comment on: http://stackoverflow.com/a/29110905
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29073289
tagged with: datatable
has body: I use data table plugin with table as data source. I have to change some column value via javascript when the user types in some numbers into an input (this input is part of the table too and I have to export this values to). It is working well but when I want to export the table the columns witch was changed with javascript is not displayed in the exported file. I think the problem is that I have not refreshed the datatable plugin. Is this correct? If yes how do I refresh the datasource? If no what can be the problem and how can I solve it? I tried the refresh() method (var dataTableObject = $(this).parents('table').dataTable(); dataTableObject.refresh();) and the $(this).parents('table').dataTable() but is not working. Edit: Here is how do I change the cell value: $item.find('input.quantity-coefficient').each(function (i, d) { $(d).off('change').on('change', function () { var multiplier = $(this).val(); //var dataTableObject = $(this).parents('table').dataTable(); $($(this).data("row-price-info-class")).each(function (i, d) { var priceContainer = $(d); var price = parseFloat(priceContainer.data('price-value')); var priceInfoRatioContainer = $(priceContainer.data("ratio-input-class")); if (multiplier * price == 0) { priceInfoRatioContainer.closest("td").addClass("no-euro"); priceInfoRatioContainer.html(" "); } else { priceInfoRatioContainer.closest("td").removeClass("no-euro"); priceInfoRatioContainer.html(localizeNumber(multiplier * price)); } }); //TODO redrow the data $(this).parents('table').dataTable().fnDraw();; }); });
type: Question
has answer: http://stackoverflow.com/a/29073456
answer count: 2
has title: How to refresh datatable column data
tagged with: javascript
tagged with: jquery
tagged with: export
score: 0
linked to: http://stackoverflow.com/q/3299280
has answer: http://stackoverflow.com/a/29073781
type: UnansweredQuestion

http://stackoverflow.com/comment/91770495
type: AnswerComment
type: Comment
score: 6
has text: he meant the other way around ... from cpp call js
comment on: http://stackoverflow.com/a/32323249

http://stackoverflow.com/a/29127998
score: 0
type: Answer
has body: It is not possible to save a json file with jquery alone. You must implement a server side code in order to make that work.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46482048
answers question: http://stackoverflow.com/q/29127878

http://stackoverflow.com/comment/46753068
has text: Thank you for your answer. But how do I use $ionicView.enter? I figured out, that it should be used in a $scope.$on('$ionicView.enter', function(...)); function, but it does nothing. Can you also give an example with the resolve functionality?
type: Comment
comment on: http://stackoverflow.com/a/29200443
score: 0
type: AnswerComment

data-structures
tags question: http://stackoverflow.com/q/29149272
tag name: data-structures
tags question: http://stackoverflow.com/q/29135542
type: Tag
tags question: http://stackoverflow.com/q/29192656

http://stackoverflow.com/comment/46605540
has text: are you getting the file name. try with edited version.
comment on: http://stackoverflow.com/a/29195826
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29139732
has comment: http://stackoverflow.com/comment/46503776
has comment: http://stackoverflow.com/comment/46503670
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46503482
has comment: http://stackoverflow.com/comment/46503620
type: Answer
has body: Your script is run for each user (since that is the server). You can listen and emit to a specific user of course. You need to generate an emit for each one, or write the emit in such a way it sends data only to the desired clients. This may help you: socket.io and node.js to send message to particular client Edit after comment: No, the script will be run for each user so you start an interval for each. If you want to start only one you can: 1. Name your interval and if it is defined not start it again. 2. Start the interval on a separate script that you run from console or something like that and it is never accessed by clients.
answers question: http://stackoverflow.com/q/29139654
has comment: http://stackoverflow.com/comment/46503784
has comment: http://stackoverflow.com/comment/46503721
score: 1
accepted answer of: http://stackoverflow.com/q/29139654
upvote count: 1
has comment: http://stackoverflow.com/comment/46503747

http://stackoverflow.com/a/29143608
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29143294
has comment: http://stackoverflow.com/comment/46510509
has comment: http://stackoverflow.com/comment/46510957
has body: I don't know the reason but I guess this is becouse of themeing jquery-ui. Without a theme (or the default theme) it is better to have a clean helper so you can style it the way you want. If the classes are applied to the helper as well you need to clear them first if you want to style your own helper. I hope you know what I mean. I know this is more theory than an answer.

http://stackoverflow.com/comment/46484420
type: Comment
comment on: http://stackoverflow.com/q/29129218
type: QuestionComment
has text: How are you hiding the validation divs?
score: 0

http://stackoverflow.com/comment/46480179
type: Comment
has text: Just note that if if you use something like this, your event will always have to be attached in your HTML. If in the future, you decide to attach your events in JavaScript, you will need to refactor to use `event.target`/`event.currentTarget`.
comment on: http://stackoverflow.com/a/29126643
type: AnswerComment
score: 0

sensors
type: Tag
tag name: sensors
tags question: http://stackoverflow.com/q/29195174

http://stackoverflow.com/comment/46646440
type: Comment
comment on: http://stackoverflow.com/a/29201233
has text: I understand that the event based version does not submit a form. I introduced it for troubleshooting as the form had not been submiting at all.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29181175
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29181187
type: Question
has body: I'm trying to replace a variable globaly in a string, but so far this just returns the same string without modifying it, don't know what I'm doing wrong. Can somebody point out what's happening? var line = "tooth"; var char = line.charAt(0); line.replace(new RegExp(char,"g"), ""); console.log(line);
tagged with: javascript
tagged with: replace
has comment: http://stackoverflow.com/comment/46578798
upvote count: 1
has title: .replace does nothing when input is a variable
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29181187
type: AnsweredQuestion

http://stackoverflow.com/q/29111730
accepted answer: http://stackoverflow.com/a/29111941
has answer: http://stackoverflow.com/a/29111883
has comment: http://stackoverflow.com/comment/46453111
tagged with: http
type: Question
has body: Found this issue debugging code where the following did not work: var req = http.request(options,function(res){ // res.on('error',cb(err)); res.on('end',function(){ cb(); }); }); However the following did work: var req = http.request(options,function(res){ // res.on('error',cb(err)); res.on('data',function(chunk){ //why do we need this? }); res.on('end',function(){ cb(); }); });
tagged with: javascript
has answer: http://stackoverflow.com/a/29111879
answer count: 3
score: 5
favorite count: 0
upvote count: 5
possible better answer: http://stackoverflow.com/a/29111879
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
has title: Why do we need res.on('data'... defined for POST even if we are not doing anything with the data?
has answer: http://stackoverflow.com/a/29111941
has comment: http://stackoverflow.com/comment/46452625

http://stackoverflow.com/comment/46474011
type: Comment
comment on: http://stackoverflow.com/a/29115543
score: 0
has text: I was able to take your fiddle and update it to my needs. http://jsfiddle.net/mcVfK/929/ It works as it is however, to be efficient, how can I avoid including sidebar.html on every sidebar link?
type: AnswerComment

http://stackoverflow.com/a/29104513
has comment: http://stackoverflow.com/comment/46439012
score: 0
answers question: http://stackoverflow.com/q/29104144
type: Answer
has body: easy fix :) var nameArray = ["Bill", "Barry", "Zack", "Will"]; console.log(validateName("Ben", nameArrray)); // False console.log(validateName("Will", nameArrray)); // True function validateName(name, arr){ var found = 0; for(var i = 0; i &lt; arr.length; i++){ found += (name === arr[i])? 1 : 0; } var result = (found&gt;0)? true: false; return result; }

http://stackoverflow.com/comment/46448351
type: QuestionComment
comment on: http://stackoverflow.com/q/29109106
score: 0
type: Comment
has text: Is your intention to remove consecutive equal values?

http://stackoverflow.com/q/29071921
tagged with: function
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29071972
answer count: 5
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29071992
type: Question
has answer: http://stackoverflow.com/a/29071983
accepted answer: http://stackoverflow.com/a/29071983
has body: While declaring function in javascript I come across this weird behaviour. I am not able to understand the reason. Can anyone explain. if ( true ) { function myFun() { alert( "true block" ); } } else { function myFun() { alert( "false block" ); } } myFun(); It's showing alert of false block!!!
has answer: http://stackoverflow.com/a/29071972
tagged with: if-statement
has title: Javascript weird behaviour of if block
score: 0
has answer: http://stackoverflow.com/a/29071973
has answer: http://stackoverflow.com/a/29072007

http://stackoverflow.com/q/29196450
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 0
tagged with: scroll
accepted answer: http://stackoverflow.com/a/29196545
has title: How to make section fade on scroll?
type: AnsweredQuestion
has body: I am trying to make a section of my website fade out on scroll. I tried looking at other questions, but none helped. Here is the link to my code : http://bit.ly/1BmYnvo Any help would be appreciated. If you could tell me why your code works, that would be great too! Thanks
score: 1
has answer: http://stackoverflow.com/a/29196545
tagged with: fade
type: Question
upvote count: 1

http://stackoverflow.com/q/29186834
tagged with: nested
has body: I'm trying to make a RuneScape hiscores checker in Meteor.js. I'm now successfully parsing data from their API and saving it as object (you can see app in action here: http://rs-hiscores.meteor.com/). Here's my server code: var cheerio = Meteor.npmRequire('cheerio'); var BASE_SKILLS = [ 'overall', 'attack', 'defence', 'strength', 'hitpoints', 'ranged', 'prayer', 'magic', 'cooking', 'woodcutting', 'fletching', 'fishing', 'firemaking', 'crafting', 'smithing', 'mining', 'herblore', 'agility', 'thieving', 'slayer', 'farming', 'runecrafting', 'hunter', 'construction' ]; var skills = { 'osrs': BASE_SKILLS, 'rs3': BASE_SKILLS.concat('summoning', 'dungeoneering', 'divination') }; var urls = { 'osrs': 'http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=', 'rs3': 'http://hiscore.runescape.com/index_lite.ws?player=' }; Meteor.methods({ lookup: function(player, game) { if (!urls.hasOwnProperty(game)) { game = 'rs3'; } var url = urls[game].concat(encodeURIComponent(player)); result = Meteor.http.get(url); $ = cheerio.load(result.content); body = $.html(); parsed = Meteor.call('parseStats', body, skills[game]); return parsed; }, parseStats: function(raw, skillsList) { var stats = raw.split('\n').slice(0, skillsList.length); var statsObj = { }; stats.forEach(function(stat, index) { var chunk = stat.split(','); statsObj[skillsList[index]] = { rank: +chunk[0], level: +chunk[1], xp: +chunk[2] }; }); return statsObj; } }); In my client code, I'm testing lookup method manually by providing player name inside function as an argument: Meteor.call('lookup', 'zezima', 'rs3', function(error, result) { if (error) { console.error(error); } console.log(result); Session.set("data", result); }); Template.rawdata.helpers({ getData: function() { return Session.get("data"); } }); Result in console: { agility: { level: 99, rank: 174, xp: 100234567 }, attack: { level: 99, rank: 601, xp: 127370193 }, construction: { level: 99, rank: 119, xp: 141170001 }, and so on... } Obviously, w…
has answer: http://stackoverflow.com/a/29208977
has title: Iterate through nested objects in Meteor.js and insert results into table
type: Question
type: AnsweredQuestion
tagged with: object
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29208977
tagged with: meteor
tagged with: html-table
score: 0
answer count: 1

http://stackoverflow.com/comment/46602997
type: QuestionComment
has text: Can I recommend you **don't** try to adapt that NYTimes example. The code in there is minified and therefore very difficult to read. In addtion, it looks to be using d3.v2, which is outdated at this point. Finally, I quick look at your codepen, you cut and pasted the SVG that's output by d3 into the HTML window and secondly I can't see where you ever call your `draw` function...
score: 0
comment on: http://stackoverflow.com/q/29194562
type: Comment

backbone.js
tags question: http://stackoverflow.com/q/29128717
tags question: http://stackoverflow.com/q/29200430
tags question: http://stackoverflow.com/q/29178423
tags question: http://stackoverflow.com/q/29150835
tags question: http://stackoverflow.com/q/29087536
tags question: http://stackoverflow.com/q/29159939
tags question: http://stackoverflow.com/q/29156907
tags question: http://stackoverflow.com/q/29211731
tags question: http://stackoverflow.com/q/29154566
tags question: http://stackoverflow.com/q/29112677
tags question: http://stackoverflow.com/q/29139075
tags question: http://stackoverflow.com/q/29177729
tags question: http://stackoverflow.com/q/29187895
tags question: http://stackoverflow.com/q/29214934
tags question: http://stackoverflow.com/q/29118801
tags question: http://stackoverflow.com/q/29105213
tags question: http://stackoverflow.com/q/29119472
tags question: http://stackoverflow.com/q/29134463
tags question: http://stackoverflow.com/q/29072012
tags question: http://stackoverflow.com/q/29128039
tags question: http://stackoverflow.com/q/29101350
tags question: http://stackoverflow.com/q/29079225
tags question: http://stackoverflow.com/q/29157524
tags question: http://stackoverflow.com/q/29133991
tags question: http://stackoverflow.com/q/29107485
tags question: http://stackoverflow.com/q/29215488
type: Tag
tags question: http://stackoverflow.com/q/29083120
tags question: http://stackoverflow.com/q/29108067
tags question: http://stackoverflow.com/q/29170765
tags question: http://stackoverflow.com/q/29152887
tags question: http://stackoverflow.com/q/29111726
tag name: backbone.js

http://stackoverflow.com/q/29097484
tagged with: printing
tagged with: http://stackoverflow.com/tag/html
has body: What is the best practice for creating specific page breaks in SAPUI5 and is it actually possible? Classical CSS atributes page-break-after and page-break-beforedoesn't seem to work in my case. For example, I have two sap.m.VBox elements and I attached them a CSS class which specifies page-break-after: always !important;when printing, but nothing happens. If I add * {overflow-x: visible !important; overflow-y: visible !important;} then it will break and continue to draw the content in next page if it doesn't fit in one page, but it doesn't work in IE. I have tryed also adding an empty div element that would work as a page break indicator, but still CSS wouldn't do anything. I guess that's because everything in SAPUI5 is put into one content div.
type: UnansweredQuestion
has title: Page breaks in SAPUI5
tagged with: css
tagged with: sapui5
has answer: http://stackoverflow.com/a/29119989
has comment: http://stackoverflow.com/comment/46429800
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/30727573
score: 0

http://stackoverflow.com/comment/46558440
type: QuestionComment
has text: It starts to look messy but if you want to `save_video` and then just render js you should render js directly in 'save_video' method (instead of redirecting somewhere) but if you really want to redirect - than you can render your modal without any javascript (directly inside your views)
comment on: http://stackoverflow.com/q/29168007
score: 0
type: Comment

http://stackoverflow.com/q/29099608
score: -1
has title: Google Maps API - Get info window to open when clicking a circle?
tagged with: google-maps-api-3
tagged with: infowindow
answer count: 1
has comment: http://stackoverflow.com/comment/46432357
favorite count: 0
tagged with: geometry
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29101488
downvote count: 1
type: Question
upvote count: 0
has body: I'm trying desparately to get a google map with circles which can be clicked to open an infowindow. It really doesn't seem like a complicated ask but searching online it does't seem to be possible, but I'm wondering if those posts are old and it's now possible. What I'm trying to do I'm trying to have a google map (HTML code which I can 'host' on SharePoint) with circles in different locations (This bit is fine so far) where I can click the circle to open an info window with a list of people at that location. What I've done so far I've been looking at the google maps javascript API pages and successfully made a map with circles using this example https://developers.google.com/maps/documentation/javascript/examples/circle-simple I've also tried putting a marker at the centre of the map with an infowindow which is less than ideal but still acceptable, however this didn't work. I literaly just cut the part of the javascript which does a marker and the page wouldn't load. My Background Unfortunately I have no idea about Javascript. I know a little about HTML but I'm certainly not from a technical background, I just want a map which looks nice and works. I could literally be one character from making it work but I've no clue what javascript means. . Newsletter Map <!--[if gte mso 9]> <mso:CustomDocumentProperties> <mso:_dlc_DocId msdt:dt="string">FQNCM6NFZFN7-2543-7</mso:_dlc_DocId> <mso:_dlc_DocIdItemGuid msdt:dt="string">a9ec8002-9354-4aef-9bbe-aac4a1d8f794</mso:_dlc_DocIdItemGuid> <mso:_dlc_DocIdUrl msdt:dt="string">https://sp.myatos.net/ms/uki/bs/bo/_layouts/DocIdRedir.aspx?ID=FQNCM6NFZFN7-2543-7, FQNCM6NFZFN7-2543-7</mso:_dlc_DocIdUrl> </mso:CustomDocumentProperties> <![endif]-->
tagged with: javascript

http://stackoverflow.com/comment/46593947
type: QuestionComment
has text: @jrook See [Conversion between Julian and Gregorian calendars #Conversion table](http://en.wikipedia.org/wiki/Conversion_between_Julian_and_Gregorian_calendars#Conversion_table).
comment on: http://stackoverflow.com/q/29188685
score: 0
type: Comment

http://stackoverflow.com/a/29063517
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29063491
has comment: http://stackoverflow.com/comment/46363719
type: Answer
score: 3
has body: First of all you need to use setTimeout instead of setInterval. Then you need to clear previous timer if there are new changes in textarea. For example something like this: jQuery('#textarea').on('input propertychange paste', function() { // Clear previous timeout if ($(this).data('timeout')) { clearTimeout($(this).data('timeout')); } // Set up new one $(this).data('timeout', setTimeout(function() { //save }, 2000)); });
upvote count: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29063491
has comment: http://stackoverflow.com/comment/46363066

http://stackoverflow.com/comment/46490632
has text: Well, those can't work because as you can see, the object doesn't have a property `sd`. One solution would be to simply iterate over all children and create a new object that maps the id to the content.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29131304

http://stackoverflow.com/a/34453088
upvote count: 2
downvote count: 0
type: Answer
has body: Yes, Chrome crashes if you are running the loops with heavy objects. The best thing you can do use Webworkers to process files and then read the chucks. Resources File APIs HTML5 Rocks Webworkers HTML5 Rocks
answers question: http://stackoverflow.com/q/29152732
score: 2

http://stackoverflow.com/q/29110014
has comment: http://stackoverflow.com/comment/46449549
type: AnsweredQuestion
has body: I have a MEAN.JS application running. It is a Single Page Application using AngularJS' hashtag routing. I would like to implement Bootstrap's toggable tabs, but for them to work they use hashtags to switch tabs (e.g. www.example.com/#tab1 and www.example.com/#tab2). All fine and dandy, except for that I cannot use hashtags that way due to AngularJS' routing. Any workarounds to make toggable tabs working in an AngularJS Single Page Application environment? Thanks in advance, I'll accept the answer that helps me solve this.
has answer: http://stackoverflow.com/a/29110165
accepted answer: http://stackoverflow.com/a/29110165
type: Question
has title: Toggable tabs in an AngularJS single page application?
tagged with: mean-stack
tagged with: javascript
score: 0
answer count: 1
tagged with: meanjs
tagged with: angularjs

http://stackoverflow.com/q/29151942
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/29152172
tagged with: selenium-webdriver
tagged with: selenium-chromedriver
score: 1
has body: I am using Protractor, and trying to grab all elements within a drop down list. I have the following and this part appears to be working: var counter = element.all(By.className('class')).count(); console.log(counter); I expected the value to be 43 instead I received this from the console log: { then: [Function: then], cancel: [Function: cancel], isPending: [Function: isPending] } So not giving up, I then decided to see if I can output this value to a search bar inside the web application I'm testing on. To see what value it displays: element(by.className('search_bar')).sendKeys(counter); When I run it again: I see the value in the search bar become populated with 43. This is what I am expecting to be what counter is equal to. I then proceed to use the variable 'counter' in other places, and I keep getting values back as: NaN How do I get it to pass the actual number value of 43 but as a variable.
has title: Protractor - variable assigned to element.all.locator.count is returning NaN why?
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29152172
tagged with: protractor
tagged with: javascript

http://stackoverflow.com/comment/100330279
score: 0
comment on: http://stackoverflow.com/a/29131408
type: AnswerComment
has text: @MattJohnson oh seems like I confused the answer with the jsfiddle above, which didn't use `parseZone()` but only `moment(currentTime).utcOffset()`, my apologies.
type: Comment

http://stackoverflow.com/comment/46550381
type: Comment
comment on: http://stackoverflow.com/a/29165675
score: 0
type: AnswerComment
has text: Awesome, this is exactly what I needed! Thank you! :) Any chance on doing this using multiple primary keys?

http://stackoverflow.com/q/29160962
tagged with: ajax
has body: So far I have HTML: Enter a word Javascript: PHP: <?php $dbh=mysql_connect ("localhost", "~", "~") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("~") or ("Database not found"); $input = $_REQUEST['input']; $input = mysql_real_escape_string(trim($input)); $sql = "SELECT * FROM ~ WHERE ~ LIKE '%".$input."%'"; $data = mysql_query($sql); $arrcnt = -1; $dataArray = array(); while ($temp = mysql_fetch_assoc($data)) { foreach($temp as $key=>$val) { $temp[$key] = stripslashes($val); $arrcnt++; } $dataarray[$arrcnt] = $temp; } $list = " "; foreach($dataArray as $val) { $list .= " ".$val['DesiredColumnContainingDesiredData']." "; } $list .= " "; echo $list; ?> Now, these codes are supposed to work together to autocomplete the div with id="suggest" then populate the text field with id="input" when selected ... I keep getting alert that reads:
has comment: http://stackoverflow.com/comment/46541694
possible better answer: http://stackoverflow.com/a/29161023
has title: Can someone spot my error (autocomplete text box)?
has comment: http://stackoverflow.com/comment/46541722
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29161118
has comment: http://stackoverflow.com/comment/46541564
type: Question
has comment: http://stackoverflow.com/comment/46541837
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29161118
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29161023

http://stackoverflow.com/comment/46534324
has text: yeah. I'm experimenting with hacks. It only works, though, if you click on the next button. I'm trying to make it work on label click
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29155824

http://stackoverflow.com/comment/46451195
has text: What's wrong with loops?
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29110922

http://stackoverflow.com/a/29093529
answers question: http://stackoverflow.com/q/29093474
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer
has body: What happens if this code runs dynamically on the browser and the user supplies wrong type of arguments. This will fail to check type since there's no type checking on the equivalent JS generated for that. The assumption is that you will use TypeScript code to call your TypeScript code, and that will fail to typecheck. Anything else will just pass through. If you accept a boolean from the user somehow, it will fail at runtime. Does typescript does only compile type checking or is there a way to generate JS that will also do type checking on run time? So suppose I want the argument to be of type 'number' and it can add JS code to check for type like 'isFinite()' ? Not yet.
score: 2
accepted answer of: http://stackoverflow.com/q/29093474

http://stackoverflow.com/q/29100260
has comment: http://stackoverflow.com/comment/46432499
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/29100554
tagged with: javascript
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29100550
has comment: http://stackoverflow.com/comment/46430800
tagged with: jquery
has title: enable/disable datepicker with dropdown asp.net
tagged with: asp.net
favorite count: 0
tagged with: datepicker
has body: i have dropdown for selecting data type of data in a textbox. dropdown options are like integer, decimal,string,date. everything is working fine except one thing that is am unable to get a datepicker to the text box when dropdown is selected to date. tried something like but failed to achieve $(function () { $(".date1").datepicker({ changeMonth: true, changeYear: true, numberOfMonths: 1 }); }); $("#&lt;%=ddlDataType.ClientID %&gt;").change(function () { if ($('#&lt;%=ddlDataType.ClientID %&gt; option:selected').text().toLowerCase() == "date") { $("#&lt;%=txtDefaultValue.ClientID%&gt;").prop("class", "date1"); } else { $("#&lt;%=txtDefaultValue.ClientID%&gt;").prop("class", ""); } }); what is the possible way to achieve this.
downvote count: 0
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/29137075
score: 0
has body: you can either use gulp-help, which gives you ability to provided even details to be printed for a given task... or use gulp-task-linking which prints tasks as main tasks &amp; sub-tasks visit the link to know all the options that they provide...
type: Answer
answers question: http://stackoverflow.com/q/29118988

http://stackoverflow.com/q/29107455
tagged with: javascript
has body: I have in tasks/config/custom.js: module.exports = function(grunt) { /* code */ grunt.loadNpmTasks(sails.config.mywebsite.foo); }; sails.config.mywebsite.foo But when calling a configuration variable, Sails shows me an error of GruntFile. I think that in these files can not access the configuration variables. But, How I can access them here? Thanks.
has title: How to access to Sails config variable in Tasks files
downvote count: 0
answer count: 1
tagged with: config
favorite count: 0
type: UnansweredQuestion
score: 3
has answer: http://stackoverflow.com/a/47676437
upvote count: 3
type: Question
tagged with: sails.js

http://stackoverflow.com/a/29192560
type: Answer
has body: selectedCategory can be accessed inside update function: $scope.update= function () { console.log($scope.selectedCategory); //this is selected cotegory id };
answers question: http://stackoverflow.com/q/29191496
score: 0

http://stackoverflow.com/comment/46606367
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29196641
has text: unhappy no, when i execute the initTinymce() in browser console, the modal dialog widget continue without the editor.

http://stackoverflow.com/q/29176393
upvote count: 3
type: Question
has title: AngularJS contenteditable blur on Enter
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: blur
has answer: http://stackoverflow.com/a/29177327
favorite count: 0
has body: I have a directive which i add on a div in order to be able to edit it's content and make a two-way binding to the scope. I wish to blur when I press the return button, I've tried element[0].blur(); as you can see below. However this doesn't work. What should I do? .directive("contenteditable", function() { return { restrict: "A", require: "ngModel", link: function(scope, element, attrs, ngModel) { function read() { ngModel.$setViewValue(element.html()); } ngModel.$render = function() { element.html(ngModel.$viewValue || ""); }; element.bind("blur keyup change", function() { scope.$apply(read); }); element.css('outline','none'); element.bind("keydown keypress", function (event) { if(event.which === 13) { element[0].blur(); event.preventDefault(); } }); } }; });
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29177071
score: 3

http://stackoverflow.com/a/30025301
accepted answer of: http://stackoverflow.com/q/29141887
answers question: http://stackoverflow.com/q/29141887
type: Answer
has body: In case anyone else finds this useful: I ended up adding a "NOW" series to my chart data and assigning it a specific color. var tNow = new Date(); var sNow = { key: "NOW", values: [ [tNow, 0], [tNow, max] ], color: '#FFFFFF' };
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46383509
type: Comment
type: QuestionComment
has text: I've opened the question yo see this image )
comment on: http://stackoverflow.com/q/29070982
score: 0

http://stackoverflow.com/comment/46538113
type: AnswerComment
comment on: http://stackoverflow.com/a/29158909
score: 0
type: Comment
has text: My example worked replacing the class of div element ".tab-content"

http://stackoverflow.com/comment/46629112
has text: i also feel that. by the way thanks for your help all you guys.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29209077

http://stackoverflow.com/a/59604654
has body: for is a keyword in javascript so in JSX you can't use it. You must use htmlFor which is translated into for attribute once it is rendered to the DOM.
answers question: http://stackoverflow.com/q/29161330
upvote count: 7
type: Answer
downvote count: 0
score: 7

http://stackoverflow.com/a/29153041
has comment: http://stackoverflow.com/comment/46549706
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46586058
answers question: http://stackoverflow.com/q/29152305
downvote count: 0
has body: My guess would be that, even though you don't enter an address in asp:TextBox txtStreetAddress, the asp:DropDownList for State is using a default which is not empty, e.g. 'AL' (alphabetically the first state in the list) and you're passing that as part of your address wihtout noticing it. Your request probably looks something like these: maps.googleapis.com/maps/api/geocode/json?address=,,AL,, which always returns the same results, i.e. { "results" : [ { "formatted_address" : "Alabama, USA", "geometry" : { "location" : { "lat" : 32.3182314, "lng" : -86.902298 }, } } ], "status" : "OK" } What your request should look like is: maps.googleapis.com/maps/api/geocode/json?address=,,,, which would not return results. Add a default empty list item to you drop down list, like: &lt;asp:DropDownList ID="ddlState" runat="server" AutoPostBack="True" DataTextField="StateName" DataValueField="StateId" OnSelectedIndexChanged="ddlState_SelectedIndexChanged" Width="160px"&gt; &lt;asp:ListItem&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; Update: I looked at your javascript a bit more, and I see a bug that would cause the behavior you described. If you send a valid address, you'll get back results, and these lines will execute: var location = results[0].geometry.location; txtLatitude.value = location.lat(); txtLongitude.value = location.lng(); So now txtLatitude and txtLongitude have values. But, if you then send an invalid address, this line executes: alert(searchString + ' - not found'); But txtLatitude and txtLongitude still have their original values. You must reset them, so change your code like: geocoder.geocode({ address: address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { var location = results[0].geometry.location; txtLatitude.value = location.lat(); txtLongitude.value = location.lng(); } else { txtLatitude.value = ''; txtLongitude.value = ''; alert(searchString + ' - not found'); });
type: Answer

iron-router
tags question: http://stackoverflow.com/q/29115858
tags question: http://stackoverflow.com/q/29194044
tags question: http://stackoverflow.com/q/29183247
tags question: http://stackoverflow.com/q/29131178
tags question: http://stackoverflow.com/q/29174128
tags question: http://stackoverflow.com/q/29145900
tag name: iron-router
type: Tag

http://stackoverflow.com/q/29203451
has comment: http://stackoverflow.com/comment/46618595
type: UnansweredQuestion
tagged with: adsense
has answer: http://stackoverflow.com/a/38039264
has comment: http://stackoverflow.com/comment/46618657
tagged with: blogger
has body: i have created blog http://toptenbestthings.blogspot.in/ and sign up for adsense every thing is completed verified all done and got my code to paste website / blog Adsense code (Asynchronized) method and placed code in html method and even added adsense to display ads using layout method but ads not displaying even in layout method not displaying this how i added code to my blog and page https://support.google.com/adsense/answer/181957?topic=28897 Can some one please help me trying to solve this for past 11 days And i need to check my account is verified is this the reason ads are not shown are any problem
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46618662
has comment: http://stackoverflow.com/comment/46618567
score: 0
answer count: 1
has title: google adsense not displaying in blog

http://stackoverflow.com/q/29068776
type: UnansweredQuestion
tagged with: authentication
has comment: http://stackoverflow.com/comment/46372964
has comment: http://stackoverflow.com/comment/46389025
has comment: http://stackoverflow.com/comment/46372895
has body: I'm building a simple MEAN survey app (think strawpoll). I would like people to be able to use my app without creating an account (I will implement a captcha on the form submission page). However, right now anyone can just throw requests at the api directly, and I would like to secure it. Also, I would like to make sure each visitor can only vote once (I know this isn't 100% possible). What sort of strategy can I use to secure my app? I'm thinking it's going to have to be some sort of session, but all of the strategies I see in tutorials seem to require some sort of user account. Does anyone have any ideas? Thank you!
has title: MEAN authentication strategies without user accounts?
tagged with: javascript
tagged with: express
type: Question
has comment: http://stackoverflow.com/comment/46372969
score: 0
has comment: http://stackoverflow.com/comment/46373118
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46373161
tagged with: node.js
answer count: 0

http://stackoverflow.com/a/74949645
has body: You can refer to this solution const interpolate = (str) =&gt; new Function(`return \`${new String(str)}\`;`)(); const foo = 'My'; const obj = { text: 'Hanibal Lector', firstNum: 1, secondNum: 2 } const str = "${foo} name is : ${obj.text}. sum = ${obj.firstNum} + ${obj.secondNum} = ${obj.firstNum + obj.secondNum}"; console.log(interpolate(str)); by returning a new function that has a template literal that copies the full string into that template literal you achieve the correct variable expansion wanted - this is useful if you want to have strings saved in some content management system that you then want to expand. The code also includes an example of this working.
score: 2
upvote count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/132271097
answers question: http://stackoverflow.com/q/29182244
type: Answer

http://stackoverflow.com/q/29098558
tagged with: c#
has answer: http://stackoverflow.com/a/29099238
tagged with: javascript
score: 0
answer count: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/29099173
tagged with: asp.net
has title: How to pass data from code behind to JavaScript and call array
tagged with: multidimensional-array
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/140247365
has body: I have an ASP.NET project that uses some analytics controls for viewing various data. The controls are populated via JavaScript functions such as this: Morris.Bar({ element: 'hero-bar', data: [ { device: '1', sells: 136 }, { device: '3G', sells: 1037 }, { device: '3GS', sells: 275 }, { device: '4', sells: 380 }, { device: '4S', sells: 655 }, { device: '5', sells: 1571 } ], xkey: 'device', ykeys: ['sells'], labels: ['Sells'], barRatio: 0.4, xLabelMargin: 10, hideHover: 'auto', barColors: ["#3d88ba"] }); What I need to do is to populate the 'data: []' array by passing some values from the code behind (where I get the actual values from a database). How can I go about passing the data across, and in what format does it need to come across? How do I add the variable into the JavaScript? Can I pass it over as a string array by running a foreach loop in my code behind on the collection, so: foreach(var item in items) { //build array here called "myDataFromCodeBehind" sb.Append(" { device: xVariable, sells: yVariable },"); } And then call the string array from the JavaScript var myData = "<%=myDataFromCodeBehind %>"; Morris.Bar({ element: 'hero-bar', data: [myData], // etc Or would that not work? Something tells me I'm going about it all wrong. I'm new to JavaScript and I'm not sure if this will work.
type: Question

http://stackoverflow.com/comment/46377503
type: QuestionComment
comment on: http://stackoverflow.com/q/29071179
score: 0
has text: And your form code has accept-charset="UTF-8"? and for good measure you could use utf8_encode() on the posted code. That way the whole chain is utf8 what you controll http://php.net/manual/en/function.utf8-encode.php and to go even one step better add this before any content in your php files header('Content-Type: text/html; charset=utf-8'); See if that resolves anything...
type: Comment

http://stackoverflow.com/comment/46480435
score: 0
has text: It is working as expected, Please have a look at: http://plnkr.co/edit/FWD4wrG1cVbzjI7cQyEL?p=preview
type: Comment
comment on: http://stackoverflow.com/q/29126787
type: QuestionComment

http://stackoverflow.com/q/29097230
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46425151
tagged with: jquery
has answer: http://stackoverflow.com/a/29098758
has comment: http://stackoverflow.com/comment/46425490
has comment: http://stackoverflow.com/comment/46425349
favorite count: 0
has title: how to find element in html using php?
has comment: http://stackoverflow.com/comment/46425245
type: Question
has comment: http://stackoverflow.com/comment/46425626
has comment: http://stackoverflow.com/comment/46425427
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/46425534
has comment: http://stackoverflow.com/comment/46425314
has comment: http://stackoverflow.com/comment/46425328
score: 0
accepted answer: http://stackoverflow.com/a/29098758
has comment: http://stackoverflow.com/comment/46425487
upvote count: 1
has comment: http://stackoverflow.com/comment/46426136
answer count: 1
downvote count: 1
tagged with: file-get-contents
has comment: http://stackoverflow.com/comment/46425942
has body: I am trying to find an element in html document using php. include_once('simple_html_dom.php'); $handle = fopen("exercise/Exercise.php", "r"); $file = fread($handle ,8192); $handle = file_get_html('exercise/Exercise.php'); if (!empty($handle)) { $ret = $handle-&gt;find('div[id=abc]'); } but I have no idea What to do with $ret now? or even check has it found &lt;div id="abc"&gt; or not?is this even the right way I don't know because I am not very good at php? Edit that question is way to vast for me understand.
tagged with: javascript

http://stackoverflow.com/comment/46633764
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29211758
has text: If You use requirejs to build your project! Why do You need the `var worker` outside the define method?
score: 0

http://stackoverflow.com/a/29167382
type: AcceptedAnswer
downvote count: 0
score: 2
accepted answer of: http://stackoverflow.com/q/29163395
type: Answer
answers question: http://stackoverflow.com/q/29163395
upvote count: 2
has body: You can use the Selector's built-in support for regular expressions through re(): pattern = r'SKART\.analytics\["category"\] = "(\w+)";' response.xpath('//script[@type="text/javascript+gk-onload"]').re(pattern) Demo (using scrapy shell): $ scrapy shell index.html In [1]: pattern = r'SKART\.analytics\["category"\] = "(\w+)";' In [2]: response.xpath('//script[@type="text/javascript+gk-onload"]').re(pattern) Out[2]: [u'television']

http://stackoverflow.com/comment/46442556
type: QuestionComment
comment on: http://stackoverflow.com/q/29106347
score: 0
type: Comment
has text: I found 14 similar threads using your search term. http://stackoverflow.com/questions/14651348/checking-if-image-does-exists-using-javascript

http://stackoverflow.com/a/29169580
score: 1
answers question: http://stackoverflow.com/q/29169234
downvote count: 0
has body: You'd have to use some module dependency tool, like browserify, requireJS or webpack. You'd need to export your code's variables: //js/source.js var SourceComponent = 'Hello'; // what you want to export module.exports = SourceComponent; // export that variable You can now include your source by calling require('js/source'); Setting this up can take a while, as you often need to make sure all dependencies are tied together, which can take a long time with large projects. We used the webpack, which has helped, as you can “emulate” it being run in a script tag. In webpack we imported source files like follows: require(script!js/source.js'); which allowed us to quickly get something working.
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46379763
score: 0
type: Comment
type: QuestionComment
has text: That is indeed interesting :)
comment on: http://stackoverflow.com/q/29072744

http://stackoverflow.com/comment/46422219
comment on: http://stackoverflow.com/q/29095586
type: Comment
type: QuestionComment
has text: There is no `&laquo;` in the text you are getting it's the actual symbol: `«`, have you tried replacing that? Also you are doing nothing with the result: http://jsfiddle.net/peteng/t1rru99a/3/
score: 3

http://stackoverflow.com/a/29181083
accepted answer of: http://stackoverflow.com/q/29180984
answers question: http://stackoverflow.com/q/29180984
has body: here a demo http://embed.plnkr.co/phmNaQD2JQa4RH8ITK0I Click Here!
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46578906
has comment: http://stackoverflow.com/comment/46582163
score: 0
type: Answer

http://stackoverflow.com/q/29203547
has comment: http://stackoverflow.com/comment/46624725
has comment: http://stackoverflow.com/comment/46622977
tagged with: javascript
has answer: http://stackoverflow.com/a/29212470
has comment: http://stackoverflow.com/comment/46655471
has comment: http://stackoverflow.com/comment/46624925
tagged with: parse-cloud-code
tagged with: promise
has comment: http://stackoverflow.com/comment/46624571
has body: In the following Cloud function I need to know where and how to put the response.success() so that it gets executed once all the work is done and not before. I have already checked that the function is doing its job as expected. The only issue is the one I mentioned. I am trying to use Promises, but what I have done so far did not work. Parse.Cloud.define ("deleteUnitAndDependencies", function(request, response) { var unitListQuery; unitListQuery = new Parse.Query("UnitList"); unitListQuery.equalTo("objectId", request.params.unitID); unitListQuery.equalTo("ownerID", request.params.userID); unitListQuery.find().then(function(resUnit) { var sentenceListQuery,sentenceListStatus; sentenceListQuery = new Parse.Query("SentenceList"); sentenceListQuery.equalTo("unit", resUnit[0]); sentenceListStatus = sentenceListQuery.find(); resUnit[0].destroy({}); return sentenceListStatus; }).then(function(resSentence) { var translatListQuery,translatListQStatus; translatListQuery = new Parse.Query("TranslatList"); for (iS = 0; iS &lt; resSentence.length; iS++) { if (iS == 0 ) { translatListQuery.equalTo("sentence", resSentence[iS]); continue; } translatListQuery = Parse.Query.or(translatListQuery, (new Parse.Query("TranslatList")).equalTo ("sentence", resSentence[iS])); } translatListQStatus = translatListQuery.find(); for (iS = 0; iS &lt; resSentence.length; iS++) { resSentence[iS].destroy({}); } return translatListQStatus; }).then(function(resTranslat) { for (iT = 0; iT &lt; resTranslat.length; iT++) { resTranslat[iT].destroy({}); } }); });
has comment: http://stackoverflow.com/comment/46618711
has comment: http://stackoverflow.com/comment/46618563
answer count: 4
has comment: http://stackoverflow.com/comment/46622153
has comment: http://stackoverflow.com/comment/46618821
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46626492
has title: How to make response.success() wait?
tagged with: parse-platform
has answer: http://stackoverflow.com/a/29203585
has answer: http://stackoverflow.com/a/29226404
has answer: http://stackoverflow.com/a/29231592
has comment: http://stackoverflow.com/comment/46618489
type: Question
has comment: http://stackoverflow.com/comment/46624832
has comment: http://stackoverflow.com/comment/46625014
possible better answer: http://stackoverflow.com/a/29203585
has comment: http://stackoverflow.com/comment/46623985
score: 0
accepted answer: http://stackoverflow.com/a/29226404
has comment: http://stackoverflow.com/comment/46621911

http://stackoverflow.com/comment/46394820
has text: @JoshSalazar: Glad that helped. I misunderstood why you were linking to the fiddle initially, but I get it now.
comment on: http://stackoverflow.com/a/29080561
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46629774
type: QuestionComment
has text: Then how does it work the second time?its working perfectly on the second click.
comment on: http://stackoverflow.com/q/29146155
score: 0
type: Comment

http://stackoverflow.com/comment/46415171
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29090869
has text: So what do you guys think of using the nodejs tool node-async ... its a hack, but a hack published in npm. ASYNC.EACH OR ASYNC.PARALLEL should do it. I'm just not clear on how to perform a 'wait' operation for a slow asynchronous function that is called from within a loop a variable # of times. I'm doing this on a node server, not in a client.

http://stackoverflow.com/comment/46448830
comment on: http://stackoverflow.com/q/29109400
type: Comment
type: QuestionComment
has text: I understand, but wouldn't just putting a $ infront of the opening function do the job? It doesn't seem to help..
score: 0

http://stackoverflow.com/a/29131764
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29131688
has body: Well, you can try to hide the object inside of a closure or use Object.freeze in browsers that support it, however there is no getting around the fact that the code is being sent to and executed on the client. Even if there was a foolproof way of preventing modification ( which there isn't ), the client could have modified the payload in Fiddler or something before it reached the browser. With that in mind, you cannot trust anything on the client for access/authorization; you must verify this on the server or you'll have security holes/risks.
downvote count: 1
score: 1

http://stackoverflow.com/a/29099144
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29098539
answers question: http://stackoverflow.com/q/29098539
has comment: http://stackoverflow.com/comment/62865180
type: AcceptedAnswer
downvote count: 0
has body: Your problem is your trying to read s.text in your html, but you don't have a text key in your array! Change.... ng-options="s.text as s for s in items" to ng-options="s for s in items" and it seems to work. http://jsfiddle.net/v983ryrk/1/

http://stackoverflow.com/q/29217788
answer count: 2
has answer: http://stackoverflow.com/a/29217926
tagged with: jquery
has answer: http://stackoverflow.com/a/29218105
accepted answer: http://stackoverflow.com/a/29218105
has comment: http://stackoverflow.com/comment/46644556
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29217926
tagged with: onclick
has title: Direct JQuery click events to two of same element?
type: Question
tagged with: responsive-design
tagged with: javascript
has body: I have a web page which loads a slider/drawer. Inside the web page, I load an html div for the contents of the drawer for when the window is expanded, and another duplicate of it for when the window is collapsed in a small window like on a phone. On the page is have a function like: $('#button').click(function(){ //do something }); The large button of //button here loads before the small version. So clicking the large one works and the .click event is triggered, but for the small one it isn't. How can I get my .click function to observe the click event on the small drawer when it's clicked?
score: 0
tagged with: jquery-events

http://stackoverflow.com/q/29184449
has title: How to upload files using pure node.js?
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46585516
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46587303
accepted answer: http://stackoverflow.com/a/29184918
favorite count: 0
has body: I have a webpage with a form, the form has a file input, and when I submit the form I would like the server to write it to a file server side. I have tried uploading several test images using this form, and so far every one turns out as a plain text file containing the original file's filename. I have found no good information or examples of how to do this online except for "use Express!", "use This!", "use That!", "use The Other Thing!" and it's quite aggravating.
type: Question
score: 5
has comment: http://stackoverflow.com/comment/46585427
answer count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/46585671
upvote count: 10
has comment: http://stackoverflow.com/comment/46587859
has answer: http://stackoverflow.com/a/29184918
has comment: http://stackoverflow.com/comment/46584967

controller
tags question: http://stackoverflow.com/q/29115179
tags question: http://stackoverflow.com/q/29148243
tags question: http://stackoverflow.com/q/29209697
tag name: controller
tags question: http://stackoverflow.com/q/29200161
tags question: http://stackoverflow.com/q/29087995
tags question: http://stackoverflow.com/q/29112542
type: Tag
tags question: http://stackoverflow.com/q/29073267
tags question: http://stackoverflow.com/q/29148057

http://stackoverflow.com/q/29158419
score: 0
answer count: 2
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29158655
accepted answer: http://stackoverflow.com/a/29158655
tagged with: web
has answer: http://stackoverflow.com/a/29158639
has comment: http://stackoverflow.com/comment/46537319
type: AnsweredQuestion
has title: Use canvas context works as global but not when I pass it
has body: I'm working on a final project (interactive Javascript game, etc.) and decided to give myself a challenge by learning canvas and HTML5. I'm also trying to learn Javascript objects (and organize what so many people seem to throw into one big script tag), etc. so excuse some possible stupidity on my part. :) So currently I have the core working but I'm trying to make a start screen (I'm going to blur a paused random game behind the start options). The game involves dodging obstacles. When I draw the obstacles using a global variable context everything works. When I try to pass in a variable it dies. Here's what works: var mainCanvas = document.getElementById("objectsToAvoidCanvas"); var mainContext = mainCanvas.getContext('2d'); function Obstacle(){ var height; var width; var xPosition; var yPosition; var isOffScreen; var isSafeToAddMore; var speed; var anonymousCreation = function(){ this.width = Math.floor((Math.random() * window.innerWidth * 0.8) + 1); this.height = Math.floor((Math.random() * window.innerHeight * 0.7) + 1); this.xPosition = Math.floor((Math.random() * window.innerWidth * 0.8) + 1); this.yPosition = this.height * -1; this.isOffScreen = false; this.isSafeToAddMore = false; this.speed = 1; mainContext.fillStyle = '#009933'; mainContext.fillRect(this.xPosition, this.yPosition, this.width, this.height); }; anonymousCreation(); }; Obstacle.prototype.drawInRandomPlace = function(){ yPosition = Math.floor((Math.random() * window.innerWidth * 0.8) + 1); mainContext.fillStyle = '#009933'; mainContext.fillRect(xPosition, yPosition, width, height); }; However, something along these lines breaks: function Obstacle(context){ var height; var width; var xPosition; var yPosition; var isOffScreen; var isSafeToAddMore; var speed; var mainCanvas var mainContext var anonymousCreation = function(){ this.mainContext = context this.width = Math.floor((Math.random() * window.innerWidth * 0.8) + 1); this.height = Math.floor((Math.random() * window.innerHeight * 0.7) + 1); …
has comment: http://stackoverflow.com/comment/46537286
type: Question
tagged with: canvas
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29158639

http://stackoverflow.com/comment/46461253
score: 0
comment on: http://stackoverflow.com/q/29113698
type: Comment
type: QuestionComment
has text: @ArunPJohny I can't see/find a faster/better way to do what that task does, maybe I'm missing something?

http://stackoverflow.com/q/29069217
answer count: 1
tagged with: button
accepted answer: http://stackoverflow.com/a/29069237
has title: button not running as button, can't find how to make run a js file
has body: so in my html file i have Orange’s Game and in the game.js i have var startgame = function(){ alert('GO!'); } the supposed button is actually a text box, and everything I have looked up does not seem to work. I am on OS X Yosemite. EDIT Ok, so I have got a button now, but now, how do I get it to run the script?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: onclick
has comment: http://stackoverflow.com/comment/46373589
linked to: http://stackoverflow.com/q/469059
has comment: http://stackoverflow.com/comment/46373681
type: Question
has answer: http://stackoverflow.com/a/29069237
tagged with: javascript
has comment: http://stackoverflow.com/comment/46373619
score: 0

http://stackoverflow.com/comment/46584313
has text: Not sure what the reason is, maybe it is linked to the use of contentEditable rather of ? Good luck :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29183948

http://stackoverflow.com/comment/46488115
type: AnswerComment
comment on: http://stackoverflow.com/a/29130670
type: Comment
has text: its the if (document.getElementById('input_25_custom_1011_0').selected == true ) I think need to define which option is selected?
score: 0

http://stackoverflow.com/comment/46453444
comment on: http://stackoverflow.com/q/29111249
has text: Do you know the parameter names for the coords?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29139920
accepted answer: http://stackoverflow.com/a/29140946
has comment: http://stackoverflow.com/comment/46503842
has comment: http://stackoverflow.com/comment/46503903
answer count: 2
downvote count: 2
has body: so.. var songList = ["1", "2" ,"3","4","5","6","7","8","9","10"]; so my idea is to make a function which returns the first 5 Set of the values according to the index. if getList("1"); // is called. it should result in "1 2 3 4 5" output. and if getList("2"); // is called it should result in " 6 7 8 9 10"
has comment: http://stackoverflow.com/comment/46504679
has comment: http://stackoverflow.com/comment/46503780
has title: make a listing function for a array Jquery / Javascript
has answer: http://stackoverflow.com/a/29140946
type: AnsweredQuestion
upvote count: 0
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29140447
tagged with: jquery
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/29140447
score: -2

http://stackoverflow.com/comment/46582920
has text: He asked for a way to get the element contents as a HTML string, not bind it to the DOM...
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29183461

http://stackoverflow.com/q/29081179
has title: Function run on multiple elements inserts multiple images
accepted answer: http://stackoverflow.com/a/29081212
score: 0
answer count: 1
tagged with: javascript
has body: I have a function that is called on multiple li elements when you scroll to the bottom of the page. The function removes a class and creates an image element based on the data- attribute of each li: function createImg(param) { var img = $(' '); img.attr('src', $(this).attr("data-src")); img.appendTo(this); } $(window).scroll(function () { if ($(window).scrollTop() + $(window).height() === $(document).height()) { $("li.hidden").slice(0, 2).removeClass('hidden').each(createImg); }); 1 2 3 However now I want to create the image within div.image-cont within the li. Ive tried the javascript below but it creates multiple images within each div.image-cont rather than just 1 in each: function createImg(param) { var img = $(' '); img.attr('src', $(this).attr("data-src")); img.appendTo(".image-cont", this); } 1 2 3
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29081212
type: Question

http://stackoverflow.com/comment/46412565
type: QuestionComment
comment on: http://stackoverflow.com/q/29089845
has text: You don’t, unless the remote site enables CORS.
score: 0
type: Comment

wijmo
type: Tag
tag name: wijmo
tags question: http://stackoverflow.com/q/29143304

http://stackoverflow.com/comment/46420589
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29094664
has text: Which code branch is being executed? Firefox, Chrome or Other?

http://stackoverflow.com/comment/46500945
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29137862
has text: Yes - because when question is actually closed as duplicate all suggested duplicates are listed.

http://stackoverflow.com/comment/46612111
type: AnswerComment
comment on: http://stackoverflow.com/a/29199862
score: 0
type: Comment
has text: Yep, same solution, so it might be the solution :)

http://stackoverflow.com/q/29141472
has answer: http://stackoverflow.com/a/29141647
has comment: http://stackoverflow.com/comment/46506545
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46507322
tagged with: javascript
has comment: http://stackoverflow.com/comment/46507514
has title: How to get the JSON object from the given code?
answer count: 2
upvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29142067
type: UnansweredQuestion
score: -3
has body: I am using a url my code is: var url="http://nucleus/api/projectlist?format=json" var json=JSON.parse(this.responseText); The JSON formatted data in the browser is like as follows { "1": { "id": "91", "title": "Nucleus Aura", "project_locations": "TVm, Kochi", "project_type": "Villa", "project_status": "Book Now", "count_plan": 0, "image": "uploads/project_images/projects_images_image1415954647.png", "imagetitle": "Villa Night" } } I want to print the JSON data object to an alert box.

http://stackoverflow.com/a/29128427
upvote count: 1
answers question: http://stackoverflow.com/q/29128266
has comment: http://stackoverflow.com/comment/46482875
has comment: http://stackoverflow.com/comment/46483133
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46483037
has body: Your a tag isn't closed, and you have an orphan tag: ... ... Change to this: ... ... Also: ids must be unique, but you have the same "adiv" id on each row of your table. You could remove the id and do this instead: Hello
score: 1
accepted answer of: http://stackoverflow.com/q/29128266

http://stackoverflow.com/comment/46573948
comment on: http://stackoverflow.com/a/29177777
type: AnswerComment
score: 0
type: Comment
has text: Hey Guffa. my code did do exactly like the top box u posted and that is exactly what i wanted. the bug in the original problem was i didnt use return to call the recursion function again....it was ugly. when i put the keyword return as "return john(arr, i + 1, 0, total, coord)" it fix all the problem and got exactly as u mentioned in the top box of ur post. THANKS

http://stackoverflow.com/a/29148657
answers question: http://stackoverflow.com/q/29147334
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/46579907
type: Answer
downvote count: 0
has body: Try this: function MyCtrl($scope){ var date = new Date(), year = date.getFullYear(), month = date.getMonth(); var firstDay = new Date(year, month, 1); var lastDay = new Date(year, month + 1, 0); $scope.firstDay = firstDay ; $scope.lastDay = lastDay ; $scope.date = date ; } And: &lt;div ng-app ng-controller="MyCtrl"&gt; &lt;ul&gt; &lt;li&gt;&lt;/li&gt; &lt;li&gt;&lt;/li&gt; &lt;li&gt;&lt;/li&gt; &lt;/ul&gt;
accepted answer of: http://stackoverflow.com/q/29147334
score: 6

http://stackoverflow.com/q/29102854
tagged with: javascript
has comment: http://stackoverflow.com/comment/46436328
has comment: http://stackoverflow.com/comment/46436516
has answer: http://stackoverflow.com/a/29103515
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46436810
upvote count: 2
accepted answer: http://stackoverflow.com/a/29103515
score: 2
type: AnsweredQuestion
has title: Data content dont load on first page-load but does on 2nd page-load
type: Question
has body: The problem im been having is that the content in my view (the content that comes from database) aren't loading on the first page load. but it does on the second. Example I go from my startpage to the view i have my content on (text and database method content) First time i go there i only see my texts that are in the html. I go to another page on my site Then i go back to the previous view that have data content on. and now it shows that content. Why isn't the data content showing on the first page load?, and how do I resolve this? App/routing code: angular.module('App', ['ngRoute']) .config(function ($routeProvider) { $routeProvider .when('/Employee', { templateUrl: 'Employee/EmployeeResult', controller: 'EmployeeController', controllerAs: 'EmployeeCtrl', }) Controller code : angular.module('App') .controller('EmployeeController', function ($scope, $http, $location, getClassInfoForTeacher, $routeParams) { var vm = this; vm.info; vm.info = getClassInfoForTeacher.get(); vm.ClassClick = function () { $location.path('/Employee/EmployeeClassSelect'); } }) Factory code: angular.module('App') .factory('getClassInfoForTeacher', function ($http) { var obj; $http.get("/employee/GetClassInfoForTeacher") .success(function (response) { obj = JSON.parse('[' + response + ']'); }); return { get: function () { return obj; } }; }); Årskurs {{g.Grade}} {{c.Name}} This is what i get back from the function now. Controller code: angular.module('App') .controller('EmployeeController', ['$scope','$http','$location','$routeParams','getClassInfoForTeacher', function ($scope,$http, $location,$routeParams, getClassInfoForTeacher) { var vm = this; getClassInfoForTeacher.get().then(function (response) { vm.info = response; console.log(vm.info); }); vm.ClassClick = function () { $location.path('/Employee/EmployeeClassSelect'); } }]) .filter('unique', function () { return function (collection, keyname) { var output = [], keys = []; angular.forEach(collection, function (item) { var key = item[key…
has comment: http://stackoverflow.com/comment/46436542
has comment: http://stackoverflow.com/comment/46435927

http://stackoverflow.com/q/29162101
has title: How to duplicate form field text input in another field simulaneously
upvote count: 3
answer count: 3
has body: Essentially what I'm trying to achieve here is a client brief form, where our company manager can type in the clients name at the top in the quick glance section, and then it's replicated below under the client details section. Ideally i'd like it to replicate it out as he's typing. I had a look at this discussion, and unfortunately it hasn't helped me. Then again it might be because my Jquery scripting is very poor. So input in #client_name replicated in #client_name_output in real time is what I'm trying to achieve :) Any help will be appreciated! 1At A Glance Manager Vernon Penny Glenn Collie Nick Heygate Deadline 2Client Info Send
has comment: http://stackoverflow.com/comment/46544464
has answer: http://stackoverflow.com/a/29162433
linked to: http://stackoverflow.com/q/4061489
type: UnansweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/29162200
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
score: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29162376

http://stackoverflow.com/a/29092486
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/29092460
type: Answer
upvote count: 0
has body: Give id to your select tag: &lt;select id="selectBox"&gt; and $(function (){ if( $("#selectBox").val() == 0 ) { //change here alert('asd'); } });

http://stackoverflow.com/q/29092045
has body: Since I have deployed my app to a test environment, the calls to /Token (to log in and get a token) are playing up. The problem is it won't work at all for a few calls (takes 30 seconds and then returns a 500 error), then all of a sudden it will just start working (and working flawlessly, get a reply in &lt;50ms). On localhost on the dev machine, it has never skipped a beat. My dev setup was just on localhost; my test setup has three servers - one for the html/js and an iis rewrite which points to the second server which hosts the APIs and a third DB server. Same response via the following javascript: var loginData = { grant_type: 'password', username: self.loginEmail(), password: self.loginPassword() }; $.ajax({ type: 'POST', url: url + '/Token', data: loginData }).done(function (data) { self.loggedInUserName(data.userName); // Cache the access token in session storage. sessionStorage.setItem(tokenKey, data.access_token); Or if I use POSTMAN I get the same response. Web.config: &lt;system.webServer&gt; &lt;httpErrors errorMode="Detailed" /&gt; &lt;validation validateIntegratedModeConfiguration="false" /&gt; &lt;modules runAllManagedModulesForAllRequests="true"&gt; &lt;remove name="WebDAVModule"/&gt; &lt;/modules&gt; &lt;httpProtocol&gt; &lt;customHeaders&gt; &lt;add name="Access-Control-Allow-Headers" value="Content-Type" /&gt; &lt;add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /&gt; &lt;/customHeaders&gt; &lt;/httpProtocol&gt; Also I have put the following: GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; in my Global.asax file but error messages still aren't showing (wonder if this is the IIS rewrite hiding them?) EDIT: all calls to /api work flawlessly, it's only /Token that's playing up.
score: 0
accepted answer: http://stackoverflow.com/a/29096221
type: Question
tagged with: c#
tagged with: javascript
answer count: 1
tagged with: asp.net-web-api
has title: ASP Web API call to /Token intermittent
has answer: http://stackoverflow.com/a/29096221
type: AnsweredQuestion

http://stackoverflow.com/q/29069259
has comment: http://stackoverflow.com/comment/46373778
has comment: http://stackoverflow.com/comment/46374172
has answer: http://stackoverflow.com/a/29078209
answer count: 2
has answer: http://stackoverflow.com/a/29069341
has body: I am trying to process an array of objects (representing game players) to assign each object a group number based on their current group value. The catch is that each group should have as close to four players as possible and some players want to be in specific groups which must not be broken (but can be renamed or merged). Some players have unassigned/null groups (they don't want to play with anyone specific) and others want to play with specific people so they have a custom group value. var players = [ {name: "A", group: null}, {name: "B", group: null}, {name: "C", group: null}, {name: "D", group: null}, {name: "E", group: null}, {name: "cA", group: "custom1"}, {name: "cB", group: "custom1"}, {name: "cC", group: "custom2"}, {name: "cD", group: "custom2"}, {name: "cE", group: "custom3"}, {name: "cF", group: "custom3"}]; I need a way to resolve this array so that it returns something like this: var resolvedGroup = [ {name: "A", group: 1}, {name: "B", group: 1}, {name: "C", group: 1}, {name: "D", group: 1}, {name: "cA", group: "customMerged1"}, {name: "cB", group: "customMerged1"}, {name: "cC", group: "customMerged1"}, {name: "cD", group: "customMerged1"}, {name: "cE", group: 2}, {name: "cF", group: 2}, {name: "E", group: 2} ] You can see that the first four players should get assigned to group 1 and the players who initially had custom groups, get merged into groups of four, if possible - otherwise, they should get some of the "null" group players to form as close to four players in a group as possible. The names of the groups don't matter, only that each player who specified a custom group should be able to stay with the initial group members even if they get merged with another custom group.
score: 0
has comment: http://stackoverflow.com/comment/46374020
tagged with: javascript
type: UnansweredQuestion
type: Question
has title: Processing an array of objects and assigning them in groups of 4

each
tags question: http://stackoverflow.com/q/29133968
tags question: http://stackoverflow.com/q/29121010
tags question: http://stackoverflow.com/q/29206525
type: Tag
tag name: each

http://stackoverflow.com/a/29100149
downvote count: 1
answers question: http://stackoverflow.com/q/29100093
accepted answer of: http://stackoverflow.com/q/29100093
has body: Use the Date method toLocaleFormat(formatString) var today = new Date(); today.toLocaleFormat('%d-%b-%Y'); // 30-Dec-2011 tolocaleformat
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46514249
type: Answer
score: -1

http://stackoverflow.com/comment/46556389
type: Comment
comment on: http://stackoverflow.com/a/29168972
has text: Is it possible to avoid loop if I can use d3 object? In real like I have around 1000+ rows and I'm hoping to avoid looping over them.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46568164
comment on: http://stackoverflow.com/a/29173990
score: 0
type: AnswerComment
type: Comment
has text: Ok, thanks but where is headers of table here ? I cant review this witout header... so please make this with all elements like I have here: http://jsfiddle.net/nexetdad/

http://stackoverflow.com/q/29102501
score: -3
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46435238
type: Question
accepted answer: http://stackoverflow.com/a/29102703
tagged with: python
has body: I'm adding extra functionality to an existing JS website, and Python works best to do the math that the program needs to do. What I need is for a user to submit information, which should then become input for my Python code, which runs and sends the output back to the site. I'm attempting to do this with an AJAX call, although I'm open to other options. What I can't figure out is what needs to happen to or around my Python code for it to accept input and send output. I'm missing the piece that would be running, ready to accept the AJAX call, run the Python, and send everything back. I've looked everywhere, and I saw a couple of (not very good) examples using CGI and such. Is that the best option? What would be the cleanest and simplest way to do this?
has comment: http://stackoverflow.com/comment/46434933
answer count: 1
downvote count: 3
has answer: http://stackoverflow.com/a/29102703
type: AnsweredQuestion
upvote count: 0
has title: Incorporating Python Script with Input and Output into a JavaScript Website
linked to: http://stackoverflow.com/q/19735250
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29196364
has body: I am trying to set CORS for my Express.js backend. Since I have a local and a remote version of the front end I want to allow a couple of URLS access to the backend. I have tried to use "*" and var cors = require('cors') app.use(cors()) but I get Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true. I have tried using the dynamic settings for cors(), but there were no examples how to use it with Express's routes. I am now trying to create my own white list check with the code below but now I am getting No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5000' is therefore not allowed access. The response had HTTP status code 500. What am I doing wrong? UPDATE: It looks like the if statement is blocking the headers from being added so I tried to remove it to see what is happening with res.header('Access-Control-Allow-Origin', req.get("origin")); It is now giving me Credentials flag is 'true', but the 'Access-Control-Allow-Credentials' header is ''. It must be 'true' to allow credentials. var whiteList = { "http://localhost:5000": true, "https://example-url.herokuapp.com": true }; var allowCrossDomain = function(req, res, next) { if(whiteList[req.get('Origin')]){ res.header('Access-Control-Allow-Credentials', true); res.header('Access-Control-Allow-Origin', req.get('Origin')); res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With, Origin, Accept'); next(); } }; app.use(allowCrossDomain);
has comment: http://stackoverflow.com/comment/46605572
has comment: http://stackoverflow.com/comment/46606122
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
accepted answer: http://stackoverflow.com/a/29202119
has comment: http://stackoverflow.com/comment/46613966
linked to: http://stackoverflow.com/q/36393256
has comment: http://stackoverflow.com/comment/46615598
has comment: http://stackoverflow.com/comment/46614298
score: 4
has comment: http://stackoverflow.com/comment/46605650
has comment: http://stackoverflow.com/comment/46613540
has comment: http://stackoverflow.com/comment/46614132
tagged with: backend
tagged with: node.js
has comment: http://stackoverflow.com/comment/46606359
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29202119
has comment: http://stackoverflow.com/comment/46614984
has comment: http://stackoverflow.com/comment/46606138
linked to: http://stackoverflow.com/q/11001817
has title: Why do the CORS settings for my Express.js backend not work?
type: Question
upvote count: 4

http://stackoverflow.com/comment/46467719
type: Comment
has text: Thanks Murtaza, any idea why the write operation would lock up UI? I've recorded timestamps around fileWriter.write() and that is the only time consuming operation.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29114588

http://stackoverflow.com/comment/46525454
comment on: http://stackoverflow.com/a/29149784
has text: The only error is you don't like it, but boy you like to argue. Keeps me entertained though.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46600493
type: QuestionComment
comment on: http://stackoverflow.com/q/29193504
score: 0
type: Comment
has text: Maybe you need to add name for input if you want the ng-model to work

http://stackoverflow.com/comment/46488940
comment on: http://stackoverflow.com/a/29131615
has text: actually the rest of the code works except for showing the image
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46542881
type: Comment
comment on: http://stackoverflow.com/a/29159028
has text: If you're going to add variables to the global scope, using names such as `width` should be strongly reconsidered as it is too generic and too likely to be used by other code
type: AnswerComment
score: 0

http://stackoverflow.com/a/29214114
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46648905
type: Answer
has comment: http://stackoverflow.com/comment/46659694
accepted answer of: http://stackoverflow.com/q/29213837
has body: You could clone the already existing Element. That way all data and image data is preserved and doesn't need to be fetched anew. Also this method is gazillion times faster than adding the new HTML via string. function startthefun() { var imgElem = document.createElement('img'); imgElem.setAttribute('src','http://cdn.sstatic.net/stackoverflow/img/sprites.svg?v=1bc6a0c03b68'); document.getElementById('content').appendChild(imgElem); window.timer = window.setInterval(function() {document.body.appendChild(imgElem.cloneNode());},1000); } &lt;input type="button" value="start" onclick="startthefun()"&gt;&lt;input type="button" onclick="window.clearInterval(window.timer)" value="stahp"&gt;&lt;div id="content"&gt;&lt;/div&gt; You can just simply feed the HTMLElement into the $(selector).append(HTMLElement) Jquery will append the html node to your selected item.
has comment: http://stackoverflow.com/comment/46638057
answers question: http://stackoverflow.com/q/29213837
has comment: http://stackoverflow.com/comment/46638586
has comment: http://stackoverflow.com/comment/46658491
has comment: http://stackoverflow.com/comment/46640863

http://stackoverflow.com/a/29210764
score: 0
has body: You can do something like this. var mname; var ARRAY = ['A','B','C','D','E']; var mlength = ARRAY.length; for(var i=0;i&lt;mlength;i++){ window['mname'+i]=ARRAY[i]; } console.log(mname1); So this might help you. In this code I am making all the variables as window object member since Window is Global Object.
has comment: http://stackoverflow.com/comment/46632768
type: Answer
answers question: http://stackoverflow.com/q/29210657
has comment: http://stackoverflow.com/comment/46631262

http://stackoverflow.com/comment/46374973
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29069975
has text: instead of alert, can you console.log(result); and see response you got
score: 0

http://stackoverflow.com/comment/46436454
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29103114
has text: @rubberchicken you're welcome, there is probably more possible optimisation, but I think it's a good start.

http://stackoverflow.com/a/29212456
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46634340
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46634624
answers question: http://stackoverflow.com/q/29212359
has body: Javascript functions always return ambigious values. One function can return boolean, string, object, array or HTMLElement. There is no fixed type. function masterSwitch(input) { switch(input) { case 0 : return "Hello"; case 1 : return 0xdead; case 2 : return 0.00042; case 3 : return document.createElement("DIV"); case 4 : return true; case 5 : return window; case 6 : return this; case 7 : return null; default:window.alert("Please specify input from 0 to 8"); } } string int float HTMLElement boolean window this null

http://stackoverflow.com/comment/46606738
comment on: http://stackoverflow.com/a/29139807
type: Comment
has text: sorry i was weekend with my family, yes that usefull, my mistake is the code not i put on $(document).ready(function(). thanks for the answer (y)
score: 0
type: AnswerComment

http://stackoverflow.com/a/29150129
has comment: http://stackoverflow.com/comment/46525211
has comment: http://stackoverflow.com/comment/46563873
type: Answer
accepted answer of: http://stackoverflow.com/q/29149748
upvote count: 3
has comment: http://stackoverflow.com/comment/46525171
has comment: http://stackoverflow.com/comment/46525077
has body: This is a complex solution to this problem, which minimizes the numbers of jQuery element fetching calls Note that it's clean and a lot faster than the other solutions provided. Unless it's tested I believe that this is a working piece of code. Since you are using # div id selector (which is unique) the is no need for calling find() function. //Object handles var headerFader = $('#headerFader'); var masterHeader = $('#masterHeader'); var takemeback = $('#takemeback'); headerFader.carousel({ interval: 2500, pause: false }); //BACK HOME TEXT headerFader.hover( function(){ masterHeader.animate({opacity:0}, 0, function(){ $(this).css("display", "none"); takemeback.css("display", "block").animate({opacity:1}, 1000); }); }, function(){ takemeback.animate({opacity:0}, 0, function(){ $(this).css("display", "none"); masterHeader.css("display", "block").animate({opacity:1}, 1000); headerFader.carousel({ interval: 2500, pause: false }); }); } );
score: 3
answers question: http://stackoverflow.com/q/29149748
has comment: http://stackoverflow.com/comment/46525015
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29166032
score: 2
type: AnsweredQuestion
has body: I have a CSS modal on my page that is automatically hidden by JS until a Sign Up link is clicked. My problem is that when the page loads, the modal briefly flashes before being hidden. I have used JS Hide function on the modal but am unsure of how to prevent the flash on page load, without disabling the ability for it to show on sign up click. Modal HTML: X Header Form Contents Hide (and reveal on click) JS: Your help is greatly appreciated. D
upvote count: 2
has answer: http://stackoverflow.com/a/29166077
type: Question
accepted answer: http://stackoverflow.com/a/29166077
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29166262
has title: Remove CSS Modal Flash on Page Load
has answer: http://stackoverflow.com/a/29166085
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29166190
has comment: http://stackoverflow.com/comment/46550749
possible better answer: http://stackoverflow.com/a/29166085
tagged with: css
answer count: 4

http://stackoverflow.com/comment/46415869
comment on: http://stackoverflow.com/q/29089104
score: 0
type: Comment
has text: @GregL Yes, that's a good point. The page is a spreadsheet so it's large. What you described is definitely ideal but we are working on an MVP (minimum viable product) to demo to possible investors so I guess it's ok to overload the client with some extra processing in this case.
type: QuestionComment

http://stackoverflow.com/a/29135253
score: 0
has body: If you wrap the radio buttons in a container, you can then use document.getElementById to attach an event handler. That way, if your JavaScript changes, your HTML doesn't. &lt;span id="radio-buttons"&gt; &lt;input type="radio" class="tryout" name="example" checked="check"&gt; &lt;input type="radio" class="tryout" name="example"&gt; &lt;input type="radio" class="tryout" name="example"&gt; &lt;input type="radio" class="tryout" name="example"&gt; &lt;/span&gt; &lt;script&gt; document.getElementById("radio-buttons").onmouseover = function (e) { e.target.checked = true; } &lt;/script&gt;
answers question: http://stackoverflow.com/q/29135047
type: Answer
has comment: http://stackoverflow.com/comment/46495810

http://stackoverflow.com/comment/46416657
comment on: http://stackoverflow.com/q/29092449
has text: then you need to set a fixed with (in px)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29218707
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29217784
has body: It turns out that, yes, Ember services can have computed properties, and that this bug came from something else. In my tests I was calling service.numberOfThings() and after appending .property() to numberOfThings: function(){...} I needed to change the test code to service.get('numberOfThings');
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46437714
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29089308
has text: @mathewbergt where should I put that ? I did already and is not working, the ```id: 10``` is still ```checked = true```

http://stackoverflow.com/a/29125529
downvote count: 1
has body: Here is a website with lots of animated gifs for loading: http://preloaders.net/ They all work in IE8
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/46477202
type: Answer
answers question: http://stackoverflow.com/q/29125166

http://stackoverflow.com/comment/46488621
comment on: http://stackoverflow.com/a/29131386
type: AnswerComment
score: 0
type: Comment
has text: How to I get this to work with my HTML code? As I had it above, it was just running the onclick validate function

http://stackoverflow.com/q/29079614
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am running a flash file in an html embed tag in an html file. There is a need for me to run an action (lets say "alert") in javascript as soon as the Flash finishes. How can I do tht
type: UnansweredQuestion
has title: Get notifications from flash file in html
type: Question
tagged with: flash
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29081713

http://stackoverflow.com/a/29201142
has body: You should understand one simple thing: even though those http modules look somewhat similar, they are totally different beasts in regards to CORS. Actually, the node.js http.get() has nothing to do with CORS. It's your server that makes a request - in the same way as your browser does when you type this URL in its location bar and command to open it. The user agents are different, yes, but the process in general is the same: a client accesses a page lying on an external server. Now note the difference with angular's $http.get(): a client opens a page that runs a script, and this script attempts to access a page lying on an external server. In other words, this request runs in the context of another page - lying within its own domain. And unless this domain is allowed by the external server to access it in the client code, it's just not possible - that's the point of CORS, after all. There are different workarounds: JSONP - which basically means wrapping the response into a function call - is one possible way. But it has the same key point as, well, the other workarounds - it's the external server that should allow this form of communication. Otherwise your request for JSONP is just ignored: server sends back a regular JSON, which causes an error when trying to process it as a function call. The bottom line: unless the external server's willing to cooperate on that matter, you won't be able to use its data in your client-side application - unless you pass this data via your server (which will act like a proxy).
type: Answer
has comment: http://stackoverflow.com/comment/46614571
answers question: http://stackoverflow.com/q/29201091
score: 4
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/29097809
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28708651
has answer: http://stackoverflow.com/a/29156169
tagged with: parse-platform
answer count: 2
linked to: http://stackoverflow.com/q/27723121
possible better answer: http://stackoverflow.com/a/29099491
has body: I'm saving three results but they are all the same. I'm running into the dam Javascript async loop problem. How do I get out of this? my code: var teamMatch = function(){ var Pairingteam = []; var promise = Parse.Promise.as(); var x = matchedPairingIds.length; while (x--) { var match = matchedPairingIds[x]; var matching = function () { matched.set("team", { __type: "Pointer", className: "_User", objectId: "yCDDEWoiwM" }); matched.set("Pairing", { __type: "Pointer", className: "Pairing", objectId: match }); Pairingteam.push(matched.save()); } } promise.then(function(){ return Parse.Promise.when(Pairingteam); }); } teamMatch();
has answer: http://stackoverflow.com/a/29099491
score: 0
has title: Javascript with Parse - Saving with Ansynchronous Loops
tagged with: loops
accepted answer: http://stackoverflow.com/a/29156169
tagged with: javascript
tagged with: pointers
type: Question

http://stackoverflow.com/a/29072101
answers question: http://stackoverflow.com/q/29072004
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46380819
has body: You have two commands both bound to the Ctrl+Click key stroke. Open the Preferences and look in 'General > Keys' for the clashing commands. You can click on the 'Binding' column to sort by the binding which should help to find the clash. Change one of the clashing bindings to something else to remove the issue.
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/71136322
score: 0
comment on: http://stackoverflow.com/a/29074067
type: Comment
has text: what is username and bob ? is those are form fields ?
type: AnswerComment

http://stackoverflow.com/q/29152721
has body: I have this HTML: 1 Week I want to add a title attribute to the specific li element. I have many li elements in entire HTML inside the ul element. I have this javascript/jquery: $('.dropdown-list-item.unselectable.disabled option[data-list-item-value="144"]').attr('title', 'testing titles'); But that doesn't seem to be working. When I directly add a title to the HTML, it appears on mouse over. However, I don't want to write title directly to the HTML. Is my script malformed or incorrect? Or am I missing something else? JSFiddle
has title: Adding title to li element
has comment: http://stackoverflow.com/comment/46526800
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29152776
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29152772
tagged with: javascript
has comment: http://stackoverflow.com/comment/46526875
tagged with: jquery
has answer: http://stackoverflow.com/a/29152772
accepted answer: http://stackoverflow.com/a/29152776
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46485061
score: 0
comment on: http://stackoverflow.com/q/29129585
has text: Since DoSomething receives e, it only be valid in the function scope. You're defining an event for the keyup event, which is out of the scope of the function, therefore, e doesn't exist there.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46555422
type: QuestionComment
comment on: http://stackoverflow.com/q/29143344
has text: In my fiddle it works...too bad for me http://jsfiddle.net/8hpe3dqu/15/
score: 0
type: Comment

http://stackoverflow.com/comment/46410556
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29088892
has text: Yep, it's the same in this case. And since `someVariable` is guaranteed to be a Boolean, "casting" it to a Boolean makes even less sense. There is no benefit here at all.
score: 0

http://stackoverflow.com/comment/46458517
type: Comment
type: QuestionComment
has text: no error is shown but still for me its not working properly ..
comment on: http://stackoverflow.com/q/29114993
score: 0

http://stackoverflow.com/comment/46538883
score: 0
has text: So basically you want to generate `keypress` event of dynamically generated button... correct?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29159403

http://stackoverflow.com/a/29083647
answers question: http://stackoverflow.com/q/29083497
has body: JSFIDDLE DEMO -> http://jsfiddle.net/7ed7zs9w/4/ This is happening because you have background-color mentioned in the #container selector in the CSS which has the higher hierarchy than the class bgchange. Hence it never changes. Make the following changes: HTML &lt;div id="container" class="redbg"&gt; //add class redbg here CSS #container{ height: 150px; //remove background-color here overflow-y: scroll; } .bgchange{ background-color: blue; } .redbg{ background-color: red; } jQuery $('#container').click(function(){ $(this).toggleClass('redbg bgchange'); // toggle between 2 classes instead of 1 }); $('#container ul li').click(function(e){ e.stopPropagation(); // add this here $(this).toggleClass('bgchange'); });
type: Answer
score: 0

http://stackoverflow.com/q/29141337
tagged with: javascript
possible better answer: http://stackoverflow.com/a/44068311
has comment: http://stackoverflow.com/comment/46506225
has answer: http://stackoverflow.com/a/44068311
answer count: 2
linked to: http://stackoverflow.com/q/17907445
has body: Very new to web development, bear with me. I want to check if the browser used is IE (all versions). I need to change CSS if IE is detected. Point me in right direction please.
accepted answer: http://stackoverflow.com/a/29141430
favorite count: 0
has comment: http://stackoverflow.com/comment/46506243
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46506684
has title: Is it possible to detect all versions of IE with Javascript? How?
downvote count: 2
has comment: http://stackoverflow.com/comment/46506430
upvote count: 10
has answer: http://stackoverflow.com/a/29141430
linked to: http://stackoverflow.com/q/19999388
type: Question
has comment: http://stackoverflow.com/comment/46506438
score: 8
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/11219582

http://stackoverflow.com/a/29197424
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46616627
accepted answer of: http://stackoverflow.com/q/29197033
has body: The issue here lies on the fine line between specification and implementations. ECMAscript 5.1 Specification states that: A - character can be treated literally or it can denote a range. It is treated literally if it is the first or last character of ClassRanges, the beginning or end limit of a range specification, or immediately follows a range specification. Regular-Expressions.info notes that: Hyphens at other positions in character classes where they can't form a range may be interpreted as literals or as errors. Regex flavors are quite inconsistent about this. Conclusions: The safe way of including a dash - minus sign in a character class is by either: escaping it (eg. [a-zA-Z0-9\-&gt;.]) placing it as the first char. in the class (eg. [-.&gt;a-zA-Z0-9]) exception: in a negated class it goes 2nd, right after ^ (eg. [^-.&gt;a-zA-Z0-9]) placing it last in the class (eg. [a-zA-Z0-9.&gt;-]) General coding guidelines suggest placing your ranges first and ending the character class with the hyphen, this avoids ambiguity and helps readability. Summing it up, your RegEx should become: /@\{each ([a-zA-Z0-9&gt;.-]*)\}([\s\S]*)@\{\/each}/g As an additional tip: you could also rewrite [\s\S] (any whitespace char. or any non-whitespace char.) into [^] (not nothing) which would end you up with the following RegEx: /@\{each ([a-zA-Z0-9&gt;.-]*)\}([^]*)@\{\/each}/g JavaScript ... treats [^] as a negated empty character class that matches any single character. - source
has comment: http://stackoverflow.com/comment/46619319
has comment: http://stackoverflow.com/comment/46619470
has comment: http://stackoverflow.com/comment/46607707
type: Answer
has comment: http://stackoverflow.com/comment/46607695
has comment: http://stackoverflow.com/comment/46620654
score: 6
upvote count: 7
has comment: http://stackoverflow.com/comment/46607487
downvote count: 1
answers question: http://stackoverflow.com/q/29197033

http://stackoverflow.com/comment/46458192
type: QuestionComment
type: Comment
has text: Sir I have a List suppose 'abc' ;in that list i have a dataview, and I want to go to bottom of the that gridview(i.e, bottom of the page) but if i use the URL gets disturbed and the gridview disappears and javascript scroll function didn't help me!! Sorry I can't Reproduce the issue since it is in sharepoint webparts
comment on: http://stackoverflow.com/q/29114657
score: 0

three.js
tags question: http://stackoverflow.com/q/29142017
tags question: http://stackoverflow.com/q/29114485
tag name: three.js
tags question: http://stackoverflow.com/q/29174061
tags question: http://stackoverflow.com/q/29181309
tags question: http://stackoverflow.com/q/29086457
tags question: http://stackoverflow.com/q/29189857
tags question: http://stackoverflow.com/q/29170396
tags question: http://stackoverflow.com/q/29075459
tags question: http://stackoverflow.com/q/29155322
tags question: http://stackoverflow.com/q/29202091
tags question: http://stackoverflow.com/q/29161512
tags question: http://stackoverflow.com/q/29144514
tags question: http://stackoverflow.com/q/29069675
tags question: http://stackoverflow.com/q/29166969
type: Tag
tags question: http://stackoverflow.com/q/29120273
tags question: http://stackoverflow.com/q/29209725
tags question: http://stackoverflow.com/q/29158365
tags question: http://stackoverflow.com/q/29123709
tags question: http://stackoverflow.com/q/29185783
tags question: http://stackoverflow.com/q/29069965
tags question: http://stackoverflow.com/q/29186424
tags question: http://stackoverflow.com/q/29172172

http://stackoverflow.com/comment/46481816
has text: I'm already using an ng-repeat! but I'm not barely printing a list of elements, I need to group them by a certain number of items :P
comment on: http://stackoverflow.com/a/29127905
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29084357
has body: This is somewhat similar to this post, and this one, so you may have a look there to see if there are other useful answers. A consensus seems to be that Mustache, which has a Java-implemented compiler (among other flavors) could be executed as an Ant target. It's a logic-less template, so you may want to find another solution. Because it is possible to call Node.js scripts from Ant, it seems like an artificial restriction to not have Node.js. You will have much more choice and flexibility in template choice if you can persuade your team to allow Node.js. Node.js is not in an either-or relationship with Java tools. There is plenty of room for both on a project, and I've worked on C# projects that use Node.js, just as I've worked on projects that use JRuby, Java, and Rails. None of those technologies excludes the others. Note that I'm not recommending that you try to persuade people to switch to Node.js as an environment, migrate existing code, or use Grunt, but if it's a useful tool that you're familiar with, I can't think of a single good reason why you should be denied its use.
accepted answer of: http://stackoverflow.com/q/29079315
answers question: http://stackoverflow.com/q/29079315
upvote count: 1
has comment: http://stackoverflow.com/comment/46446433
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46446921
type: Answer

http://stackoverflow.com/comment/46525159
score: 1
has text: Why not `call()` directly? What about those `if` and `switch` ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29151863

http://stackoverflow.com/comment/46614973
comment on: http://stackoverflow.com/q/29200527
type: Comment
type: QuestionComment
has text: Yes, returning `false` on an event prevents it from happening (can be used to disable links, or form submits). This is often useful for dynamic websites that load the links without reloading the whole page. This process uses Ajax (You can find more info on Google or on this site).
score: 0

jquery-mobile
tags question: http://stackoverflow.com/q/29110425
tags question: http://stackoverflow.com/q/29130742
tags question: http://stackoverflow.com/q/29185895
type: Tag
tags question: http://stackoverflow.com/q/29156037
tags question: http://stackoverflow.com/q/29122580
tags question: http://stackoverflow.com/q/29135107
tags question: http://stackoverflow.com/q/29161159
tags question: http://stackoverflow.com/q/29106414
tags question: http://stackoverflow.com/q/29187993
tags question: http://stackoverflow.com/q/29109800
tags question: http://stackoverflow.com/q/29098263
tags question: http://stackoverflow.com/q/29157206
tags question: http://stackoverflow.com/q/29171304
tags question: http://stackoverflow.com/q/29081938
tags question: http://stackoverflow.com/q/29186101
tags question: http://stackoverflow.com/q/29080977
tags question: http://stackoverflow.com/q/29119921
tags question: http://stackoverflow.com/q/29145465
tags question: http://stackoverflow.com/q/29103502
tags question: http://stackoverflow.com/q/29066879
tags question: http://stackoverflow.com/q/29189617
tags question: http://stackoverflow.com/q/29184199
tag name: jquery-mobile
tags question: http://stackoverflow.com/q/29178661

http://stackoverflow.com/comment/46441940
type: QuestionComment
has text: Can you post the actual html that gets sent to the client, right-click in the browser and 'view source'?
score: 0
comment on: http://stackoverflow.com/q/29105437
type: Comment

http://stackoverflow.com/q/29172310
score: 0
has answer: http://stackoverflow.com/a/29174894
has comment: http://stackoverflow.com/comment/46567163
has comment: http://stackoverflow.com/comment/46567357
possible better answer: http://stackoverflow.com/a/29174894
type: AnsweredQuestion
has body: I have a component defined, Pragmatometer, which I am trying to render to div#main: React.render(React.createElement(Pragmatometer, {}), document.getElementById('main')); Chrome's JavaScript console shows, with line numbers in the thousands for ReactJS: Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element. My HTML is: Pragmatometer Pragmatometer Is the error in that React.render() call, or an issue concerning the Pragmatometer component? What are the usual suspects for this kind of issue? Thanks,
has title: How can I correctly get this component to render?
type: Question
tagged with: reactjs
answer count: 2
has answer: http://stackoverflow.com/a/39010421
accepted answer: http://stackoverflow.com/a/39010421
tagged with: javascript

http://stackoverflow.com/a/29207421
has comment: http://stackoverflow.com/comment/46625528
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29207074
has comment: http://stackoverflow.com/comment/46625788
has comment: http://stackoverflow.com/comment/46625511
has comment: http://stackoverflow.com/comment/46625635
accepted answer of: http://stackoverflow.com/q/29207074
type: AcceptedAnswer
downvote count: 0
has body: First of all JavaScript is client side programming language so to get data to server you need to make a http/https request to server and send/receive data Good read What is the difference between client-side and server-side programming? and to do that you can either use html Form or ajax Form In form you simply send data to url in action ( if no url specified it will make request to current page else specified action url) Ajax you can send data using ajax for that you just need to make ajax request like below (i highly recommended to use JavaScript ( but if you are good at JavaScript that you can use Jquery framework too ) var yourFormId = document.getElementById("email"); email.onsumbit = function(e){ e.preventDefault(); var formData = new FormData(yourFormId ); var request = new XMLHttpRequest(); request.open("POST", "your-url"); request.send(formData); } // here by formData object you can get all data in single code of line and to do with jquery see this post it has very simple example jQuery Ajax POST example with PHP Now couple of good Reads FormData Objects Ajax : MDN its really good source
has comment: http://stackoverflow.com/comment/46625624
type: Answer

http://stackoverflow.com/comment/46632994
has text: @RSKMR: Why do you need a output format like that? Does it need to be _exactly_ like that, or can the format be changed slightly, to make accessing it easier?
score: 0
comment on: http://stackoverflow.com/q/29211564
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29152166
answer count: 1
accepted answer: http://stackoverflow.com/a/29153685
tagged with: indexeddb
tagged with: google-chrome
has body: I'm developing a Chrome extension, and have run into an issue due to developing against a mixture of synchronous and asynchronous apis. chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { //code that modifies details.requestHeaders //.. return {requestHeaders: details.requestHeaders}; }, {urls: ["&lt;all_urls&gt;"]}, ["blocking", "requestHeaders"] Inside the listener function I want to fetch data from IndexedDB and modify the request headers based on this data. IndexedDB only has an asynchronous API, while the contract for the listener requires it to be synchronous. Any ideas how I could solve this problem?
downvote count: 0
tagged with: javascript
score: 2
type: AnsweredQuestion
tagged with: google-chrome-extension
has title: Asynchronous operation in blocking chrome.webRequest.onBeforeSendHeaders listener
tagged with: asynchronous
favorite count: 0
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/29153685
has comment: http://stackoverflow.com/comment/46525782

http://stackoverflow.com/comment/46375342
score: 2
has text: https://github.com/buzzfeed/libgif-js
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29070195

http://stackoverflow.com/comment/46469761
type: QuestionComment
type: Comment
score: 1
has text: This might help http://jsfiddle.net/satpalsingh/u6d5m8hn/
comment on: http://stackoverflow.com/q/29121474

http://stackoverflow.com/a/29211672
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29211600
type: Answer
answers question: http://stackoverflow.com/q/29211600
score: 2
upvote count: 2
has body: You need to bind autocomplete for that textbox after appending it: $("#add_item").click( function() { $("#next_items").append('&lt;input class="auto" class="new_id" type="text" name="id_item[]" placeholder="Article ID" required style="width: 15%;"/&gt;'); $("#next_items .auto:last").autocomplete({ source: "contract/auto", minLength: 1 }); });

http://stackoverflow.com/comment/46625442
comment on: http://stackoverflow.com/a/29207291
has text: ilia Can you please let me know about twitter video also ?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46412587
comment on: http://stackoverflow.com/q/29089901
has text: you can use PHP. But the point is the data should be of this structure http://jsbin.com/fokibe/2.json
type: Comment
type: QuestionComment
score: 0

zingchart
type: Tag
tag name: zingchart
tags question: http://stackoverflow.com/q/29095014

http://stackoverflow.com/comment/46561891
type: Comment
comment on: http://stackoverflow.com/q/29171842
type: QuestionComment
has text: what do you have so far?
score: 0

http://stackoverflow.com/q/29133558
score: 0
tagged with: reactjs
answer count: 1
has body: Here is my folder structure: js/common/components/Chart.jsx js/manager/components/ManagerContent.jsx I want to display Chart.jsx inside ManagerContent.jsx. I've gotten the following syntax to work for jsx files inside the same folder as ManagerContent.jsx: var ManagerContent = React.createClass({ render: function() { return ( &lt;Chart.jsx /&gt; How do I modify the above for my case?
accepted answer: http://stackoverflow.com/a/29147062
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29147062
has comment: http://stackoverflow.com/comment/46495214
tagged with: javascript
has title: Displaying a React component in another folder

http://stackoverflow.com/comment/46402035
score: 0
has text: Thanks, I will try also this way.. :)
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29084309

http://stackoverflow.com/q/29118883
has comment: http://stackoverflow.com/comment/46488982
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46467116
has body: please have a look at this: http://jsfiddle.net/zb443xj9/ The bubble is drawed higher by the radius. Therefore method "drawPoints" is changed as followed (because this "changing feature" is not implemented in the framework): (function (H) { H.wrap(H.seriesTypes.bubble.prototype, 'drawPoints', function (p) { var series = this; H.each(series.points, function (point, i) { point.shapeArgs.y -= point.shapeArgs.r; //moved up by radius }); p.call(this); }); })(Highcharts); If you hover over the bubble you see, that the shadow and the tooltip still orientate on the "old" center. Does anybody know how the method for drawing the shadow and tooltip is named? I'd love to overwrite these two methods as well. I hoped the are called something like "drawShadow" and "drawTooltip" but unfortunately not. Thanks!
type: Question
has title: hightcharts: change standard position of tooltip AND shadow (hover)
has answer: http://stackoverflow.com/a/29146050
answer count: 1
score: 0
tagged with: shadow
tagged with: highcharts
has comment: http://stackoverflow.com/comment/46491788
tagged with: tooltip

http://stackoverflow.com/q/29175692
type: Question
has title: How to use requirejs to load a directory recursivelly?
tagged with: javascript
has body: How to use requirejs to require all files on directory and the subdirectories of this one recursivelly? For example, if we have a directory like: vendor vendor1 vendor11.js vendor2 vendor21.js vendor22.js vendor23.js vendor3 vendor31.js How can we load the entire directory vendor? Using a function like require(['vendor/*'], myCallbackFunction)? This function should load the equivalent: require( ['vendor/vendor1/vendor11.js'], require( ['vendor/vendor2/vendor21.js'], require( ['vendor/vendor2/vendor22.js'], ...and so on ... require( ['vendor/vendor3/vendor31.js'], myCallbackFunction ) ) ) );
score: 0
answer count: 1
tagged with: callback
has answer: http://stackoverflow.com/a/29176481
type: UnansweredQuestion
tagged with: requirejs
tagged with: recursion

http://stackoverflow.com/q/29079749
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46392906
has body: I have a dynamically generated form using bootstrap form elements , in which I have options to add check boxes and radio buttons. When I click the submit button, the data in the form is sent to the database as json. I am using the following javascript function for form submission $('#customForm').on("submit",function(event){ var formData = JSON.stringify($("#customForm").serializeArray()); var formURL = $(this).attr("action"); $.ajax({ url : formURL, type: "POST", data : formData, contentType : "application/json; charset=utf-8", success:function(data) { $("#myAlert").show(); }, failure:function(error) { } }); event.preventDefault(); }); The problem is that , whenever the check box is left unchecked or no option is selected for the radio button, no data is send to the database corresponding to these fields. Is there any way that I can use to set some default value for these form fields so that I get some value in the database for these fields even if the fields are not selected.
has answer: http://stackoverflow.com/a/29080570
tagged with: forms
type: Question
tagged with: javascript
score: 0
has title: how do I set some default value for a check box or a radio button if user do not check the check box or select a button
answer count: 1
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/46429846
has text: Maybe a compatibility error between mootools and jquery
comment on: http://stackoverflow.com/q/29099521
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29071193
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29071251
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: browser-history
has title: Check Browser back button history
tagged with: browser
has comment: http://stackoverflow.com/comment/46376977
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46376937
has body: I have one single page application and on some buttons / links some angular js function is called and which changed the page content . Now as it is a single page browser will save the history of original page not angular js links which got clicked and change the content . But I want to store that history in recent visited page so that if some one clicked browser back button , the previous content will be loaded . E.g. , Suppose I visited first Google home page them my app and then click on any link which changes the content of page . Google home (1)> my app (2)> click on link and content changed (3). original behavior will be when click browser back button -> back button will load Google home page . currently I am on (3) page and back button will send me to (1) page instead of (2) Expected behavior -> click on browser back button must move me as (3) then (2) then (1) goggle home page

http://stackoverflow.com/q/29106237
tagged with: firefox
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46444014
tagged with: ajax
type: Question
tagged with: php
has body: I have three scripts: - //progress.php <?php session_start(); echo $_SESSION["progress"]; ?> //long_progress.php <?php for($i=1;$i<=10;$i++){ session_start(); $_SESSION["progress"]=$i; session_write_close(); sleep(1); } ?> So when i load index.php in chromium, I can see the the content of progress.php changing in real time. The requests work just like they should. In Firefox however nothing happens. Opening the consoles of the respective browsers yeild this: - In chromium, the numbers are printed, 1-10, as they should. In firefox, however, just multiple "". My query is, why the discrepency, when the code has no issues? What is this inexplicable issue? And how can it be resolved. Also, please do not mark this as duplicate, since this is similar to this and cannot be deleted since it already has answers. Also this question forms the basis for answering that question. Reference - php/ajax to get contents of long running code in real-time
answer count: 2
has comment: http://stackoverflow.com/comment/46442723
upvote count: 1
has answer: http://stackoverflow.com/a/29106513
has comment: http://stackoverflow.com/comment/46443018
has comment: http://stackoverflow.com/comment/46442610
linked to: http://stackoverflow.com/q/29088420
has title: Firefox is treating ajax differently from Chromium?
has answer: http://stackoverflow.com/a/29106772
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46442772

http://stackoverflow.com/a/29107406
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46446111
accepted answer of: http://stackoverflow.com/q/29106631
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29106631
has body: You are either looking for grunt.config.get, grunt.config.process or grunt.template.process, depending on where you are getting the values from and how you want to process them. grunt.config.get Get a value from the project's Grunt configuration. If prop is specified, that property's value is returned, or null if that property is not defined. If prop isn't specified, a copy of the entire config object is returned. Templates strings will be recursively processed using the grunt.config.process method. grunt.config.get([prop]) grunt.config.process Process a value, recursively expanding &lt;% %&gt; templates (via the grunt.template.process method) in the context of the Grunt config, as they are encountered. this method is called automatically by grunt.config.get but not by grunt.config.getRaw. grunt.config.process(value) [...] grunt.template.process Process a Lo-Dash template string. The template argument will be processed recursively until there are no more templates to process. The default data object is the entire config object, but if options.data is set, that object will be used instead. The default template delimiters are &lt;% %&gt; but if options.delimiters is set to a custom delimiter name (set with grunt.template.addDelimiters), those template delimiters will be used instead. grunt.template.process(template [, options]) Inside templates, the grunt object is exposed so that you can do things like &lt;%= grunt.template.today('yyyy') %&gt;. Note that if the data object already has a grunt property, the grunt API will not be accessible in templates. In this example, the baz property is processed recursively until there are no more &lt;% %&gt; templates to process. var obj = { foo: 'c', bar: 'b&lt;%= foo %&gt;d', baz: 'a&lt;%= bar %&gt;e' }; grunt.template.process('&lt;%= baz %&gt;', {data: obj}) // 'abcde'
upvote count: 1

http://stackoverflow.com/q/29133991
has title: What is the purpose of this.someFunction.call(this, param);
has comment: http://stackoverflow.com/comment/46494485
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29145855
linked to: http://stackoverflow.com/q/20279484
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46493692
has body: I've come across some code that has this sort of pattern in numerous places: this.someFunction.call(this, param); but it seems to me just a more verbose way of typing this.someFunction(param) The pattern sometimes appears inside a function which is provided as a callback. It happens to use Backbone, in case that's relevant. Something like this: Backbone.View.extend({ // other stuff ... someFunction: function(param) { // ... }, anotherFunction: function() { this.collection.on("some_event", function() { this.someFunction.call(this, param); }); } }); Does the pattern actually have an effect that isn't the equivalent of this.someFunction(param) or was someone just nervous about the closure not capturing the correct this? Thanks for any insights!
has comment: http://stackoverflow.com/comment/46493904
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29145466
has comment: http://stackoverflow.com/comment/46494132
has answer: http://stackoverflow.com/a/29145466
has comment: http://stackoverflow.com/comment/46493590
has answer: http://stackoverflow.com/a/29145855
score: 7
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/46494075
upvote count: 7

ckeditor
tags question: http://stackoverflow.com/q/29197170
tags question: http://stackoverflow.com/q/29073312
tag name: ckeditor
tags question: http://stackoverflow.com/q/29129564
tags question: http://stackoverflow.com/q/29147517
tags question: http://stackoverflow.com/q/29071653
tags question: http://stackoverflow.com/q/29120562
tags question: http://stackoverflow.com/q/29175741
tags question: http://stackoverflow.com/q/29099297
tags question: http://stackoverflow.com/q/29189984
tags question: http://stackoverflow.com/q/29205145
tags question: http://stackoverflow.com/q/29146751
tags question: http://stackoverflow.com/q/29116392
tags question: http://stackoverflow.com/q/29169473
tags question: http://stackoverflow.com/q/29216218
type: Tag

http://stackoverflow.com/q/29103859
has comment: http://stackoverflow.com/comment/46438813
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46437937
favorite count: 0
has comment: http://stackoverflow.com/comment/46438787
has comment: http://stackoverflow.com/comment/46438365
type: UnansweredQuestion
tagged with: fullpage.js
answer count: 0
has comment: http://stackoverflow.com/comment/46437744
has comment: http://stackoverflow.com/comment/46437814
upvote count: 1
downvote count: 1
type: Question
has body: I am using fullpage.js for a website I am building but am having a lot of issues with setting the paddingTop setting and the screen displaying properly. For example: Here is Chrome on a 13" Macbook Air http://cl.ly/image/1D2P1S3Z291W Here is the screen on an iPad 2 (vertical) view: http://cl.ly/image/1m2M3H1E2E3n The problem is the gap at the top. The gap appears on screens larger than 13" laptops too Here is my JavaScript: $('.fullPage').fullpage({ responsive: 768, autoScrolling: false, anchors: ['home', 'customResearch', 'onlineCommunities', 'buzzSection', 'ourStorySection', 'howWeWorkSection', 'aliciaProfile', 'patProfile', 'clientsSection', 'experienceSection', 'contactUs'], easing: 'easeInOutCubic', fixedElements: '#mainNav', fitToSection: false, verticalCentered: true, loopHorizontal: false, scrollOverflow: false, css3: true, paddingTop: '147px', resize: false, afterLoad: function(anchorLink, index) { if($.inArray(anchorLink, ['aliciaProfile', 'patProfile'])) { var parent = $('[data-anchor="' + anchorLink + '"]'); if(isElementInViewport(parent)) { animateProfileSubImages(parent); } } var expTblCell = $('#experience').find('.fp-tableCell'); $(expTblCell).attr('style', ''); } }); There is no padding on the HTML body. I am just needing the top image section to sit directly underneath the nav on all screens (regardless of screen size)
has comment: http://stackoverflow.com/comment/46439290
has title: FullPage.js paddingTop issues on different screen sizes

http://stackoverflow.com/q/29076016
linked to: http://stackoverflow.com/q/8888491
upvote count: 0
has body: I have been researching about this around Internet but couldn't find a solution. I have this script which displays time in Monday, March 16, 2015, 16:59:40 format which you can see is a 24 hours format and Seconds are not running. The script is &lt;script type='text/javascript'&gt; document.getElementById("para1").innerHTML = formatAMPM(); function formatAMPM() { var d = new Date(), seconds = d.getSeconds().toString().length == 1 ? '0'+d.getSeconds() : d.getSeconds(), minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(), ampm = d.getHours() &gt;= 12 ? 'pm' : 'am', months = ['January','February','March','April','May','June','July','August','September','October','November','December'], days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; return days[d.getDay()]+', '+months[d.getMonth()]+' '+d.getDate()+', '+d.getFullYear()+', '+hours+':'+minutes+':'+seconds+' ' } &lt;/script&gt; And HTML is &lt;span id='para1'&gt;&lt;/span&gt; You can see the current code running at https://jsfiddle.net/g70rsr1L/ All I want is to convert 24 hours format to 12 hours and a running seconds script within it. Thanks
has comment: http://stackoverflow.com/comment/46385678
tagged with: javascript
has comment: http://stackoverflow.com/comment/46385629
linked to: http://stackoverflow.com/q/5091888
favorite count: 0
has title: Converting 24 Hours time to 12 Hours In Javascript With Seconds Running
type: Question
tagged with: time
has comment: http://stackoverflow.com/comment/46385862
has comment: http://stackoverflow.com/comment/46385760
score: -2
has comment: http://stackoverflow.com/comment/46385559
has answer: http://stackoverflow.com/a/29076616
downvote count: 2
answer count: 1
type: UnansweredQuestion
tagged with: date

http://stackoverflow.com/a/29115040
has body: I'm not sure if it's the most elegant answer, but you could set a variable within your master page, and when this info button is clicked, toggle this variable, and whenever it is toggled, disable all functionality of the page. It won't physically stop users switching back to that window, but it'll stop them being able to use anything until they've done whatever they need in the popup.
type: Answer
answers question: http://stackoverflow.com/q/29114934
score: 0
has comment: http://stackoverflow.com/comment/46458646

http://stackoverflow.com/q/29134796
tagged with: javascript
has answer: http://stackoverflow.com/a/29137616
favorite count: 0
has comment: http://stackoverflow.com/comment/46495153
tagged with: php
has comment: http://stackoverflow.com/comment/46495087
has comment: http://stackoverflow.com/comment/46495567
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46495045
has body: When I filled the list of email addresses in a message box and when I click on a submit button, how do you call the closepopup function from the javascript in php when I post the message using this code? if (!empty($_POST['message'])) { $emails = explode("\n", $_POST['message']); // explode textarea on a line break into an array $email_str = implode(", ", $emails); // take each of the emails and implode together with the , } When I try this if (!empty($_POST['message'])) { $emails = explode("\n", $_POST['message']); // explode textarea on a line break into an array $email_str = implode(", ", $emails); // take each of the emails and implode together with the , closePopUp(); } It will give me an error: Fatal error: Call to undefined function closePopUp() in /home/myusername/public_html/PHP/examples/send.php on line 6 Here is the full code: <?php if (!empty($_POST['message'])) { $emails = explode("\n", $_POST['message']); // explode textarea on a line break into an array $email_str = implode(", ", $emails); // take each of the emails and implode together with the , } ?> Send Email To: <input type="text" name="to" value="<?php if (!empty($email_str)) { echo $email_str; } ?>" style="height:15px; width:650px"> Subject: Message:
type: Question
score: 0
upvote count: 1
answer count: 1
downvote count: 1
has title: How do you call a function outside in php?

http://stackoverflow.com/comment/46634273
score: 0
type: AnswerComment
type: Comment
has text: Jquery was only the click binder, I updated the example to pure js
comment on: http://stackoverflow.com/a/29209865

http://stackoverflow.com/q/29136137
accepted answer: http://stackoverflow.com/a/29136352
answer count: 3
has comment: http://stackoverflow.com/comment/46497444
has answer: http://stackoverflow.com/a/29136165
tagged with: regex
has answer: http://stackoverflow.com/a/29136178
favorite count: 0
has comment: http://stackoverflow.com/comment/46497375
possible better answer: http://stackoverflow.com/a/29136165
has title: How can I store a string which contains backslashes (without manually double escaping)?
has body: I need to double up the backslashes in a string, and have found an odd limitation to Javascript: it's not possible to enter strings without evaluating escape characters. The behaviour means I can't distinguish via input "\!" == "!" // true "\?" == "?" // true "\d" == "d" // true "\!\[\d\d\:\d\d\:\d\d.*?\]\(" == "![dd:dd:dd.*?](" // true Note here that \d and d are strings with different meanings in a regex (digit vs. the letter d). The string evaluation leads to them being stored identically, as for \b and b. "\![d\d \bb" // == "![dd bb]" etc. I want to create a new RegExp, composed from strings (with doubling up of escape characters as required) and variables, to be able to process a series of files without manually changing the regular expression each time, or relying on some weaker, more generic regex. It really looks like I'll have to do this by hand, despite the backslashes being right there to be replaced against. I'm confused by the lack of any obvious way I could do the same for a regular expression Without the ability to enter backslashes (as far as I know) this doesn't seem possible - or rather the solution would be hacky and not programmatic. Does anyone know of the function I'm looking for? It seems quite fundamental so I'm hoping I've missed something obvious! Observations like the length of \!\[ returning 2 rather than 4 make me feel it might actually be some fundamental fact of the language, but then common sense tells me... this page is being processed in Javascript. Sure enough, fishing out the previous code block : document.querySelector('... &gt; code')[0].innerText // "\!\[" document.querySelector('... &gt; code')[0].innerText.length ... returns 4 rather than 2 - so there must surely be a way to enter strings like this? Related question How do I Programmatically create a double escape?
linked to: http://stackoverflow.com/q/17863066
downvote count: 7
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29136352
has comment: http://stackoverflow.com/comment/46497288
has comment: http://stackoverflow.com/comment/46497307
has comment: http://stackoverflow.com/comment/46497404
type: Question
upvote count: 0
linked to: http://stackoverflow.com/q/28444386
tagged with: javascript
score: -7
tagged with: string

http://stackoverflow.com/comment/46388538
comment on: http://stackoverflow.com/q/29077446
type: Comment
has text: Looks like you're calling `reset` on the input's value, which is not a valid action. you may call `reset` function of your form element if you have one.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46568764
has text: might look into $.load() to inject a url into an element
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29174502

http://stackoverflow.com/a/29079239
has body: Here is a reasonable fiddle on grouping data in Knockout 2.0 that should work for you. http://jsfiddle.net/rniemeyer/mXVtN/ Most importantly, you should be transforming your data so you have your divisions as an element to loop through and each division has a computed child that returns the matching data. He happens to use an extension on the observableArray property itself to manage this... ko.observableArray.fn.distinct = function(prop) { var target = this; target.index = {}; target.index[prop] = ko.observable({}); ko.computed(function() { //rebuild index var propIndex = {}; ko.utils.arrayForEach(target(), function(item) { var key = ko.utils.unwrapObservable(item[prop]); if (key) { propIndex[key] = propIndex[key] || []; propIndex[key].push(item); } }); target.index[prop](propIndex); }); return target; }; Then in your markup just data-bind to loop through your divisions.
upvote count: 1
answers question: http://stackoverflow.com/q/29078681
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/a/29137564
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46500062
answers question: http://stackoverflow.com/q/29137510
has body: Smarty is a template module on top of php. So basically smarty functions are php functions. You don't need ajax to call it, you can call it directly, you just need to register it. Here is how to do it: http://www.smarty.net/docsv2/en/api.register.function.tpl
has comment: http://stackoverflow.com/comment/46502492
has comment: http://stackoverflow.com/comment/46499955
has comment: http://stackoverflow.com/comment/46500144

http://stackoverflow.com/a/29065782
upvote count: 1
has body: The problem is that empty string is not equal to udnefined so this checkes: if ((i1 != undefined) &amp;&amp; (i2 != undefined)) { behave not the way you expect. The if block can be simpler: if (i1 &amp;&amp; i2) { // or i1 !== '' &amp;&amp; i2 !== '' The second problem is that you need to provide function reference as event listener, not execute it immediately with (): document.getElementById("input1").addEventListener("change", i1set, false); // Note, you don't need () here ------^
downvote count: 0
answers question: http://stackoverflow.com/q/29065732
type: Answer
score: 1

http://stackoverflow.com/a/29084203
has body: You seem to be missing a few things. First you will need to connect the select to your function using either the dojo/on module or some other way. You will also need to update the map's web map id, probably by calling create map again. You may want to wrap that part of the code up in a function and pass it the web map id as a parameter that way when you need to change it, you can simply call the function with a new parameter.
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29065971
type: Answer
upvote count: 1

http://stackoverflow.com/q/29099268
upvote count: 0
has title: Google sign-in button
tagged with: google-plus
tagged with: javascript
type: Question
has body: Research: https://developers.google.com/+/web/signin/add-button I haven't been able to use this correctly. I have gotten to the screen several times where it will show me my emails to login. When a press one though, it shows an error. Here is my code: http://codepen.io/Xavier-Bennett/pen/azQGBx codepen for google button
favorite count: 0
score: -1
has answer: http://stackoverflow.com/a/29099563
answer count: 1
downvote count: 1
tagged with: google-signin
type: UnansweredQuestion

http://stackoverflow.com/comment/81017715
has text: There are already correct answers. It does not always overwrite the entire document, only if it's called after `document.close()` has been called. The browser calls `document.close()` after it finishes parsing the HTML.
comment on: http://stackoverflow.com/a/47035520
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/46420323
comment on: http://stackoverflow.com/a/29093095
type: Comment
has text: Thanks, now there is no message in console but still i not getting Enable as selected,---- my question, where this ID should kept, id="user_status", should it be in select element or in option element?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29071785
has title: How to retrieve HttpResponseMessage FileName in JavaScript
tagged with: angularjs
has body: I've this WebAPI method, that takes a custom object MyType as input and generate a PDF based on that. The PDF-file is returned as a HttpResponseMessage. Note that I specify the filename on response.Content.Headers.ContentDisposition.FileName: ASP.NET WebAPI [Route("")] public HttpResponseMessage Get([FromUri]MyType input) { var pdfContent = PdfGenerator.Generate(input); var response = new HttpResponseMessage(HttpStatusCode.OK); response.Content = pdfContent; response.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "MyCustomFileName.pdf" return response; } In AngularJS I fetch the file using FileSaver.js like this: $http.get("api/pdf/", { params: { "type": myObject }, responseType: 'arraybuffer' }).then(function (results) { var data = results.data; var file = new Blob([data], { type: 'application/pdf' }); saveAs(file, 'filename.pdf'); }, function (results) { console.log(results); }); It works as excepted, but I'm defining the filename both on WebAPI and in the JavaScript. Is there a way, that I can retrieve the FileName defined in WebAPI in the results variable in JavaScript?
has answer: http://stackoverflow.com/a/29071885
upvote count: 11
linked to: http://stackoverflow.com/q/39825590
score: 11
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29071885
downvote count: 0
answer count: 1
tagged with: asp.net-web-api
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/46489410
score: 0
comment on: http://stackoverflow.com/q/29130291
type: Comment
type: QuestionComment
has text: Then you can try to instantiate it programmatically after copying, and add an unique id : var myDropzone = new Dropzone("form#yourNewId", { url: "/file/post"});

http://stackoverflow.com/q/29208907
has answer: http://stackoverflow.com/a/29212059
tagged with: javascript
tagged with: jquery
has title: checkbox options = select options - angularjs
score: 0
has answer: http://stackoverflow.com/a/29209059
tagged with: angularjs-ng-repeat
tagged with: angularjs
has body: I have successfully populated Designations to select option through Json and now i wanted to create multiple checkbox filter to my search results.. Here below is the working code for select option var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { var json = { "modules": [{ "myid": "70", "realname": "Kishore", "full_name": "Kishore Chandra", "category": "professional", "firm_name": "Yes", "designation": "Design-Build Firm", "address": "Dwarakanagar 5th lane" }, { "myid": "75", "realname": "Vinod kumar", "full_name": "Kishore Chandra", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "76", "realname": "Pradeep Reddy", "full_name": "PRADEEP REDDY", "category": "professional", "firm_name": "", "designation": "Civil Engineer", "address": "Visakapatnam, Andhra Pradesh, India" }, { "myid": "78", "realname": "Pradeep Raju", "full_name": "", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "79", "realname": "Pradeep kumar", "full_name": "", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "80", "realname": "Pradeep", "full_name": "Pradeep", "category": "professional", "firm_name": "", "designation": "Architect", "address": "Akkayapalem" }, { "myid": "81", "realname": "Pradeep", "full_name": "Pradeep Reddy ", "category": "professional", "firm_name": "", "designation": "Civil Engineer", "address": "Jubliee Hills" }, { "myid": "82", "realname": "krishna", "full_name": "", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "83", "realname": "raghu", "full_name": "", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "84", "realname": "Pradeep", "full_name": "", "category": "professional", "firm_name": "", "designation": null, "address": null }, { "myid": "85", "realname": "Pradeep", "full_name": "", "category": "professi…
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29209059
accepted answer: http://stackoverflow.com/a/29212059
type: Question
answer count: 2

http://stackoverflow.com/comment/46372913
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29068441
has text: I'm still not fully understanding what your asking. I really think you should post a simple drawing of what you want, it would clear this up immediately
score: 0

http://stackoverflow.com/comment/46488529
score: 1
comment on: http://stackoverflow.com/q/29129514
has text: @FelixKling: I didn't downvote, but it's a duplicate not a valid question :-)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29153546
favorite count: 0
score: -4
accepted answer: http://stackoverflow.com/a/29153579
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28390481
has title: What frameworks are used in this web-application?
has body: If somebody has stumbled upon something like this (I'm particularly interested in "chaotic" circles on the background that react on cursor) please respond. I'd very much like to know what JavaScript frameworks, that are able to implement something like this, you would recommend. Btw is it even possible to create this without third-party code ?
duplicate of: http://stackoverflow.com/q/28390481
type: Question
downvote count: 4
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29153579
has comment: http://stackoverflow.com/comment/46528690
tagged with: html5-canvas
answer count: 1
has comment: http://stackoverflow.com/comment/46563966
tagged with: web

http://stackoverflow.com/q/29153946
answer count: 1
has title: Flexslider manipulation
has answer: http://stackoverflow.com/a/31735217
type: UnansweredQuestion
has body: I'm working with Flexslider and I'm running into a bit of trouble with some of the controls. I have a pretty simple configuration although I want to change the position of one of the direction arrows when the .flex-disabled class isn't present on it's adjacent control. First call is to flexslider, pretty typical. Then the second call is something I wrote but does not seem to fully function. Any help would be appreciated. &lt;script&gt; $(window).load(function() { var $flexslider = $('.flexslider'); $flexslider.flexslider({ animation: "fade", animationLoop: false, animationSpeed: 500, //controlsContainer: ".content", directionNav: true, manualControls: ".flex-control-nav li", nextText: "View Next Property", prevText: "View Previous Property", slideshow: false }); }); &lt;/script&gt; &lt;script&gt; $(window).load(function(){ var previousControl = $('.flex-nav-prev a'); var nextControl = $('.flex-nav-next a'); if(previousControl.hasClass('.flex-disabled')){ nextControl.parent().css('left','.5em') } else { nextControl.parent().css('left','5em') } }); &lt;/script&gt;
type: Question
has comment: http://stackoverflow.com/comment/46529060
tagged with: javascript
tagged with: jquery
score: 0
tagged with: flexslider

http://stackoverflow.com/comment/46508805
score: 0
type: Comment
type: QuestionComment
has text: you are not able to get php variable in side js file ; assign value to global javascript variable in side php file and get in js file
comment on: http://stackoverflow.com/q/29142669

http://stackoverflow.com/a/73347610
answers question: http://stackoverflow.com/q/29168433
score: 0
type: Answer
has body: It depends. You can use template literals in dynamic imports to import a file based on a variable. I used dynamic imports to add .vue files to vue router. I have excluded the Home.vue view import. const pages = [ 'About', ['About', 'Team'], ] const nodes = [ { name: 'Home', path: '/', component: Home, } ] for (const page of pages) { if (typeof page === 'string') { nodes.push({ name: page, path: `/${page}`, component: import(`./views/${page}.vue`), }) } else { nodes.push({ name: _.last(page), path: `/${page.join('/')}`, component: import(`./views/${_.last(page)}.vue`) }) } } This worked for me. I was using yarn + vite + vue on replit.

http://stackoverflow.com/comment/46481216
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29127576
has text: It looks like you are calculating `padTop` so if the result is not the same every time, then that means `(slideHeight / 2) - (contentHeight / 2)` is returning different values (slideHeight or contentHeight is not the same for each slide). You should shorten up the html code and use generated source

http://stackoverflow.com/q/29215646
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29215872
has comment: http://stackoverflow.com/comment/46779819
type: UnansweredQuestion
has body: I tried my solution in this forum for five days and found some similar situations, but still could not solve my problem. 1- I am using pure jsf 2- I need before deleting a row from my table, there is a confirmation, a modal (I'm trying to use the smartNotifications) 3 - I can call the javascript function and suspend the delete action, but after clicking the button "Yes, I want to delete the record" does not continue the process of erasing the record, stands in the same place. Follow my example below Java code &lt;h:form id="form1"&gt; &lt;h:datatable id="tab1"&gt; &lt;h:column id="column1"&gt; &lt;f:facet name="header"&gt;User&lt;/f:facet&gt; &lt;h:outputText rendered="#{bean.User}"&gt;&lt;/h:outputText&gt; &lt;/h:column&gt; &lt;h:column id="column2"&gt; &lt;h:commandlink onclick="delete();" action="#{bean.deleteUser}" /&gt; &lt;/h:column&gt; &lt;/h:datatable&gt; &lt;/h:form&gt; Javascript: function delete(e) { $.SmartMessageBox({ title: "Are you Sure?", content: "This action can not be undone", buttons: '[Yes][No]' }, function (ButtonPressed) { if (ButtonPressed === "Yes") { return true; } if (ButtonPressed === "No") { return false; } }); e.preventDefault(); } Please help me
tagged with: delete-row
tagged with: jsf-2.2
type: Question
has title: delete row confirm with jquery and jsf
score: 0
tagged with: commandlink
tagged with: confirmation

http://stackoverflow.com/comment/46587315
has text: yes indeed, i tried with another image in this folder also, but still
comment on: http://stackoverflow.com/q/29186014
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29522556
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/82401964
has body: This is a bug in chrome; it's being worked on.
has comment: http://stackoverflow.com/comment/82397050
type: Answer
accepted answer of: http://stackoverflow.com/q/29185251
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29185251

http://stackoverflow.com/comment/46511833
has text: Because I need to update this cache as well.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29144284
score: 0

object
tags question: http://stackoverflow.com/q/29134414
tags question: http://stackoverflow.com/q/29065836
tags question: http://stackoverflow.com/q/29133392
tag name: object
tags question: http://stackoverflow.com/q/29083071
tags question: http://stackoverflow.com/q/29153654
tags question: http://stackoverflow.com/q/29153915
tags question: http://stackoverflow.com/q/29084275
tags question: http://stackoverflow.com/q/29116870
tags question: http://stackoverflow.com/q/29208578
tags question: http://stackoverflow.com/q/29134784
tags question: http://stackoverflow.com/q/29099886
tags question: http://stackoverflow.com/q/29067146
tags question: http://stackoverflow.com/q/29143467
tags question: http://stackoverflow.com/q/29132012
tags question: http://stackoverflow.com/q/29121924
tags question: http://stackoverflow.com/q/29097500
tags question: http://stackoverflow.com/q/29166059
tags question: http://stackoverflow.com/q/29170361
tags question: http://stackoverflow.com/q/29138381
tags question: http://stackoverflow.com/q/29191499
tags question: http://stackoverflow.com/q/29157943
tags question: http://stackoverflow.com/q/29182369
tags question: http://stackoverflow.com/q/29115096
tags question: http://stackoverflow.com/q/29206770
tags question: http://stackoverflow.com/q/29107835
tags question: http://stackoverflow.com/q/29086742
tags question: http://stackoverflow.com/q/29212335
tags question: http://stackoverflow.com/q/29179000
tags question: http://stackoverflow.com/q/29174516
tags question: http://stackoverflow.com/q/29209349
tags question: http://stackoverflow.com/q/29200318
tags question: http://stackoverflow.com/q/29198651
tags question: http://stackoverflow.com/q/29172766
tags question: http://stackoverflow.com/q/29189565
tags question: http://stackoverflow.com/q/29093164
tags question: http://stackoverflow.com/q/29186834
tags question: http://stackoverflow.com/q/29109408
type: Tag
tags question: http://stackoverflow.com/q/29108288
tags question: http://stackoverflow.com/q/29079854
tags question: http://stackoverflow.com/q/29188908
tags question: http://stackoverflow.com/q/29144205
tags question: http://stackoverflow.com/q/29192862
tags question: http://stackoverflow.com/q/29211564
tags question: http://stackoverflow.com/q/29205597

http://stackoverflow.com/q/29119905
has comment: http://stackoverflow.com/comment/46467079
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46466869
has body: I have a value on my PHP page and I want to refresh it per second with setInterval(). So I actually know how to refresh values with html etc. But now I want to do the same with php values. Here is my code: Ofc this isn't working since JS and php arent really great together. and in my table I just simply have: Activity: <?php echo $TimeMachineActive; ?> So the problem now is, it's only refreshing when I press f5. But now I want the autorefresh. I know setInterval() worked for html. Is it possible to get this done for php code?
has comment: http://stackoverflow.com/comment/46466841
answer count: 6
has answer: http://stackoverflow.com/a/60000219
has answer: http://stackoverflow.com/a/29120109
score: 0
has comment: http://stackoverflow.com/comment/46466899
has title: Refresh part of my php page with setInterval()
tagged with: php
has comment: http://stackoverflow.com/comment/46467006
has answer: http://stackoverflow.com/a/29120080
accepted answer: http://stackoverflow.com/a/29120296
linked to: http://stackoverflow.com/q/11497611
possible better answer: http://stackoverflow.com/a/29120183
has answer: http://stackoverflow.com/a/29120183
has comment: http://stackoverflow.com/comment/46467003
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29120064
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/29120296

http://stackoverflow.com/q/29161939
has answer: http://stackoverflow.com/a/29162016
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29164135
accepted answer: http://stackoverflow.com/a/29164135
possible better answer: http://stackoverflow.com/a/29162016
has title: Aligning a DIV at the bottom - Google Chrome extension
type: Question
has body: I have a Google Chrome extension where I'll add a DIV to the bottom of the webpage when the user clicks on the Chrome extension icon in the toolbar. Here is the code, var newdiv = document.createElement('div'); newdiv.id="alignToBottomDIV"; $( "body" ).append(newdiv); $("#alignToBottomDIV").load(chrome.runtime.getURL("bottomBar.html")); and the CSS, #alignToBottomDIV{ height:50px; position: fixed; bottom: 0; width: 100%; z-index:9999; } However the DIV is not positioned at the bottom of the page. It is getting overlapped with some content of the webpage. Any pointers how to position the DIV after the content of the webpage?
answer count: 2
has comment: http://stackoverflow.com/comment/46543259
tagged with: javascript
score: 0
tagged with: google-chrome-extension

http://stackoverflow.com/q/29092898
upvote count: 2
has comment: http://stackoverflow.com/comment/46417499
has body: Should be simple but I can't work it out. I have two panes on my webpage. I want both to be independently scrollable: &lt;body&gt; &lt;div id="sidebar"&gt; ... lots of content ... &lt;/div&gt; &lt;div id="container"&gt; ... lots of content ... &lt;/div&gt; &lt;/body&gt; #sidebar{ width:200px; position:fixed; overflow:scroll; background-color:black; color:white; top:0; left:0; height:100%; } Here is a JSFiddle. Notice how when you scroll to the bottom in the black sidebar, and keep scrolling, the body starts to scroll? That's what I want to avoid. Is there a simple way to achieve this?
has comment: http://stackoverflow.com/comment/46418084
type: Question
has title: Making a scrollable div which doesn't scroll the rest of the body
has answer: http://stackoverflow.com/a/29093021
tagged with: javascript
has comment: http://stackoverflow.com/comment/46417458
has answer: http://stackoverflow.com/a/29093835
downvote count: 0
has answer: http://stackoverflow.com/a/29093305
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29092991
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
score: 2

http://stackoverflow.com/a/29185451
type: Answer
accepted answer of: http://stackoverflow.com/q/29185308
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29185308
has body: When creating the marker, add a unique id to that marker, that will later help you identify which marker has been clicked and pick the corresponding image/description for display. //variable options contains different marker options var myMarker = new google.maps.Marker({ position: new google.maps.LatLng(options.lat, options.lng), map: myMap, draggable: options.draggable || false, animation: options.animation || "none", icon : options.markerImage }); myMarker.uniqueID = "myMarkerUniqueID123"; google.maps.event.addListener(marker, 'click', function() { showDetailsAndImage(marker.uniqueID); }); function showDetailsAndImage(id) { //do whatever you want to do here }

http://stackoverflow.com/q/29160355
has comment: http://stackoverflow.com/comment/46540512
type: Question
has answer: http://stackoverflow.com/a/29160478
has comment: http://stackoverflow.com/comment/46540537
has body: I have created form like this: Email ID {{getErrorMessage('emailId')}} Password {{getErrorMessage('password')}} Show Login Form I am validating emailId and password using server side validations and passing error list as response. Now, I want to display error messages at top in order of fields. So, in getErrorMessage() method, I have passed fieldName along with field's sequence no. and I have created hashmap as follows: $scope.getErrorMessage = function(errorCode,sequenceNo) { for ( var i = 0; i < data.validationErrors.length; i++) { if(data.validationErrors[i].errorCode == errorCode){ hashmap[sequenceNo] = data.validationErrors[i].errorDescription; return data.validationErrors[i].errorDescription; } } } Now I want to sort this hashmap based on key which is my field sequence no How should I do this in javascript or angualrjs? Thanks in advance.
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29160714
tagged with: javascript
has answer: http://stackoverflow.com/a/29160651
tagged with: angularjs
type: UnansweredQuestion
has title: Sorting hashmap in angularjs or javascript
has comment: http://stackoverflow.com/comment/46540495

http://stackoverflow.com/comment/46737491
comment on: http://stackoverflow.com/q/29168007
score: 0
has text: I think something else is broken in my app, because when I try to render anything basic in the `tag_users.js.erb` it doesn't work. Even a basic alert. So there must be something else going weird. I have just simply reverted to `format.html` and putting the content in the partial there. Thanks for all of your hard work @lx00st
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29123259
accepted answer of: http://stackoverflow.com/q/29123110
answers question: http://stackoverflow.com/q/29123110
score: 0
type: AcceptedAnswer
type: Answer
has body: Well the answer was pretty simple.. DateToCheckAfter was a Date object and dataCheck was a string if(DateToCheckAfter.toString() == dataCheck) { Browser.msgBox('9 march?!', Browser.Buttons.OK); } Fixed it

http://stackoverflow.com/q/29156176
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/46533081
has comment: http://stackoverflow.com/comment/46533939
has answer: http://stackoverflow.com/a/29156746
tagged with: node.js
type: AnsweredQuestion
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29156746
tagged with: javascript
has title: Listen for a webhook server side using meteor
tagged with: routes
has body: I've set up a meteor app using iron-router and I want the app to listen to a webhook from another service (basically I'm building an API for other services to use) So for example, when an external website calls myapp.meteor.com/webhook I want to catch that specific link and parameters and do stuff with the data. Update: Thanks to a comment I found this: https://github.com/iron-meteor/iron-router/blob/devel/Guide.md#server-routing Router.route('/webhooks', { where: 'server' }) .post(function () { console.log(this); this.response.end('Caught you\n'); //this.response.status(200).json({text:"Todo added"}); }); I added the above in the /server folder as there is no need to for the front-end server to worry about this like mentioned in the comment. But when I load this using postman POST request, it just returns my HTML for not found. Any ideas? Thanks in advance for your help. UPDATE I tried what @David said and still I get the template loaded and nothing in the console. Any idea what I'm doing wrong?
downvote count: 0
answer count: 1
score: 1

http://stackoverflow.com/comment/46512861
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29144934
has text: Thanks a lot the regex is perfect and I understood more on the regex logic. Thank a lot again
type: Comment

http://stackoverflow.com/comment/64970860
comment on: http://stackoverflow.com/a/38797235
type: AnswerComment
type: Comment
score: 1
has text: This does not provide an answer to the question. Once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](http://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/13243316)

jquery-ui
tags question: http://stackoverflow.com/q/29147103
tags question: http://stackoverflow.com/q/29189896
tags question: http://stackoverflow.com/q/29144091
tags question: http://stackoverflow.com/q/29160127
tags question: http://stackoverflow.com/q/29116254
tags question: http://stackoverflow.com/q/29092968
tags question: http://stackoverflow.com/q/29100352
tags question: http://stackoverflow.com/q/29121365
tags question: http://stackoverflow.com/q/29157077
tags question: http://stackoverflow.com/q/29147510
tags question: http://stackoverflow.com/q/29198044
tags question: http://stackoverflow.com/q/29166562
tags question: http://stackoverflow.com/q/29122275
tags question: http://stackoverflow.com/q/29125511
tags question: http://stackoverflow.com/q/29171174
tags question: http://stackoverflow.com/q/29150100
tags question: http://stackoverflow.com/q/29089879
tags question: http://stackoverflow.com/q/29194707
tags question: http://stackoverflow.com/q/29122009
tags question: http://stackoverflow.com/q/29183541
tags question: http://stackoverflow.com/q/29078385
tags question: http://stackoverflow.com/q/29150789
tags question: http://stackoverflow.com/q/29134172
tags question: http://stackoverflow.com/q/29203738
tags question: http://stackoverflow.com/q/29171563
tags question: http://stackoverflow.com/q/29091490
tags question: http://stackoverflow.com/q/29179469
tags question: http://stackoverflow.com/q/29078756
tags question: http://stackoverflow.com/q/29156849
tags question: http://stackoverflow.com/q/29076542
tags question: http://stackoverflow.com/q/29111034
tags question: http://stackoverflow.com/q/29105335
tags question: http://stackoverflow.com/q/29095448
tags question: http://stackoverflow.com/q/29147054
tags question: http://stackoverflow.com/q/29155838
tags question: http://stackoverflow.com/q/29091765
type: Tag
tags question: http://stackoverflow.com/q/29098871
tags question: http://stackoverflow.com/q/29200876
tags question: http://stackoverflow.com/q/29129551
tag name: jquery-ui
tags question: http://stackoverflow.com/q/29138603
tags question: http://stackoverflow.com/q/29215433
tags question: http://stackoverflow.com/q/29087541
tags question: http://stackoverflow.com/q/29143294
tags question: http://stackoverflow.com/q/29112167
tags question: http://stackoverflow.com/q/29211312
tags question: http://stackoverflow.com/q/29206583
tags question: http://stackoverflow.com/q/29095899
tags question: http://stackoverflow.com/q/29119943
tags question: http://stackoverflow.com/q/29065607
tags question: http://stackoverflow.com/q/29073106
tags question: http://stackoverflow.com/q/29215071
tags question: http://stackoverflow.com/q/29118424
tags question: http://stackoverflow.com/q/29154436
tags question: http://stackoverflow.com/q/29134536

http://stackoverflow.com/a/29181684
has body: Here is code I've used in the past... Please Log In User: Password: and elsewhere in JavaScript: // process the login via ajax $('#submit_login').click(function () { $('#form-error').hide(); $('#submit').hide(); $.ajax({ type: 'POST', url: './php/login.php', data: 'email_address=' + $('#email').val() + '&password=' + $('#password').val(), dataType: 'json', success: function (data) { if (data.status == -1) { $('#form-error').html(data.msg).slideDown('slow'); } else if (data.status == 0) { window.location.replace(data.url); } $('#submit').show(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { $('#form-error').html('Oops, Functional Error').slideDown('slow'); $('#submit').show(); } }); return false; });
type: Answer
answers question: http://stackoverflow.com/q/29179224
score: 0

http://stackoverflow.com/comment/46634110
type: QuestionComment
comment on: http://stackoverflow.com/q/29212238
score: 1
has text: This has nothing to do with JavaScript, right?
type: Comment

http://stackoverflow.com/a/29099944
type: Answer
accepted answer of: http://stackoverflow.com/q/29097973
answers question: http://stackoverflow.com/q/29097973
has comment: http://stackoverflow.com/comment/46432507
score: 0
type: AcceptedAnswer
has body: I was implementing @tinkerbot 's solution but then I found another way. I created a class like this: var self = this; var _baseColour = '#3C60EF'; var _shadeColour = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length &lt; 6) { hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i &lt; 3; i++) { c = parseInt(hex.substr(i * 2, 2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00" + c).substr(c.length); } return rgb; }; function _getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; }; function _getRandomColour(colour) { var percent = _getRandomInt(-100, 100) / 100; colour = colour || _baseColour; return _shadeColour(colour, percent); }; self.generateCSS = function (colour) { var colour1 = _getRandomColour(colour), colour2 = _shadeColour(colour1, -.1); // Shade 10% darker var rule = 'background: ' + colour1 + '; /* Old browsers */ ' + 'background: -webkit-linear-gradient(left top, ' + colour1 + ', ' + colour2 + '); /* For Safari 5.1 to 6.0 */' + 'background: -o-linear-gradient(bottom right, ' + colour1 + ', ' + colour2 + '); /* For Opera 11.1 to 12.0 */' + 'background: -moz-linear-gradient(bottom right, ' + colour1 + ', ' + colour2 + '); /* For Firefox 3.6 to 15 */' + 'background: linear-gradient(to bottom right, ' + colour1 + ' , ' + colour2 + '); /* Standard syntax (must be last) */'; return rule; }; and in my loop through the elements I just did this: var colour = attr.colouredTile; var css = controller.generateCSS(colour); element.setAttribute('style', css);

http://stackoverflow.com/a/29186009
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29185843
upvote count: 1
has body: The parentheses create a numbered capturing group, which allows you to access that part of the match. When you use String.prototype.match, you get an array where the first element is the match, the second one is the first capturing group, and so on: "a1a".match(/a(\d)a/); // [ "a1a", "1" ] However, that only happens when the regex doesn't have the global g flag. Otherwise, you get an array with all matches: "a1a-a2a".match(/a(\d)a/g); // [ "a1a", "a2a" ] It is still possible to access the capturing groups with a global flag, but not with match: var regex = /a(\d)a/g, str = "a1a-a2a", match; while(match = regex.exec(str)) { match[1]; // First capturing group of each match }
type: Answer

google-maps
tags question: http://stackoverflow.com/q/29151321
tags question: http://stackoverflow.com/q/29202303
tags question: http://stackoverflow.com/q/29080504
tags question: http://stackoverflow.com/q/29157626
tags question: http://stackoverflow.com/q/29101088
tags question: http://stackoverflow.com/q/29160146
tag name: google-maps
tags question: http://stackoverflow.com/q/29212571
tags question: http://stackoverflow.com/q/29098827
tags question: http://stackoverflow.com/q/29086530
tags question: http://stackoverflow.com/q/29078039
tags question: http://stackoverflow.com/q/29129727
tags question: http://stackoverflow.com/q/29094418
tags question: http://stackoverflow.com/q/29132434
tags question: http://stackoverflow.com/q/29161127
tags question: http://stackoverflow.com/q/29085461
tags question: http://stackoverflow.com/q/29165386
tags question: http://stackoverflow.com/q/29068436
tags question: http://stackoverflow.com/q/29185308
tags question: http://stackoverflow.com/q/29152305
tags question: http://stackoverflow.com/q/29150261
tags question: http://stackoverflow.com/q/29113105
tags question: http://stackoverflow.com/q/29210471
tags question: http://stackoverflow.com/q/29131250
tags question: http://stackoverflow.com/q/29169240
tags question: http://stackoverflow.com/q/29084461
tags question: http://stackoverflow.com/q/29117793
tags question: http://stackoverflow.com/q/29156292
tags question: http://stackoverflow.com/q/29150249
tags question: http://stackoverflow.com/q/29080540
tags question: http://stackoverflow.com/q/29078110
tags question: http://stackoverflow.com/q/29186043
tags question: http://stackoverflow.com/q/29133520
tags question: http://stackoverflow.com/q/29204412
tags question: http://stackoverflow.com/q/29183851
tags question: http://stackoverflow.com/q/29196332
tags question: http://stackoverflow.com/q/29102217
tags question: http://stackoverflow.com/q/29106414
tags question: http://stackoverflow.com/q/29117931
tags question: http://stackoverflow.com/q/29092286
tags question: http://stackoverflow.com/q/29197029
tags question: http://stackoverflow.com/q/29105437
tags question: http://stackoverflow.com/q/29062708
tags question: http://stackoverflow.com/q/29109800
tags question: http://stackoverflow.com/q/29114798
tags question: http://stackoverflow.com/q/29133150
tags question: http://stackoverflow.com/q/29121221
type: Tag
tags question: http://stackoverflow.com/q/29182835
tags question: http://stackoverflow.com/q/29196855
tags question: http://stackoverflow.com/q/29065938
tags question: http://stackoverflow.com/q/29098720
tags question: http://stackoverflow.com/q/29163288
tags question: http://stackoverflow.com/q/29090543
tags question: http://stackoverflow.com/q/29095640
tags question: http://stackoverflow.com/q/29156642
tags question: http://stackoverflow.com/q/29176753
tags question: http://stackoverflow.com/q/29154297
tags question: http://stackoverflow.com/q/29179410
tags question: http://stackoverflow.com/q/29119190
tags question: http://stackoverflow.com/q/29171262
tags question: http://stackoverflow.com/q/29203769
tags question: http://stackoverflow.com/q/29168539
tags question: http://stackoverflow.com/q/29155398
tags question: http://stackoverflow.com/q/29209181

http://stackoverflow.com/comment/87426247
comment on: http://stackoverflow.com/a/29151264
type: AnswerComment
has text: This worked for me with `karma-mocha`, but I had to comment out `singleRun: true` in karma.conf.js and run `karma start --no-auto-watch` so that it didn't try running the whole suite from `karma start`...
type: Comment
score: 3

http://stackoverflow.com/q/29131995
tagged with: javascript
has answer: http://stackoverflow.com/a/29132052
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Reading in radio button selections in JS
possible better answer: http://stackoverflow.com/a/29132246
has answer: http://stackoverflow.com/a/29132246
accepted answer: http://stackoverflow.com/a/29132052
type: AnsweredQuestion
has body: I am trying to get a popup window to display whatever was entered into the form. I have managed to get it display the Name that was entered into the form, but would also like it to display the rating given in the website (radio buttons) using only JavaScript and HTML. Details First Name Last Name Email Help Rating Website Rating: * (1 Star) * * (2 Star) * * * (3 Star) * * * * (4 Star) * * * * * (5 Star) Comments Comments on the website: Updates Do you want to receive updates via Email? Yes No Submit
type: Question
answer count: 2

http://stackoverflow.com/q/29127089
has body: In this javascript code, I will submit a form to server, and waiting response data. After I get response from server, I will redirect to /list Template.post_question_form.events({ 'submit form' : function(event) { event.preventDefault(); // get content value var question = event.target.question_title.value; var content = event.target.question_content.value; // send data to server Meteor.call('createQuestion', question, content, function(error, result) { console.log(result); Meteor.go('list'); }); } }); But when my web application runs to line Meteor.go('list'). I meet exception: Exception in delivering result of invoking 'createQuestion': TypeError: undefined is not a function at http://localhost:3000/client/views/post_question/post_question_form.js?ea61f464a8905bc8789871133dddf7b0782e7438:39:20 at Meteor.bindEnvironment [as _callback] (http://localhost:3000/packages/meteor.js?81e2f06cff198adaa81b3bc09fc4f3728b7370ec:977:22) at _.extend._maybeInvokeCallback (http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:3858:12) at _.extend.receiveResult (http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:3878:10) at _.extend._livedata_result (http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:4931:9) at onMessage (http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:3723:12) at http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:2717:11 at Array.forEach (native) at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18:156:11) at _.extend._launchConnection.self.socket.onmessage (http://localhost:3000/packages/ddp.js?41b62dcceb3ce0de6ca79c6aed088cccde6a44d8:2716:11) And here is createQuestion code: Meteor.methods({ 'createQuestion': function(title, content) { // insert into database question object return Topic.insert({ title: title, content: content }); } }); Although I have tested loc…
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46481603
has comment: http://stackoverflow.com/comment/46484035
has answer: http://stackoverflow.com/a/29129651
type: AnsweredQuestion
tagged with: meteor
score: 1
favorite count: 0
has title: Meteor: Redirect to another url using Meteor.go('url') meeting error
type: Question
accepted answer: http://stackoverflow.com/a/29129651
answer count: 1
has comment: http://stackoverflow.com/comment/46483017
upvote count: 1

http://stackoverflow.com/q/29130030
has comment: http://stackoverflow.com/comment/46485886
has comment: http://stackoverflow.com/comment/46485877
has comment: http://stackoverflow.com/comment/46485878
has comment: http://stackoverflow.com/comment/46485996
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29130099
type: Question
has body: I'm stuck animate the same first frame, when I want to call out to i++ but for whatever reason I'm not able to load in the next variable. My setTimeout function fires every 3 seconds and should load in the next li in the view. //set animation function animate() { var set = $(".1,.2,.3,.4"); var i = 0; $(set).find('li:nth-child('+(i+1)+')').removeClass().find('li:nth-child('+(i+1)+')').addClass("active"); //$(set).find("li:first").addClass('active'); }; setTimeout(function(){ animate(); }, 3000);
answer count: 2
possible better answer: http://stackoverflow.com/a/29130099
tagged with: javascript
has title: i++ animation for javascript function
has answer: http://stackoverflow.com/a/29130128
score: 0
accepted answer: http://stackoverflow.com/a/29130128
has comment: http://stackoverflow.com/comment/46485967

http://stackoverflow.com/q/29074321
type: AnsweredQuestion
has body: I had working code until I tried to make the style.css page apply only to a certain div on the index.html file. This is the current code I have: http://codepen.io/anon/pen/LEXxeM All that I did (which made it stop working) was completely wrap the style.css page in "adder { }", and put all the code in the body in a div tag. Any ideas as to why this was an incorrect step? In case codepen can't be accessed, below is the code. HTML: Task ListO Clear all CSS @import url(http://fonts.googleapis.com/css?family=Open+Sans:400, 300, 600); adder { * { padding:0; margin:0; } body { background:url(''); background-color:#2a2a2a; font-family:'Open Sans', sans-serif; } #container { background-color: #111216; color:#999999; width:350px; margin: 50px auto auto auto; padding-bottom:12px; } #formContainer { padding-top:12px } #taskIOSection { } #taskInput { font-size:14px; font-family:'Open Sans', sans-serif; height:36px; width:311px; border-radius:100px; background-color:#202023; border:0; color:#fff; display:block; padding-left:15px; -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; } #taskInput:focus{ box-shadow: 0px 0px 1pt 1pt #999999; background-color:#111216; outline:none; } ::-webkit-input-placeholder { color: #333333; font-style:italic; /* padding-left:10px; */ } :-moz-placeholder { /* Firefox 18- */ color: #333333; font-style:italic; } ::-moz-placeholder { /* Firefox 19+ */ color: #333333; font-style:italic; } :-ms-input-placeholder { color: #333333; font-style:italic; } header { margin-top:0; background-color:#F94D50; width:338px; height:48px; padding-left:12px; } header h1 { font-size:25px; font-weight:300; color:#fff; line-height:48px; width:50%; display:inline; } header a{ width:40%; display:inline; line-height:48px; } #taskEntryForm { background-color:#111216; width:326px; height: 48px; border-width:0px; padding: 0px 12px 0px 12px; font-size:0px; } #taskList { wi…
type: Question
has answer: http://stackoverflow.com/a/29075221
has title: How do you apply a style to only one div in the HTML?
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/46382493
possible better answer: http://stackoverflow.com/a/29074352
has answer: http://stackoverflow.com/a/29074804
upvote count: 4
has answer: http://stackoverflow.com/a/29074352
answer count: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/29075221
tagged with: jquery
has comment: http://stackoverflow.com/comment/46382575
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/46441916
has text: I tried, but see the $scope.result still not change. You can see in: http://jsfiddle.net/castiel_zyf/0hL4ucxf/
comment on: http://stackoverflow.com/a/29105550
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29093751
tagged with: modal-dialog
answer count: 1
tagged with: bootstrap-modal
has title: Data dismiss in modal being called twice on click
has comment: http://stackoverflow.com/comment/46419000
tagged with: http://stackoverflow.com/tag/html
has body: I've been working a modal which gets dismissed when a user clicks the 'Cancel' button. Everything was working fine until the button developed a bug. When I click on the 'Cancel' button, the modal is dismissed, but closes and opens again. So one needs to click the dismiss button twice to close the modal. This is the 'Bootstrap' modal and I haven't made any changes to the JS file. Only CSS and HTML have been tinkered with. On inspecting in the browser, I see the following function being called twice. &lt;div class="modal-backdrop fade in"&gt;&lt;/div&gt; How do I fix this error? I have no idea where to even start! The following is my modal code. Note: The same error is being encountered with the 'cross' aria label at the top-right corner of the modal. &lt;div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog modal-sm"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;&lt;b&gt;Why are you deleting this book?&lt;/b&gt;&lt;/h4&gt; &lt;/div&gt; &lt;!--modal body starts --&gt; &lt;div class="modal-body"&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked&gt;Sold &lt;/div&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"&gt;Sold on another site or elsewhere &lt;/label&gt; &lt;/div&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"&gt;Don't want to sell it now &lt;/label&gt; &lt;/div&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"&gt;Lack of buyer interest &…
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46419516
has answer: http://stackoverflow.com/a/29094469
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46419042
score: 0

http://stackoverflow.com/a/29079714
answers question: http://stackoverflow.com/q/29078944
has comment: http://stackoverflow.com/comment/46392945
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46394220
has comment: http://stackoverflow.com/comment/46393922
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46392762
accepted answer of: http://stackoverflow.com/q/29078944
has body: The integrated features are loaded into a L.mapbox.featureLayer which is available as a member of your L.mapbox.Map instance. Let's say you have your map instance stored in a reference called map your layer would be map.featureLayer: // Make sure the featureLayer is ready map.featureLayer.on('ready', function (e) { // Loop over the features e.target.eachLayer(function (layer) { // Do your thing // here "layer" holds an instance of the marker/polygon/polyline // "layer.feature" holds the actual geojson feature }); }); Here's an example of the concept: http://plnkr.co/edit/D5IfRTLV0yXTqOmzNCYA?p=preview You could also load the tiles and features seperately if you wish, instanciate your map with no mapid: var map = L.mapbox.map('mapbox', null, { 'center': [0, 0], 'zoom': 1 }); var tileLayer = L.mapbox.tileLayer('yourMapId').addTo(map); var featureLayer = L.mapbox.featureLayer('yourMapId').addTo(map); Example: http://plnkr.co/edit/9pYeRu6UmxuVL1TLzwPR?p=preview Then you could leave out the addTo method, first process your features and then add the layer to the map: var featureLayer = L.mapbox.featureLayer('yourMapId'); // Make sure the featureLayer is ready featureLayer.on('ready', function (e) { // Loop over the features e.target.eachLayer(function (layer) { // Do your thing }); // Add layer to the map e.target.addTo(map); }); What ever works best for you. But i almost forgot to actually answer your question (although i think you won't be needing this anymore), the actual GeoJSON featurecollection can be obtained by using L.mapbox.FeatureLayer's getGeoJSON method (only when the layer is ready ofcourse): // Make sure the featureLayer is ready featureLayer.on('ready', function (e) { // Fetch you featurecollection var geojson = e.target.getGeoJSON(); });
type: Answer
has comment: http://stackoverflow.com/comment/46393801

http://stackoverflow.com/comment/46679182
type: Comment
has text: The interesting part is getting the information that the user has read the book. I'm thinking about this tutorial ( http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields ) for creation of relevant user fields, and then using `get_user_meta($current_user->ID, 'booksread', 'book-1')` in place of the commented `if user has read book 1` in your example. Would that be ideal?
comment on: http://stackoverflow.com/a/29201408
type: AnswerComment
score: 0

http://stackoverflow.com/a/29188636
has body: You could use a regex ? $('.refresh a').click(function() { var pathName = window.location.pathname; if (pathName == '/' || /^\/page\/\d+?\/?$/.test(pathName) ) { event.preventDefault(); location.reload(true); }else {} }); That would match things like /page/4 /page/4/ /page/11111111 but not /page/test/ /page/1/ff etc.
has comment: http://stackoverflow.com/comment/46591954
upvote count: 4
answers question: http://stackoverflow.com/q/29188574
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/29188574
type: Answer

http://stackoverflow.com/q/29211600
downvote count: 0
tagged with: jquery-autocomplete
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29211672
tagged with: http://stackoverflow.com/tag/html
has title: How to add autocomplete to dynamically created inputs?
accepted answer: http://stackoverflow.com/a/29211672
upvote count: 1
type: AnsweredQuestion
has body: sorry for asking a question that has been answered, I read them, but I could not figure out how to apply them to my problem. Basically I have a form with this input &lt;input class="auto" type="text" name="id_item[]" placeholder="Article ID" required style="width: 15%;"/&gt; and then I have an empty div under it, where I put newcly created inputs, when user click the add button &lt;div id="next_items"&gt; &lt;/div&gt; My function to create and delete new inputs looks like this $(document).ready( function() { $("#add_item").click( function() { $("#next_items").append('&lt;input class="auto" class="new_id" type="text" name="id_item[]" placeholder="Article ID" required style="width: 15%;"/&gt;'); }); $("#remove_item").click( function() { $(".new_id:last").remove(); }); }); and the last thing is my autocomplete js $('input.auto').each(function() { $(this).autocomplete({ source: "contract/auto", minLength: 1 }); }); It works fine for my first input, which is there all the time, but when I tr to add new input with the button, it does not work. I tried using the each function and it still does not work. Also the classes started to mix up in the created buttons. How can I fix this problem?
tagged with: javascript
type: Question
answer count: 1

http://stackoverflow.com/comment/46491555
has text: That would explain it. Thank you
comment on: http://stackoverflow.com/a/29132848
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46455539
has text: Consider `!/[^a-z\-]/i.test(string)`. ;-)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29113234
score: 1

http://stackoverflow.com/q/29092697
tagged with: javascript
tagged with: jquery
has title: jQplot tooltip dismiss issue
has answer: http://stackoverflow.com/a/29093576
favorite count: 0
score: 4
has body: I have implemented a simple bar chart, ive added tooltip feature using highlighter but i am facing an issue with the same. When i move the mouse down and exit the chart canvas the tooltip doesnt dismiss I have tried adding $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]); $.jqplot.eventListenerHooks.push(['jqplotMouseLeave', handleMove]); But it doesnt work , i get the error handleMove is not defined Here is the code fiddle for the same https://jsfiddle.net/9j2na3L7/
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29093576
tagged with: jqplot
has comment: http://stackoverflow.com/comment/46418573
type: Question
upvote count: 4
answer count: 1
downvote count: 0

directed-acyclic-graphs
type: Tag
tag name: directed-acyclic-graphs
tags question: http://stackoverflow.com/q/29109157

http://stackoverflow.com/comment/46599368
type: Comment
score: 0
has text: But as you can see from my xml file i have different xml:id for each surface element. Maybe i could use a class instead of use anid attribute.
type: QuestionComment
comment on: http://stackoverflow.com/q/29192763

http://stackoverflow.com/comment/126334155
has text: I know its greyed out above, but the original Circle.prototype is still active as the prototype on myFirstCircle instance, correct? (not sure why I'm asking, I guess I know this is true since I tested it in Chrome :) )
comment on: http://stackoverflow.com/a/29155987
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46540330
has text: Where are `ruleId`, `ruleName` and `comments` defined? And, if you could put the alert before adding the row, and see what value of `ruleName` it is showing.
score: 0
comment on: http://stackoverflow.com/q/29160127
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46573923
has text: it would look like this: This would create an input box with "name" in the field.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29178131
score: 1

http://stackoverflow.com/a/29201590
upvote count: 1
has body: You have to run var i = Math.floor(7*Math.random()) inside your fortune function, or i will be the same as it was before.
downvote count: 0
has comment: http://stackoverflow.com/comment/46696923
has comment: http://stackoverflow.com/comment/46615928
type: Answer
answers question: http://stackoverflow.com/q/29201480
score: 1

http://stackoverflow.com/a/29152773
answers question: http://stackoverflow.com/q/29150704
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29150704
score: 1
upvote count: 1
has body: Radio buttons are used to choose between different values for a single field or, in Angular's case, a single model. The logical solution would be to select the correct answer: &lt;input type="radio" ng-model="component.question.correctAnswer" ng-value="answer"&gt; If you really need to set a flag you can easily achieve that with a watcher: $scope.$watch('component.question.correctAnswer', function(correctAnswer) { component.question.answers.forEach(function(answer) { answer.is_correct = answer === correctAnswer ? true : false; }); });
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46465573
type: Comment
score: 0
has text: @Blackhole there is a little difference i checked the Doc of angular.
type: QuestionComment
comment on: http://stackoverflow.com/q/29118736

http://stackoverflow.com/a/29193561
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46600566
answers question: http://stackoverflow.com/q/29193133
accepted answer of: http://stackoverflow.com/q/29193133
has body: Something like this? var data={"events":[ {"id": "EX_01", "Name":"Event 1", "City":"City 1", "Dates":"13-09-2015" }, {"id": "EX_02", "Name":"Event 2", "City":"City 2", "Dates":"15-09-2015" } ]}; data["events"].forEach(function(elem) { for(var key in elem) { var filter = [elem["id"], "_", key].join(""); $("div[data-filter='" + filter + "']").text(elem[key]); } }); Read about Array forEach and for...in to learn how they work!
type: AcceptedAnswer

http://stackoverflow.com/comment/46459251
comment on: http://stackoverflow.com/a/29081713
type: Comment
has text: I have gone over both the package and the example and couldn't find a callback for when the flash finishes running
type: AnswerComment
score: 0

http://stackoverflow.com/q/29065419
has comment: http://stackoverflow.com/comment/46366660
has title: Different scopes within an iframe
type: Question
tagged with: internet-explorer-8
has body: I need his code to work with iframes in IE8+ I have the html code in a string, but scripts with and without src-s are in a different scope in IE8. So the 1. file is Jquery, but the 4. file runs on an error: "jQuery is not defined". For example: The significant part of my code: var iframe = document.getElementById('my_iframe') if (frame == null) { return; } iframe.style.display = 'block'; var doc = null; if (iframe.contentDocument) doc = iframe.contentDocument; //IE8! else if (iframe.contentWindow) doc = iframe.contentWindow.document; if (doc === null) { return; } // the content variable has the html in a string, here I get the script elements out of this string //... doc.open(); doc.write(content); if (typeof doc.charset != 'undefined') { try { doc.charset = "utf-8" } catch (exception) {} } // appending script to the iframe var loadScript = function(srcArray) { if (srcArray.length === 0) { return; } var src = ''; // test if the script has an scr attribute if (/<\s*script[^>]+src\s*=\s*"([^"]+)"[^>]*>\s*<\/script[^>]*>/gi.test(srcArray[0])) { var srcIndex = srcArray[0].indexOf('src="') +5; var lastI = srcArray[0].indexOf('"', srcIndex) for (var i = srcIndex; i < lastI; i++) { src += srcArray[0][i] } //no src attribute } else { var stripedScript = srcArray[0]; stripedScript = stripedScript.replace(/<\s*script[^>]*>/gi, ''); stripedScript = stripedScript.replace(' ', ''); var newScript = doc.createElement('script'); newScript.setAttribute("type", "text/javascript"); newScript.setAttribute("charset", 'utf8'); newScript.text = stripedScript; doc.getElementsByTagName('head')[0].appendChild(newScript); srcArray.shift(); loadScript(srcArray); return; } // has scr attribute var newScript = doc.createElement('script'); newScript.setAttribute("type", "text/javascript"); newScript.setAttribute("charset", 'utf8'); newScript.setAttribute("src", src); var head = doc.getElementsByTagName('head')[0]; newScript.onload = newScript.onreadystatechange = function () { if (!this.readyStat…
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46367006
answer count: 0
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/q/29150512
tagged with: javascript
favorite count: 0
tagged with: opendata
has answer: http://stackoverflow.com/a/31439873
possible better answer: http://stackoverflow.com/a/49038633
has answer: http://stackoverflow.com/a/49038633
has title: How can I allow public to view/download data from my firebase?
accepted answer: http://stackoverflow.com/a/31439873
has body: I'm working on an Open Data Project over at www.openwifinder.com/ . We're using firebase to store the data that we'll load to an ESRI map using javascript. Because we're working with the idea of Open Data, we want the public to be able to download our entire point cloud stored in firebase as a .json file. My team originally copied the link from the "Export Data" Button on the data page, but we've found that the link is temporary due to an expiring auth token in the url. We've also tried linking to the "Instance.firebaseio.com" url, but when you click it (in another browser), it says that you're not authorized to view the firebase. Ideally, we'd like to do something like Firebase has done with it's Open Data Set page. When you click on those open data urls, you get taken to the data page of the open firebase, and you can't do anything but read and export the data. It doesnt necessarily have to be a public link, but even if the user has to sign up for a firebase account to view the data it would be alright. Of course a true public link would be ideal for our purpose. Any ideas? I've scoured the help page of the website for clues. Thanks!!
upvote count: 1
type: Question
tagged with: firebase
type: AnsweredQuestion
score: 1
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/128379674
comment on: http://stackoverflow.com/a/65988527
has text: i don't think it's possible to call resolve and reject both on same promise... it will either be resolve or reject.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29207727
type: AcceptedAnswer
type: Answer
score: 2
has body: It seems that ng-file-upload doesn't react to .sendKeys(...), its file-change doesn't get invoked. You can use standard onchange event to invoke some custom upload logic: &lt;input type="file" style="display: none" onchange="angular.element(this).scope().upload(this)" ng-file-select ng-multiple="multiple" accept=".jpg,.png"&gt; this points to the input element which has a property files.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29091906
upvote count: 2
answers question: http://stackoverflow.com/q/29091906

http://stackoverflow.com/comment/46553785
score: 0
has text: Could you add a link to the example?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29167142

http://stackoverflow.com/comment/139600057
comment on: http://stackoverflow.com/a/53648867
has text: The `Boolean` conversion is superfluous (so are the parentheses, technically, but IMO they improve readability)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29199439
score: 0
has body: After upgrading to Bootstrap 3.3.4, all of the tool-tips stopped working on my website. I have created a simple example of my set-up via JsFiddle with Bootstrap 3.3.4, and Jquery 2.1.3. Please tell me, am I doing something wrong? Did something change that I have to update?
has comment: http://stackoverflow.com/comment/46611763
tagged with: css
has title: Bootstrap 3.3.4 Tooltips not working
has comment: http://stackoverflow.com/comment/46611421
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46611634
type: Question
has comment: http://stackoverflow.com/comment/46611353
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29199655

http://stackoverflow.com/q/29215004
score: 0
tagged with: node.js
has answer: http://stackoverflow.com/a/29215099
linked to: http://stackoverflow.com/q/14220321
possible better answer: http://stackoverflow.com/a/29215104
has answer: http://stackoverflow.com/a/29215104
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29215477
accepted answer: http://stackoverflow.com/a/29215099
has title: Return array from function in Nodejs and send it to ejs view?
answer count: 3
tagged with: javascript
has body: Okay, so my code is pulling data from a yelp business using their official API. My problem is that I can't seem to get the data to return out of the function. The problem isn't in ejs, it's that the data doesn't return when I tell it to! I just get undefined with some attempts, and with others (including the one I'm going to show here), I get an empty array. I'm pasting only the code that's important, let me know if you need more! function yelp(){ var b = []; var i = 0; (struck the initialization of client) client.business("(struck)", function(error, data) { if (error != undefined){ res.send("an error occured. exiting"); process.process.reallyExit(); } b[i++] = data.name; b[i++] = data.display_phone; b[i++] = data.rating; console.log(b); //NEW!! }); console.log(b); return b; } app.get('/yelp', function(req,res){ var arr = yelp(); console.log(arr); res.render('yelp.ejs', {title: 'Yelp!', arr: arr}); }); } I added one more line of code, that I THINK may have narrowed down the problem to being related to my poor internet connection. I added ANOTHER console.log(b), this time inside of the business API call. the console.log(arr) is shows second, the console.log(b); just before the reutrn shows first, and LAST is the console.log(b) INSIDE the API call. It also took a good 30 seconds for that log to appear, and it appeared AFTER the page loaded. So, how do I go about making the page wait for the data? Or is this unrelated to my problem?
tagged with: express
has comment: http://stackoverflow.com/comment/46639531

http://stackoverflow.com/comment/46549817
type: QuestionComment
score: 0
has text: You need to also compare `one.originalId` to `other.id`.
type: Comment
comment on: http://stackoverflow.com/q/29165471

http://stackoverflow.com/q/29203763
has title: How to upload blob to Parse?
linked to: http://stackoverflow.com/q/26024135
has body: I am trying to upload blob to Parse. I can get a file to upload just fine, but I am trying to upload a blob that I get from canvas after doing a crop in Javascript. The line that I use to define a new parse File to be uploaded looks like this var parseFile = new Parse.File("some_file_name.png", file); Since the Blob Object is basically a File object without the meta attributes, I was hoping to be able to do something like this.. var parseFile = new Parse.File("some_file_name.png", blob); But the result of this is parseFile being 'undefined'. And I thus cannot call subsequent methods to continue with the upload. I can't seem to find any info anywhere else, and was hoping someone with a little more insight may know if I am missing something or on the wrong path. Any help is greatly appreciated!
type: AnsweredQuestion
tagged with: parse-platform
has answer: http://stackoverflow.com/a/29225074
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46619005
tagged with: blob
accepted answer: http://stackoverflow.com/a/29225074
score: 0
answer count: 1
tagged with: blobstorage
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/29125730
has answer: http://stackoverflow.com/a/29135735
upvote count: 3
has comment: http://stackoverflow.com/comment/46478657
has title: Onsen setMainPage callback not working
type: Question
tagged with: javascript
tagged with: onsen-ui
has comment: http://stackoverflow.com/comment/46477725
accepted answer: http://stackoverflow.com/a/29135735
score: 3
answer count: 1
downvote count: 0
has body: In the following docs for onsen it shows that the setMainPage function has an optional property that allows you to specify a callback: http://onsen.io/reference/ons-sliding-menu.html#method-setMainPage It doesn't seem to work though, my callback doesn't appear to get fired. There are no errors or anything it just doesn't fire the callback. Here is my code: My App About this practice guidance Home Home Interestingly if I do the following: Then it will error because I'm passing a string when its expecting a function, so the callback does seem to be registering it just doesn't fire
favorite count: 0
has comment: http://stackoverflow.com/comment/46477748
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46478555
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/29669907

http://stackoverflow.com/q/29093560
upvote count: 0
has comment: http://stackoverflow.com/comment/46421101
tagged with: jquery
has answer: http://stackoverflow.com/a/29108790
has body: I am working on website (HTML+PHP).Here is Fiddle of what I have done so far(sharing one for example). Each image should point to different URLs. There are few images whose color matches the font color.I want to change font size/color as image changes. Also URL should also change automatically as image changes. HTML: Dark Chocolate Smoothie Description View more Is it possible ? Can anyone help me with it.? Thanks,
favorite count: 0
has title: Change font color and URL Dynamically
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/29108874
has comment: http://stackoverflow.com/comment/46419421
downvote count: 1
type: Question
tagged with: javascript
score: -1
answer count: 2

http://stackoverflow.com/comment/48816065
comment on: http://stackoverflow.com/q/29081324
score: 0
type: QuestionComment
has text: I think it has to do with something stupid with IE... I would say change it from checking the bottom to checking 50pxs from the bottom.
type: Comment

http://stackoverflow.com/comment/46475595
type: Comment
has text: Problem is fixed now. Thank you for fast help!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29124013

http://stackoverflow.com/q/29192283
tagged with: handlebars.js
answer count: 0
has body: I have an urgent demo showcase for Ghost and I have the following context. Though not specific to Ghost, its a general problem { posts: [{ name: 'post1', id: 1, tags: [{ id: 1, name: 'tag1' },{ id: 5, name: 'tag5' }] }, { name: 'post2', id: 2, tags: [{ id: 1, name: 'tag1' },{ id: 3, name: 'tag3' }] }] } I want to create a filter helper in HandleBars.js which will display all posts whose tag name is 'tag1' Something like {{#filter posts tags[].name="tag5"}} &lt;h1&gt; {{name}} &lt;/h1&gt; {{/filter}} Outputs &lt;h1&gt; post1 &lt;/h1&gt; EDIT I have seen filter helpers, I think what I need is deepfilter helper.
tagged with: http://stackoverflow.com/tag/json
type: Question
linked to: http://stackoverflow.com/q/6491463
tagged with: javascript
has comment: http://stackoverflow.com/comment/46598351
has title: Deep filter / if in Handlebars Helper
score: 0
tagged with: filter
tagged with: ghost-blog
has comment: http://stackoverflow.com/comment/46598518
has comment: http://stackoverflow.com/comment/46618999
type: UnansweredQuestion

http://stackoverflow.com/comment/46601995
has text: thanks for the quick answer! But why do I need Math.random() here? This will give me random numbers, but I want to iterate over a specific list of words.
type: Comment
comment on: http://stackoverflow.com/a/29194172
score: 0
type: AnswerComment

http://stackoverflow.com/comment/139333188
type: AnswerComment
comment on: http://stackoverflow.com/a/79016027
type: Comment
score: 1
has text: I tried it out with iterators, but unsurprisingly those are much slower than copying and mutating an array https://jsperf.app/cojiwe/8 . Too bad Javascript does not have zero-extra-cost abstractions. This means that your answer is the fastest solution that we can currently come up with. Time to edit my answer and point people to this version :)

http://stackoverflow.com/comment/46587016
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29185489
type: AnswerComment
has text: Glad to help, but it sounds like your larger problem was the mis-named properties?

http://stackoverflow.com/comment/48040997
comment on: http://stackoverflow.com/a/29095982
has text: Thanks heaps... will try this as well
type: Comment
score: 0
type: AnswerComment

sitemap
type: Tag
tags question: http://stackoverflow.com/q/29090697
tag name: sitemap

http://stackoverflow.com/a/29188744
answers question: http://stackoverflow.com/q/29183963
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29183963
upvote count: 3
score: 3
has body: You can get the languages, which the user has set in the Chrome settings, like this: chrome.i18n.getAcceptLanguages(function (list) { console.log(list); }); For location, there is the location API (HTML5) - but the user must agree to share the location for it to work: http://html5demos.com/geo Or you could use a geo IP service (IP is known only server side): http://freegeoip.net/json/
type: AcceptedAnswer

http://stackoverflow.com/a/29096520
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46424717
score: 1
has comment: http://stackoverflow.com/comment/46427978
has comment: http://stackoverflow.com/comment/46425232
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46427789
accepted answer of: http://stackoverflow.com/q/29095448
has comment: http://stackoverflow.com/comment/46424622
answers question: http://stackoverflow.com/q/29095448
has body: The below will work for you: Here is a working jsFiddle jQuery $('.useLocalSelect').change(function () { var key = $(this).attr('id'); var value = $(this).val(); localStorage.setItem(key, value) }); // use a timer for text fields and the like so that localsotrage is set 2 seconds after the user stops typing instead of after each keystroke var t = ''; $('.useLocalInput').keyup(function () { clearTimeout(t); var key = $(this).attr('id'); var value = $(this).val(); t = setTimeout(function () { localStorage.setItem(key, value) }, 2000); }); $('.useLocal').each(function () { var key = $(this).attr('id'); if (localStorage.getItem(key)) { $(this).val(localStorage.getItem(key)); } }); $('.clearLocalSelect').click(function () { $('.useLocalSelect').each(function () { $(this).val(''); var key = $(this).attr('id'); localStorage.removeItem(key); }); }); html &lt;label style="color: #01ACEE; font: bold 14px Tahoma;"&gt;Input &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input class="useLocal useLocalInput" id="testInput" size="40" type="text" name="website" value="" required/&gt; &lt;/label&gt; &lt;br/&gt; &lt;br/&gt; &lt;label style="color: #01ACEE; font: bold 14px Tahoma;"&gt;Select&lt;/label&gt; &lt;select class="useLocal useLocalSelect" id="testSelect" name="start_date"&gt; &lt;option value=""&gt;Select one...&lt;/option&gt; &lt;option value="January"&gt;January&lt;/option&gt; &lt;option value="February"&gt;February&lt;/option&gt; &lt;option value="March"&gt;March&lt;/option&gt; &lt;option value="April"&gt;April&lt;/option&gt; &lt;option value="May"&gt;May&lt;/option&gt; &lt;option value="June"&gt;June&lt;/option&gt; &lt;option value="July"&gt;July&lt;/option&gt; &lt;option value="August"&gt;August&lt;/option&gt; &lt;option value="September"&gt;September&lt;/option&gt; &lt;option value="October"&gt;October&lt;/option&gt; &lt;option value="November"&gt;Noember&lt;/option&gt; &lt;option value="December"&gt;December&lt;/option&gt; &lt;/select&gt; &lt;br/&gt; &lt;br/&gt; &lt;input type="bu…

http://stackoverflow.com/q/29209511
has body: Hi I am developing an app in phonegap, where I am getting a particular value from server by connecting php file the value I need to pass is a string value 'pmnno'suppose whose value is '2' I need to get the value of '2' in column name 'personalnumber'.. So I am giving my code below var jsonData; $.ajax({ type: 'GET', url: 'http://xxxx.com/app/get_pday1_number.php', data: { pmnno: '2' }, dataType: 'html', success: function (response) { jsonData = response; alert(jsonData); } }); php code &lt;?php // array for JSON response $response = array(); // include db connect class require_once __DIR__ . '/db_connect.php'; // connecting to db $db = new DB_CONNECT(); // check for post data if (isset($_GET["pone"])) { $pone = $_GET['pone']; // get a product from products table $result = mysql_query("SELECT *FROM pdaynew WHERE pone = $pone"); if (!empty($result)) { // check for empty result if (mysql_num_rows($result) &gt; 0) { $result = mysql_fetch_array($result); $product = array(); $product["pid"] = $result["pid"]; $product["pone"] = $result["pone"]; $product["personaldayone"] = $result["personaldayone"]; $product["created_at"] = $result["created_at"]; $product["updated_at"] = $result["updated_at"]; // success $response["success"] = 1; // user node $response["product"] = array(); array_push($response["product"], $product); // echoing JSON response echo json_encode($response); } else { // no product found $response["success"] = 0; $response["message"] = "No product found"; // echo no users JSON echo json_encode($response); } } else { // no product found $response["success"] = 0; $response["message"] = "No product found"; // echo no users JSON echo json_encode($response); } } else { // required field is missing $response["success"] = 0; $response["message"] = "Required field(s) is missing"; // echoing JSON response echo json_encode($response); } ?&gt; I am getting a success mesage that means connection is succesful but ineed the value of '2' in column 'personalnumber' for that wh…
type: Question
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/46629128
answer count: 1
has comment: http://stackoverflow.com/comment/46629184
has comment: http://stackoverflow.com/comment/46629303
score: 0
has comment: http://stackoverflow.com/comment/46628962
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46629399
has comment: http://stackoverflow.com/comment/46629484
has comment: http://stackoverflow.com/comment/46629210
has answer: http://stackoverflow.com/a/29209798
has comment: http://stackoverflow.com/comment/46629048
tagged with: javascript
has comment: http://stackoverflow.com/comment/46629187
has comment: http://stackoverflow.com/comment/46628985
tagged with: ajax
has comment: http://stackoverflow.com/comment/46629269
has comment: http://stackoverflow.com/comment/46628899
has comment: http://stackoverflow.com/comment/46629312
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29209798
favorite count: 0
has title: Ajax Javascript Get JSON value
has comment: http://stackoverflow.com/comment/46629352
tagged with: cordova

http://stackoverflow.com/comment/46591350
type: AnswerComment
comment on: http://stackoverflow.com/a/29188122
type: Comment
has text: Assuming jQuery is loaded before qr.js, you should be able to change that line to this: $('#qr-value').val(a).change();
score: 0

http://stackoverflow.com/q/29137794
score: 3
answer count: 1
tagged with: asp.net
favorite count: 0
has title: Dropzone error messages in ASP.NET MVC
tagged with: asp.net-mvc-4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29154693
has body: Using ASP.NET MVC, I return an error, when the submitted app/form is missing something, I get a nice red "X" on the dropzone file, but the error message is "[object Object]": My Controller: if (some error) { Response.ClearHeaders(); Response.ClearContent(); Response.StatusCode = 500; Response.StatusDescription = "Internal Error"; return Json(new { Message = "Missing Something", JsonRequestBehavior.AllowGet }); } My Javascript: &lt;script&gt; //File Upload response from the server Dropzone.options.dropzoneForm = { maxFilesize: 20, init: function() { this.on("complete", function(data) { // ??????? var res = data.xhr.responseText ; }); } }; &lt;/script&gt;
upvote count: 3
type: Question
tagged with: asp.net-mvc
downvote count: 0
tagged with: javascript
tagged with: dropzone.js
has answer: http://stackoverflow.com/a/29154693

http://stackoverflow.com/comment/70980301
comment on: http://stackoverflow.com/a/36597253
type: AnswerComment
score: 0
type: Comment
has text: How do you use this?

http://stackoverflow.com/q/29087977
favorite count: 0
type: UnansweredQuestion
has body: Say I have a form with multiple submit buttons like so: &lt;form method="post" action="..."&gt; &lt;input type="submit" value="search" name="a" /&gt; &lt;input type="submit" value="search" name="b" /&gt; &lt;input type="submit" value="search" name="c" /&gt; &lt;/form&gt; I know I can listen to "click" and retrieve the respective element, but I would like to know if this was also possible when listening to submit like so: var form = document.getElementsByTagName("form")[0]; function foo(evt) { evt.preventDefault(); console.log(evt); } form.addEventListener("submit", foo, false); Question: Is it possible to retrieve the clicked submit button `name' when listening to the submit event? Thanks!
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29088174
score: 1
tagged with: forms
upvote count: 1
has comment: http://stackoverflow.com/comment/46409291
has comment: http://stackoverflow.com/comment/46408895
type: Question
tagged with: addeventlistener
tagged with: javascript
has title: Can I find out on the client which submit button was pressed when listening to the submit event?
answer count: 1
tagged with: submit
downvote count: 0

http://stackoverflow.com/q/29177977
tagged with: ruby-on-rails-4
answer count: 1
has body: I seem to be having some trouble finding some good information on how to go about dynamically presenting forms on the same view. What I mean is, for example, A user clicks an "Add Sub-element" link on the show view for an "Element", and then is presented with a small form for adding a Sub-Element, and of course the same type of thing for editing existing Sub-Elements, on the same Show View using AJAX/JS/jQuery or something. I was trying REST-in-place, but to no avail, as I have several nested objects (some within other nested objects), and that doesn't seem to work well with in-line-editing. I believe my lack of information is coming from using incorrect search terminology, so any help would be appreciated to point me in the right direction. Thanks in advance.
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29178146
tagged with: ruby-on-rails
linked to: http://stackoverflow.com/q/13941215
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29178146
has title: Rails 4: Dynamically rendering a form on the same page with AJAX

http://stackoverflow.com/q/29183861
possible better answer: http://stackoverflow.com/a/29184596
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
tagged with: jquery
has body: This is my output [{ "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-SEP-14|0.59" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-MAY-14|0.87" }, { "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-NOV-14|0.25" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-JUL-14|0.67" }, { "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-DEC-14|0.10" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-OCT-14|0.03" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-DEC-14|0.14" }] In this ABC has only data for 3 months SEP, NOV, DEC and XYZ has data for 4 months MAY, JUL, OCT, DEC. I am trying to fetch data from this output. But I am getting a problem while implementing it because of the months. In ABC there are only 3 months and the other 9 months are missing. Same in the case of XYZ there are 4 months and the other 8 months are missing. I am trying to replace these missing months with that month and the corresponding value to 0.0. For example in ABC OCT is missing between the months I am trying to replace with 01-OCT-14|0.0 similar with all the cases. For this I have written the below code but its not working. Please correct the code. var data = new Array(); data = ' [{ "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-SEP-14|0.59" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-MAY-14|0.87" }, { "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-NOV-14|0.25" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-JUL-14|0.67" }, { "MFG_NAME": "ABC", "CONCATED_MKT_SHARE": "01-DEC-14|0.10" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-OCT-14|0.03" }, { "MFG_NAME": "XYZ", "CONCATED_MKT_SHARE": "01-DEC-14|0.14" }]'; var currentTime = new Date();//Sat Mar 21 2015 17:19:15 GMT+0530 var monthNames = ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]; var ctdate = (new Date()).getMonth() + 1; //Here I get the current month eg:MAR var dynmonths = new Array(); dynmonths = monthNames.slice(ctdate).concat(monthNames.slice(0, ctdate));//Here I get previous 12 months for comparision //["APR…
score: 0
has title: Replacing a missing month using jquery
has answer: http://stackoverflow.com/a/29184660
has answer: http://stackoverflow.com/a/29184596
accepted answer: http://stackoverflow.com/a/29184660

http://stackoverflow.com/comment/46574265
comment on: http://stackoverflow.com/q/29178476
type: Comment
type: QuestionComment
score: 2
has text: Use a callback function. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter

http://stackoverflow.com/q/29160140
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/29160292
has comment: http://stackoverflow.com/comment/46540093
has comment: http://stackoverflow.com/comment/46540169
answer count: 2
has comment: http://stackoverflow.com/comment/46540387
downvote count: 1
has answer: http://stackoverflow.com/a/29160284
has title: Get Page Width Javascript - Return PHP variable
favorite count: 0
has comment: http://stackoverflow.com/comment/46540189
has body: I am trying to do something fairly simple but I am not a good javascript. What I am trying to do is the following: 1. Get the page width via Javascript 2. If Page width is less than 400px then set a php variable to 1 MY JAVASCRIPT IS VERY POOR //javascript var width = $(window).width(); //get the width of the screen if (width&lt;400) { $slidevar = 1; } Then down the page I can get that variable and use it to display my slideshows //PHP if ($slidevar == 1) { //Display Slideshow #1 PHP Function } else { //Display Slideshow #2 PHP Function } So this can't be done. Can you retrieve the page width in PHP one time on page load? I found this code but how what do I need to do to get my functions? &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script&gt; var width = $(window).width(); //This is ajax code which will send width to your php page in the screenWidth variable $.ajax({ url: "example.php", //this will be your php page data : {screenwidth:width} }).done(function() { $(this).addClass("done"); }); &lt;/script&gt; //example.php code is here : &lt;?php echo $width = $_REQUEST['screenwidth']; ?&gt;
has comment: http://stackoverflow.com/comment/46540198
tagged with: php
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/29160284
accepted answer: http://stackoverflow.com/a/29160292

http://stackoverflow.com/comment/46478645
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29126129
has text: I'm writing partly for mobile. I'm not going to do a no-store.

http://stackoverflow.com/a/29067176
answers question: http://stackoverflow.com/q/29067033
upvote count: 3
has body: Two examples: var string = " content content 2 "; // EXAMPLE 1 var parser = new DOMParser().parseFromString(string, "text/html"); var paragraphs = parser.getElementsByTagName('p'); for(var i=0; i<paragraphs.length; i++){ console.log( paragraphs[i].innerHTML ); // or use `outerHTML` } // "content" // "content 2" // EXAMPLE 2 var el = document.createElement("div"); el.insertAdjacentHTML('beforeend', string); var paragraphs = el.getElementsByTagName('p'); for(var i=0; i<paragraphs.length; i++){ console.log( paragraphs[i].innerHTML ); // or use `outerHTML` } // "content" // "content 2" if you want instead to really get // " content " // " content 2 " simply replace in both examples innerHTML with outerHTML if you want to manipulate the current HTMLParagraphElement than simply use the paragraph[i]
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29067033
type: Answer

http://stackoverflow.com/a/29141484
upvote count: 1
answers question: http://stackoverflow.com/q/29141274
type: Answer
downvote count: 0
score: 1
has body: You could use audio.js, a cross-browser javascript wrapper for the html5 audio tag.

http://stackoverflow.com/comment/46513641
comment on: http://stackoverflow.com/q/29144059
has text: Does `A` output any data on it's startup?
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46489116
comment on: http://stackoverflow.com/a/29131602
type: AnswerComment
score: 0
type: Comment
has text: When I try to use the location method the url is changed to this http://www.google.com?radio=Yes&radio=Yes&radio=Yes

http://stackoverflow.com/comment/46382133
score: 0
type: Comment
type: QuestionComment
has text: @RoryMcCrossan So how can I disable the validation for element?
comment on: http://stackoverflow.com/q/29074077

http://stackoverflow.com/a/29125213
has comment: http://stackoverflow.com/comment/46476595
type: Answer
accepted answer of: http://stackoverflow.com/q/29125015
downvote count: 0
answers question: http://stackoverflow.com/q/29125015
score: 1
upvote count: 1
type: AcceptedAnswer
has body: use $(this).attr('class') $(function(){ $("div[class^='col-lg-']").each(function(){ var fullclassname= $.grep(this.className.split(" "), function(v, i){ return v.indexOf('col-lg-') === 0; }).join(); alert(fullclassname); }); }); WORKING DEMO or you could also use $(this).prop("class")

http://stackoverflow.com/q/29209204
linked to: http://stackoverflow.com/q/4402036
possible better answer: http://stackoverflow.com/a/29209364
has answer: http://stackoverflow.com/a/29210791
downvote count: 1
has title: What is the correct way to post array of objects using query to an asp.net-mvc controller action?
favorite count: 0
accepted answer: http://stackoverflow.com/a/29209344
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46628514
has answer: http://stackoverflow.com/a/29209344
type: Question
score: 5
tagged with: asp.net-mvc
upvote count: 6
has answer: http://stackoverflow.com/a/29209364
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I have an array of data: var myArray = [{"id": 1, "name", "John"},{"id": 2, "name", "Joe"},{"id": 3, "name", "Bill"}] $.post("/MyController/Update", myArray, function (data) { alert("Complete"); }); and here is my asp.net-mvc controller action public ActionResult Update(List&lt;Person&gt; people) { return Json(new {Success = true}); } public class Person { public int id {get;set;} public string name {get;set;} } I also tried: var paramString = JSON.stringify({ people: myArray}); $.post("/MyController/Update", paramString , function (data) { alert("Complete"); }); but when i look at the people parameter on the server, I either see: null array of 3 items but the values of Id are always 0 and the value of Name is always an empty string any suggestions on what I am doing wrong here?
tagged with: http-post
answer count: 3

http://stackoverflow.com/q/29096705
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46433498
tagged with: .htaccess
has comment: http://stackoverflow.com/comment/46424105
has comment: http://stackoverflow.com/comment/46424447
type: Question
score: 0
has body: I want to make some advanced hotlinking protection for images on my site. And I want the thieves suffer so I would like that any user that goes to thieves site that is trying to hotlink my image to be redirected to my site. Let's say I have an image on imagedomain.com named harmless.png Thief takes my image and on stealerdomain.net he simply puts &lt;img src='http://imagedomain.com/harmless.png'&gt; and he steals my image. I know how to prevent this from happening, I already have htaccess code that prevents hotlinking of images: RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://imagedomain.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ http://imagedomain.com [NC,R,L] This nice code prevents thieves from displaying my images on their site. Its'good but what I really want is that when some thief puts &lt;img&gt; with src that is pointing to my image then everyone who displays that &lt;img&gt; tag via his browser would be redirected to my site (as a punishement cuz its me who should get a traffic for that image content not the stealer). Does anyone knows how to do this?
tagged with: image
has title: Advanced image hotlinking protection

http://stackoverflow.com/comment/46582660
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29183037
has text: possible duplicate of [How to deal with page breaks when printing a large HTML table](http://stackoverflow.com/questions/1763639/how-to-deal-with-page-breaks-when-printing-a-large-html-table)
score: 0

http://stackoverflow.com/comment/46477716
has text: I like what you've done, but for whatever reason, I can only drag and drop once. The 2nd time, it just won't start the drag.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29120659

http://stackoverflow.com/comment/46369158
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29065694
has text: If a function output is a string; Could it then be stored as a variable and tested with .match?

http://stackoverflow.com/q/29105153
has answer: http://stackoverflow.com/a/29456455
tagged with: javascript
has body: I need to get html after all javascripts run.I use WebKit.NET for it and the problem is that WebKitBrowser.StringByEvaluatingJavaScriptFromString doesn't return anything even with simple alert().And when I pass "document.getElementsByTagName('html')[0].outerHTML" (it is actually what I need to get) as the argument it throws the System.AccessViolationException(Attempted to read or write protected memory). And of course I do call StringByEvaluatingJavaScriptFromString in the function that is stick to the DocumentCompleted delegate.I've tried to do the same with WebView in objective-c with the same function StringByEvaluatingJavaScriptFromString and with the same argument "document.getElementsByTagName('html')[0].outerHTML" and it works good as well as it works good with "document.getElementsByTagName('html')[0].outerHTML" in console of the browser. Please help or maybe give alternatives how can I get whole html after runnig all javascripts. public Form1() { InitializeComponent(); webKitBrowser1.Navigate("http://famous-design.ru/stoly/"); webKitBrowser1.DocumentCompleted += webKitBrowser1_DocumentCompleted; } void webKitBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { string str = webKitBrowser1.StringByEvaluatingJavaScriptFromString("document.getElementsByTagName('html')[0].outerHTML"); }
score: 4
upvote count: 4
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/32105852
has title: WebKitBrowser.StringByEvaluatingJavaScriptFromString returns no value
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has comment: http://stackoverflow.com/comment/125111423
tagged with: c#

http://stackoverflow.com/a/29154994
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29153007
accepted answer of: http://stackoverflow.com/q/29153007
score: 0
has body: It turned out that the issue was due to my build script mangling my code (including jquery). I dont know why it dont work after. but setting optimize: "none",in the require build grunt file, made everything work.

http://stackoverflow.com/a/29164471
has comment: http://stackoverflow.com/comment/92562056
type: Answer
accepted answer of: http://stackoverflow.com/q/29164278
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/119718422
has body: The use cases for AJAX and Window.postMessage() are different. With AJAX you send a message from the browser to the server. It is picked op and processed by a script running on the server (written for PHP, Node.js, Ruby, Python, Java, etc.), which sends a response back to the browser. Window.postMessage() will send a message from one browser window to another, for instance from an iframe to it's parent window. The data is never send to the server.
answers question: http://stackoverflow.com/q/29164278
has comment: http://stackoverflow.com/comment/121288418
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46496498
comment on: http://stackoverflow.com/a/29135284
type: Comment
has text: Yes I'm asking for the HTML element content language, although UI language could be used as a fallback perhaps.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29201195
accepted answer: http://stackoverflow.com/a/29290516
downvote count: 3
tagged with: wordpress
has comment: http://stackoverflow.com/comment/46615434
has comment: http://stackoverflow.com/comment/46624553
has comment: http://stackoverflow.com/comment/46614581
has body: Quick summary: I have a function in a .js file that's loaded thanks to wp_enqueue_scripts. Now when I try to call that function from the HTML in one of my template files, it doesn't seem to work... I've researched this and I think I'm doing it all right, but obviously I must have missed something and can't quite put my finger on what it is. . So, in functions.php, I have the following code: function script_assets() { wp_enqueue_script( 'js-code', get_template_directory_uri() . '/js/js-code.js' ); } add_action( 'wp_enqueue_scripts', 'script_assets' ); This works as intended, and results in this being added to the head: . Then, in header.php, after wp_head(); I have the following bit of code: <?php if ( !is_front_page() ) : ?> <?php endif; ?> The PHP bit works correctly, the script tags and everything in between go into the HTML whenever I'm not on the front page as intended. It goes after js-code.js is loaded via the line I pasted above. Both deploy() and switchMobile() are functions in js-code.js and I know they work, as I use them with no issue in a different context. However Chrome throws Uncaught ReferenceError: deploy is not defined Uncaught ReferenceError: switchMobile is not defined and the functions are not executed... I know the question of 'how to call JS functions from HTML' has been asked countless times, but like I said I've been reading many pages and they all seem to say the same thing, which I've followed to the letter, and it still doesn't work... Any ideas? Thanks. New developments: So, it turns out that, for some weird reason, if I only call the functions without using setTimeout(), the second one* — switchMobile() — works properly... but not the first one. If I reverse them so that deploy() is after switchMobile(), then this time deploy() works. I am utterly confused :s *for the sake of clarity my initial example only had one function, when in practice I am calling two. I've edited the question to reflect that. UPDATE Tried enclosing the function …
type: Question
has answer: http://stackoverflow.com/a/29290516
has comment: http://stackoverflow.com/comment/46614485
upvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: Can't call functions from a JS file in HTML in Wordpress
score: -3
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/29107655
downvote count: 1
has answer: http://stackoverflow.com/a/29107829
type: AnsweredQuestion
upvote count: 5
has answer: http://stackoverflow.com/a/29107900
score: 4
type: Question
accepted answer: http://stackoverflow.com/a/29107790
tagged with: arrays
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29107825
tagged with: http://stackoverflow.com/tag/html
answer count: 4
tagged with: htmlcollection
possible better answer: http://stackoverflow.com/a/29107825
has body: I am attempting to grab the selected values of a multi-select dropdown and convert them into a single string for later manipulation. At the moment I have the following code: function newComic() { var elem = document.querySelector("#genreList").selectedOptions; var arr = [].slice.call(elem); var genres = arr.join(', '); window.alert(genres); } Action Comedy Fantasy Horror Mystery Non-Fiction Period Romance Sci-Fi Thriller The alert window is currently outputting the following: [object HTMLOptionElement, object HTMLOptionElement, ...] where '...' represents any further hypothetical options. What I need is for 'genres' to output as, for example, 'Action, Romance, Thriller' instead. Thanks in advance for any help.
has answer: http://stackoverflow.com/a/29107790
has title: Getting values from an HTMLCollection to a string

http://stackoverflow.com/comment/46569191
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29174883
has text: https://bitbucket.org/webrtc/codelab/src/c75c8e837a125441d2ee008c55348ac5a24a85d4/complete/step7/

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/29106368
tags question: http://stackoverflow.com/q/29166937
tag name: google-oauth
tags question: http://stackoverflow.com/q/29130729

http://stackoverflow.com/q/29118558
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29118805
accepted answer: http://stackoverflow.com/a/29118805
favorite count: 0
has comment: http://stackoverflow.com/comment/46464361
has comment: http://stackoverflow.com/comment/46464456
tagged with: regex
type: AnsweredQuestion
downvote count: 0
has body: Here is my code: new RegExp((", eric\\b")||("eric\\b"), "g"); but there is something wrong in that code that it only reads the first condition. It only outputs like this: /, eric\b/g I want it to output an OR condtion
type: Question
has comment: http://stackoverflow.com/comment/46464546
score: 1
has comment: http://stackoverflow.com/comment/46464594
has title: How can I make an OR condition in RegExp?
upvote count: 1

http://stackoverflow.com/q/29087541
has answer: http://stackoverflow.com/a/29087980
type: Question
tagged with: jquery-ui
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46407992
accepted answer: http://stackoverflow.com/a/29087980
favorite count: 0
upvote count: 1
tagged with: css
has title: JQuery UI: Multiple sliders with different css for handles
type: AnsweredQuestion
has body: I have twelve sliders on a single page and I wish to address the handles individually to use all different colors. I'm using .each to build the sliders. //jquery sliders $(function() { $("#eq &gt; span").each(function() { $( this ).empty().slider({ orientation: "horizontal", animate: true, value: 10, min: 0, max: 10, step: 1, slide: function( event, ui ) { var val = $(this).attr('id'); weights[val] = ui.value; updateSvg(); if (typeof areaSelected !== 'undefined') {showPiechart(areaSelected); } } }); }); }); In the HTML it looks like this. Each span has an ID: &lt;div id="eq"&gt; &lt;span id="sl11"&gt;&lt;/span&gt; &lt;/div&gt; However, I don't think I can use this ID to change the colors of the slider itself. I have found solutions ( http://jqueryui.com/demos/slider/#colorpicker) where each slider is build individually and then the colors are adjusted, but not when the sliders are build with .each. Thanks in advance!
score: 1

http://stackoverflow.com/comment/46464940
score: 0
type: Comment
has text: you are also correct, this also worked for me, seems this is easy.
comment on: http://stackoverflow.com/a/29118384
type: AnswerComment

http://stackoverflow.com/q/29143155
score: 0
has body: Javascript is a client-side language, so scripts can be read and copied. Now consider this example. title User: insertUser.php : <?php $user = filter_input(INPUT_POST, 'user'); if (isset($user)) { require_once("class.Database.php"); $db = Database::getInstance(); $mysqli = $db->getConnection(); $stmt = $mysqli->prepare("INSERT INTO Users (User) VALUES (?)"); $stmt->bind_param("s", $user); $stmt->execute(); } Could someone write a script in his localhost for inserting his own data using the path to insertUser.php? Anyway to solve this?
answer count: 3
has answer: http://stackoverflow.com/a/29143681
possible better answer: http://stackoverflow.com/a/29143374
has answer: http://stackoverflow.com/a/29143374
accepted answer: http://stackoverflow.com/a/29143744
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46509501
has title: remote javascript-ajax-php attack
type: Question
linked to: http://stackoverflow.com/q/60174
has comment: http://stackoverflow.com/comment/46509434
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29143744
tagged with: ajax

http://stackoverflow.com/comment/46540270
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29160187
has text: Arun: Could you differentiate between `data('task-category')` and `data('taskCategory')`. Guess it works for both but what's the core difference ? Can I use the former or should I use the latter ?
type: Comment

http://stackoverflow.com/comment/46375150
type: AnswerComment
has text: The time difference between your question and answer is nonexistent. If you're wanting your question to be a guide, 1) there are methods for that, and 2) just wait until you've actually finished the answer.
type: Comment
comment on: http://stackoverflow.com/a/29070031
score: 0

http://stackoverflow.com/a/29112612
downvote count: 0
has body: Make it simple. Rely on the "Monthly payment" text and get the preceding-sibling: //span[contains(., "Monthly Payment")]/preceding-sibling::h3 Since there are two elements with "Monthly Payment" text, you can use element.all() to get both and use first() and last() to get the desired one: var monthlyPayments = element.all(by.xpath('//span[contains(., "Monthly Payment")]/preceding-sibling::h3')) monthlyPayments.first().getText(); monthlyPayments.last().getText();
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29111830

http://stackoverflow.com/comment/46518186
has text: @JNYRanger: please stop to repeat the false argument about `regular languages` that is only pertinent in a computer science context. Tools currently called regex are different than regular expression in computer science and are able to parse things that are not regular at all.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29147658
score: 0

http://stackoverflow.com/comment/46395212
has text: I cannot reproduce this! For me, `getAll()` returns unpacked extensions just fine. You should add your code where you try to enumerate extensions.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29077544

http://stackoverflow.com/q/29140243
has comment: http://stackoverflow.com/comment/46504318
possible better answer: http://stackoverflow.com/a/29140712
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/46504405
type: AnsweredQuestion
has title: Ajax response is not executed in Rails 4
has body: I am using ajax in my Rails app. In my application js i have $('#request_name').on('focusout', function () { var clientName = $(this).val(); $.ajax({ url: "/requests/autofill/"+clientName, type: "GET", contentType: 'text/javascript' }); So i am sending ajax request to requests controller action autofill. Autofill method: def autofill @client = Client.where("name=?",params[:name]).take respond_to do |format| format.js format.html end end And in my autofill.js.erb file I have: alert("hello"); $('#request_mobile").val('hi there'); (alert is just for testing) What I want to do is to update #request_mobile id field with some values in my autofill.js.erb file. The problem is that my autofill.js.erb code in not being executed. And here is the response shown in firebag: alert("hello"); $('#request_mobile").val('hi there'); But nothing happens, even alert is not launching. I don't know what i am doing wrong?
type: Question
has answer: http://stackoverflow.com/a/29140712
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/29140890
accepted answer: http://stackoverflow.com/a/29140890
score: 0

http://stackoverflow.com/a/29187092
has comment: http://stackoverflow.com/comment/46589514
has body: Your camera's far plane is at 3000 which means everything that is 3000 units away will be clipped and not drawn. At the same time you have placed your camera at (0,0,3000) so you are right on the position where things will start to disappear.
type: AcceptedAnswer
downvote count: 0
score: 8
upvote count: 8
type: Answer
accepted answer of: http://stackoverflow.com/q/29185783
answers question: http://stackoverflow.com/q/29185783

http://stackoverflow.com/comment/46409395
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29088223
has text: How would you call an object function? ``ng-click="myObject.method(params)``? It currently does nothing?

http://stackoverflow.com/a/37616646
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29171802
has body: I was actually having the same problem, but after looking into the source code for ui-grid (in the ui-grid.js file), I found that the version check of IE wasn't working correctly downloadFile: function (fileName, csvContent, exporterOlderExcelCompatibility) { var D = document; var a = D.createElement('a'); var strMimeType = 'application/octet-stream;charset=utf-8'; var rawFile; var ieVersion; //Check if IE9 or below ieVersion = this.isIE(); if (ieVersion &amp;&amp; ieVersion &lt; 10) { var frame = D.createElement('iframe'); document.body.appendChild(frame); frame.contentWindow.document.open("text/html", "replace"); frame.contentWindow.document.write('sep=,\r\n' + csvContent); frame.contentWindow.document.close(); frame.contentWindow.focus(); frame.contentWindow.document.execCommand('SaveAs', true, fileName); document.body.removeChild(frame); return true; } // IE10+ if (navigator.msSaveBlob) { return navigator.msSaveOrOpenBlob( new Blob( [exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent], { type: strMimeType } ), fileName ); } So the ieVersion was returning true (which apparently in JS is less than 10...) Since I was looking for it to work in 11, I was able to comment this out and it worked fine! But if you need it to work below 9, you can switch the order of these two functions. The code is correct on the ui-grid.info site as of 6/3/2016

http://stackoverflow.com/comment/46581753
comment on: http://stackoverflow.com/a/29182807
score: 0
type: Comment
has text: this creates new div not in DOM, unless I append it as child to any element in DOM it won't be live in page. also it takes care of the fact that HTMLCodes might be coming from some service
type: AnswerComment

http://stackoverflow.com/a/29160787
answers question: http://stackoverflow.com/q/29160705
has comment: http://stackoverflow.com/comment/46541394
has comment: http://stackoverflow.com/comment/46541484
has comment: http://stackoverflow.com/comment/46541171
score: 0
upvote count: 1
downvote count: 1
has body: If you need to get 12 you can just use what you mentioned with a capturing group \[\[(\d+)\]\] var myRegexp= /\[\[(\d+)\]\]/; var myString='[[12]],23,asd'; var match = myRegexp.exec(myString); console.log(match[1]); // will have 12
type: Answer

http://stackoverflow.com/comment/111289841
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29182787
type: AnswerComment
has text: Instead of using eval better is use to regex Eval it's not recommended & highly discouraged, so please don't use it https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Never_use_eval! let b = 10; let a="b:${b}"; let response = a.replace(/\${\w+}/ ,b); conssole.log(response);

http://stackoverflow.com/comment/46425808
type: Comment
comment on: http://stackoverflow.com/a/29097620
has text: This is not valid answer since no "controller as" is not using by OP
type: AnswerComment
score: 0

http://stackoverflow.com/q/29195866
favorite count: 0
has comment: http://stackoverflow.com/comment/46604940
tagged with: http://stackoverflow.com/tag/html
has title: How to clear an iframe of all content?
has answer: http://stackoverflow.com/a/29195910
tagged with: iframe
accepted answer: http://stackoverflow.com/a/29195910
upvote count: 1
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11658011
score: 1
has comment: http://stackoverflow.com/comment/46627060
has comment: http://stackoverflow.com/comment/46604572
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm using an iframe and dynmically loading its content from an API. I'm trying to find a way to clear the iframe of all of it's content without changeing the src attribute. E.G. Lots of HTML rendered Needs to become: Very important that I keep all of the iframe attributes. Is there a way to do this with javascript or jquery?

http://stackoverflow.com/q/29191171
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/29191194
upvote count: 3
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29191211
favorite count: 0
duplicate of: http://stackoverflow.com/q/13272406
has title: Convert string containing arrays to actual arrays
type: AnsweredQuestion
has body: I have no idea why I'm having so much trouble with this. This seems like it should be really simple. I have a JavaScript string like the following: var str = '[[1, 2, 3], [4, 5, 6], [7, 8, 9]]'; I actually want to convert this into an array of arrays. str.split(',') doesn't work because it'll split on the commas in the inner arrays. I'm sure this conversion is probably something stupidly simple, but I must be missing it. Any help would be appreciated.
possible better answer: http://stackoverflow.com/a/29191211
accepted answer: http://stackoverflow.com/a/29191194
type: Question
linked to: http://stackoverflow.com/q/13272406

http://stackoverflow.com/comment/46427693
type: AnswerComment
has text: Great! My use case is that if you want to create a geometry object , it is made by one or more vertex. Is it good my solution?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29098617

http://stackoverflow.com/comment/46570377
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29174762
has text: @DasBeasto I didn't click that box, i'm using alert here just for the example and the Fiddle. I normally use console.log to debug. Btw, thank you all for your answers. I found a temporary workaround: the 'wheel' event. Hope it will do the trick !
score: 0

http://stackoverflow.com/a/29154932
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29130585
answers question: http://stackoverflow.com/q/29130585
type: Answer
has body: No Quill does not support arbitrary HTML. Anything it does not recognize will be converted (strong tag to b tag) when possible or removed when not possible.
upvote count: 1

http://stackoverflow.com/comment/46520725
type: AnswerComment
comment on: http://stackoverflow.com/a/29147131
score: 0
has text: Or maybe better yea, use the `open` event and size then get the size.
type: Comment

http://stackoverflow.com/comment/46388031
has text: @FabrizioMorello: *"balexandre what is the difference?"* It could make a big difference, but your edit suggests that it doesn't in your particular case. Basically, doing XHR on `file://` URLs doesn't work in some browsers.
comment on: http://stackoverflow.com/q/29076864
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29091434
has comment: http://stackoverflow.com/comment/46415028
has comment: http://stackoverflow.com/comment/46415117
has answer: http://stackoverflow.com/a/29091587
score: 0
has title: disable input box on check box jquery NO onchange
has comment: http://stackoverflow.com/comment/46415154
has body: In my project i have a check box that is the basis if the input box is disable. When using the click event i achieve it correctly but when i get it in database it does not behave correctly but i get the value i am expecting. For example the value is 0 it will display disable false and the disable is false (default) when value is 1 it will display disable true but the input is not disabled here is the code any suggestion is appreciated On click event $('#flag').click(function() { console.log("sumenu change on click"); if ($(this).is(":checked")) { $('#url').prop('disabled', true); console.log("check disble true"); } else { $('#url').prop('disabled', false); console.log("nocheck disble false"); } }); Code from ajax success that is getting value and should turn off / turn on input on data load if (data[i].flag == "0") { console.log("value is 0 no check disble false"); $('#flag').prop('checked', false); $('#url').prop('disable', false); } else { console.log("value is 1 check disble true"); $('#flag').prop('checked', true); $('#url').prop('disable', true); }
type: Question
has comment: http://stackoverflow.com/comment/46415066
accepted answer: http://stackoverflow.com/a/29091587
has comment: http://stackoverflow.com/comment/46415146
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46415007
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46415060

http://stackoverflow.com/comment/46546161
score: 0
type: AnswerComment
has text: You should have realized it was a very sill question and treated it as such. Asking "What is the URL I connected by" when something in your configuration "must" have specified that in order for the connection to be made is a clear response. So why "introspect" something that should already be available from another source? Some questions just do not deserve answers.
type: Comment
comment on: http://stackoverflow.com/a/29163289

http://stackoverflow.com/comment/46574742
type: Comment
type: QuestionComment
score: 0
has text: are you importing `webix.css`?
comment on: http://stackoverflow.com/q/29178819

http://stackoverflow.com/a/29195440
answers question: http://stackoverflow.com/q/29194704
has body: Here is a simple solution with some good practices like using ID, grouping variables, caching the jQuery Object .. We'll use a counter to get the next and previous and a small function to get the image by index et voilà: var i = 0, // Counter $images = $('#thumbs').find('img'), // Cache the jQuery object total = $images.length, getCurrentItem = function () { var currentItem = Math.abs(i % total), // Get item index $currentItem = $images.eq(currentItem), // Current item object currentItemSrc = $currentItem.attr('src').replace('thumb', 'large'); alert(currentItemSrc); }; $('.next').on('click', function () { i++; getCurrentItem(); }); $('.prev').on('click', function () { i--; if (i &lt; 0) { i = total - 1; // If negative go back to the last image } getCurrentItem(); });
score: 0
type: Answer

http://stackoverflow.com/comment/46527131
type: AnswerComment
has text: Used another option :) http://code.tutsplus.com/tutorials/animating-game-menus-and-screen-transitions-in-html5-a-guide-for-flash-developers--active-11183
type: Comment
comment on: http://stackoverflow.com/a/29151939
score: 0

http://stackoverflow.com/q/29119833
answer count: 3
has body: I am building a fixed header with using JQuery Everything is working fine at the moment but instead of setting attributes to classes and I want to call them from css directly. I am not quite familiar with this method. One of the example is below; #header-main { background-color: #ffffff; min-height: 107px; color: #8c8c8c; } #header-main .sabit{ position : fixed; width: 100%; z-index: 98; padding-top: 35px; border-bottom: 3px ridge #7BBD42; } How I am doing is; (Working) var menu = $('#header-main'); if (...) menu.css('position','fixed').css('width','100%').css('z-index','98').css('padding-top','35px').css('border-bottom','3px ridge #7BBD42'); else menu.removeAttr('style'); //Back to normal What I am doing to achieve what I want; (Not working) var menu = $('#header-main'); if(...) menu.addClass("sabit"); else menu.removeClass("sabit"); //Back to normal I also tried menu.addClass(".sabit"); or menu.addClass("#header-main .sabit"); but none of them worked. What part am I doing wrong to add directly css class using JQuery?
downvote count: 0
has answer: http://stackoverflow.com/a/29119907
tagged with: jquery
favorite count: 0
has title: Call CSS Class instead of inserting Attribute using JQuery (.css())
possible better answer: http://stackoverflow.com/a/29119904
has answer: http://stackoverflow.com/a/29119904
tagged with: css
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29119898
upvote count: 2
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29119898

http://stackoverflow.com/q/29150516
has comment: http://stackoverflow.com/comment/46671017
has comment: http://stackoverflow.com/comment/46525786
has body: I'm using Bootstrap to bind data to a table then trying to catch a accordion show event. My plan would then be to get the div id to call an ajax call to get more information on the item so far I had no luck with this my table is built like this opened I'm trying to use $(document).ready(function() { ko.applyBindings(new PackagesViewModel()); $(document).ready(function() { $('div').on('show.bs.collapsing', function (e) { alert("Event fired on " + e.currentTarget.id); }); }); }); to catch the event. My view model is built from an ajax request when the page loads. Any help would be great.
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46523823
has comment: http://stackoverflow.com/comment/46533148
has comment: http://stackoverflow.com/comment/46670900
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46522861
has comment: http://stackoverflow.com/comment/46672963
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/46536098
has title: Cannot capture click event on Bootstrap accordian
type: Question
has comment: http://stackoverflow.com/comment/46525967
has answer: http://stackoverflow.com/a/29251484
tagged with: javascript

http://stackoverflow.com/q/29140934
has comment: http://stackoverflow.com/comment/46506692
type: Question
type: AnsweredQuestion
tagged with: background
possible better answer: http://stackoverflow.com/a/29141284
answer count: 2
has answer: http://stackoverflow.com/a/29141284
tagged with: button
has comment: http://stackoverflow.com/comment/46505914
tagged with: javascript
has body: I got a form with checkboxes. The Submit button first is hidden. When i check one checkbox at least the button will appear. That is working. But the button has some background image and that will also only appear when the button is visible. I want the background image to be always there. Is there a way to to this? HTML : &lt;div class="wrapper2"&gt;&lt;input type = button class="next_button" name="commit" value="Submit" onClick="resultFunction();" &gt; CSS : .wrapper2{ margin-top: 230px; text-align: center; background: -moz-linear-gradient(left, rgba(89,106,114,1) 0%, rgba(206,220,231,1) 58%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(89,106,114,1)), color-stop(58%,rgba(206,220,231,1))); } i forgot to add this here: $(".next_button").hide(); $("#question1, #question2, #question3, #question4").change(function () { if ($("#question1").is(':checked') || $("#question2").is(':checked') || $("#question3").is(':checked') || $("#question4").is(':checked') ) { $(".next_button").show(); } });
has title: Keep background when button is hidden? (CSS/Javascript)
has answer: http://stackoverflow.com/a/29141001
has comment: http://stackoverflow.com/comment/46505524
has comment: http://stackoverflow.com/comment/46506058
tagged with: css
score: 0
accepted answer: http://stackoverflow.com/a/29141001

http://stackoverflow.com/q/29153429
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29153483
has title: javascript function when value changes
has answer: http://stackoverflow.com/a/29153625
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29153625
has answer: http://stackoverflow.com/a/29153822
has body: i have a section of html (see below) where the value in constantly changes depending on whats being scanned by the webcam. value changes here I want a javascript function to fire when the value contains the following text -"Job". I have tried .onchange but i think im doing it wrong? document.getElementById('qr-value').onchange = function (e) { if ($('#qr-value').val() == 'Job') { alert('Changed!') } }; Can anyone see what im doing wrong?
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/29153483
has comment: http://stackoverflow.com/comment/46528332
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/29094699
answers question: http://stackoverflow.com/q/29094415
type: Answer
has body: function dothis(eventObj) { var x = document.getElementsByClassName("active"); for (var i = 0; i &lt; x.length; i++) { x[i].className = ""; } var Celm = eventObj.target; var name = "active"; Celm.className= name; }
score: 0

http://stackoverflow.com/comment/46443904
comment on: http://stackoverflow.com/q/29106141
has text: http://stackoverflow.com/questions/4551834/how-we-get-content-of-tiny-mce-textarea-in-javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29078990
score: 1
has comment: http://stackoverflow.com/comment/46392698
accepted answer of: http://stackoverflow.com/q/29078075
type: Answer
answers question: http://stackoverflow.com/q/29078075
has comment: http://stackoverflow.com/comment/46391691
has body: You can achieve this by using ng-click and ng-model to update a scope variable that is displayed in the DOM. Below is an example and a JSFiddle: HTML {{hi}} {{ entry }} JS var app = angular.module('myApp', []); // Your data object from before var myData = "..Some JSON data..."; app.controller('pandoraController', ['$scope', function($scope) { $scope.hi = "Select a Pandora Product:"; $scope.data = myData; $scope.update = function(val) { $scope.hi = val; } } ]); JSFiddle
has comment: http://stackoverflow.com/comment/46393019
upvote count: 1
has comment: http://stackoverflow.com/comment/46392078
has comment: http://stackoverflow.com/comment/46400878
has comment: http://stackoverflow.com/comment/46391651
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46435618
comment on: http://stackoverflow.com/a/29070796
has text: sorry, but this is the version i tried ...i don't really want an iframe so i did'nt add one. I just want to include jsp page in div 'dashboard-iframe' asynchronously. so that i can work with session objects. since session objects cannot be passed to the iframe page
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29073099
downvote count: 1
upvote count: 5
has comment: http://stackoverflow.com/comment/50382969
score: 4
has body: First, I do not think such a behavior as you described even need to have a unit test. BUT, If you really need to check if the methods are called with specific parameters (or even any parameters). There is a way you could do that, you could use a mocking framework like ShortifyPunit: https://github.com/danrevah/ShortifyPunit Follow this steps: Make sure the methods attached to an object you can mock Inject a mocked object to your class and stub the methods You could verify() the methods were called with specific parameters For example if your class is using the dependency injection, which is crucial for unit testing like the following class: class SomeClass { private $obj; public function __construct($obj) { $this-&gt;obj = $obj; } public function test() { $this-&gt;obj-&gt;method1("#input a") $this-&gt;obj-&gt;method2("test") $this-&gt;obj-&gt;method3(1,2) } } You could write a unit test as follows: public function testMethodCalled() { $mockedObj = ShortifyPunit::mock('object'); $class = new SomeClass($mockedObj); // Stub the methods so you could verify they were called ShortifyPunit::when($mockedObj)-&gt;method1(anything())-&gt;returns(1); ShortifyPunit::when($mockedObj)-&gt;method2(anything())-&gt;returns(2); ShortifyPunit::when($mockedObj)-&gt;method3(anything(), anything())-&gt;returns(3); $class-&gt;test(); // run test() method // Verify it was called $this-&gt;assertTrue(ShortifyPunit::verify($mockedObj)-&gt;method1(anything())-&gt;calledTimes(1)); $this-&gt;assertTrue(ShortifyPunit::verify($mockedObj)-&gt;method2(anything())-&gt;calledTimes(1)); $this-&gt;assertTrue(ShortifyPunit::verify($mockedObj)-&gt;method3(anything(), anything())-&gt;calledTimes(1)); }
answers question: http://stackoverflow.com/q/29072518
type: Answer

http://stackoverflow.com/q/29092309
tagged with: graph
has answer: http://stackoverflow.com/a/29092657
tagged with: javascript
has title: d3 parallel coordinates datetime axis
linked to: http://stackoverflow.com/q/49329600
score: 0
answer count: 1
tagged with: d3.js
type: UnansweredQuestion
tagged with: datetime
has comment: http://stackoverflow.com/comment/46424526
tagged with: parallel-coordinates
has body: I am trying to make a parallel coordinates graph and developing based on http://bl.ocks.org/jasondavies/1341281 example. What do I need to alter/modify/add in the code if I want to use DateTime format attribute as one of axis in the graph?
type: Question

http://stackoverflow.com/q/29100242
has body: I have used ng-click on div and it works as expected, but when I have used ng-blur on some other input, the ng-click on the div stops working. Working code [addItem(item) is being called on click] Choose from selected {{item}} Following are selected {{item}} Broken code [addItem(item) not being called] Choose from selected {{item}} Following are selected {{item}} Related JS code angular.module("myApp", []) .controller("TestController", ["$scope", function($scope) { $scope.allItems = ["A", "B", "C", "D", "E"]; $scope.selectedItems = []; $scope.addItem = function(item) { if ($scope.selectedItems.indexOf(item) == -1) $scope.selectedItems.push(item); } } ]); Here is plunkr http://plnkr.co/edit/eI5dvczO2E1Cp1SBPgQx?p=preview Click on input which will bring dropdown. Clicking on dropdown adds item to selected list in one case but not in other case. I have tried to debug. scope is set correctly and it was accessible.
type: Question
has answer: http://stackoverflow.com/a/29101039
accepted answer: http://stackoverflow.com/a/29101039
score: 10
has comment: http://stackoverflow.com/comment/46432185
tagged with: javascript
linked to: http://stackoverflow.com/q/10652852
upvote count: 10
answer count: 1
linked to: http://stackoverflow.com/q/25304260
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
tagged with: angularjs-ng-click
downvote count: 0
has title: Why doesn't ng-click work when ng-blur used?

http://stackoverflow.com/q/29186881
accepted answer: http://stackoverflow.com/a/29189366
answer count: 1
downvote count: 0
tagged with: asp.net-web-api
score: 1
favorite count: 0
tagged with: angularjs
has title: AngularJS $http.post doesn't work in Chrome, only IE
has comment: http://stackoverflow.com/comment/46593109
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/21783079
upvote count: 1
has answer: http://stackoverflow.com/a/29189366
type: Question
tagged with: javascript
tagged with: post
has body: I am trying to post a simple JSON object to my local asp.net web.api service. here is a peace of code. createTable: function (table) { var res = $http.post('http://localhost:50827/api/v0.1/xxxx/create-some-table', table); res.success(function (data, status, headers, config) { alert("Sent : " + JSON.stringify({ data: data })); }); res.error(function (data, status, headers, config) { alert("failure message: " + JSON.stringify({ data: data })); }); } Asp.Net Web Api has Cors enabled and this peace of code works well with internet explorer. But Google's Chrome leaves error: OPTIONS: http://localhost:50827/api/v0.1/xxxx/create-some-table 404 (Not Found) Same webapi controller has some other GET methods and it works well. Any idea? Appreciate any help. Pavlo

http://stackoverflow.com/q/29071576
has answer: http://stackoverflow.com/a/29072712
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46379975
upvote count: 3
possible better answer: http://stackoverflow.com/a/29071704
has comment: http://stackoverflow.com/comment/46377703
has body: I have a string to validate using javascript Regex. The string can have single occurrence of any different special character. I tried the following pattern. /^[A-Za-z0-9]*[-!$%^&amp;*()_+|~=`{}\[\]:";'&lt;&gt;?,.\/]?[A-Za-z0-9]*$/ But it is allowing any two different special characters . But as per my scenario it should allow every special characters single time (eg. Single occurrence of '&amp;' and '%' is acceptable but two occurrence of '&amp;' or any other is not allowed). Please help.
type: Question
has title: Javascript Regex to validate single occurrence of special characters
accepted answer: http://stackoverflow.com/a/29072712
tagged with: javascript
answer count: 2
score: 3
downvote count: 0
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/29071704

http://stackoverflow.com/comment/46482022
type: Comment
comment on: http://stackoverflow.com/q/29127878
score: 0
has text: I am sure you can't do filing on Client side, but some methods are here http://stackoverflow.com/questions/582268/read-write-to-file-using-jquery
type: QuestionComment

http://stackoverflow.com/a/35389947
type: Answer
upvote count: 1
downvote count: 1
score: 0
has body: This is very good question and I too struggled with it for a long time. In your case you have a function test which you want to test , but the function has dependencies — method1-3. There are basically two ways — Keep the code as is and simply test the test function. Pass dependencies as params — Example — function test(method1, method2, method3) { method1("#input a") method2("test") method3(1,2) } The second approach would give you the flexibility to mock the methods 1, 2 &amp; 3. It could also be a mix of case one and two, where some methods are directly used from the global scope and some are passed as params. The only problem now is to understand when to use what. Here are some tips — For case one The dependencies are simple synchronous functions. In JS, async functions generally do some IO related work or sometime very expensive computations, both of which should not come in the way of testing your test function. It takes input params and return an output. They do NOT mutate any state or dispatch any event, anywhere in the application. For all other cases, you would want to pass the dependencies as params. For example — in this case, it looks like method1 and method2 are doing some DOM operations, which means they should be injected and mocked where as method3 looks pretty simple and can be used from the global scope. function (d) { d.method1("#input a") d.method2("test") method3(1,2) } If the dependencies become too many, you can pass an object containing the all dependencies.
answers question: http://stackoverflow.com/q/29072518

http://stackoverflow.com/comment/46625635
type: Comment
score: 0
type: AnswerComment
has text: come on PHP and JavaScript are tow different things and work on different places you can not do the things of PHP by JavaScript( except you use node.js) .. JavaScript run on web browser and PHP runs of server like Apache or nginx (say wamp , lamp , mamp )
comment on: http://stackoverflow.com/a/29207421

http://stackoverflow.com/comment/46754810
has text: Can't/Don't want to use Javascript.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29264547
type: Comment

http://stackoverflow.com/comment/46493734
has text: jquery, fancybox javascript and fancybox css
type: AnswerComment
comment on: http://stackoverflow.com/a/29105598
type: Comment
score: 0

http://stackoverflow.com/q/29105259
tagged with: jslint
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: Here are some JSLint results: 1 finaffJS.module('custom_ribbon_buttons', ['jQuery'], function ($) { 2 var my = {}; 3 4 my.insertLightBoxCloseDialog = function () { 5 var url = $('#finaff-insert-lightbox-image-url').val(); 6 if (url) { 7 var buttonHtml = '&lt;a class="finaff-lightbox-link" href="' + encodeURI(url) + '"&gt;&lt;div class="FinAff_View_Image_Button_Sprites FinAff_View_Image_Button"&gt;&amp;#160;&lt;/div&gt;&lt;/a&gt;'; 8 SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, buttonHtml); 9 } else { 10 $('#finaff-insert-lightbox-image-url-flash').text('Need a URL'); 11 } 12 } 13 14 my.insertLightBoxClicked = function () { =^ lint warning: missing semicolon Where is the supposed missing semicolon? Or why is JSLint confused?
type: AnsweredQuestion
has title: Why does JSLint say there is a missing semicolon in this jQuery?
has answer: http://stackoverflow.com/a/29105322
has comment: http://stackoverflow.com/comment/46440828
type: Question
accepted answer: http://stackoverflow.com/a/29105322

bluebird
tags question: http://stackoverflow.com/q/29106953
tags question: http://stackoverflow.com/q/29121733
tags question: http://stackoverflow.com/q/29090566
tags question: http://stackoverflow.com/q/29118835
tags question: http://stackoverflow.com/q/29152657
tags question: http://stackoverflow.com/q/29196864
tags question: http://stackoverflow.com/q/29063252
tag name: bluebird
type: Tag

http://stackoverflow.com/comment/46566202
has text: In this case, I needn't use JSFiddle. querySelectorAll (according to answer below) solved this.
comment on: http://stackoverflow.com/q/29173915
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/100168558
has text: Nice tip, i'e used it and it's great!
type: AnswerComment
comment on: http://stackoverflow.com/a/45126813
score: 0
type: Comment

http://stackoverflow.com/a/29149704
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29149122
type: Answer
accepted answer of: http://stackoverflow.com/q/29149122
has body: Make backface visibility hidden, use two elements instead of one, position:absolute them on top of eachother, put them in a containing element - when the containing element is hovered, trigger your flip transition. Read this: http://davidwalsh.name/css-flip

http://stackoverflow.com/q/29161723
possible better answer: http://stackoverflow.com/a/29161737
duplicate of: http://stackoverflow.com/q/9644044
linked to: http://stackoverflow.com/q/20279484
has answer: http://stackoverflow.com/a/29161738
type: Question
has body: please refer to the following code, var XClass = function () { this.dataMember = "hello world"; $("div").on("click", "button", function() { console.log(this.dataMember); //error }); } How do I access this.dataMember in on function? I googled and new on js.
tagged with: javascript
has answer: http://stackoverflow.com/a/29161746
accepted answer: http://stackoverflow.com/a/29161738
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29161737
linked to: http://stackoverflow.com/q/9644044
has comment: http://stackoverflow.com/comment/46543518
has title: How do I call variable in function?
type: AnsweredQuestion

http://stackoverflow.com/q/29181872
has title: multichart line d3.js transform json
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: I have this diagram: http://bl.ocks.org/mbostock/3884955 And I want change the file .tsv by .json I change this method : d3.json("data2.json", function(error, data) { color.domain(d3.keys(data[0]).filter(function(key) { return key !== "date"; }); And I change date format too a format json this is my file example json: [ {"date": 20111001, "New York": 63.4 }, {"date": 20111002, "New York": 58.0 }, {"date": "20111003", "New York": 53.3 } ] But now, dont show the diagram. What is the problem?? I need change other method?
answer count: 1
accepted answer: http://stackoverflow.com/a/29184491
type: AnsweredQuestion
tagged with: d3.js
score: 0
type: Question
has answer: http://stackoverflow.com/a/29184491

http://stackoverflow.com/comment/46609755
score: 1
has text: @pankajparkar I do think that is because of the isolated scopes. Manipulating the same data type as option values, i.e. strings will be enough if you hardcode the options : [fiddle](http://jsfiddle.net/micaz/dofk699m/). But now with `ng-repeat`-ed options, you lose the binding : [second fiddle](http://jsfiddle.net/micaz/r60kconz/)
type: AnswerComment
comment on: http://stackoverflow.com/a/29195601
type: Comment

http://stackoverflow.com/comment/46552646
score: 1
has text: i multiple it but it give wrong result if(val=="sin") { var x=document.getElementById("d").value; x=x*(Math.PI/180); document.getElementById("d").value=Math.sin(x); }
comment on: http://stackoverflow.com/q/29166784
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29118825
has answer: http://stackoverflow.com/a/29118939
upvote count: 2
has body: Why does the nodeName of an attribute in the attributes property of an element become lowercase, and how to make it camelCase? I have the following code: this will display myattr, but in the markup, it's myAttr, why is it like that? and how to fix it?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/75722434
accepted answer: http://stackoverflow.com/a/29118939
type: Question
has answer: http://stackoverflow.com/a/42887484
has title: Attributes nodeName of elements become lowerCase automatically
downvote count: 0
has comment: http://stackoverflow.com/comment/72876470
tagged with: javascript
possible better answer: http://stackoverflow.com/a/42887484
has comment: http://stackoverflow.com/comment/46464845
answer count: 3
score: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/46566779
has text: Thanks for the help, can you please write me the part of the code independent from my function? I mean the part that checks if the value has changed
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29174385
type: Comment

http://stackoverflow.com/q/29193314
type: Question
score: 5
has title: Anonymous functions syntax in jQuery
accepted answer: http://stackoverflow.com/a/29193471
upvote count: 5
has answer: http://stackoverflow.com/a/29193428
downvote count: 0
has answer: http://stackoverflow.com/a/29193400
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46600132
has answer: http://stackoverflow.com/a/29193471
answer count: 4
favorite count: 0
possible better answer: http://stackoverflow.com/a/29193428
has answer: http://stackoverflow.com/a/29193370
type: AnsweredQuestion
has body: I have read lots of articles regarding jQuery and its syntax. However I have not fully understood its syntax and I would really like to get a better and deeper understanding of it. Many articles fail to point out the simple syntax rules (and what they are necessary for). As of right now I am experiencing a syntax-understanding-problem: my HTML: jQuery.com jQuery.com jQuery.com I will clarify how I understand the code, and I would absolutely appreciate if you answer me in a very basic manner. Please do point out all my misunderstandings! My Understanding and Questions so far: Example 1: I create an anonymous JavaScript-function. This function is executed right in that moment the browser reads it. I pass it the jQuery-Object (with ($) but I don't know why this is important at that point). From now on my function 'speaks' jQuery (it understands its syntax - I am assuming). At the very end of my JavaScript-function I pass it the jQuery object again (but why would that be necessary?). Please enlighten me. Example 2: I tried the same function without the (jQuery) at the end. Now it is not working. I understand what is missing. But why is that (jQuery) at the end so important? Example 3: Now I STARTED my Javascript-function with the $ and I assume that from now on my whole function is WRAPPED inside a jQuery object. Inside this jQuery-object my function understands jQuery syntax. At the end NO (jQuery) is needed. Example 4: Here I did NOT build a JavaScript function. I just use jQuery to select and return the ("a"). This code gets executed right in the second the browser reads it. No waiting for the document to be ready. My Question basically is: In Example 1, why is that ($) at the beginning AND the (jQuery) at the end necessary? What is the purpose? I would really appreciate longer answers where I can get a deeper understanding of "reading jQuery syntax correctly" and speaking about jQuery syntax and what it requires. Thanks.
tagged with: syntax
has comment: http://stackoverflow.com/comment/46600259

http://stackoverflow.com/a/29200205
has comment: http://stackoverflow.com/comment/46612711
answers question: http://stackoverflow.com/q/29200120
downvote count: 0
has comment: http://stackoverflow.com/comment/46612911
has body: sorry its 2am here var count = 0; $('input[type="checkbox"]').change(function(){ $(this).attr('name',count++); }); in plain js this.setAttribute("name", count++);
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46612889
has comment: http://stackoverflow.com/comment/46612672
score: 1
has comment: http://stackoverflow.com/comment/46613140
has comment: http://stackoverflow.com/comment/46612970
has comment: http://stackoverflow.com/comment/46613264

http://stackoverflow.com/q/29198368
type: Question
has body: I have tried various versions now, but I simply seem to miss something. Funnily I haven't found an example for this so far. Only thing seems to be uploaded by my Javascript is [object XMLDocument]. (I try to save the XML-Document in the receiving perl-script, and that's the string that the perl script writes to the outputfile.) For the JavaScript part I looked at Mozilla's Using FormData Objects. And then came up with: function httpPerlUploadBigData(fuPerlTarget, contentToWrite, fuCallMeOnLoad) { var formData = new FormData(); var blob = new Blob([contentToWrite], { type: "text/xml"}); formData.append('file', blob, "filename.txt"); formData.append('bigcontent', contentToWrite); formData.append('saveOnServerAs', 'temp.xml'); var MyThis = this; this.perlTarget = fuPerlTarget; this.callMeOnLoad = fuCallMeOnLoad; var oReq = new XMLHttpRequest(); oReq.open("POST", MyThis.perlTarget, true); oReq.onload = function(e) { MyThis.callMeOnLoad( e.target.response ); }; oReq.send(formData); } I send contentToWrite twice because I would like to upload it in a way that the script sees as an uploaded file. The other code I tried before uploaded it as plain text, but because this is XML I guess an upload as sort of file would be better.
has title: How to upload an XML object and save it with Perl on the server?
has answer: http://stackoverflow.com/a/29210543
score: 0
tagged with: perl
answer count: 1
tagged with: upload
tagged with: javascript
tagged with: xmlhttprequest
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion

http://stackoverflow.com/q/29145460
upvote count: 1
accepted answer: http://stackoverflow.com/a/29149603
favorite count: 0
has comment: http://stackoverflow.com/comment/46518118
tagged with: jsdoc
has body: I'm using JSCS to enforce a consistent code style in one of my projects. Is there a way to use JSCS to check that every function has some JSDoc? Something that would say this is invalid: var add = function(x, y) { return x + y; }; But this is valid: /** * Adds two numbers together * @param {number} x * @param {number} y * @returns The sum of x and y */ var add = function(x, y) { return x + y; };
has answer: http://stackoverflow.com/a/29149603
has comment: http://stackoverflow.com/comment/46518177
has comment: http://stackoverflow.com/comment/46517884
type: AnsweredQuestion
has title: Require JSDoc on all functions with JSCS
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46518246
type: Question
tagged with: jscs
has answer: http://stackoverflow.com/a/29148271
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29148271
answer count: 2

http://stackoverflow.com/a/29107984
has comment: http://stackoverflow.com/comment/46446059
has comment: http://stackoverflow.com/comment/46445842
answers question: http://stackoverflow.com/q/29107931
score: 0
has body: You can easily check if the mail has been sent succesfully, look at my code snippet below. if(@mail($email_to, $email_subject, $email_message, $headers)) { //Mail has been sent succesfully echo "&lt;script&gt;window.alert('Mail has been sent succesfully')"; } else { //Something went wrong with emailing echo "&lt;script&gt;window.alert('Mail could not be sent!')"; }
type: Answer

http://stackoverflow.com/comment/46546836
comment on: http://stackoverflow.com/a/29163303
has text: As you edited your answer, could you tell what is the point of the for loop ?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46500679
comment on: http://stackoverflow.com/a/29138209
has text: The OP will benefit more from your answer if you explain what the issue was and how the fix works. You are not addressing any of the OP's questions: *" It generates new questions as long as you submit the the right answer to the first question only. Why? I mean, I'm running a new function and those variables are defined in that function. Is there something I'm missing? Is this a scope problem?"*
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29093163
type: Question
has body: This show number 1 and a Change button. When I click that button, it supposed to trigger $state.go and within the controller, it should detect the event in $rootScope.$on and update the number to 2. However, for some reason I cannot get the number (data.id) to update even using $digest or $apply. http://plnkr.co/edit/3qHnIm?p=preview HTML Change state1.html {{ data.id }} JS var app = angular.module('myapp', ['ui.router']); app.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/state1/0'); $stateProvider .state('state1', { url: '/state1/:id', controller: 'state1Ctrl', templateUrl: 'state1.html' }); }); app.controller('state2Ctrl', function ($scope, $rootScope, $state, $stateParams) { $scope.i = 1; $scope.change = function(){ console.log('change state1'); $state.go('state1', {id: $scope.i++}); }; }); app.controller('state1Ctrl', function ($scope, $rootScope, $state, $stateParams) { $scope.data = {id: 1}; $rootScope.$on('$stateChangeSuccess', function(evt, toState, toParams, fromState, fromParams) { console.log($scope.data); $scope.$apply(function() { $scope.data = {id: 2}; console.log($scope.data); }); }); }); Can someone find my mistake on why data.id did not get update in the view? UPDATE 1 From Radim response below, I changed the code a bit to better reflect my REAL code: http://plnkr.co/edit/yyg0Hrl5IgzP4e44aRet?p=preview Basic I didn't have the situation with parent state in my case. What I want to do is from the SAME state, trigger that state with new params and change some $scope variable objects. That's all. JS var i = 1; app.controller('state1Ctrl', function($scope, $rootScope, $state, $stateParams) { $scope.change = function() { console.log('change state1: ' + i); $state.go('state1', { id: i++ }); }; $scope.data = { id: 1 }; $rootScope.$on('$stateChangeSuccess', function(evt, toState, toParams, fromState, fromParams) { console.log('$stateChangeSuccess: '); console.log($scope.data); $scope.data = $scope.data || {}; $scope.dat…
score: 3
upvote count: 3
has title: $scope variable not update within $rootScope.$on
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/29093189
has comment: http://stackoverflow.com/comment/46419185
type: AnsweredQuestion
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/134493335
favorite count: 0
accepted answer: http://stackoverflow.com/a/29093189
tagged with: angularjs

http://stackoverflow.com/a/29071536
has comment: http://stackoverflow.com/comment/46377572
type: Answer
answers question: http://stackoverflow.com/q/29071390
downvote count: 0
has body: Better to use W3C standards attribute data-* Read More on data- attribute function myclick(control) { alert($(control).attr("data-group")); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; first &lt;input type="radio" id="qwerty1" data-group="1" onClick="myclick(this);"&gt;&lt;br&gt; second &lt;input type="radio" id="qwerty2" data-group="2" onClick="myclick(this);"&gt;&lt;br&gt; third &lt;input type="radio" id="qwerty3" data-group="3" onClick="myclick(this);"&gt;&lt;br&gt; Update using data() function of jQuery function myclick(control) { alert($(control).data("group")); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; first &lt;input type="radio" id="qwerty1" data-group="1" onClick="myclick(this);"&gt;&lt;br&gt; second &lt;input type="radio" id="qwerty2" data-group="2" onClick="myclick(this);"&gt;&lt;br&gt; third &lt;input type="radio" id="qwerty3" data-group="3" onClick="myclick(this);"&gt;&lt;br&gt;
score: 3
has comment: http://stackoverflow.com/comment/46377487
upvote count: 3

http://stackoverflow.com/comment/101233992
type: AnswerComment
score: 0
type: Comment
has text: can someone provide any vanilla versions that match 2019s compatibility? :D
comment on: http://stackoverflow.com/a/29203427

http://stackoverflow.com/comment/46625339
score: 0
has text: @nadeemahmad you can do `<input type="text" name="txt" id="name<%=id%>" />` then do `name = document.getElementById("name"+idd).value;`.Also close the while loop before script tag
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29207018

http://stackoverflow.com/q/29178950
upvote count: 1
has title: How to do .click() on added class in JQuery?
has comment: http://stackoverflow.com/comment/46574946
type: Question
has body: I am trying to create a simple edit function on a button. When the user clicks the the Edit Button (containing the following classes btn btn-primary btn-edit change-btn), the text will change to "Save", the readonly attributes will be removed on the input elements, and will have a class btn-success save-btn at the same time removing the edit-btn btn-primary class. So that when the user clicks the button again, it will update and save the data. Although it removes and successfully changes the classes, the save-btn function wont work even with a simple "hello" alert. Here is my code: $(document).ready( function() { $('.save-btn').click(function () { alert('hello'); }); $('.edit-btn').click(function () { $('.change-btn').removeClass('btn-primary edit-btn').addClass('btn-success save-btn').text('Save'); $('#firstname, #lastname').removeAttr('readonly'); }); }); Is there something wrong of my execution of the javascript/jquery here?
accepted answer: http://stackoverflow.com/a/29178989
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29178989

http://stackoverflow.com/a/29122152
upvote count: 2
has body: There's a handy guide at the Content Security Policy documentation. It also mentions that it can't be solved by modifying CSP itself in case of inline scripts. Specifically, read the section on inline scripts. In short, the following changes are needed in your case (based on the errors): If there are any &lt;script&gt; /* some code */ &lt;/script&gt; blocks, they need to be moved in a separate file and loaded with &lt;script src="file.js"&gt;&lt;/script&gt; If there are any inline handlers like &lt;div onclick="clickHandler()"&gt; or &lt;body onload="load()"&gt;, they need to be converted to addEventListener format and performed from included JS code. See the documentation for examples. Don't hesitate to raise a bug at https://crbug.com to indicate that the sample is out of date.
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29121599

http://stackoverflow.com/comment/46491876
has text: Put it under the document ready function perhaps? I'm not 100% sure how use strict works with jQuery
comment on: http://stackoverflow.com/q/29132907
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46470945
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29122193
has text: What do you mean it doesn't work? Are you unable to move objects while zoomed or can't u zoom while objects are being rendered?

http://stackoverflow.com/comment/46572948
has text: That’s likely something they simply built themselves – so you won’t find it in the Pinterest documentation, because it is not “from” Pinterest. Looks like a simple overlay that shows a couple of images, and buttons on top of them that trigger the “normal” share functionality that _is_ documented.
type: Comment
comment on: http://stackoverflow.com/q/29176351
type: QuestionComment
score: 3

http://stackoverflow.com/a/29120609
type: Answer
has comment: http://stackoverflow.com/comment/46499186
has comment: http://stackoverflow.com/comment/46474774
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29120323
upvote count: 2
has body: Solutions You convert jade to html and place index.html file in the public folder Enable express static files serve app.use(express.static('public')); define and other specific routes returns static files and api like in (api|css|js) app.route('/:url(api|css|js)/*') .get(function (req, res) { var viewFilePath = '404'; var statusCode = 404; var result = { status: statusCode }; res.status(result.status); res.render(viewFilePath, function (err) { if (err) { return res.json(result, result.status); } // 404.jade file res.render(viewFilePath); }); }); // All other routes should redirect to the index.html app.route('/*') .get(function(req, res) { // SPA index file res.sendfile('/public/index.html'); }); Now you can use app.get('/api/emails', function(req, res){ res.json({a:1}); }); app.get('/api/contacts', function(req, res){ res.json({a:1}); });

http://stackoverflow.com/comment/46650337
has text: @Stryner can help me now??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29216189

http://stackoverflow.com/comment/46427099
has text: I'll have to expand [toSting](https://github.com/atmd83/toSting) with a stingify method
score: 0
comment on: http://stackoverflow.com/q/29098367
type: Comment
type: QuestionComment

cytoscape-web
type: Tag
tag name: cytoscape-web
tags question: http://stackoverflow.com/q/29165150

http://stackoverflow.com/q/29150292
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46522746
has body: I have this code snippet in my view: @if (User.Identity.IsAuthenticated) { @Html.Partial("_PostCommentPartial", new PostCommentViewModel(Model.Id)) } On my partial view: @using (Ajax.BeginForm("PostComment", "SecondComments", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.InsertBefore, UpdateTargetId = "comments" })) { @Html.AntiForgeryToken() @Html.HiddenFor(m =&gt; m.TicketId) @Html.EditorFor(m =&gt; m.Content) &lt;div class="col-md-5"&gt; &lt;input type="submit" class="btn btn-default pull-right" /&gt; &lt;/div&gt; } My controller: public class SecondCommentsController : BaseController { [HttpPost] [ValidateAntiForgeryToken] public ActionResult PostComment(PostCommentViewModel comment) { // some codes here } } When I'm clicking the submit button, I am getting a 500 error. Please advise. EDIT My base controller class that was inherited by my controller: [HandleError] public class BaseController : Controller { protected ITicketSystemData Data { get; private set; } protected User UserProfile { get; private set; } public BaseController(ITicketSystemData data) { this.Data = data; } protected override IAsyncResult BeginExecute(RequestContext requestContext, AsyncCallback callback, object state) { this.UserProfile = this.Data.Users.All().Where(u =&gt; u.UserName == requestContext.HttpContext.User.Identity.Name).FirstOrDefault(); return base.BeginExecute(requestContext, callback, state); } }
has title: Partial view action resulting in 404 error
tagged with: ajax
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/46529538
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/46555371

http://stackoverflow.com/q/29084236
has answer: http://stackoverflow.com/a/30580193
has body: In the reveal.js Github says that there's a way to activate the a remote control for the presentation using a touch device, without using third party scripts. This is: Reveal.initialize({ dependencies: [ // Remote control your reveal.js presentation using a touch device { src: 'plugin/remotes/remotes.js', async: true } ] }); I have put that code but i don't get what to do next for it to work using my phone. I know there's a way to do this via node.js, but my server doesn't support that. I'll appreciate any help. Thanks.
tagged with: reveal.js
favorite count: 0
type: UnansweredQuestion
score: 3
downvote count: 0
type: Question
answer count: 1
has title: reveal.js - Remote control
tagged with: javascript
upvote count: 3

http://stackoverflow.com/comment/46499468
type: QuestionComment
score: 2
has text: Don't use `$` in variable names. It's hideous. I know it's *somewhat* of a convention for jQuery users but it's a terrible one. There's just no need. You should have sensible enough names that you don't need a `$` to know it's a jQuery object.
comment on: http://stackoverflow.com/q/29137437
type: Comment

http://stackoverflow.com/a/29214779
has comment: http://stackoverflow.com/comment/46639035
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29214700
has comment: http://stackoverflow.com/comment/46639407
accepted answer of: http://stackoverflow.com/q/29214700
has body: You have mismatched input and button, try the following : $(document).ready ( function () { $('input[value="Till kassan"]').on('click', function(){ alert("Night button clicked"); }); }); Or $(document).ready ( function () { $('input[type="button"][value="Till kassan"]').on('click', function(){ alert("Night button clicked"); }); });
type: Answer
has comment: http://stackoverflow.com/comment/46639122
score: 4

http://stackoverflow.com/comment/46644534
type: AnswerComment
has text: Yes. I put git in console. I didn't get error, so git is installed.
type: Comment
comment on: http://stackoverflow.com/a/29217419
score: 0

http://stackoverflow.com/comment/46585642
score: 0
type: QuestionComment
type: Comment
has text: `s = s.replace(/, /g, ',');`
comment on: http://stackoverflow.com/q/29185006

http://stackoverflow.com/comment/46505466
type: QuestionComment
has text: no no.. when i press enter from keyboard this calls myfunction and when pc has no keyboard and it has a touchscreen i need enter button on HTML\
type: Comment
comment on: http://stackoverflow.com/q/29140626
score: 0

http://stackoverflow.com/q/29137317
has comment: http://stackoverflow.com/comment/46499185
tagged with: http://stackoverflow.com/tag/html
has body: I recently updated my site to make it mobile friendly. On my laptop, when I physically make the browser window smaller or larger, the @media queries fire and change the CSS. However, on my actual mobile browser, I'm getting the desktop site. Can someone please tell me what's going on?
tagged with: css
accepted answer: http://stackoverflow.com/a/29137366
downvote count: 1
has title: @media query works in desktop browser, not in mobile browser
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29137376
has answer: http://stackoverflow.com/a/29137366
tagged with: media-queries
score: -1
type: Question
answer count: 2
tagged with: mobile
upvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46499231
has answer: http://stackoverflow.com/a/29137376

http://stackoverflow.com/q/29167184
has answer: http://stackoverflow.com/a/29167230
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46553016
has answer: http://stackoverflow.com/a/29167818
has body: I visit a webpage with multiple check boxes, each box has a his own name in front of it. I am looking to check or un-check one box but I want to set shortcut keys for each box so instead use mouse or tab+space by its name. How would it be possible?
upvote count: 1
downvote count: 1
tagged with: javascript
tagged with: web
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/29167368
has comment: http://stackoverflow.com/comment/46553385
has title: Webpage with multiple check boxes
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46553052
has comment: http://stackoverflow.com/comment/46553028

http://stackoverflow.com/q/29137152
accepted answer: http://stackoverflow.com/a/29137188
has comment: http://stackoverflow.com/comment/46499888
type: AnsweredQuestion
has title: Looping using position absolute to form 9 boxes
possible better answer: http://stackoverflow.com/a/29137186
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/29137186
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29137771
score: 0
answer count: 3
has body: 1 2 3 4 5 6 7 8 9 I want to achieve above boxes position using absolute positioning and looping in js. But I'm stuck at starting a second line. http://jsfiddle.net/k554x7vs/ var left = 0; for (var i = 1; i &lt;= 10; i++) { $('&lt;div class="box" id=box' + i + '&gt;&lt;/div&gt;').appendTo('#holder'); if (i == 3) { //2nd line and so on.. left = 0; $('#box' + i).css({ 'top': 70 }) } $('#box' + i).css({ 'left': left }); left += 60; } There's a reason why I don't use float left.
has answer: http://stackoverflow.com/a/29137188

http://stackoverflow.com/comment/46416666
has text: Yes. There is a Submit button which sends the File and some metadata regarding the file(description etc)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29091906

http://stackoverflow.com/q/29143220
tagged with: jquery
score: 0
tagged with: carousel
has answer: http://stackoverflow.com/a/29143859
tagged with: css
type: AnsweredQuestion
has title: jQuery Slick plugin not resizing after parent resizes
has body: I have a project with a collapsable sidebar navigation, with the content filling the remaining space; when the navigation is collapsed, the content fills the whole screen. I'm using jQuery Slick to display some snippets of text, and for the most part, responsively it works great. However, whenever I toggle the navigation, Slick doesn't respond to the new width of it's parent, showing part of the next slide instead of filling the screen. What can I do to fix this? Here is a jsfiddle demonstrating the issue: http://jsfiddle.net/b82x7rr2/ And here's some code: Page 1 Page 2 Page 3 Toggle Navigation Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
accepted answer: http://stackoverflow.com/a/29143829
type: Question
has answer: http://stackoverflow.com/a/29143829
answer count: 2
possible better answer: http://stackoverflow.com/a/29143859
tagged with: slideshow
tagged with: javascript

http://stackoverflow.com/q/29121365
score: 0
tagged with: css
has body: I have a response menu called Flexy Menu which is excellent. But the issue I have is that when the menu loads on mobile (and no mouse present) I have a conflict where a href exists on the parent link but also this has an onClick event to open up the child menu. See below as an example, the link "experience-sweden" also opens a dropdown for "touring-sweden" but just as the menu opens the href redirects it to another page Home Experience Sweden Touring Holidays I guess the solution is to somehow ignore the first click, so essentially have the href as # and then update once clicked to the actual href. However to make it difficult the menu is entirely dynamic and pulled from a database so the javascript would have to have to have some PHP breakins I am guessing. Any advice appreciated.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29122138
tagged with: responsive-design
tagged with: jquery-ui
type: Question
has title: Responsive menu issue - how to handle HREF and onclick event on mobile environment
tagged with: mobile
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29103931
upvote count: 2
has comment: http://stackoverflow.com/comment/46438529
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46438919
answer count: 2
has answer: http://stackoverflow.com/a/29103988
downvote count: 0
has answer: http://stackoverflow.com/a/29105177
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46437896
tagged with: php
has title: Get the values of all select options on change event javascript
has comment: http://stackoverflow.com/comment/46437822
score: 2
has body: I want to know all the values of a select element once the change event is recorded on it. Code is like this: PHP a a JAVASCRIPT function on(value){ alert(value); //This gives me selected value }; I need values a & b when change event is recorded on select element. Can someone help?

http://stackoverflow.com/q/29062664
type: Question
possible better answer: http://stackoverflow.com/a/29062735
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29062762
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Change link background colour when link clicked using jQuery
accepted answer: http://stackoverflow.com/a/29062762
tagged with: css
has body: I have a basic jQuery Accordion. I'd like to change the background colour on a link if that link is clicked. So if I click 'Dropdown 1', the background colour changes to red. How do I do this? Demo: http://jsfiddle.net/4dm318nn/ $(document).ready(function($) { $('.inline').find('.navtoggle').click(function(){ //Expand or collapse this panel $(this).next().slideToggle('fast'); //Hide the other panels $(".sub-menu").not($(this).next()).slideUp('fast'); }); }); .accordion-toggle {cursor: pointer;} .sub-menu {display: none;} .sub-menu .sub-menu {display: block;} Home Dropdown 1 Dropdown 2 Test 1 Test 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29062735

http://stackoverflow.com/comment/46639834
comment on: http://stackoverflow.com/q/29214824
has text: Rule of thumb: If you have data values of an identical structure or meaning, using an array is appropriate. If they _don’t_ have an identical structure or meaning – then what they represents is obviously so different, that better variable names than `fooA`,`fooB`,`fooC` or `bar1`,`bar2`,`bar3` … should have been chosen in the first place.
score: 0
type: Comment
type: QuestionComment

internet-explorer
tags question: http://stackoverflow.com/q/29144891
tags question: http://stackoverflow.com/q/29176839
tags question: http://stackoverflow.com/q/29098571
tags question: http://stackoverflow.com/q/29072418
tags question: http://stackoverflow.com/q/29108092
tags question: http://stackoverflow.com/q/29139957
tag name: internet-explorer
tags question: http://stackoverflow.com/q/29161361
tags question: http://stackoverflow.com/q/29105596
tags question: http://stackoverflow.com/q/29200677
tags question: http://stackoverflow.com/q/29149834
tags question: http://stackoverflow.com/q/29208574
tags question: http://stackoverflow.com/q/29072136
tags question: http://stackoverflow.com/q/29110663
tags question: http://stackoverflow.com/q/29211787
tags question: http://stackoverflow.com/q/29216928
tags question: http://stackoverflow.com/q/29174516
tags question: http://stackoverflow.com/q/29105731
tags question: http://stackoverflow.com/q/29149174
tags question: http://stackoverflow.com/q/29171802
tags question: http://stackoverflow.com/q/29170960
tags question: http://stackoverflow.com/q/29188728
tags question: http://stackoverflow.com/q/29103076
tags question: http://stackoverflow.com/q/29104132
tags question: http://stackoverflow.com/q/29141734
tags question: http://stackoverflow.com/q/29142431
tags question: http://stackoverflow.com/q/29141509
tags question: http://stackoverflow.com/q/29141337
tags question: http://stackoverflow.com/q/29178900
tags question: http://stackoverflow.com/q/29176319
tags question: http://stackoverflow.com/q/29212270
type: Tag
tags question: http://stackoverflow.com/q/29171918
tags question: http://stackoverflow.com/q/29079550
tags question: http://stackoverflow.com/q/29099475

http://stackoverflow.com/comment/46548475
type: QuestionComment
has text: The code as posted now (without the single quotes round the line which sets up the client) works fine
comment on: http://stackoverflow.com/q/29163200
score: 0
type: Comment

http://stackoverflow.com/q/29105909
linked to: http://stackoverflow.com/q/10082031
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/29106169
has comment: http://stackoverflow.com/comment/46442036
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46441834
has title: Jquery content's mouseover not display after contents load again
type: Question
has body: I created a (right)side bar for display all new post (like facebook). Now If user mouse over any post, It's fade in a new box to display full post (like facebook). This side bar get all new posts by a ajax request after 5 second interval. And this below code I used for mouseover to display full post. $(".upbox1").mouseover(function() { var id = $(this).attr('id').replace('',''); $("#menu").fadeIn("slow"); $('.loader2').show(); $.get("uphover?id="+id, function(data) { $('#menu').empty().html(data); $('.loader2').hide(); }); }); After load the page 1st time the mouseover display well but just 5 second interval when side post reload again mouseover cannot display anything. How to solved it please? All script placed in same file: my side bar's update script: var uid = '&lt;? echo $session-&gt;id; ?&gt;'; function addside(type, msg){ //Do something for display all new post in side bar. } function waitFormailno(){ $.ajax({ type: "GET", url: "updateside.php", cache: false, async : false, dataType : 'json', data: "uid="+ uid, timeout:15000, success: function(data){ addside("MyDivId", data); setTimeout(waitFormailno, 15000); }, error: function(){ setTimeout(waitFormailno, 15000); } }); } $(document).ready(function(){ waitFormailno(); });
score: -1
has answer: http://stackoverflow.com/a/29106169

http://stackoverflow.com/a/29178622
has body: Another option. Use the InfoBox third party library. It inherits from OverlayView, and you can put your "completely custom" div in it. proof of concept fiddle var geocoder; var map; var overlay; function initialize() { var map = new google.maps.Map( document.getElementById("map_canvas"), { center: new google.maps.LatLng(37.4419, -122.1419), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); var marker = new google.maps.Marker({ map: map, draggable: true, position: map.getCenter() }); var boxText = document.createElement("div"); boxText.style.cssText = "border: 1px solid black; margin-top: 8px; background: white; padding: 5px;"; boxText.innerHTML = "I am a div on top of a google map .."; var myOptions = { content: boxText, disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-75, -10), zIndex: null, boxStyle: { background: "url('tipbox.gif') no-repeat", opacity: 0.75, width: "150px" }, closeBoxMargin: "0px 0px 0px 0px", closeBoxURL: "", infoBoxClearance: new google.maps.Size(0, 0), isHidden: false, pane: "floatPane", enableEventPropagation: false }; var info = new InfoBox(myOptions); info.open(map, marker); google.maps.event.addListener(marker, 'click', function() { // info.setContent(' I am a div on top of a google map .. '); info.open(map, marker); }); } google.maps.event.addDomListener(window, "load", initialize); html, body, #map_canvas { height: 100%; width: 100%; margin: 0px; padding: 0px } div.info { position: absolute; z-index: 999; width: 200px; height: 50px; display: none; background-color: #fff; border: 3px solid #ebebeb; padding: 10px; }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29176753

http://stackoverflow.com/q/29073445
has comment: http://stackoverflow.com/comment/46384890
answer count: 1
has body: div.tabs is a container of tab control. div.tab is an individual tab, child of div.tabs. div.tab.active is the tab currently showing. .data is a whatever element. It can appear in any div.tab, or just appear in body when these is no .tab. Task: If there is a .tabs, select .data that are child of .tab.active. If there is no .tabs, select all .data. I wrote the following two version: // First version var data; if ($('.tabs').length) { data = $('.tab.active .data'); } else { data = $('.data'); } // Section version var data = $('*'); if ($('.tabs').length) { data = data.find('.tab.active'); } data = data.find('.data'); But I wonder if there is a function s.findUsingParent(e) which selects elements that are children of e from a set of elements s: // Expect var data = $('data'); if ($('.tabs').length) { data = data.findUsingParent('.tab.active'); } Is there in jQuery? Is there a pure css solution?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46383028
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: Is there a .findUsingParent() function in jQuery?
type: Question
has comment: http://stackoverflow.com/comment/46398451
has answer: http://stackoverflow.com/a/29073510
accepted answer: http://stackoverflow.com/a/29073510
score: 0

http://stackoverflow.com/comment/46466878
type: AnswerComment
score: 0
type: Comment
has text: @PavanAlapati I think you need to create another StackOverflow question for that. Sphvn answered this question btw ;)
comment on: http://stackoverflow.com/a/29118021

http://stackoverflow.com/comment/46598351
comment on: http://stackoverflow.com/q/29192283
score: 0
type: Comment
type: QuestionComment
has text: You should pre-filter in the code that populates the template - this kind of logic is really too complex for handlebars.

http://stackoverflow.com/comment/46531333
has text: Thank you @Quince for looking into this!
comment on: http://stackoverflow.com/q/29132900
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/34358397
score: 0
answers question: http://stackoverflow.com/q/29067932
type: Answer
has body: In this example the value not redraw because you didn't use m.prop, if you want that the value change you cas use var pages = m.prop(''); Now you can use pages().push or ctrl.pages().map because m.prop is a function!!!! Remember this it's very important, you will use it a lot

http://stackoverflow.com/comment/46388224
comment on: http://stackoverflow.com/a/29077347
has text: Thank you sylwester! So it was really just a case of adding the header! That's fantastic - thanks again :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46408555
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29087545
type: AnswerComment
has text: @MinearenaMine you don't need curly braces to call scope function, just `ng-click="getDays()"`

http://stackoverflow.com/comment/46441128
score: 0
has text: @Louy 50 divs within each other. One div within and another div.
type: Comment
comment on: http://stackoverflow.com/q/29105469
type: QuestionComment

http://stackoverflow.com/q/29148866
upvote count: 1
type: UnansweredQuestion
tagged with: forms
downvote count: 0
answer count: 0
tagged with: javascript
score: 1
tagged with: jquery
has body: I am fairly new to AngularJS and need some help with refreshing an Angular form when an event happens. I’m using Kendo UI window modal to open the form and when the form is closed, I want to reset the form ($setPristine and empty form data) so it will be a fresh form when it’s opened again. The window has a close event, so one solution that comes to mind is calling a controller function when the window is closed. But I’m having hard time implementing that when the event is triggered. Below is the method that opens the modal window with the form and there is a dynamic button that calls it. //open the modal with form function openModal(id){ curItemId = id; console.log(curItemId); $("#window").kendoWindow({ width: "800px", height: "510px", close: closedFunction, //can call a function from controller here? title: "", actions: [ "Minimize", "Maximize", "Close" ] }); var modalWindow = $("#window").data("kendoWindow"); modalWindow.title("Contact Form"); modalWindow.open(); modalWindow.center(); } Contact Below is my controller, form calls the submit() function on submit but need to figure out a way to call the clearForm()method when window is closed? var app = angular.module("contactApp",[]); app.controller('ContactController', function($scope,$sce){ console.log('controller initiated'); //variables $scope.formData = {}; //formData is an object holding the name, email, subject, and message //submit function $scope.submit = function(contactform,event) { if (contactform.$valid) { //submit data } else { //something is wrong, try again. } } //reset function $scope.clearForm = function(contactform,event){ //reset the form } }); I tried to move the openModal() method inside the controller and call it with ng-click from the dynamic button but was not successful with this as the ng-click was not working. Hope I made the issue clear, please do let me know if I can provide further details. Thank you!
favorite count: 0
tagged with: kendo-ui
tagged with: angularjs
type: Question
has title: Reset Angular form with KendoUI events

http://stackoverflow.com/comment/46523377
has text: @MichaelTotKorsgaard: I couldn't quite follow what you were trying to achieve in the loops. I guess the above is only *part* of the problem.
comment on: http://stackoverflow.com/a/29150178
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/31836220
score: 22
type: AcceptedAnswer
has body: Update This answer was originally written in 2015. The compatibility table link shows Chrome, FF, Edge, and Safari are more compatible than Babel now. Chrome 49+, FF 45+ may not benefit from Babel. Other browsers, may need transpiling. Original I am also currently developing a Chrome Extension in ES6. Your questions seems to be more general so I try to answer this based on my experiences. In the following compatibility table, Chrome 41 shows that it currently has 41% compatibility. A couple key features like class are not included in that 41% and so I was curious if there were other options, such as transpiling. This is true. You can easily use all existing ES6 Features without worries and transpiling. Every new Chrome release has some more features, which makes it quite exciting to wait ;) Chrome 44 now covers 48%, including class. However, if you want go full ES6 then a compiler is still the best option. You don't have to worry about supported features and simply write ES6 code, which will be compiled to proper ES5 code. My current setup is Browserify (via grunt-browserify) using Babelify as compiler. Browserify enables you to also use ES6 Modules, which give you the full power of ES6. Gruntfile.js browserify: { dist: { options: { transform: [ ['babelify', { loose: 'all' }] ], browserifyOptions: { debug: true }, exclude: '' }, files: { 'path/to/es5/app.js': ['path/to/es6/**/*.js'] } } } // Then it will be uglified and copied to dist. That means my Extension still runs with ES5 code though, but that doesn't matters much for me as I still can write in ES6. If you really want to use available ES6 features (which I did before), it can be quite frustrating/annoying as you always have to look up whats possible in Chrome and mostly it's waiting for a new Chrome release. However, I find the build process a bit different when developing a chrome extension. For example, when testing an extension I'm developing, I load it into the browser via the "Load unpacked extension" op…
type: Answer
upvote count: 22
accepted answer of: http://stackoverflow.com/q/29185601
downvote count: 0
answers question: http://stackoverflow.com/q/29185601

http://stackoverflow.com/q/29196744
score: 0
has body: I am doing experiment by using browser-sync for developing moodle theme. After inserted the css by &lt;link /&gt; tag into layout pages, I could change the style(eg:-color) and layout(columns3.php) of moodle theme in browser without reload. Well the changes on css are reflecting near about 2 seconds in browser. But the reflect of changes on layout(tweak some html code in columns3.php) is reflecting very delay in browser. Why layout changes is reflecting so late in browser? I am observing the moodle theme layout and css by command browser-sync start --proxy "http://localhost/moodle/" --files "theme/clean/layout/*.php, theme/clean/style/*.css" Is there any way through which I can increase the reflecting speed when I change on layout file. Updated : I have enabled the Theme designer mode.
type: UnansweredQuestion
tagged with: node.js
has title: Why changes on layout files of moodle are reflecting on browser so late
has answer: http://stackoverflow.com/a/29197002
tagged with: browser-sync
tagged with: moodle
type: Question
has answer: http://stackoverflow.com/a/29275509
answer count: 2
tagged with: javascript

http://stackoverflow.com/a/29167083
answers question: http://stackoverflow.com/q/29095426
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: That can not be done using JSONPath.

http://stackoverflow.com/comment/48651294
type: Comment
has text: There’s a [similar newer question](http://stackoverflow.com/q/30006646/2816199) with a [very succint answer](http://stackoverflow.com/a/30011133/2816199) out there.
comment on: http://stackoverflow.com/q/29213428
score: 0
type: QuestionComment

http://stackoverflow.com/a/29101839
score: 0
has body: This should work; var MyClass = function() { this.logging = true; var logging = 0; this.myFunction = function(logging) { var console = document.getElementById('console'); console.innerHTML = 'logging: ' + logging + '&lt;br /&gt;'; console.innerHTML += 'this.logging: ' + this.logging + '&lt;br/&gt;'; console.innerHTML += 'var loggin:' + logging + ' !!! &lt;br/&gt;--&gt; var logging scope never access'; } } myObj = new MyClass(); myObj.myFunction(false); https://jsfiddle.net/x7m3w3gp/2/
type: Answer
answers question: http://stackoverflow.com/q/29101459

http://stackoverflow.com/a/29086651
type: Answer
score: 3
has body: You can register a global helper to get any Session variable given its key : Template.registerHelper("getSession",function(key){ return Session.get(key); }); And use it like this in your Spacebars templates : {{getSession "posX"}}
answers question: http://stackoverflow.com/q/29086511
has comment: http://stackoverflow.com/comment/46410634
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29086511
has comment: http://stackoverflow.com/comment/46409648
upvote count: 3

http://stackoverflow.com/q/29142003
tagged with: timestamp
type: Question
score: 10
tagged with: javascript
tagged with: date
has body: I want to set the date as an infinite date in form of timestamp? There are people saying we can use "0" and some are saying set big value like this 60*60*24*100. And I do not want to do this. Is there any suitable way of handling this?
has answer: http://stackoverflow.com/a/29142324
answer count: 1
linked to: http://stackoverflow.com/q/11526504
favorite count: 0
tagged with: unix-timestamp
type: UnansweredQuestion
upvote count: 10
has title: I want to set date as infinite in form of timestamp
downvote count: 0
tagged with: calendar

http://stackoverflow.com/q/29128697
answer count: 2
has body: I am using D3 tip.js , function getScreenBBox() { var targetel = target || d3.event.target, bbox = {}, matrix = targetel.getScreenCTM(), tbbox = targetel.getBBox(), width = tbbox.width, height = tbbox.height, x = tbbox.x, y = tbbox.y, scrollTop = document.documentElement.scrollTop || document.body.scrollTop, scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft; } I am getting this error in Internet Explorer Object doesn't support property or method 'getScreenCTM' in Internet explorer browser. On mouse-enter of tree node tool-tip us displaying and on mouse-leave tool-tip is hidden. But the display position of tool-tip is not changing.
has comment: http://stackoverflow.com/comment/46487031
has comment: http://stackoverflow.com/comment/46512344
score: 0
has comment: http://stackoverflow.com/comment/68220444
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46543356
has title: How to fix error 'Object doesn't support property or method 'getScreenCTM'' in Internet explorer broweser using D3 tip.js
has answer: http://stackoverflow.com/a/54626514
has comment: http://stackoverflow.com/comment/46500633
type: Question
tagged with: d3.js
has answer: http://stackoverflow.com/a/58563811

http://stackoverflow.com/a/29083721
has comment: http://stackoverflow.com/comment/46400738
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46400854
has body: You are trying to trigger an event prior to actually setting the events. Re-organize your code like so: $(document).ready(function() { console.log("Executing embedded jQuery."); $("#header #nav a").click(function() { if (!$(this).hasClass("active")) { $("#nav a").removeClass("active"); $(this).addClass("active"); document.location.hash = $(this).attr('href'); switch (document.location.hash) { case "#home": $.get("{text:DocumentRoot}index.html", function(data) { $("#iframe").html(data); }); break; case "#showcase": $.get("{text:DocumentRoot}showcase.html", function(data) { $("#iframe").html(data); }); break; case "#about": $.get("{text:DocumentRoot}about.html", function(data) { $("#iframe").html(data); }); break; case "#github": $.get("{text:DocumentRoot}github.html", function(data) { $("#iframe").html(data); }); break; default: event.preventDefault(); break; } } }); if (document.location.hash.length == 0) { $("#home").trigger("click"); console.log("Simulating #home link click."); } else { $(document.location.hash).trigger("click"); console.log("Simulating " + document.location.hash + " link click."); } });
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29082444
has comment: http://stackoverflow.com/comment/46400677
answers question: http://stackoverflow.com/q/29082444
has comment: http://stackoverflow.com/comment/46400630
upvote count: 2

http://stackoverflow.com/q/29153370
has answer: http://stackoverflow.com/a/29154765
tagged with: model-view-controller
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29153616
has answer: http://stackoverflow.com/a/29153616
has comment: http://stackoverflow.com/comment/46529941
type: Question
has comment: http://stackoverflow.com/comment/46529031
answer count: 2
has title: Not able to Pass object values from javascript to controller
accepted answer: http://stackoverflow.com/a/29154765
tagged with: arrays
has comment: http://stackoverflow.com/comment/46530548
tagged with: javascript
tagged with: string
has body: I am trying to pass a string of objects from my javascript to the controller. But when I run the code, nothing is passed to the controller, all I get is a null value. I go through debugging and I can see the string of data that should be passed, but it never goes or hits the controller. Here is my code below. What I want it to pass is the ContactID, Address, ContactName and Phone. When I debug, I can see that it's passing/getting the data, but it doesn't pass to the controller. I have tried doing a string[ ] obj, but I still get a null reference. I am sure I am missing something, and just needing someone to point me in the right direction. Thanks in Advance! JavaScript: function saveEdit(element) { var form = $(element).closest('tr'); model = retrieveEditCustomerModel(form); PostObject("Home/Update", model, replacethisEditRow, element); } function retrieveEditCustomerModel(form) { var model = new Object(); model.CompanyID = $(form).find('.customer-stored-id').attr('data-value'); model.CompanyName = $(form).find('#SelectedCustomer_CompanyName').val(); model.Address = $(form).find('#SelectedCustomer_Address').val(); model.ContactName = $(form).find('#SelectedCustomer_ContactName').val(); model.Phone = $(form).find('#SelectedCustomer_Phone').val(); return model; } function replacethisEditRow(result, element) { $(element).closest('tr').replaceWith(result); } __________________________________________________________________________ function PostObject(url, object, callback, param1, param2, errorCallback) { var data = JSON.stringify(object); $.ajax({ url: "../../"+ url , data: data, type: "POST", dataType: 'json', contentType: "application/json", success: function (result) { if (callback != null &amp;&amp; callback != undefined) { callback(result, param1, param2); } }, error: function (result) { if (errorCallback != undefined) { errorCallback(result.responseText); } else { if (result.responseText != '') { alert(result.responseText); } else { alert("An error occurred whil…
score: 0
has comment: http://stackoverflow.com/comment/46531462
tagged with: javascript-objects

http://stackoverflow.com/comment/46395887
has text: nice answer though, makes my answer redundant, (and really not so good) so I removed it :)
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29081130

http://stackoverflow.com/comment/46465200
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29118925
type: QuestionComment
has text: but the application is not working on firefox too (version 36.0.1)

http://stackoverflow.com/q/29206675
score: 3
has body: I'm trying to handle PrintScreen paste in a textarea, which is working everywhere except in Safari. Since Safari is a kind of webkit it has event.clipboardData object. But in Chrome it is a DataTransfer and works fine. It does not work in Safari, and I'm failed to find the reason in docs. $(document).ready(function(){ $('.test').bind('paste', function(evt){ console.log(evt.originalEvent.clipboardData.items[0]); }); });
has comment: http://stackoverflow.com/comment/52212068
tagged with: javascript
upvote count: 3
downvote count: 0
linked to: http://stackoverflow.com/q/6333814
tagged with: jquery
has comment: http://stackoverflow.com/comment/81602439
has comment: http://stackoverflow.com/comment/52212106
favorite count: 0
has title: How to paste image from clipboard using javascript in Safari
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/73239070
tagged with: safari
answer count: 0
tagged with: clipboarddata
type: Question

http://stackoverflow.com/comment/46454044
type: Comment
type: QuestionComment
has text: @floor nothing is showing in console
comment on: http://stackoverflow.com/q/29112444
score: 0

http://stackoverflow.com/q/29076405
tagged with: jquery
score: 0
answer count: 1
tagged with: zeroclipboard
has title: ZeroClipboard doesn't work in first click
type: UnansweredQuestion
type: Question
has body: I'm trying to copy text to clipboard by using ZeroClipboard. It works good, but only in the second click on the button and not in the first click. I saw few solutions in Google but none of them fixed my problem. I tried to put the ZeroClipboard events outside of the click button event, and also to put it inside the $(document).ready(function() and all of this didn't help. Can you please help me solve this problem? Thanks! $("body").on('click','.copyToClipboard', function (event) { var clientTarget = new ZeroClipboard( $("#copy_to_clipboard"), { moviePath: "js/ZeroClipboard.swf", debug: false } ); $('#copy_to_clipboard').attr('data-clipboard-text', texttocopy); alert(texttocopy); clientTarget.on( "load", function(clientTarget) { $('#flash-loaded').fadeIn(); clientTarget.on( "complete", function(clientTarget, args) { clientTarget.setText( args.text ); $('#data-to-copy-text').fadeIn(); } ); alert(args); } ); });
has answer: http://stackoverflow.com/a/29076507
tagged with: javascript

http://stackoverflow.com/q/29083065
score: 2
has comment: http://stackoverflow.com/comment/46418123
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: android
has body: Timbre.js looks like a great library for generating sound effects for mobile apps, however, it seems that there is very significant delay when trying to play a sound in the browser. The samples that work in the documentation also exhibit a delay. It even happens in the Chrome mobile emulator on Windows (on Mac, there is no delay). The docs say that "Android support is only Firefox app." I'm not quite sure what that means. In a phonegap application, the sound is not played at all This is the code I am using with Timbre: function playSound() { var sine1 = T("sin", {freq:440.00, mul:0.5}); T("perc", {r:500}, sine1).on("ended", function() { this.pause(); }).bang().play(); } If Timbre.js doesn't work on mobile, is there another means to generate simple sounds via a phonegap application?
has title: Timbre.JS alternative that works on mobile devices via phonegap?
answer count: 0
upvote count: 3
downvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46516736
score: 0
comment on: http://stackoverflow.com/a/29146679
type: Comment
has text: Thank you. I'v tried with this, doesn't help me. :(
type: AnswerComment

http://stackoverflow.com/q/29090475
upvote count: 0
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29090607
type: Question
score: -2
has answer: http://stackoverflow.com/a/29090568
downvote count: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/29090541
tagged with: javascript
tagged with: multidimensional-array
has body: Expected result is below. Trying to split old array into 3 arrays. I don't want to "chunk" it but instead want the items put into almost 'columns' var old_array = ["1","2","3","4","5"]; var new_array = new Array(); for(i=0; i&lt;old_array.length; i++) { new_array[i%3].push(old_array[i]); } The result should be: new_array[0] = [3] new_array[1] = [1, 4] new_array[2] = [2, 5]
has title: Splitting an array into columns
has answer: http://stackoverflow.com/a/29090612
has answer: http://stackoverflow.com/a/29090551
favorite count: 0

http://stackoverflow.com/comment/46523877
comment on: http://stackoverflow.com/q/29150998
type: Comment
type: QuestionComment
has text: Tried `karma run -- --grep=testDescriptionFilter` ? I've seen this suggested before, but I can't verify first hand that it works. (If I were home, I'd try before suggesting. Since I can't try- I'm commenting instead of answering.) :)
score: 1

http://stackoverflow.com/comment/46392128
comment on: http://stackoverflow.com/a/29079301
type: Comment
score: 0
has text: The object is within the array, it's an array of objects. See my answer for what the issue was!
type: AnswerComment

http://stackoverflow.com/a/29200164
answers question: http://stackoverflow.com/q/29200139
downvote count: 0
has body: You need to define icdoQuestion base object first before assigning its properties: $scope.ibusQuestion = {icdoQuestion: {iQuestion: {}}}; $scope.ibusQuestion.icdoQuestion.iQuestion.questionTitle = "questionTitle"; // ... Or if you want to make it more fancy and not worry about defining entire nested object structure in advance, you can make use of Angular $parse service: $parse('ibusQuestion.icdoQuestion.iQuestion.questionTitle').assign($scope, "questionTitle"); In this case you don't even need to define $scope.ibusQuestion at all, as Angular will create it for you if it can't find it on $scope.
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/46591531
has text: Did you try wrapping everything you want to change in a `div`?
comment on: http://stackoverflow.com/q/29188057
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29161839
has answer: http://stackoverflow.com/a/29162998
upvote count: 1
tagged with: php
has body: The result of my php is $result = '[{"MFG_NAME":"ABC","CONCATED_MKT_SHARE":"01-MAR-14|0.59"},{"MFG_NAME":"XYZ","CONCATED_MKT_SHARE":"01-MAR-14|0.87"},{"MFG_NAME":"ABC","CONCATED_MKT_SHARE":"01-APR-14|0.25"},{"MFG_NAME":"XYZ","CONCATED_MKT_SHARE":"01-APR-14|0.67"},{"MFG_NAME":"ABC","CONCATED_MKT_SHARE":"01-MAY-14|0.10"},{"MFG_NAME":"XYZ","CONCATED_MKT_SHARE":"01-MAY-14|0.03"}]'; and done json parse to it var data = new Array(); data = JSON.parse('&lt;?php echo $result ; ?&gt;'); How will I get the output as MFG_NAME[0] = ABC; MFG_NAME[1] = XYZ; DATE[0] = [01-MAR-14,01-APR-14,01-MAY-14]; DATE[1] = [01-MAR-14,01-APR-14,01-MAY-14]; MKT[0] = [0.59,0.25,0.10]; MKT[1] = [0.87,0.67,0.03];
has comment: http://stackoverflow.com/comment/46544701
has comment: http://stackoverflow.com/comment/46543084
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29161988
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46543073
has answer: http://stackoverflow.com/a/29161988
type: Question
tagged with: arrays
has answer: http://stackoverflow.com/a/29173612
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29161993
has answer: http://stackoverflow.com/a/29162146
favorite count: 0
accepted answer: http://stackoverflow.com/a/29173612
answer count: 5
has title: convert json to array using jquery

append
tags question: http://stackoverflow.com/q/29089912
tag name: append
tags question: http://stackoverflow.com/q/29136408
tags question: http://stackoverflow.com/q/29187004
type: Tag

http://stackoverflow.com/comment/46421639
has text: @Ondkloss, I can't find the Chart object? How can I get that?
comment on: http://stackoverflow.com/q/29095095
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29132453
has body: Ok, so previous answer misunderstood the question so here's my second attempt: // remember to include your us-map.js library $('.state').hide(); $('#map').usmap({ // The click action click: function(event, data) { console.log( data.name ); $(".state").hide(); $('#' + data.name).show(); } }); This is Virginia This is California
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29130900

http://stackoverflow.com/comment/46506855
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29138232
has text: Hi Andy, do you have any example for a zone. I used it, it gave me time in ISO format which was not getting converted to UTC
type: Comment

http://stackoverflow.com/q/29090697
tagged with: feed
tagged with: wordpress
has title: How to Add Sitemap Automatically from Wordpress to Blogger
has answer: http://stackoverflow.com/a/29118797
type: Question
answer count: 1
tagged with: javascript
tagged with: sitemap
favorite count: 0
upvote count: 1
has body: How to make sitemap / list ordered by category like http://goo.gl/XnFIsM (wordpress version) on blogspot? I want to add sitemap automatically from wordpress to blogger. Wordpress use php, blogger use html. They are also different feed formats.
type: UnansweredQuestion
tagged with: blogger
downvote count: 0
score: 1

http://stackoverflow.com/q/29071330
accepted answer: http://stackoverflow.com/a/29071531
type: Question
possible better answer: http://stackoverflow.com/a/29071414
has comment: http://stackoverflow.com/comment/46377228
has body: This is my javascript code below (Just to get current url) And Now i want to use as below: Share on Facebook But as it cant be execured inside href="value" Is there any way to do that with php or something else?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46377191
has comment: http://stackoverflow.com/comment/46377210
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46377268
has answer: http://stackoverflow.com/a/29071531
answer count: 3
has comment: http://stackoverflow.com/comment/46377229
tagged with: php
has comment: http://stackoverflow.com/comment/46377137
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29071414
has title: how to echo javascript generated value in href?
has answer: http://stackoverflow.com/a/29071500

http://stackoverflow.com/q/29111293
has comment: http://stackoverflow.com/comment/46455265
has comment: http://stackoverflow.com/comment/46455551
has comment: http://stackoverflow.com/comment/46455732
has comment: http://stackoverflow.com/comment/46455717
has body: I am clueless. I have done some research on how to display exact values on the y-axis and on top of the graph, and found the following: Display exact values? Determines whether to display a shortened, rounded version of the values on the top of the graph, to save space; false indicates that it may. Click on the pull-down menu to the right to view and choose a value. For example, if set to false, > 56123.45 might be displayed as 56.12k. I can neither find such "pull-down menu" nor any other settings for displaying an exact value instead of the rounded version. I know this is possible when using the script externally and building your graph using the google script library, but my data is within a sheet which means I am creating the graph using Google Drive not a webstie and the values to be displayed are bigger than 1000. I gave this little importance until I realized that when I hover over the chart although the lines go up and down (for bigger and smaller values respectivaly) the value displayed on top of the chart for most of the points are the same given that they vary by decimals. I tried dividing the values by 1000 and displaying them in decimal form with a suffix which will say "units (x1000)" but the effect is still the same, they are rounded to 2 dp. I also tried to change the format of the cells which contain the values and nothing happened. Is there a specific way or method to use this "Display exact values?" within Google Drive? Is there any settings I have missed out on? I am also open to using google script if there is any code which will change the settings of the chart to fully display the values. Best regards!!
favorite count: 0
has comment: http://stackoverflow.com/comment/46457307
tagged with: annotatedtimeline
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29114393
has title: Google Sheets Annotated Timeline display exact values?
type: Question
tagged with: google-apps-script
tagged with: google-sheets
tagged with: google-visualization
has comment: http://stackoverflow.com/comment/46454606
has answer: http://stackoverflow.com/a/29114393
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46571874
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29176703
has text: have you considered defer="true" in your script tag?
score: 0

http://stackoverflow.com/q/29119812
tagged with: javascript
upvote count: 2
tagged with: xcode
has body: I am attempting to create script that will automate sign in process (to login). However, when I run script it says that 'could not be tapped'. Below is what I have written so far: var target = UIATarget.localTarget(); var app = target.frontMostApp(); var appWindow = app.mainWindow(); var settingsButton = appWindow.buttons()["CloseVector"]; var settingsView = app.mainWindow().staticTexts()["Settings"] UIALogger.logStart("Sign in test") settingsButton.tap(); target.delay(1); if (settingsView.isValid()) { UIALogger.logPass("Correct View"); } else { UIALogger.logFail("Wrong View"); }
favorite count: 0
type: UnansweredQuestion
tagged with: ios-ui-automation
score: 2
has title: Button could not be tapped - UIAutomation
answer count: 0
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/46978414
tagged with: ios

http://stackoverflow.com/a/29147409
answers question: http://stackoverflow.com/q/29147312
type: Answer
downvote count: 0
score: 1
has body: replace &lt;div controller="VegetableCtrl"&gt; with &lt;div ng-controller="VegetableCtrl"&gt;
upvote count: 1

http://stackoverflow.com/comment/46564933
type: Comment
has text: @Matt _"There are three scales: Square, 9:16(portrait) and 16:9(landscape) crop ratio options."_ Relative to ?
comment on: http://stackoverflow.com/a/29154834
score: 0
type: AnswerComment

http://stackoverflow.com/a/29189668
downvote count: 0
answers question: http://stackoverflow.com/q/29189650
has comment: http://stackoverflow.com/comment/46595817
has comment: http://stackoverflow.com/comment/46593968
type: Answer
accepted answer of: http://stackoverflow.com/q/29189650
score: 2
has body: The id attribute shouldn't have a hashtag. Change to: Working Example
has comment: http://stackoverflow.com/comment/46593927
upvote count: 2
has comment: http://stackoverflow.com/comment/46593860
type: AcceptedAnswer

http://stackoverflow.com/comment/52646969
has text: @Farzad, 1st Q: Refer to the [jstree plugin](https://www.jstree.com/plugins/) page on how to include it. 2nd Q: I'm not sure if I understand the question. Pulling from the server or saving to the server or notifying the user of the changes? Can you clarify your 2nd question? Populating the jstree with json is covered [here](https://www.jstree.com/docs/json/). Another [this useful link (although quite old)](http://mohyuddin.blogspot.com/2009/08/persisting-jstree-changes-to-database.html). Sorry for the late reply, am barely here!
score: 1
comment on: http://stackoverflow.com/a/30122863
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46573974
has text: Nope. Thats the issue I was running into with trying to use substring.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29178106

http://stackoverflow.com/comment/46615478
comment on: http://stackoverflow.com/q/29197386
has text: It is in the link above. Here it is since you just skimmed through it. http://www.757stylist.com/Slicebox/js/jquery.slicebox.js
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29083455
has body: Your Ajax structure is correct, I think the problem is the data that you are posting to php script. Try to use console.log(title + ' ' + start + ' ' + end); before $.ajax. Probably one or more data is incorrect. One of the possible problem is $.fullCalendar.moment().format(). Probably this function does not return a simple string, therefore you can't use it in your ajax data. Try to use console.log() for "start", "end" and "title" separately.
has comment: http://stackoverflow.com/comment/46401431
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29080767

http://stackoverflow.com/q/29095392
has body: I'm talking about content from inside a contenteditable div, and the target is the same contenteditable div. So no external programs involved. The structure of the HTML in this div is that each individual word is inside a span with some data we need to track. Then the whitespace is left as text nodes between the spans. This works fine for the most part (screw you newlines) but I've encountered a strange problem when copy and pasting. Chrome turns this &lt;span attrs="stuff"&gt;word&lt;/span&gt; &lt;span attrs="stuff"&gt;another&lt;/span&gt; into this: &lt;span attrs="stuff"&gt;word&amp;nbsp;&lt;/span&gt;&lt;span attrs="stuff"&gt;another&lt;/span&gt; or this: &lt;span attrs="stuff"&gt;word&lt;/span&gt;&lt;span style="line-height: 16.79999"&gt;&amp;nbsp;&lt;/span&gt;&lt;span attrs="stuff"&gt;another&lt;/span&gt; This obviously means that if the user copy and pastes over more than one line, then the formatting is completely screwed up, and the content of the span has changed which invalidates our data that we need to track. The core problem is that other stuff in the div may contain non-breaking spaces for real reasons, so if I globally start swapping them out, then I might break that. For my spans with my attrs, then I know what should be in them so it's easy to strip out the non-breaking spaces and restore it to how it should be. But for these strange spans with the odd line height, I've no idea how to clean them out without nuking everything. Right now, I've stripped all the inserted spans that contain just a non-breaking space. But what I'd really like is to either stop Chrome from doing this in the first place, or an unambiguous means to identify the problematic extra spans so that I can clean them up in safety without breaking any similar spans that exist for real reasons. I could use this strange line-height I guess but that's pretty brittle and unsafe it feels. How can I prevent the spans from appearing or identify them unambiguously?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29096569
favorite count: 0
has title: Chrome inserts non-breaking spaces into copy and pasted content
has comment: http://stackoverflow.com/comment/46422412
has comment: http://stackoverflow.com/comment/46422614
type: UnansweredQuestion
score: 3
tagged with: google-chrome
type: Question
linked to: http://stackoverflow.com/q/1219860
has comment: http://stackoverflow.com/comment/46422097
tagged with: javascript
upvote count: 3

http://stackoverflow.com/comment/46519917
comment on: http://stackoverflow.com/q/29130853
has text: This is one of those Homer Simpson situations (D'OH) - the service didn't like my data. There is still an issue with the server side code because if the request is bad CORS headers should still be returned with at least an error message. Thanks to all for their input!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/33051253
type: Answer
answers question: http://stackoverflow.com/q/29164276
has body: Chart.js doesnt support conversion to pdf but you can convert it to image by using following code function done() { console.log('done'); var url=document.getElementById("page").toDataURL(); document.getElementById("url").src=url; } In options you have to set the following : onAnimationComplete: done
upvote count: 1
downvote count: 1
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29164276

http://stackoverflow.com/a/29112307
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29111913
has body: Why don't you use a resolve function to check if the user can access your route? Something like this: autoExecApp.config(['$stateProvider', '$urlRouterProvider', function ( $stateProvider, $urlRouterProvider) { $stateProvider .state('index', { url: '/index', templateUrl: 'partials/index.html' }) .state('permission', { url: '/permission', templateUrl: 'partials/permissions.html' }) .state('restricted-route', { url: '/restricted', templateUrl: 'partials/restricted.html', resolve: { authenticated: function ($q) { var deferred = $q.defer(); $userRoles.hasPermissions(this) .then(function (data) { var result = data === "true"; if (result) { deferred.resolve(); } else { deferred.reject('unauthorized'); } }); return deferred.promise; } } }); }]); $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, rejection) { if (rejection.error === 'unauthorized') { $state.go('permission'); } } }

http://stackoverflow.com/comment/46490161
comment on: http://stackoverflow.com/a/29132017
score: 2
type: AnswerComment
has text: Completely overlooked that, the server wont even render that control for the client. +1
type: Comment

http://stackoverflow.com/a/29082597
has comment: http://stackoverflow.com/comment/72454904
has body: Merely transferring the onclick attribute to the checkboxes themselves, instead of their labels, solved the problem.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29078412
answers question: http://stackoverflow.com/q/29078412
upvote count: 1
score: 1

http://stackoverflow.com/q/29092460
has title: If the Option Value is having value="0" alert true
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46416663
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29092920
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/46416649
has body: DEMO HTML: this is 0 this is 1 this is 2 this is 3 JS: $(function () { if ( $("select option[value='0']") == option[value='0'] ) { alert('asd') } })
has comment: http://stackoverflow.com/comment/46416619
has answer: http://stackoverflow.com/a/29092631
downvote count: 3
has answer: http://stackoverflow.com/a/29092503
has answer: http://stackoverflow.com/a/29092486
type: Question

http://stackoverflow.com/comment/46512450
score: 1
has text: Part of the letter or part of the word? if part of the word just style the words with: `aw` etc. so that you can select all the spans differently.
comment on: http://stackoverflow.com/q/29144887
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29142825
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46517287
has body: Here is Polymer working example: Plunk Define the JavaScript object in the parent element: domReady: function() { // Animal properties and method encapsulation this.animal = { type: "Invertebrates", // Default value of properties displayType : function(){ // Method which will display type of Animal console.log(this.type); alert(this.type); } } }, Pass it to the child element: &lt;my-dynamic_element animal='{{animal}}'&gt; &lt;/my-dynamic_element&gt; Use it inside the child element: domReady: function() { console.log('in Dynamic:'); this.animal.displayType(); }, Note, when passing objects warp the attributes in single quotes: obj_attr='{{obj_attr}}'
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29141555
answers question: http://stackoverflow.com/q/29141555
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46822530
has comment: http://stackoverflow.com/comment/46515956

http://stackoverflow.com/q/29099582
tagged with: email
has body: I'm trying to send emails from my application using nodemailer. My setup look like this: var nodemailer = require('nodemailer'); var smtpTransport = require('nodemailer-smtp-transport'); var transporter = nodemailer.createTransport(smtpTransport ({ host: 'smtp.companyname.dk', secureConnection: true, port: 587, auth: { user: 'support@companyname.dk', pass: '****' } })); var mailOptions = { from: 'Olaf <ob@companyname.dk>', to: 'john@test.dk', subject: 'This is a test ', text: 'Hello world ', html: 'Hello world ' }; transporter.sendMail(mailOptions, function(error, info){ if(error){ console.log(error); }else{ console.log('Message sent: ' + info.response); } }); After running this, it gives me the following error: { [Error: Hostname/IP doesn't match certificate's altnames: "Host: smtp.companyname.dk. is not in the cert's altnames: DNS:*.mailcloud.dk, DNS:mailcloud.dk"] reason: 'Host: smtp.companyname.dk. is not in the cert\'s altnames: DNS:*.mailcloud.dk, DNS:mailcloud.dk', host: 'smtp.companyname.dk.', cert: { subject: { OU: 'Domain Control Validated', CN: '*.mailcloud.dk' }, issuer: { O: 'AlphaSSL', CN: 'AlphaSSL CA - G2' }, subjectaltname: 'DNS:*.mailcloud.dk, DNS:mailcloud.dk', infoAccess: { 'CA Issuers - URI': [Object], 'OCSP - URI': [Object] }, modulus: 'AFFDE405E26382FC1F9A126B51C763A21DCB90228DF9B9BFF466B00DA17BCBDA48E0315E0A6E4E8E0C65B3E5A9BF9A98448DF8006869B913C8D644B78B2176C240AA703DF7C5109F7FC9EDBAE0A69E35E00A81D753990A7DF531CC1F47A778A1CC18271298DBB71E341E846139951D9B119C237BDD9AA6F7D16A62FC5D4D6BEA0288DAC700E5C87E472B75365C522B0342185F16854659EE48637B6124269C4E18CC040344928D115350805EF66738922230349DEC97E2D68D0B4175EA6B63BC161B841C150B7009AAC0E8A06CD34D3912926D98CEBF83F6C187AD08A5045F9868512EFDD478FAA81FA0402F5C44B3FD70F82BA4F102352A01B02B77F0FA096D', exponent: '10001', valid_from: 'Oct 3 08:22:02 2014 GMT', valid_to: 'Dec 21 11:07:29 2017 GMT', fingerprint: '35:3A:87:5C:91:8C:B2:7C:4E:87:D1:E3:26:84:57:E5:A1:73:62:F3', ext_key_usage: [ '1.3.6.1.5.5.7.3.…
favorite count: 0
has answer: http://stackoverflow.com/a/35892544
score: 8
has answer: http://stackoverflow.com/a/29099737
accepted answer: http://stackoverflow.com/a/29099737
linked to: http://stackoverflow.com/q/14262986
has title: Sending emails with nodemailer
possible better answer: http://stackoverflow.com/a/29101099
tagged with: node.js
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29101099
downvote count: 0
tagged with: javascript
upvote count: 8
answer count: 3
tagged with: nodemailer

http://stackoverflow.com/comment/46485115
score: 1
comment on: http://stackoverflow.com/a/29129581
type: AnswerComment
has text: This is just my preference. The method I used just relies on the order of the links and the content - the first link corresponds to the first .content, second link to second content, etc. This saves you from having to give them specific class names in order for it to work. Also I feel that the current status should be a class not an ID
type: Comment

http://stackoverflow.com/comment/46415517
type: Comment
comment on: http://stackoverflow.com/a/29076799
score: 0
type: AnswerComment
has text: You use id in your `response!=0` branch, you must also use id in your `response==0` branch

http://stackoverflow.com/a/29174089
score: 0
type: Answer
has body: Here is some HTML that can get you started with the HTML Service: Input Form HTML Name: One Two Three Four Gmail: One Two Three Four Select_CW_ID_From List: One Two Three Four Standard Part Description Enter text here... Download Notepad++: Notepad plus plus And design your HTML in that. Then create an HTML file in your Apps Script project. Your doGet() should just have the code that serves the HTML. Code.gs function doGet() { return HtmlService.createTemplateFromFile('myHTML_File_Name_Here') .evaluate() // evaluate MUST come before setting the NATIVE mode .setTitle('Materials Form') .setSandboxMode(HtmlService.SandboxMode.NATIVE); }; Create another .gs file for dealing with the data. That's where all your code for writing data to the spreadsheet will go. If you need to populate select boxes, you can do that with JavaScript in a script tag of the HTML. With what I've given you, you should be able to create a Stand Alone Apps Script HTML Service app. Publish it, and run it. You probably did that with your current project.
answers question: http://stackoverflow.com/q/29171893

http://stackoverflow.com/q/29143405
has answer: http://stackoverflow.com/a/29143481
type: Question
accepted answer: http://stackoverflow.com/a/29143481
upvote count: 2
tagged with: time
answer count: 2
tagged with: utc
has title: Time Date Objects JavaScript getUTCMilliseconds
has body: From the Chrome console: Me: var dateObj = new Date("2013-04-14 11:48"); undefined Me: dateObj Sun Apr 14 2013 11:48:00 GMT+0200 (Central Europe Daylight Time) Me: dateObj.getUTCMilliseconds(); 0 Can anyone tell me why these Date functions aren't working? I want to take a date string and turn it into UTC milliseconds. As you can see I passed the string to the Date constructor, then applied the function getUTCMilliseconds() to the returned date object. Why is it returning zero??
has comment: http://stackoverflow.com/comment/46509829
has comment: http://stackoverflow.com/comment/47789676
tagged with: date
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/47310651
favorite count: 0
has answer: http://stackoverflow.com/a/47310651

http://stackoverflow.com/q/29091906
has body: The HTML is as follows: &lt;input type="file" style="display: none" ng-file-select="" ng-file-change="upload($files)" ng-multiple="multiple" accept=".jpg,.png"&gt; I need to upload file to the element which uses ng-file-upload for uploading image file using Protractor: var uploadFile = element(by.css('input[type="file"]')); uploadFile.sendKeys('C:\\Temp\\test.png'); uploadFile.evaluate("openMetadataDialog({file:imgFile})"); The above is however not working. I am not able to understand how to upload the file! As per my understanding, as soon as I sendkeys to input element, the upload function should be called itself! However, that does not seem to be happening! Regards, Sakshi
has answer: http://stackoverflow.com/a/29207727
has comment: http://stackoverflow.com/comment/46415996
has comment: http://stackoverflow.com/comment/46539600
has comment: http://stackoverflow.com/comment/46538454
favorite count: 0
accepted answer: http://stackoverflow.com/a/29207727
has comment: http://stackoverflow.com/comment/46417320
upvote count: 1
has comment: http://stackoverflow.com/comment/46539340
has comment: http://stackoverflow.com/comment/46416666
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46416704
tagged with: selenium
has comment: http://stackoverflow.com/comment/46501687
type: Question
tagged with: testing
tagged with: protractor
has comment: http://stackoverflow.com/comment/46525949
has title: How to upload file using Protractor to the ng-file-upload element
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: end-to-end

http://stackoverflow.com/comment/46418941
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29092968
has text: html2canvas - provided the images are on the same domain,

http://stackoverflow.com/comment/46458686
type: AnswerComment
type: Comment
has text: Yes I know, but this is from the documentation that I posted on my original post. I tested by replacing `test` by `visitUrl` in the console.log: ```console.log("THIRD: " + visitUrl + " \n\n\n END THIRD");``` and I still have the error message: `ReferenceError: Can't find variable: visitUrl`
comment on: http://stackoverflow.com/a/29112717
score: 0

http://stackoverflow.com/q/29174190
accepted answer: http://stackoverflow.com/a/29174670
has body: I made an html website that will be running in a CD-R (this will be a manual). I have the page created and everything is working good, but at this moment I'm having some problems for opening a XML file. My question is, is this possible, since It will be running in a CD Drive? Thank you This is what I have: function testing() { var rawFile = new XMLHttpRequest(); rawFile.open("GET", "teste.txt", true); rawFile.onreadystatechange = function () { if(rawFile.readyState === 4) { var allText = rawFile.responseText; alert(allText); } else alert("erro no xml"); } rawFile.send(); } This works fine in for example: localhost/path But i want it to work in a path like c:\path\
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46566421
has comment: http://stackoverflow.com/comment/46566769
has comment: http://stackoverflow.com/comment/46566235
has comment: http://stackoverflow.com/comment/46567074
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29174670
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46566506
downvote count: 0
tagged with: javascript
has title: I Need create an html page that reads a XML file in a CD-R. How I can do that?

http://stackoverflow.com/q/29136916
downvote count: 0
has answer: http://stackoverflow.com/a/29136962
has body: I'm working with Flask and I'm having problems using chessboard.js with it. My static folder is something like this: /static/ /css/ /img/ /js where I put the files for chessboard.js. My template: {% extends "base_templates/page_base.html" %} {# base_templates/page_base.html extends base_templates/base.html #} {% block main %} Home page This page is accessible to any user. {% if not current_user.is_authenticated() %} To view the Member page, you must Sign in or Register. {% endif %} The code: ChessBoard initializes to an empty board with no second argument. {% endblock %} The javascript can't find the images to show the board. It tries to find the images at /img/ not at /static/img/. How can I fix this?
type: Question
upvote count: 2
has title: Integrate chessbord.js with Flask
tagged with: javascript
tagged with: flask
answer count: 1
tagged with: python
favorite count: 0
tagged with: chessboard.js
accepted answer: http://stackoverflow.com/a/29136962
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/46566429
type: Comment
has text: Ok, seems this would work. That was a silly question :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29174309

http://stackoverflow.com/a/29109508
has comment: http://stackoverflow.com/comment/46449616
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29109315
type: Answer
answers question: http://stackoverflow.com/q/29109315
has body: First, your array of countries is best placed in the factory than as a global variable. Then, in the function getData of the factory, instead of making the http call just pass the array to your callback. The factory looks as follows : countryApp.factory('countries', function () { var countriesArray = [ ... ]; function getData(callback) { return callback(countriesArray); } return { list: getData }; }); See fiddle Avoid using a callback : Your previous getData function used to pass the result to the callback, and the call from the controller was as follows : countries.list(function (countries) { $scope.countries = countries; }); But you can try to avoid using a callback for that and use a thenable instead : 1) Inject $q as a dependency of your factory 2) Rewrite getData as : function getData() { return $q.when(countriesArray); } Note return $q.when(countriesArray) might seem a bit tricky if you are not used to. But it's not very difficult. Here we are literally saying "return when countriesArray is resolved". As countries array is not something asynchronous, we can return immediately, and $q.when wraps the object into a $q promise, therefore the caller can call getData as follows : getData.then(...) 3) Now, the call from the controller looks like : countries.list().then(function (countries) { $scope.countries = countries; }); See second fiddle Fetch the data from a local json If you want to load the data from a standalone file instead of putting them right in the factory (that would be a valuable choice), you will have to get back $http. You would call a local url, therefore there is absolutely no problem to run that on a device not connected to the internet : function getData() { return $http.get('countries.json'); } $http returns a promise, therefore the call to getData stay unchanged : getData.then(...)
upvote count: 2
has comment: http://stackoverflow.com/comment/46490898
has comment: http://stackoverflow.com/comment/46449664
has comment: http://stackoverflow.com/comment/46453667
has comment: http://stackoverflow.com/comment/46453737
has comment: http://stackoverflow.com/comment/46452292
score: 2

http://stackoverflow.com/q/29188563
score: 1
type: Question
has answer: http://stackoverflow.com/a/29188601
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
downvote count: 0
tagged with: query-string
favorite count: 0
has title: jquery ajax generating query string if undefined do not pass
accepted answer: http://stackoverflow.com/a/29188601
has body: Hi I am using jquery and ajax to post and get data from a CMS API. I am generating a query string to fetch the data as so: region = typeof region !== 'undefined' ? 'region='+region : ''; centre = typeof centre !== 'undefined' ? 'centre='+centre : ''; data = region+centre; // generate query string Now I thought the above would not pass anything if is undefined but if I console log data when I click on a button that triggers the centre variable it passes region="undefined"centre="Centre Market". However I want it to just pass centre="Centre Market" which would be the href of the button clicked. This is my click function: $('ul.dropdown li a').click(function (e) { e.preventDefault(); console.info('Selected Centre: "' + $(this).attr('href') + '"'); var centre = $(this).attr('href'); getData.update('/overview', 'undefined' centre); }); As you can see this passes the href attribute to the getData.update function this function is below... var getData = { update: function (url, region, centre) { region = typeof region !== 'undefined' ? 'region='+region : ''; centre = typeof centre !== 'undefined' ? 'centre='+centre : ''; // i dont want to pass region if it is undefined data = region+centre; // generate query string console.log(data); $.ajax({ url: url, async: true, dataType: 'json', data: data, // data passed here type: 'POST', success: function (json) { //success stuff.... } }); } } as you can see I am passing the data into the ajax function as so: data = region+centre; // generate query string so if region is undefined or empty or not passed I don't want this to be apart of the query string i.e. don't include region=. Any ideas how I can do this?
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/46608865
score: 0
type: QuestionComment
type: Comment
has text: In case you need it you can walk up the parents and create selector strings ... see my solution here http://stackoverflow.com/a/28881979/1175966
comment on: http://stackoverflow.com/q/29197379

http://stackoverflow.com/comment/46481940
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29121876
type: QuestionComment
has text: it wasn't a solution, it was just there to make the fiddle work... if it does work in the fiddle, but does _not_ work on your own project, then there's something else what's causing the problems. I'm gonna vote to close now, as we don't have a minimal verifiable example and it seems you're not able to present us one...

http://stackoverflow.com/comment/46472488
score: 1
comment on: http://stackoverflow.com/q/29123083
type: Comment
type: QuestionComment
has text: What version of selenium and ff you are using?

http://stackoverflow.com/q/29125511
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29129841
has comment: http://stackoverflow.com/comment/46482658
tagged with: tabs
linked to: http://stackoverflow.com/q/3140017
has body: Note: I only have a few days experience with jQuery, although I have searched around to try to fix the issue and tested however it just doesn't work. What I'm trying to achieve: I'm having some trouble with jQueryUI's .selectable, I have created a Selectable with four different tabs, each tab displays different content added to it (a class for image, an append for a button and an append for paragraph text). Here is a visual look at what I'm trying to achieve: http://puu.sh/gELQi/211165f55a.png My current jQuery = http://jsfiddle.net/p5gsby49/8/ My Problem Currently, when clicking on one tab it will correctly display the contents of that tab, however as soon as you click to a different/same tab again it will: Add the contents overlapping the previous tab Button is added on every new click of same or other tab New image class is added and pushed below the previous tab Paragraph text overlaps What I need I need a way so that on every tab click (same or other tab) it will clear all previous contents of the last tab (any buttons/paragraphs/image classes). Also, one other problem with the jQueryUI .selectable() is that it allows selecting multiple tabs at once, if you drag your cursor over the tabs in my JSFiddle you'll see what I mean, I only want it to be able to select one at max. My code broken down jQuery //Tab Content added in relation to tab number if ($('#elements .elementOne').hasClass('ui-selected')) { // Tab 1 $(".elementOneInfo").addClass("elementOneInfoImage"); $(".elementOneInfo").append(" MORE<two "); $(".elementOneInfo").append(" "+textOne+" "); } if ($('#elements .elementTwo').hasClass('ui-selected')) { //Tab 2 etc. $(".elementTwoInfo").addClass("elementTwoInfoImage"); [...] HTML Title1 Title2 Title3 Title4 SCSS /* Tabs */ .elements-titles-wrapper { padding:0; ul { list-style: none; padding-left: 0; } li > h3 { color: white; margin:0; padding: 15px 0 15px 15px; } .light { background-color: $aqua; } .dark { background-color: $dark_aqua; } .active { backgro…
score: 0
type: Question
has comment: http://stackoverflow.com/comment/46478075
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/29129841
has title: jQueryUI Stackable (Remove contents on different tab click)
answer count: 1
tagged with: selectable

http://stackoverflow.com/comment/46508452
comment on: http://stackoverflow.com/q/29142479
type: QuestionComment
type: Comment
score: 0
has text: @Vohuman : you clearly haven't read it. I want from the last 3 elements, the highest or lowest number. I don't wanna slice anything ;/

http://stackoverflow.com/comment/49553357
type: Comment
has text: @HadiRj I'm familiar with debugging tools but haven't been able to reproduce the error
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29161294

http://stackoverflow.com/comment/46577311
comment on: http://stackoverflow.com/q/29180321
score: 0
has text: @RGraham so how should I solve my problem?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29119331
upvote count: 9
has body: To find distance between 2 points (Haversine formula): function distance(position1,position2){ var lat1=position1.latitude; var lat2=position2.latitude; var lon1=position1.longitude; var lon2=position2.longitude; var R = 6371000; // metres var φ1 = lat1.toRadians(); var φ2 = lat2.toRadians(); var Δφ = (lat2-lat1).toRadians(); var Δλ = (lon2-lon1).toRadians(); var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) + Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ/2) * Math.sin(Δλ/2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); var d = R * c; return d; } Now use: var closest=locations[0]; var closest_distance=distance(closest,position.coords); for(var i=1;i&lt;locations.length;i++){ if(distance(locations[i],position.coords)&lt;closest_distance){ closest_distance=distance(locations[i],position.coords); closest=locations[i]; } } This has complexity of O(n). For 5000 locations that will be good enough most of the time.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29118745
answers question: http://stackoverflow.com/q/29118745
score: 9

http://stackoverflow.com/comment/46538109
has text: Just saw you updated. Each active needs to display each tab-pane beneath it. At the moment only the first tab works.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29158909

http://stackoverflow.com/comment/139866048
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29074067
has text: What is mydropzone and where is it defined?

http://stackoverflow.com/comment/46492715
type: QuestionComment
has text: Also, in jQuery it's `$("#docLabel").val("CNPJ: ");` but a label doesn't have a value, it has text, so it should be `$("#docLabel").text("CNPJ: ");`
comment on: http://stackoverflow.com/q/29133412
score: 0
type: Comment

http://stackoverflow.com/comment/46433202
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29101414
has text: @victory: Just use `tr>td[align]:not(:first-child)`.
score: 0

http://stackoverflow.com/comment/46558462
score: 0
type: Comment
type: QuestionComment
has text: I don't think rate limit is an issue in this case...and about response, the function upon success is not running. There is no alert 'response'. Any other idea??
comment on: http://stackoverflow.com/q/29108151

http://stackoverflow.com/q/29169937
accepted answer: http://stackoverflow.com/a/29251836
upvote count: 1
tagged with: google-chrome
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29251836
tagged with: javascript
has title: using u2f-api.js Client Side Test
score: 0
answer count: 1
tagged with: fido-u2f
favorite count: 0
type: AnsweredQuestion
has body: I'm trying to show the registration response from a Fido U2F token on an alert (Google chrome V41) like so: &lt;script src="/u2f-api.js"&gt;&lt;/script&gt; &lt;script&gt; var challenge = { version : "U2F_V2", challenge : "YXJlIHlvdSBib3JlZD8gOy0p", appId : "/index.html", sessionId : "26" }; u2f.sign([challenge], [], function(deviceResponse) { alert(JSON.stringify(deviceResponse)); } ); &lt;/script&gt; but for some reason this code doesn't work correctly. I don't see the alert even after clicking on the token button.

http://stackoverflow.com/q/29067575
has title: Limit facebook gift requests per day
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: facebook-javascript-sdk
type: UnansweredQuestion
tagged with: facebook
tagged with: request
has answer: http://stackoverflow.com/a/29067772
has body: so i am writing this game where life requests can be sent, i have already coded the part where i am am sending life request, but the problem is i can send life requests multiple times to same friend how can i limit that for once per day i am coding using java script, and currently i am simply fetching all the requests received and giving lives and then deleting those requests. i see on other games like CandyCrush, FarmVille, etc, gift requests to a particular friend can be send only once per day, i am looking to do something similar
type: Question

http://stackoverflow.com/q/29187124
tagged with: javascript
has comment: http://stackoverflow.com/comment/46589278
has title: Making D3 Bubble Charts Without Children Elements
tagged with: d3.js
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/46593932
tagged with: bubble-chart
has body: guys. I've been trying to do some work with some data for a capstone class I am currently in. This data is in Excel and I have converted it to JSON using a converter online. The problem with this data is that it doesn't have children elements and making the children by hand would take hours because it's ~15,000 lines. Is it possible to make bubble charts without using children data? I've tried finding examples and answers, but I have yet to find any. <a href="https://www.google.com/search?q=D3%20bubble%20chart&amp;safe=off&amp;rlz=1C1ASRM_enUS627US627&amp;espv=2&amp;biw=1920&amp;bih=947&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ei=HscNVY2pC6m_sQTBjYD4DQ&amp;ved=0CAcQ_AUoAg#imgdii=_&amp;imgrc=L0KCy_g-0JKEJM%253A%3BYdgXynThapdpZM%3Bhttp%253A%252F%252Fouseful.files.wordpress.com%252F2012%252F08%252Ftransactional-services-explorer.png%253Fw%253D700%2526h%253D537%3Bhttp%253A%252F%252Fblog.ouseful.info%252Fcategory%252Fvisualisation%252Ffeed%252F%253Fwithoutcomments%253D1%3B700%3B537" rel="nofollow">Here is an example of what I'm roughly trying to make it look it. Thanks in advance for any replies!
has answer: http://stackoverflow.com/a/29187222
type: Question
answer count: 1

http://stackoverflow.com/comment/46642466
type: AnswerComment
score: 0
type: Comment
has text: in any case your implementing zooming behavior youself so implement it is a way when some gusture happens whole view get zoomed in / out. remember if u return false in onTouch method u can send touch event to the parent view which is grid layout. i don't know exact detail on how to implement zooming but i don't see any conflict with zooming and grid layout. maybe i'm not completly understand your problem
comment on: http://stackoverflow.com/a/29182318

http://stackoverflow.com/q/29133943
has answer: http://stackoverflow.com/a/29170564
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29170564
score: 1
upvote count: 1
type: Question
tagged with: gridster
has title: adding a widget gridster.js
tagged with: javascript
has body: i'm trying to add a widget the an already existing grid dynamically from a database using ajax like so: $.post("gestion.php",{ event : "true" }, function(data,status){ // return the name of the image like so : ImageName#x#y var arrayVal= data.split('#'); var x= arrayVal[1]; var y= arrayVal[2]; //the result of the array : x = 2 , y = 1 console.log("x = '" + x + "' - y = '" + y +"'"); gridster.add_widget.apply(gridster, ['&lt;li&gt;&lt;img src="img/'+ arrayVal[0] +'"/&gt;&lt;/li&gt;', x, y]); } ) The image are generated properly but it is placed halfway between the col1 and col2 and the grid start bugging. Adding the value directly from the array like: gridster.add_widget.apply(gridster, ['&lt;li&gt;&lt;img src="img/'+ arrayVal[0] +'"/&gt;&lt;/li&gt;', arrayVal[1], arrayVal[2]]); Doesn't work too... But when i try to enter the parameters the "hard way" like so : gridster.add_widget.apply(gridster, ['&lt;li&gt;&lt;img src="img/'+ arrayVal[0] +'"/&gt;&lt;/li&gt;', 2, 1]); The image are added properly in the bottom of my grid. How can i get my values so the plug-in doesn't bug? The numbers are displayed properly when i do a console.log The php and the AJAX are encoded as UTF-8 and the database are encoded as utf8_unicode_ci Sorry for my rusty english...

http://stackoverflow.com/comment/46569252
comment on: http://stackoverflow.com/q/29175034
score: 0
has text: There is .offset().top - 130 for scrolling, and I need to set the same value for .active, but I don't know how:/
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29167399
has answer: http://stackoverflow.com/a/29168345
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/57054682
has title: Highchart plotLines z Index between series z Index
score: 1
type: Question
has answer: http://stackoverflow.com/a/29169122
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/35304808
downvote count: 0
answer count: 4
has body: I am trying to create a fiddle, mocking up the image attached in following jsfiddle http://jsfiddle.net/2TuCW/162/ The problem is I want the plotLines between blue line and green column. I tried changing the zIndexes of plotLines (10) , between blue line (15) and green column (5) in following fiddle http://jsfiddle.net/2TuCW/163/ //plotLines zIndex "plotLines" : [ { "color": '#E5E7EB', "zIndex": 10, "width": 2, "value": 20 }, .... .... //Series data z-index "series": [{ "type":"column", "data": [35,39,49,50,57,58], "zIndex":5 .... .... "series": [{ "type":"line", "data": [35,39,49,50,57,58], "zIndex":15 But it is not working as expected. Please suggest how to achieve it.
favorite count: 0

http://stackoverflow.com/a/29066711
has comment: http://stackoverflow.com/comment/46370328
score: 0
type: AcceptedAnswer
has body: Live Demo //constructor function function Bookdes(title, author, pages, current_page, available){ this.title = title; this.author = author; this.pages = pages; this.current_page = current_page; this.available = available === 'true'; } //array of books var bookarrays = [ new Bookdes("Fast Cars", "John Burns", 205, 43, "true"), new Bookdes("Slow Cars", "Joe Fast", 70, 32, "false" ), new Bookdes("Big Cars", "Darla Jean", 234, 42, "true"), new Bookdes("Small Cars", "Dema Jones", 214, 34, "false"), new Bookdes("Cars", "Alex Best", 235, 41, "true") ]; var available = 0; var page = 0; var longest = ''; for (var i = 0, max = bookarrays.length; i &lt; max; i += 1) { bookarrays[i].available &amp;&amp; (available += 1); page += bookarrays[i].current_page; longest = bookarrays[i].title.length &gt; longest.length ? bookarrays[i].title : longest; } alert(available); alert(page); alert(longest);
has comment: http://stackoverflow.com/comment/46370363
type: Answer
accepted answer of: http://stackoverflow.com/q/29066590
answers question: http://stackoverflow.com/q/29066590

http://stackoverflow.com/q/29095640
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/29096145
has body: I'm using Google Maps alongside our CMS search tool and I have a collection of store returning successfully in a list and on a Google Map based on the search. What I can't seem to get working though is for the map to automatically set the zoom and fit all returning markers into the map. I've seen a number of other posts about doing similar but all seem to relate to v2 of the maps API. This what I have in an attempt to set the zoom and fit. var iconBase = '/img/'; var icons = { parent: { icon: iconBase + 'parent.png' }, child: { icon: iconBase + 'child.png' } } var locations = [ {exp:low_search:results query="{segment_3}" backspace="1"} ["{title}", {latitude}, {longitude}, "{type}", " {street_address} {city} {zip} ", "{website}" ], {/exp:low_search:results} ]; var map = new google.maps.Map(document.getElementById('map'), { mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var markerBounds = new google.maps.LatLngBounds(); var marker, i; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, icon: locations[i][3] == "Yes" ? '/img/parent.png' : '/img/child.png', address: locations[i][4] }); markerBounds.extend(marker); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(' ' + locations[i][0] + ' ' + this.address + ' website'); infowindow.open(map, marker); }; })(marker, i)); } map.fitBounds(markerBounds); Where am I failing here? To clarify, when I remove the markerbounds and fitbounds, that's when I see a working map. The console seems to be erroring on markerBounds.extend(marker);
has title: set Google Map zoom automatically from result set
accepted answer: http://stackoverflow.com/a/29096145
type: AnsweredQuestion
type: Question
tagged with: google-maps
answer count: 1

http://stackoverflow.com/a/29102842
score: 1
has body: As noted in the comments, you're not instantiating a new instance of gl.test. You could change it to not be an IIFE and use the new keyword var gl ={} gl.test = function () { .... } var test1 = new gl.test(); var test2 = new gl.test(); Live example: http://jsfiddle.net/19f9504u/
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29102729
downvote count: 0
answers question: http://stackoverflow.com/q/29102729
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46436176

http://stackoverflow.com/comment/46555971
type: AnswerComment
type: Comment
has text: He stated extensibility:P I don't see how the OP has misunderstood promise chaining. Rather than assume that, just answer the question
comment on: http://stackoverflow.com/a/29161042
score: 0

http://stackoverflow.com/comment/46628017
type: AnswerComment
comment on: http://stackoverflow.com/a/29205783
type: Comment
has text: yeah, thanks. So which option would you choose: yours with two constants or mine with additional module?
score: 0

http://stackoverflow.com/comment/46772481
comment on: http://stackoverflow.com/q/29175006
score: 0
type: Comment
type: QuestionComment
has text: @DanielleCS Thanks Danielle for letting me know. I was thinking to get a Javascript curl library running in the client to emulate the curl call, but I haven't found anything decent.

http://stackoverflow.com/comment/118326913
has text: This is awesome, can you explain or your provide any reference to understand this ..... `return new Function(...names, \`return \`${this}\`;\`)(...vals);`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/41015840
type: Comment

http://stackoverflow.com/q/29197182
has answer: http://stackoverflow.com/a/29197432
tagged with: angularjs
has title: Angular: Promise dependant on other promises in routing
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/46607023
type: AnsweredQuestion
has body: I'm a little confused when it comes to promises in Angular (or in general) and I just can't get this one to work the way I want it. I can't share the code I'm working with but here's some mockup code: var personModule = angular.module('personModule', [], ['$routeProvider', function($routeProvider){ $routeProvider .when('/person/:personId/cars',{ templateUrl: 'partials/personCars.html', controller: 'personCarsController', resolve: { 'person': resolvePerson, 'cars': resolveCars } }); }]); function resolvePerson($route, personFactory){ var personId = $route.current.params.personId; return personFactory.getPerson(personId).then(function(response){ return angular.fromJson(response).data; }); } function resolveCars($route, personFactory, carFactory){ var personId = $route.current.params.personId; return personFactory.getPersonCars(personId).then(function(response){ var cars = angular.fromJson(response).data; angular.forEach(cars, function(car){ carFactory.getModel(car.modelId).then(function(response){ car.model = angular.fromJson(response).data; carFactory.getMaker(car.model.makerId).then(function(response){ car.model.maker = angular.fromJson(response).data; }); }); }); return cars; }); } The data format for cars will be something like this in JSON: [ { "year": "1992", "color": "red", "modelId": 1, "model": { "name": "Corolla", "makerId": 1, "maker": { "name": "Toyota" } } }, { "year": "1998", "color": "black", "modelId": 1, "model": { "name": "Escort", "makerId": 2, "maker": { "name": "Ford" } } } ] Now the code above works just fine. It's just that when I click on the link to open the page the data comes with a delay as the promises resolve. The routing waits for person and cars to resolve but not for the model and maker for each car, which is what I would like to happen. I've strolled through all Angulars documentation on promises and defers and I'm just at a loss right now. EDIT: function resolveCars($route, personFactory, carFactory){ var personId = $route.current.pa…
has comment: http://stackoverflow.com/comment/46607150
accepted answer: http://stackoverflow.com/a/29197432
type: Question
score: 0
tagged with: angular-routing
answer count: 1
tagged with: javascript
tagged with: promise

http://stackoverflow.com/comment/46646898
type: Comment
has text: Max!! it works very well, I will try to merge it using ajax request for bringing that remote html. Please note I am using google app script, and theres some restrictions :(
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29218254

http://stackoverflow.com/comment/46433992
type: Comment
score: 1
type: AnswerComment
has text: Worth noting that [the recommendation is to continue using the radix parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt#Octal_interpretations_with_no_radix) when using `parseInt` for the time being.
comment on: http://stackoverflow.com/a/29100797

http://stackoverflow.com/comment/46448284
type: QuestionComment
has text: There are two function that i am executing on click are ajax based which are responsible for updation of data in the database.
comment on: http://stackoverflow.com/q/29109103
score: 0
type: Comment

http://stackoverflow.com/comment/46517962
comment on: http://stackoverflow.com/q/29147755
type: Comment
type: QuestionComment
score: 1
has text: is the website being edited in an iframe?

http://stackoverflow.com/q/29077877
has comment: http://stackoverflow.com/comment/46391500
has comment: http://stackoverflow.com/comment/46393916
upvote count: 1
possible better answer: http://stackoverflow.com/a/29080654
has comment: http://stackoverflow.com/comment/46390434
has answer: http://stackoverflow.com/a/29080654
accepted answer: http://stackoverflow.com/a/29081143
has comment: http://stackoverflow.com/comment/46392833
has comment: http://stackoverflow.com/comment/46392616
has comment: http://stackoverflow.com/comment/46392969
has comment: http://stackoverflow.com/comment/46393860
tagged with: c#
has comment: http://stackoverflow.com/comment/46392216
linked to: http://stackoverflow.com/q/22865904
has comment: http://stackoverflow.com/comment/46389891
has comment: http://stackoverflow.com/comment/46389647
tagged with: javascript
tagged with: alertify
has comment: http://stackoverflow.com/comment/46390900
has comment: http://stackoverflow.com/comment/46394972
has body: I'm trying to call a JavaScript function with a popup, and if user click on "Ok", it calls a C# function. But the page always PostBack in same time I am loading the JavaScript function. My HTML ASP:Button : &lt;asp:Button ID="PrchBtn" runat="server" class="PrchBtn" Text="&lt;%$ Resources:Resource, WebEDI_Save %&gt;" OnClick="PrchBtn_Click" OnClientClick = "Confirm();" /&gt; OnClientClick, it calls this JS function : function Confirm() { var confirm_value = document.createElement("INPUT"); confirm_value.type = "hidden"; confirm_value.name = "confirm_value"; alertify.confirm('&lt;%= GetGlobalResourceObject("Resource","WebEDI_PDF_MsgBox") %&gt;', function (e) { if (e) { confirm_value.value = "Yes"; } else { confirm_value.value = "No"; } document.forms[0].appendChild(confirm_value); }); } And then my C# function : public void PrchBtn_Click(object sender, EventArgs e) { //Code here... } It's working with a simple "confirm" dialog. But I want to custom the popup that's why I use "Alertify" library. Thanks for your help. UPDATE (See comments #3) : By following this link (Call Code Behind Function from JavaScript (not AJAX!)) This is my actual code : &lt;asp:Button ID="PrchBtn" runat="server" class="PrchBtn" Text="&lt;%$ Resources:Resource, WebEDI_Save %&gt;" OnClientClick="Confirm(); return false;" /&gt; &lt;asp:Button runat="server" ID="PrchBtnHidden" ClientIDMode="Static" OnClick="PrchBtn_Click" style="display:none;" /&gt; function Confirm() { var confirm_value = document.createElement("INPUT"); confirm_value.type = "hidden"; confirm_value.name = "confirm_value"; alertify.confirm('&lt;%= GetGlobalResourceObject("Resource","WebEDI_PDF_MsgBox") %&gt;', function (e) { if (e) { confirm_value.value = "Yes"; document.forms[0].appendChild(confirm_value); __doPostBack('&lt;%= PrchBtnHidden.UniqueID %&gt;'); } else { confirm_value.value = "No"; document.forms[0].appendChild(confirm_value); __doPostBack('&lt;%= PrchBtnHidden.UniqueID %&gt;'); } }); } But the problem is the same, J…
has comment: http://stackoverflow.com/comment/46391491
has title: Wait popup response before C# function
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46389249
has answer: http://stackoverflow.com/a/29081143
score: 1
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/46390546
type: Question
answer count: 2

http://stackoverflow.com/q/29121010
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/8290870
has answer: http://stackoverflow.com/a/29122155
has answer: http://stackoverflow.com/a/29121486
answer count: 3
has comment: http://stackoverflow.com/comment/46469337
linked to: http://stackoverflow.com/q/4908378
has title: Each loop to check if function exists
has comment: http://stackoverflow.com/comment/46469356
type: UnansweredQuestion
tagged with: each
has comment: http://stackoverflow.com/comment/46468698
type: Question
has body: I am developing a site using a third-party CMS and I have to include functions across various parts of the content depending on which page is being displayed. To reduce the amount of functions being called on each page load, I would like to loop through an array of functions to check if they exist before firing them. This single function would then be called at body onload. I have adapted code from Javascript Array of Functions and How to implement an array of functions in Javascript? as well as isFunction. My understanding was that I could put the functions in an array without () and they would not be called but in my console in Chrome an Uncaught Reference error is generated on the line in the array where a function name is mentioned. e.g. the jb_underimage_height function is not in the code on all pages, so this generates the error when it does not exist. Here is the code so far: function jb_onloads() { var functionArray = [ jb_category_price_POA, jb_highlight_tech_columns, jb_underimage_height, jb_moveGuestButton, jb_loginCheck, jb_moveRefineSpan, jb_style_from_url, materials_dropdown, jb_remove_search_spaces, jb_init_social, checkCookies, jb_category_change_class, jb_move_basket_text, jb_style_form, jb_checkNotifyEnvelope ]; // end of functionArray $.each(functionArray, function(key, value) { if(typeof functionArray[key] !== 'undefined' &amp;&amp; typeof functionArray[key] === "function") { functionArray[key](); } }); } // end of jb_onloads
has comment: http://stackoverflow.com/comment/46469534
score: 0
has answer: http://stackoverflow.com/a/29121519
tagged with: typeof
tagged with: arrays

http://stackoverflow.com/q/29109935
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
has body: I have a function called makeNewNode() that should take a Parse GeoPoint object and return a (custom) Parse object called node that contains a GeoPoint object with the key "location" and a pointer to another custom Parse object with the key "stop." What this function should do is essentially "snap" to a node if there is one within the SNAP_RADIUS of its GeoPoint. If not, return a brand new node with a null "stop" pointer and a "location" of the parameter geoPoint. I have a couple issues with this code. The first is that it seems to always fail to return anything. The Parse query always returns success, which is good. However, it only returns something usable when it "snaps." Otherwise it just returns an undefined results variable. The second (and main) is that regardless of snapping or not, the function never returns anything remotely similar to the node object that I'm expecting. This leads me to believe through extensive use of console.log that node is never changed or affected by the actions within the success function of the query. The third is related to the previous in a more general sense. Every time I've tried to return an object from a function in Javascript it hasn't acted the way I've expected. Every time I've tried to change a variable from within a query's success function nothing actually changes. I am a little new to this more in-depth Javascript as my previous experience has been a little more light. This is the troublesome code. function makeNewNode(geoPoint) { var node = {}; var Node = Parse.Object.extend("Nodes"); var query = new Parse.Query(Node); query.withinMiles("location",geoPoint,SNAP_RADIUS); query.first({ success: function(results) { console.log(results); console.log(results + ""); if (results == undefined) { node = new Node(); node.set("location",geoPoint); node.set("stop",null); node.save(); console.log(node.id); } else { node = results; } }, error: function(error) { console.log("Failed to create a node. Error: " + error.message + "."); …
accepted answer: http://stackoverflow.com/a/29110956
favorite count: 0
possible better answer: http://stackoverflow.com/a/29110190
has answer: http://stackoverflow.com/a/29110190
type: AnsweredQuestion
tagged with: parse-platform
upvote count: 1
has title: Javascript doesn't seem to return Parse objects properly
type: Question
has answer: http://stackoverflow.com/a/29110956

http://stackoverflow.com/a/29200013
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29199882
has body: You have to change two things. The first is you are using innerHTML in a input element, when you want to access input element you need to get the value not the innerHTML, inputs not have this property. The second one is that you need to pass the event on the onclick event since if you don't do it you can't cancel the submit action and then the page will be submit it automatically and reload the content. Then after you pass the event you have to apply event.preventDefault which will stop the submit for that button. Other option to avoid this problem would be possible to replace the submit button with a &lt;button&gt; tag or &lt;input type="button"&gt; since not of them will trigger the submit action. You can see a working example https://jsfiddle.net/5c4j2opc/9/ html -> same you have javascript var word = document.getElementById('word'), originalStory = document.getElementById('story'), button = document.getElementById("submitButton"); button.onclick = function(e){ replaceStory(word.value); e.preventDefault(); }; var replaceStory = function(userWord) { var story = ("A " + userWord + " is now part of the story"); return originalStory.innerHTML = story; };

http://stackoverflow.com/comment/47038597
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29140168
has text: @marcamillion If you render modal for each node then isn't the problem that you call the modal by ID? What i mean is that you have multiple modals with same ID #TagUsersModal so it will always open the last one. Each modal should have unique ID. So change id of modal to correspond to node.id maybe simply "modalNode1" "modalNode2" etc. and trigger it with Tag Users .

http://stackoverflow.com/a/29209372
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/46628689
downvote count: 1
has comment: http://stackoverflow.com/comment/46629031
answers question: http://stackoverflow.com/q/29209349
has comment: http://stackoverflow.com/comment/46628643
has comment: http://stackoverflow.com/comment/46628841
type: Answer
has body: You want to use splice() instead of delete. That should work. var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.splice(2, 0, "Lemon", "Kiwi"); will give: Banana,Orange,Lemon,Kiwi,Apple,Mango If you don't want to add new elements while removing others, you might wanna do this; fruits.splice(2, 1); The result of fruits will be: Banana,Orange,Lemon Shamelessly copied from W3Schools In your case, function RemoveFilter(filtArray,filtName) { var filtCount = filtArray.length; for (var i = 0; i &lt; filtCount; i++) { var filter = filtArray[i]; if (filter != undefined &amp;&amp; filter.name == filtName) { filtArray.splice(i,1); } } } This will remove the i-th object and not leave an undefined hanging there.

http://stackoverflow.com/comment/46513412
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29138065
has text: Try using [this page](http://mrcoles.com/bookmarklet/) to convert your code to a bookmarklet. You can also minify it first before doing so. The link that it creates when copying in my code works fine for me.
score: 0

http://stackoverflow.com/q/29079575
has comment: http://stackoverflow.com/comment/46392446
answer count: 9
downvote count: 1
has body: Is there a way to use the Date().getTime() function without getting the time in milliseconds? If not is there a substitute for .getTime() which will only give me the precision in minutes? Also I'm not sure how to just strip the milliseconds out of the date object. var time = new Date().getTime() Output: 1426515375925
has answer: http://stackoverflow.com/a/29079732
has comment: http://stackoverflow.com/comment/46392514
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29079726
accepted answer: http://stackoverflow.com/a/29079645
score: 21
has title: .getTime() Alternative without milliseconds
has answer: http://stackoverflow.com/a/70238984
has comment: http://stackoverflow.com/comment/46392552
has comment: http://stackoverflow.com/comment/138553890
has answer: http://stackoverflow.com/a/29079660
possible better answer: http://stackoverflow.com/a/35452561
type: Question
upvote count: 22
has answer: http://stackoverflow.com/a/35452561
tagged with: javascript
has answer: http://stackoverflow.com/a/29079652
has answer: http://stackoverflow.com/a/79539274
has comment: http://stackoverflow.com/comment/46392576
has answer: http://stackoverflow.com/a/29079645
favorite count: 0
has answer: http://stackoverflow.com/a/61504643

http://stackoverflow.com/q/29164276
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
has body: I have tried to create a sample to demo the Charts using Chart.js. I am able to do it very well. Now I want to export this Chart to Excel and PDF. Or is it possible to do so using Chart.js Here's my JavaScript code: function TyLyReport(){ var barChartData = { labels : ["Jan","Feb","Mar"], datasets : [ { fillColor : "#616161", highlightFill: "#616161", data : [1000,2000,2500] }, { fillColor : "#FF4848", highlightFill: "#FF4848", data : [1016,1800,2900] } ] } window.onload = function(){ var ctx = document.getElementById("canvas").getContext("2d"); window.myBar = new Chart(ctx).Bar(barChartData, { responsive : true, scaleOverride: true, scaleSteps: 3, scaleStepWidth: 1000, scaleStartValue: 0, scaleShowLabels: true, barValueSpacing : 30 }); } } Here's my HTML code: &lt;div style="width: 80%"&gt; &lt;canvas id="canvas" class="reportbox"&gt;&lt;/canvas&gt; &lt;/div&gt; &lt;script&gt; TyLyReport(); &lt;/script&gt; Can I do so using this Chart.js? If yes, please suggest the probable solution or if no, please tell me if there's any open source tool to do so. Thanks a lot in advance.
tagged with: http://stackoverflow.com/tag/pdf
score: 2
type: AnsweredQuestion
downvote count: 0
has title: How to export a chart in Excel and PDF format using Chart.js
has answer: http://stackoverflow.com/a/33051253
accepted answer: http://stackoverflow.com/a/33051253
tagged with: export-to-excel
type: Question
tagged with: chart.js

http://stackoverflow.com/q/29096459
downvote count: 0
tagged with: javascript
score: 1
has body: I am trying to get some data to render a scatter plot using Highcharts. Here is a sample of the data. { "results": [ [ "2013-04-14 10:00", -1 ], [ "2013-04-14 11:48", 0 ], [ "2013-04-14 14:45", -1 ], [ "2013-04-14 18:02", -1 ], [ "2013-04-14 18:45", -1 ], [ "2013-04-14 19:57", -1 ], [ "2013-04-14 22:19", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", -1 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-14 23:00", 0 ], [ "2013-04-15 00:18", 0 ], [ "2013-04-15 00:21", 0 ], [ "2013-04-15 00:22", 0 ], [ "2013-04-15 00:24", 1 ], [ "2013-04-15 04:15", -1 ], [ "2013-04-15 09:02", -1 ] ] } Here is the js: $(document).ready(function() { var options = { chart: { renderTo: 'container', type: 'scatter', zoomType: 'xy' }, title: { text: 'Sentiment Report by Publish Date' }, subtitle: { text: 'Written by Kat Chilton for Oxyme' }, xAxis: { title: { text: 'Publish Date' }, type: 'datetime' }, yAxis: { min: 0, title: { text: 'Sentiment', align: 'high' }, labels: { overflow: 'justify' } }, plotOptions: { scatter: { marker: { radius: 5, states: { hover: { enabled: true, lineColor: 'rgb(0,0,0)' } } }, states: { hover: { marker: { enabled: false } } }, allowPointSelect: true, dashStyle: 'dot', } }, legend: { layout: 'vertical', align: 'left', verticalAlign: 'top', y: 0, floating: true, borderWidth: 1, backgroundColor: ((Highcharts.theme &amp;&amp; Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), shadow: true }, credits: { enabled: false }, series: [{}] }; $.getJSON('sample.json', function(data) { options.series[0].data = data; var chart = new Highcharts.Chart(options); }); I'm not getting any points rendered on the page, but the chart does appear with the titles and what not. I presume this is an issue with data formatting, but I just can't seem to find the cause. Can anyone help out?
type: AnsweredQuestion
tagged with: datetime
has comment: http://stackoverflow.com/comment/46423961
favorite count: 0
has title: Highcharts data import JSON - formatting
type: Question
has answer: http://stackoverflow.com/a/29096671
upvote count: 1
answer count: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/29096671
tagged with: highcharts

http://stackoverflow.com/q/29136535
has comment: http://stackoverflow.com/comment/46497984
accepted answer: http://stackoverflow.com/a/29136656
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29136656
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46498028
has comment: http://stackoverflow.com/comment/46498189
downvote count: 0
score: 1
has body: I am attempting to use php to print out a line of text onto a html file, but when I run the html, it merely prints the word undefined. How can I fix this? Here is the code: HTML: &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; var xmlhttp=new XMLHttpRequest(); var textinhtml=document.createElement("div"); var text=document.createTextNode(xmlhttp.open("GET","http://mikeyrichards.bugs3.com/test.php",true)); textinhtml.appendChild(text); document.body.appendChild(textinhtml); xmlhttp.send(); &lt;/script&gt; &lt;/body&gt; PHP: &lt;?php echo "Hello, World" ?&gt;
type: Question
has title: How do you use echo in php to print text in html?
has comment: http://stackoverflow.com/comment/46498105
has comment: http://stackoverflow.com/comment/46498077
tagged with: javascript
has comment: http://stackoverflow.com/comment/46498079

http://stackoverflow.com/a/29176135
has body: Just use drawImage() with the resize parameters: context.drawImage(image, point.x, point.y, wantedWidth, wantedHeight); Image source can be image or even context itself. (Also remember to use onload handler on the image element before attempting to draw it.) var ctx = document.querySelector("canvas").getContext("2d"), img = new Image; img.onload = function() { ctx.drawImage(this, -200, -200, 800, 800); ctx.drawImage(this, 0, 0); }; img.src = "http://i.imgur.com/RV2a28T.png"; &lt;canvas/&gt;
accepted answer of: http://stackoverflow.com/q/29172223
answers question: http://stackoverflow.com/q/29172223
score: 4
has comment: http://stackoverflow.com/comment/46570505
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46570445
has comment: http://stackoverflow.com/comment/46570359
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46570413

http://stackoverflow.com/comment/46491932
type: AnswerComment
score: 0
type: Comment
has text: Yup, you got it also. Good job. +1
comment on: http://stackoverflow.com/a/29132889

http://stackoverflow.com/comment/46600035
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29193097
score: 0
has text: Are you sure all the files are where you point to? In the console, are there any warnings?

http://stackoverflow.com/comment/46636498
type: QuestionComment
comment on: http://stackoverflow.com/q/29213392
score: 0
has text: it can never happen. `"50"` is converted to `50` and `50 > 100` results in `false`, so the if block is never executed.
type: Comment

express
tags question: http://stackoverflow.com/q/29163399
tags question: http://stackoverflow.com/q/29104986
tags question: http://stackoverflow.com/q/29190397
tags question: http://stackoverflow.com/q/29139068
tags question: http://stackoverflow.com/q/29067778
tags question: http://stackoverflow.com/q/29198933
tags question: http://stackoverflow.com/q/29090331
tags question: http://stackoverflow.com/q/29168642
tags question: http://stackoverflow.com/q/29121266
tags question: http://stackoverflow.com/q/29180207
tags question: http://stackoverflow.com/q/29111171
tags question: http://stackoverflow.com/q/29164382
tags question: http://stackoverflow.com/q/29212414
tags question: http://stackoverflow.com/q/29158904
tags question: http://stackoverflow.com/q/29087411
tags question: http://stackoverflow.com/q/29170488
tags question: http://stackoverflow.com/q/29064590
tags question: http://stackoverflow.com/q/29216433
tags question: http://stackoverflow.com/q/29174185
tags question: http://stackoverflow.com/q/29122495
tags question: http://stackoverflow.com/q/29120323
tags question: http://stackoverflow.com/q/29067583
tags question: http://stackoverflow.com/q/29186014
tags question: http://stackoverflow.com/q/29083372
tags question: http://stackoverflow.com/q/29085377
tags question: http://stackoverflow.com/q/29196364
tags question: http://stackoverflow.com/q/29189233
tags question: http://stackoverflow.com/q/29118221
tags question: http://stackoverflow.com/q/29064741
tags question: http://stackoverflow.com/q/29106620
tags question: http://stackoverflow.com/q/29146751
tags question: http://stackoverflow.com/q/29179291
tags question: http://stackoverflow.com/q/29215004
tags question: http://stackoverflow.com/q/29197604
tag name: express
tags question: http://stackoverflow.com/q/29130853
tags question: http://stackoverflow.com/q/29136742
tags question: http://stackoverflow.com/q/29098937
tags question: http://stackoverflow.com/q/29087318
type: Tag
tags question: http://stackoverflow.com/q/29102672
tags question: http://stackoverflow.com/q/29188798
tags question: http://stackoverflow.com/q/29207878
tags question: http://stackoverflow.com/q/29067255
tags question: http://stackoverflow.com/q/29134611
tags question: http://stackoverflow.com/q/29169702
tags question: http://stackoverflow.com/q/29113939
tags question: http://stackoverflow.com/q/29068776
tags question: http://stackoverflow.com/q/29139241
tags question: http://stackoverflow.com/q/29113507
tags question: http://stackoverflow.com/q/29070113
tags question: http://stackoverflow.com/q/29120250
tags question: http://stackoverflow.com/q/29064840
tags question: http://stackoverflow.com/q/29197636
tags question: http://stackoverflow.com/q/29212938

fine-uploader
tags question: http://stackoverflow.com/q/29100133
tag name: fine-uploader
type: Tag
tags question: http://stackoverflow.com/q/29173161

http://stackoverflow.com/q/29100676
tagged with: javascript
has comment: http://stackoverflow.com/comment/46431751
answer count: 6
has answer: http://stackoverflow.com/a/29100797
tagged with: jquery
has body: var a = "1:2:3:4"; var b = "0:1:5:2"; I want at the end: var c = "1:3:8:6"; meaning, the numbers are summed by column. my solution is: var i, k; var a_arr = a.split(':'); var b_arr = b.split(':'); for (i=0;i&lt;a_arr.length;i++){ and here again another loop over b_arr } eeh ok, I dont have solution.. what is the cutest way to do this?
favorite count: 0
possible better answer: http://stackoverflow.com/a/29100782
has answer: http://stackoverflow.com/a/29100793
has answer: http://stackoverflow.com/a/29100782
has answer: http://stackoverflow.com/a/29100775
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29100908
has answer: http://stackoverflow.com/a/29100878
has comment: http://stackoverflow.com/comment/46431666
score: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/29100793
downvote count: 1
type: Question
has title: add elements of two arrays - the best way

http://stackoverflow.com/comment/46633251
comment on: http://stackoverflow.com/a/29211756
has text: is it the problem with calling `this.savePref(newProp);` with `this`
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/59400367
upvote count: 1
answers question: http://stackoverflow.com/q/29098888
score: 1
has body: I have made a custom stream Transform subclass for this purpose. The pro is that you can also tag your lines with your child process favorite name and it handles given \r the right way. Feel free to try my implementation: (in typescript but you could easily remove all type stuff) import { ChildProcessWithoutNullStreams } from "child_process"; import { Transform } from "stream"; export default class LineTagTransform extends Transform { lastLineData = ''; tag = ''; constructor(tag?: string) { super({ objectMode: true }); this.tag = tag || ''; if (tag &amp;&amp; !tag.endsWith(' ')) this.tag += ' '; } _transform(chunk: Buffer | string | any, encoding: string, callback: Function) { let data: string = chunk.toString().replace(/\r(?!\n)/, '\n\r'); if (this.lastLineData) data = this.lastLineData + data; let lines = data.split(/\r?\n/); this.lastLineData = lines.splice(lines.length - 1, 1)[0]; for (const line of lines) { if (line.startsWith('\r')) { this.push(`\r${this.tag}${line.substring(1)}`); } else { this.push(`\n${this.tag}${line}`) } } callback(); } _flush(callback: Function) { if (this.lastLineData) { if (this.lastLineData.startsWith('\r')) { this.push(`\r${this.tag}${this.lastLineData.substring(1)}`); } else { this.push(`\n${this.tag}${this.lastLineData}`) } } this.lastLineData = ''; callback(); } static wrapStreams(child: ChildProcessWithoutNullStreams, tag?: string, stdout: NodeJS.WriteStream = process.stdout, stderr: NodeJS.WriteStream = process.stderr) { child.stdout.pipe(new LineTagTransform(tag)).pipe(stdout); child.stderr.pipe(new LineTagTransform(tag)).pipe(stderr); } } Then the easiest way to use it: const child = spawn('./DownloadUnicorn.exe', options); LineTagTransform.wrapStreams(child, '[unicorn]'); Outputs: [unicorn] Start DownloadUnicorn! [unicorn] Downloading [=====-----] 50% ... With download bar animation on a single line! \o/ HTH! ;)
downvote count: 0
type: Answer

http://stackoverflow.com/q/29175877
tagged with: node.js
has answer: http://stackoverflow.com/a/72005609
score: 73
has comment: http://stackoverflow.com/comment/55746018
tagged with: http://stackoverflow.com/tag/json
upvote count: 73
type: Question
has comment: http://stackoverflow.com/comment/46570007
tagged with: stringify
has comment: http://stackoverflow.com/comment/46569617
has answer: http://stackoverflow.com/a/29287819
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/69548872
has title: JSON.stringify throws RangeError: Invalid string length for huge objects
has answer: http://stackoverflow.com/a/70207544
favorite count: 0
type: UnansweredQuestion
has body: As the title implies I'm trying to stringify huge JavaScript Object with JSON.stringify in my Node.js app. The objects are - again - huge (tens of mega bytes), they don't contain any functions. I need to write the serialized objects to a file. What I'm getting now is this: RangeError: Invalid string length at Object.stringify (native) at stringifyResult (/my/file.js:123:45) -&gt; line where I use JSON.stringify Any idea how to solve that issue?
linked to: http://stackoverflow.com/q/24153996
answer count: 4

http://stackoverflow.com/q/29076574
accepted answer: http://stackoverflow.com/a/29076623
type: Question
tagged with: arrays
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29076623
tagged with: lodash
type: AnsweredQuestion
has body: In several languages, it is pretty common to write a method that accepts either an array, or a single object: Ex in Ruby: def sum(array_or_single_element) # converts into array if single element, remains the same otherwise array = Array(array_or_single_element) array.reduce(:+) end I have the feeling Lodash is here to provide this type of utilities to JS. But it doesn't provide such method. Is it really absent? Is is so ovbious in JS (in which case I missed it) so that it doesn't need to be in the framework? I don't really like writing if (typeof array === 'Array') { // }
score: 1
has title: How to create an Array with a single element or an array of elements?
upvote count: 1

http://stackoverflow.com/q/29124579
has answer: http://stackoverflow.com/a/29124703
score: 6
tagged with: meta-tags
upvote count: 7
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46475324
tagged with: javascript
answer count: 1
has body: I am having trouble retrieving information from a meta tag. I am trying to get an img src from a website and can't quite figure it out. Here is an example of what I am trying to do. &lt;meta property="og:image" content="http://foo.jpg"&gt; var image = document.querySelector('meta[property="og:image"]').getAttribute('content'); I have tried this but it doesn't work. Any ideas?
favorite count: 0
has title: Get meta data attribute in javascript
type: UnansweredQuestion

http://stackoverflow.com/q/29065808
score: 0
tagged with: php
answer count: 1
has title: tinyMCE 4.1.9 and Small Window Size Freezes
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/29134368
tagged with: tinymce
type: Question
accepted answer: http://stackoverflow.com/a/29134368
has body: tinyMCE on the smaller screen sizes seem to just completely freeze. This happens on iPads and on a full-desktop using Chrome but with the window resized. I'm not doing anything fancy: &lt;script type="text/javascript"&gt; tinymce.init({ selector: "textarea#tinyMCE", height: 350, toolbar: [ "undo redo | fontselect | fontsizeselect | bullist numlist | outdent indent | bold italic", ], plugins: [ "lists link save paste" ] }); &lt;/script&gt; Any advice? I am using version 4.1.9 (2015-03-10)

http://stackoverflow.com/comment/46578342
has text: Is that not what `codeCrawlerWebSelenium.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromDays(1)); CrawlerWebSelenium.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromDays(1)); CrawlerWebSelenium.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromDays(1));` doing?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29166781

http://stackoverflow.com/a/29074516
has body: Basically, you can't do this. If you can't change anything on the mitarbeiter page then there's nothing you can do about how the page opens. There's lots of easy ways to send information from one page to another, but that doesn't help anything when you can't make the mitarbeiter page "respond" to the information you want to send. (when I say "information" then I really mean 'any' kind of data that the receiving page can act on, like a "open Prof. Peter Nyhuis on load" kind of message)
answers question: http://stackoverflow.com/q/29074282
score: 0
has comment: http://stackoverflow.com/comment/46826126
type: Answer

http://stackoverflow.com/q/29100832
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29206081
accepted answer: http://stackoverflow.com/a/29206081
has body: Is it possible to apply different color to different noise markers while clustering using here maps api? There's a theming option available, but that applies to all markers. I would like to set a specific color to specific point based on certain conditions.
linked to: http://stackoverflow.com/q/27185693
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has title: Different color to noise marker using here maps
tagged with: maps
type: Question
tagged with: here-api
tagged with: javascript

http://stackoverflow.com/q/29124665
tagged with: composite-component
answer count: 1
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46478294
tagged with: jsf
linked to: http://stackoverflow.com/q/11988415
downvote count: 1
type: Question
score: 3
has comment: http://stackoverflow.com/comment/46478975
has answer: http://stackoverflow.com/a/29129816
has body: I have a JSF composite component like this: &lt;cc:implementation&gt; &lt;div id="#{cc.clientId}"&gt; &lt;h:outputScript library="js" name="helper.js"/&gt; &lt;script type="text/javascript"&gt; if(typeof variables === "undefined"){ var variables = {}; } (function(){ variables.formid = '#{cc.clientId}'; })(); &lt;/script&gt; &lt;/div&gt; Value of variables.formid I'm using in a helper.js file. When I include this composite component only once, it's working like it should. When I include multiple composite components, every component receives the value of a last included composite component, how can I solve this issue?
tagged with: javascript
has title: How to make same JSF Composite Component included multiple times to have its own javascript scope?
upvote count: 4
accepted answer: http://stackoverflow.com/a/29129816

http://stackoverflow.com/comment/46468216
has text: @Cerbrus "minutes if number is greater or equals 10". So if you enter 10 it will be parsed as minutes. All numbers that are less than 10, e.g. 8 will be interpreted as hours. As to me it makes sense in time tracker, you will never track 8 minutes on any task.
comment on: http://stackoverflow.com/q/29119328
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46630671
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29208395
has text: (just had a peek at Masonry) you need to initialize your Masonry instance http://masonry.desandro.com/

http://stackoverflow.com/comment/46367709
type: Comment
comment on: http://stackoverflow.com/a/29065007
type: AnswerComment
has text: Found a solution using findOne, thanks for the help. I posted it below.
score: 0

http://stackoverflow.com/comment/46418499
has text: @s0rT4_w3Bn1Nj4: No, no limits, it's the same expression eval as everywhere else. There must be either a timing issue (the elements don't exist as of when you try to get them, although in your comment you showed a `ready` handler, so...) or there's some misunderstanding when you're retrieving them.
type: Comment
comment on: http://stackoverflow.com/a/29087887
score: 0
type: AnswerComment

http://stackoverflow.com/comment/114997984
comment on: http://stackoverflow.com/a/29202477
has text: What happened to requirebin? Is it gone? Is there something like it that you can use now?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/61087895
upvote count: 1
has body: I found this question today, but I'm not sure why was this made so complicated rather than implementing it simply like: var input = $('#target'); var inputVal = input.val(); input.on('change', function() { console.log('Current Value: ', $(this).val()); console.log('Old Value: ', inputVal); inputVal = $(this).val(); }); If you want to target multiple inputs then, use each function: $('input').each(function() { var inputVal = $(this).val(); $(this).on('change', function() { console.log('Current Value: ',$(this).val()); console.log('Old Value: ', inputVal); inputVal = $(this).val(); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29118178
has comment: http://stackoverflow.com/comment/127736160
score: 1

http://stackoverflow.com/a/29101298
answers question: http://stackoverflow.com/q/29100435
score: 0
has body: If you have multiple *.js (javascript) files in same directory as well. node wont run multiple files in same command line. eg if you had a.js,b.js,c.js within test and then, node test/*.js will return output of a.js only. Another proposal, Assuming you doing some form of automation with different scenarios, try creating a batch executable (or bash script in case of linux) with something like this, node test/l1/a.js node test/l1/a1.js node test/l2/b.js this will give you additional option to control test/js to execute.
type: Answer

http://stackoverflow.com/a/29213796
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/46637068
has body: eval works within a very special environment which is in many ways a lot like local scope. So if you're calling eval on that string within a function, the someName function will only be declared within that function, e.g.: function doSomething(str) { eval(str); snippet.log(typeof someName); // "function" } doSomething("function someName() { }"); snippet.log(typeof someName); // "undefined" &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; If you want it declared globally, you have to do some work. Kangax wrote up an excellent discussion of the options for "global eval". One of the options is the one David Flanagan suggested: var geval = this.execScript || eval; Then use geval. This works because IE has execScript, which works at global scope, and in other browsers calling eval indirectly through a variable referring to it makes it work at global scope as well. But read the article for more details and options. function doSomething(str) { var geval = this.execScript || eval; geval(str); snippet.log(typeof someName); // "function" } doSomething("function someName() { }"); snippet.log(typeof someName); // "function" &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/46637125
has comment: http://stackoverflow.com/comment/46637790
has comment: http://stackoverflow.com/comment/46637389
answers question: http://stackoverflow.com/q/29213692
accepted answer of: http://stackoverflow.com/q/29213692
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46638433
downvote count: 0

http://stackoverflow.com/comment/46450807
has text: Omg, You are a lifesaver! Ofcourse it was it :) Thank you :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29110666

http://stackoverflow.com/q/29158003
type: Question
tagged with: javascript
has body: I would like to include the following php variable ($crs_sub2) inside my following javascript statement: &lt;script&gt; document.getElementById("checkbox1").addEventListener('change', function() { var crs_category1 = document.getElementById("checkbox1").checked; if (crs_category1 === true){ document.getElementById('checkboxLoading').innerHTML = ''; } else { window.open ('searchPage.php?user_query=$crs_sub2&amp;search=search','_self',false); &lt;/script&gt; my issue is as follow: the variable crs_sub2 refers to the following php statement: $search_query2 = $_GET['crs_category']; $get_cats = "select DISTINCT cat_subc1,cat_subc2,cat_subc3,cat_subc4,cat_subc5,cat_subc6,cat_subc7,cat_subc8,cat_subc9,cat_subc10,cat_subc11,cat_subc12,cat_subc13,cat_subc14,cat_subc15,cat_subc16,cat_subc17,cat_subc18 from categories where (cat_title like '%$search_query2%')"; $run_cats = mysqli_query($con, $get_cats); while ($row_cats=mysqli_fetch_array($run_cats)) { $crs_sub2 = $row_cats['cat_subc2']; }
has answer: http://stackoverflow.com/a/29158053
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
possible better answer: http://stackoverflow.com/a/29158053
type: AnsweredQuestion
has title: Php statement within javascript statement
score: 1
has answer: http://stackoverflow.com/a/29158024
accepted answer: http://stackoverflow.com/a/29158024
tagged with: mysql
upvote count: 1

http://stackoverflow.com/q/29111171
tagged with: spookyjs
tagged with: casperjs
score: 1
has comment: http://stackoverflow.com/comment/86474386
has body: I'm getting a Can't set headers after they are sent error when trying to run a SpookyJS (a driver for CasperJS) script after posted to a URL. I've found several other posts about people running this issue with Express and it has to do with the headers being sent multiple times and stuff. I'm just not sure how this relates with what I'm doing here. I have to have res.send to send the status of the request, right? Because if I don't have it, the form doesn't post. Any ideas what I'm doing wrong here? app.post('/submit', function (req, res) { // Send callback res.send(req.status); var spooky = require('spooky').create({ verbose: true, logLevel: 'debug', userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22', pageSettings: { loadImages: false, loadPlugins: false } }); spooky.start('http://google.com', function () { this.echo(this.getTitle()); }); // Run Spooky spooky.run(); });
upvote count: 1
type: Question
tagged with: phantomjs
tagged with: javascript
has answer: http://stackoverflow.com/a/29114619
tagged with: express
answer count: 1
downvote count: 0
has title: Express & Casper: Can't set headers after they are sent
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46522841
score: 1
comment on: http://stackoverflow.com/a/29150380
type: AnswerComment
type: Comment
has text: it's [Internet Explorer](https://developer.mozilla.org/en-US/docs/Migrate_apps_from_Internet_Explorer_to_Mozilla#Attach_event_handlers) stuff

http://stackoverflow.com/q/29154661
has comment: http://stackoverflow.com/comment/46530299
has comment: http://stackoverflow.com/comment/46530609
has body: I am using a javascript plugin http://flipbit.co.uk/2009/03/jquery-image-annotation-plugin.html to annotate images. I am unable to load my images in the exact size on the first run but it works when i refresh the page. When i am trying to do window.onload inside the function in the below code it loads the images but annotations are removed. &lt;script type="text/javascript"&gt; $(document).ready(function() { $.ajax({ url..... success:function(data){ //adding data to div $("#imgID").append($("&lt;img src="" id="" /&gt;")); //then calling this method function annotateAllImages(id) { $(window).load(function() { $("#"+id).annotateImage({ getUrl: id+'/getAnnotationData', saveUrl: id+'/saveData', deleteUrl: id+'/deleteData', editable: true, useAjax: true, }); }); } &lt;/script&gt; I tried doing $(window).load(function() { for the complete script but still it's not working. The canvas creation and stuff are done inside the plugin that i am using. Any help is appreciated.
tagged with: image
accepted answer: http://stackoverflow.com/a/29155580
has comment: http://stackoverflow.com/comment/46531042
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46531116
has comment: http://stackoverflow.com/comment/46531224
has comment: http://stackoverflow.com/comment/46531546
score: 0
has comment: http://stackoverflow.com/comment/46531453
has title: Unable to load actual image sizes on first run using javascript plugin (images are loading after refresh)
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/46530429
has answer: http://stackoverflow.com/a/29155580
has comment: http://stackoverflow.com/comment/46531743
has comment: http://stackoverflow.com/comment/46530471
type: AnsweredQuestion

http://stackoverflow.com/q/29194581
answer count: 1
has title: Sending canvas element over socket, maximum stack size in JS
accepted answer: http://stackoverflow.com/a/29199116
type: AnsweredQuestion
tagged with: socket.io
type: Question
has answer: http://stackoverflow.com/a/29199116
tagged with: javascript
has body: I've got a following problem: I want to send canvas element over sockets using socket.io and Node.js. I've created below (pseudo)code: var myCanvas = document.getElementById("myCanvas"); var ctx = myCanvas.getContext("2d"); // open sockets connection, join to the room etc. socket.on('message', function(message) { alert(message.canvas); }); $(myCanvas).mouseup(function(e) { socket.emit('message', { canvas: myCanvas, }); }); Unfortunately, the second peer doesn't receive a message, first received this error: Uncaught RangeError: Maximum call stack size exceeded from socket.io.js file, line 5380 Thanks for any help
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29096477
score: 1
favorite count: 0
tagged with: count
tagged with: regex
type: AnsweredQuestion
upvote count: 1
tagged with: match
has answer: http://stackoverflow.com/a/29096515
type: Question
tagged with: cpu-word
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29096515
has title: Match regex dont seperate uppercase or not uppercase
has comment: http://stackoverflow.com/comment/46423709
has body: I have been searching on the site, but could not find an answer to my problem. I have a JavaScript regex pattern that matches some words and numbers. If I use a keyword "gemstone" and my input string has "Gemstone" in it, no match is found due to the fact that the word starts with an uppercase letter. How can I make the regex stop caring if a word contains uppercase letters? My current code: var count = (countDescription.match(new RegExp('(\\b)('+ u + ')(\\b)', 'g')) || []).length;
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29217055
answers question: http://stackoverflow.com/q/29085147
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29085147
has body: I ended up solving it by using an infragistics webDropDown with the client-side event: function webDropDown_SelectionChanging(sender, e) { e.get_value()[0].set_text(e.get_value()[0].get_value()); }
type: AcceptedAnswer

http://stackoverflow.com/comment/46580227
has text: Tried it but no success.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29181442
type: AnswerComment

http://stackoverflow.com/comment/46465506
type: Comment
type: QuestionComment
has text: possible related question [JavaScript Google Maps polylines : issue in connecting all given GPS locations](http://stackoverflow.com/questions/27609872/javascript-google-maps-polylines-issue-in-connecting-all-given-gps-locations)
comment on: http://stackoverflow.com/q/29117931
score: 0

http://stackoverflow.com/comment/46685765
score: 0
comment on: http://stackoverflow.com/q/29173757
has text: Yes you are right this is a better option than map reduce. I initially wanted to avoided creating intermediate C# classes for service_schedule and parts, but I can see now that doesn't make much sense. Thanks for the suggestion!
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29110406
type: Answer
has comment: http://stackoverflow.com/comment/46450382
has body: In javascript functions are variables that execute some code, so basically instead of creating a function for every row, what you are doing is updating the function to only track the last element. Let's be clear of the places where each language works, PHP outputs your html in the server, the html is parsed by the browser and after that Javascript is executed in the browser (client side). This being said, the best approach to solve this is that you should store the data in the HTML as a data attribute on an specific element of each row, retrieve this with JavaScript, and then start a timeout that updates all the elements at the same time.
score: 0
has comment: http://stackoverflow.com/comment/46488856
answers question: http://stackoverflow.com/q/29110259
has comment: http://stackoverflow.com/comment/46450834
has comment: http://stackoverflow.com/comment/46450675

http://stackoverflow.com/q/29119753
type: Question
accepted answer: http://stackoverflow.com/a/29120153
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46467165
has comment: http://stackoverflow.com/comment/46466677
answer count: 1
favorite count: 0
has title: How to do this expression of php explode in javascript?
tagged with: explode
downvote count: 2
upvote count: 1
has body: Hey guys just wondering how this php explode code can be written in javascript. Taken from here: https://eval.in/82916 (full code) foreach ($array as $value) { list($a, $b) = explode(' ', $value); $arr1[] = $a; $arr2[] = $b; }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46466860
has comment: http://stackoverflow.com/comment/46466816
has answer: http://stackoverflow.com/a/29120153

http://stackoverflow.com/q/29180409
has title: Function to exit a parent function
has comment: http://stackoverflow.com/comment/46579088
upvote count: 3
answer count: 3
has body: I have a loop that runs indefinitely until I tell it to stop. I am actually using requestAnimationFrame and a lot more is going on, but the below example is just to simplify my question. var _stop = false; var loop = function () { while (!_stop) { if (some condition is met) { stop(); } /* Do something. */ loop(); } }; function stop() { _stop = true; } Now this all works great, but it will still run /* Do something */ one more time before it actually stops. I want it to stop immediately and return. Of course this can be done like so: if (some condition is met) { stop(); return; } But is there a way to include the return part into stop();? This doesn't do what I want for obvious reasons: function stop() { _stop = true; return; } But is there a way to achieve this?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46577518
score: 3
has answer: http://stackoverflow.com/a/29180564
has answer: http://stackoverflow.com/a/29181332
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29180934
type: Question
has comment: http://stackoverflow.com/comment/46579587
has comment: http://stackoverflow.com/comment/46577471

http://stackoverflow.com/comment/46609930
comment on: http://stackoverflow.com/q/29187574
type: Comment
type: QuestionComment
has text: @PouncingPoodle: Check the output for "/OW/idvProject6/scripts/dbcon.php". Once you refresh the page and the script is called, new stuff should show up in the response. A bunch of warnings and -- hopefully -- a fatal error.
score: 0

http://stackoverflow.com/comment/46615299
type: QuestionComment
has text: That's because you deleted `objID` from your code for some reason.
comment on: http://stackoverflow.com/q/29201619
score: 0
type: Comment

http://stackoverflow.com/comment/46633636
type: Comment
has text: I changed var OBJ = $(this).parent('div.fields') to var OBJ = $(this).closest('div.fields').
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29182168

http://stackoverflow.com/comment/46468829
type: QuestionComment
has text: @LShetty Yep, it's working out fine!
comment on: http://stackoverflow.com/q/29120582
score: 0
type: Comment

http://stackoverflow.com/a/29140524
upvote count: 0
type: Answer
has body: All you need to do is check from the browser request if it is mobile: Request.Browser.IsMobileDevice and add the code saving cookies and so on
downvote count: 1
answers question: http://stackoverflow.com/q/29139296
score: -1

http://stackoverflow.com/comment/46459648
has text: I know that it can be done for popup but my question was to disable for a window :(
type: Comment
comment on: http://stackoverflow.com/a/29115614
score: 0
type: AnswerComment

html-table
tags question: http://stackoverflow.com/q/29078681
tag name: html-table
tags question: http://stackoverflow.com/q/29146612
tags question: http://stackoverflow.com/q/29217051
tags question: http://stackoverflow.com/q/29212450
tags question: http://stackoverflow.com/q/29186834
type: Tag
tags question: http://stackoverflow.com/q/29074164
tags question: http://stackoverflow.com/q/29084216
tags question: http://stackoverflow.com/q/29150892
tags question: http://stackoverflow.com/q/29172645
tags question: http://stackoverflow.com/q/29154461

http://stackoverflow.com/a/29153346
has body: OK, I have found the proper solution. You need to listen for the 'loaded' event, which will trigger only after all tweet widgedts are displayed. twttr.ready(function (twttr) { // At this point the widget.js file had been loaded. // We can now make use of the twttr events twttr.events.bind('loaded', function (event) { // At this point all tweets have been fully loaded // and rendered and you we can proceed with our Javascript console.log("Created widget", event.target.id); }); });
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29153052
downvote count: 0
type: AcceptedAnswer
type: Answer
score: 3
answers question: http://stackoverflow.com/q/29153052

http://stackoverflow.com/comment/46457066
has text: However I cannot get the both animations to work at the same time - I need to translate and rotate simultaneously.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29109467
type: AnswerComment

http://stackoverflow.com/comment/46476867
type: QuestionComment
has text: sorry guy I updated the code to use ng-init not ng-click sorry for that typo
comment on: http://stackoverflow.com/q/29125173
score: 0
type: Comment

http://stackoverflow.com/a/29185973
accepted answer of: http://stackoverflow.com/q/29185858
has body: words=['11111','2222','3333']; var selected= words[Math.floor(Math.random()*words.length)]; document.getElementsByClassName('word')[0].textContent=selected; ( HTML example) &lt;div class =" word"&gt;&lt;/div&gt;
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29185858

http://stackoverflow.com/a/29199903
has comment: http://stackoverflow.com/comment/46612484
type: AcceptedAnswer
downvote count: 0
score: 1
has body: This is completely untested but should do the job, good luck function generateBombs() { var targetTable = document.getElementsByTagName('table')[0], used = [], bomb = 0, x, y; while (bomb &lt;= 9) { y = Math.round(Math.random() * 7); x = Math.round(Math.random() * 7); if (used.indexOf(y + ':' + x) === -1) { targetTable.getElementsByTagName('tr')[y] .getElementsByTagName('td')[x] .innerHTML = '&lt;img src="bomb.png" /&gt;'; used.push(y + ':' + x); bomb++; } } } generateBombs(); JSFiddle http://jsfiddle.net/pfxpcoe0/
type: Answer
has comment: http://stackoverflow.com/comment/46612426
accepted answer of: http://stackoverflow.com/q/29199824
has comment: http://stackoverflow.com/comment/46612427
answers question: http://stackoverflow.com/q/29199824
upvote count: 1
has comment: http://stackoverflow.com/comment/46612497
has comment: http://stackoverflow.com/comment/46612332

http://stackoverflow.com/comment/46572937
type: Comment
comment on: http://stackoverflow.com/q/29159659
score: 0
has text: The button is created inside .addIncrementArrows() jQuery(" ").insertAfter(input);
type: QuestionComment

http://stackoverflow.com/q/29178117
score: 1
tagged with: ajaxcontroltoolkit
has title: Errors in Ajax Control Toolkit's JS files after upgrade?
type: Question
tagged with: javascript
tagged with: ajax
upvote count: 1
answer count: 1
has body: I upgraded Ajax Control Toolkit to v15.x and have been working on cleaning up the code after doing so. I'm running across exceptions being thrown, and VS breaks at points in the toolkit's JS files. I'm not sure why or how. I've already double-checked that any scripts are not referenced multiple times, as was the leading suggestion on Google, but I still haven't figured it out. I really need some help with this, as I have two months invested in this project. By the way, I'm using VS2013 and the project is in ASP/VB. Here are a couple of the errors (to get the next, I've hit Continue): Unhandled exception at line 1647, column 38 in http://localhost:50236/ScriptResource.axd?d=D9drwtSJ4hBA6O8UhT6CQmpVfriIlRNRich93DvwGtp67E1h_mWKZOFWLDGS9BMtlj8olqCr6zhXtNsVz0umlIymKK0GfDoqTLzNLe2YQI2ElwoX58_2MZEcEFLKjdG6fbv26oE3vanxWpdhskXpgCIAYbDVlsaWWDXPE-98sV01&amp;t=ffffffffb53e74b8 and Unhandled exception at line 785, column 42 in http://localhost:50236/ScriptResource.axd?d=D9drwtSJ4hBA6O8UhT6CQmpVfriIlRNRich93DvwGtp67E1h_mWKZOFWLDGS9BMtlj8olqCr6zhXtNsVz0umlIymKK0GfDoqTLzNLe2YQI2ElwoX58_2MZEcEFLKjdG6fbv26oE3vanxWpdhskXpgCIAYbDVlsaWWDXPE-98sV01&amp;t=ffffffffb53e74b8 0x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Type Sys.Timer has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update. 0x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Type Sys.Extended.UI.BoxSide has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update. Any and all help is appreciated! Thanks!
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
tagged with: vb.net
has answer: http://stackoverflow.com/a/29178206
downvote count: 0

http://stackoverflow.com/comment/46384510
type: QuestionComment
comment on: http://stackoverflow.com/q/29074689
score: 0
has text: I am using Papa Parse javascript plug-in for getting each column and then checking data-type.
type: Comment

http://stackoverflow.com/q/29095976
tagged with: jquery
has comment: http://stackoverflow.com/comment/46422936
has body: I have a popup div like confirm to show like below check me Ok cancel Now this popUp will be open on some condition, and on button click I want to return some values to parent function Button events $(".spok").click(function(){ return 'OK'; }); $(".spcancel").click(function(){ return 'CANCEL'; }); showPop method function showpop (){ $('.pop').show(); } now calling like this var retval = showpop() alert(retval); But it seems I am no where close to my requirement. Code on fiddle Fiddle Update Able to call back the function but.... When i tried to hide the popup it alerts as many times it has been called. Select Yes or no in dropdown then after click on Ok or cancel, two or three times, you will see effect Updated fiddle [Fiddle2][2]
has comment: http://stackoverflow.com/comment/46422865
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/29096077
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/29096077
has comment: http://stackoverflow.com/comment/46422907
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/46422908
has title: Jquery return to parent function on button click
tagged with: javascript

youtube-javascript-api
type: Tag
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/29088397

http://stackoverflow.com/comment/46587979
type: QuestionComment
comment on: http://stackoverflow.com/q/29185959
has text: Tank's man, you save me, It´s working now. I put only two colunn becouse I was testing.
score: 0
type: Comment

http://stackoverflow.com/comment/46431062
type: Comment
has text: the output should be like this- { "name": "root", **"id":12**, "children": [ { "name": "child-1", **"id": 12.0** "children": [ { "name": "inner-child-1", **"id" : 12.0.0** },{ "name": "inner-child-2", **"id" : 12.0.1** } ]}
comment on: http://stackoverflow.com/a/29099677
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46493713
type: AnswerComment
has text: sorry, i thought this would work and marked it as answer but it ended up not working when i put it in my code.
type: Comment
comment on: http://stackoverflow.com/a/29132930
score: 0

http://stackoverflow.com/q/29171918
has answer: http://stackoverflow.com/a/29172499
type: AnsweredQuestion
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/29172499
type: Question
has title: Cipboard is copying the wrong text when click
answer count: 1
tagged with: javascript
has body: When I click on the button to copy the first time I get blank and the second time I get the the last time I click on the button and on the alert I also get alot of black space before the #emp_ext#. Why is it reacting this way? Im only would like it to work on IE9. #emp_ext# #emp_ext# <cfelseif #Left(getAllDetails.emp_ext, 1)# eq '5'> 655-emp_ext# #emp_ext# <cfelse #Left(getAllDetails.emp_ext, 1)# eq '6'> #emp_ext# #emp_ext#
score: 0

http://stackoverflow.com/q/29213545
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46637468
tagged with: zooming
score: 0
has answer: http://stackoverflow.com/a/35389435
has title: Enabling pinch zoom on iOS when using iScroll.js
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46637256
type: UnansweredQuestion
tagged with: iscroll
has body: I'm building a one page scrollable web application using iScroll.js and I can't get its built in zoom feature to work no matter what I do. I'm including the iscroll-zoom.js file yet still haven't had any success. I've got this in the head of my file: &lt;script src="js/iscroll.js"&gt;&lt;/script&gt; &lt;script src="js/iscroll-zoom.js"&gt;&lt;/script&gt; &lt;script src="js/iscroll-probe.js"&gt;&lt;/script&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"&gt; And this script: function loaded () { myScroll = new IScroll('#wrapper', { mouseWheel: true, zoom: true, bounce: false }); According to the iScroll Documentation this should work, but it doesn't. If it helps, I need to get this running on an iPad.
type: Question

http://stackoverflow.com/comment/46537331
comment on: http://stackoverflow.com/q/29158470
has text: @BrianMains That's not a jQuery wrapper, it's an IIFE.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29194024
tagged with: javascript
has comment: http://stackoverflow.com/comment/66814866
has comment: http://stackoverflow.com/comment/46634312
answer count: 3
has answer: http://stackoverflow.com/a/29195590
has comment: http://stackoverflow.com/comment/46601503
has comment: http://stackoverflow.com/comment/66842566
favorite count: 0
has answer: http://stackoverflow.com/a/29194076
possible better answer: http://stackoverflow.com/a/29195590
has comment: http://stackoverflow.com/comment/66857721
has answer: http://stackoverflow.com/a/29201807
has comment: http://stackoverflow.com/comment/46643001
score: 13
linked to: http://stackoverflow.com/q/29046635
upvote count: 13
tagged with: safari
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46656648
has comment: http://stackoverflow.com/comment/66822013
has comment: http://stackoverflow.com/comment/66857424
accepted answer: http://stackoverflow.com/a/29201807
type: Question
has body: I don't understand the best way to use "let" keyword... In IE11 and Chrome45 I can use it fine In Safari8.0.4, like in older versions of Chrome, it gives the error "unexpected use of reserved word 'let'" In Firefox the let keyword only works inside &lt;script type="application/javascript;version=1.7"/&gt;, but this script type isn't even recognized as Javascript in IE11, Chrome45, Safari8. Here's a JSFiddle that shows it in action: https://jsfiddle.net/p6cgtyg6/1/ So -- I don't mind requiring users to use modern versions of their browsers. And I don't mind excluding Safari if there honestly is no version of Safari that supports this keyword. (Is that really true? Why does everyone spend all their time griping about IE when Safari seems so much worse in ES6 terms? Have I missed something?). But how should I allow "let" to work in Firefox while not preventing Chrome/IE? (I haven't yet found links from people griping about how Firefox script tag behaves differently from Chrome, and I'd have expected more complaints, so I figure I must have missed something obvious...)
tagged with: ecmascript-6
tagged with: firefox
downvote count: 0
has title: Can't use "let" keyword in Safari Javascript?

http://stackoverflow.com/q/29127387
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29127423
has body: I'm wondering how I can hide and element DIV without ID in Javascript. This is the code: Element 1 Text 1 Element 2 Text 2 ... Thank you!
score: -1
tagged with: dom
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/46481049
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29127423
answer count: 1
tagged with: events
has title: How can I hide an specific div element without id in JavaScript?
downvote count: 1

http://stackoverflow.com/comment/46602664
comment on: http://stackoverflow.com/a/29194612
score: 0
type: AnswerComment
has text: You got it - added the return false :)
type: Comment

http://stackoverflow.com/comment/46577854
score: 0
type: AnswerComment
has text: Try this, I do not get any error as literal in your code, put why are you `json_encode` a string that will return the same? `<?php echo " ";?>`
type: Comment
comment on: http://stackoverflow.com/a/29180500

http://stackoverflow.com/a/29118035
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29093192
accepted answer of: http://stackoverflow.com/q/29093192
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I just found another solution which actually fits my needs even better since the usage of the linear gradient interfered with some other styles (e.g. background image of the first cell depending on content, ...). This solution uses the pseudo element after: .x-grid-item-selected .x-grid-row:after { content: ''; width: 100%; height: 20px; position: absolute; left: 0; box-shadow: 0 0 6px 2px rgb(119, 119, 119) inset; } Working fiddle: https://fiddle.sencha.com/#fiddle/jrm The only downside of this method is that I have to set a fixed height. Again, I'd really appreciate if someone comes up with an even better way to do this. Thanks &amp; best regards

http://stackoverflow.com/comment/46389328
has text: Please try with serve your project from command prompt instead of just double click on html file. Thanks.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29077725

http://stackoverflow.com/a/29080700
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29080499
accepted answer of: http://stackoverflow.com/q/29080499
has comment: http://stackoverflow.com/comment/46416999
type: Answer
upvote count: 1
has body: try $('.addon-select').on('change', function () { $(this).find('option').each(function () { $('.product-addon-make-it-personal').removeClass(this.value); }); $('.product-addon-make-it-personal').addClass(this.value); }).change(); DEMO
has comment: http://stackoverflow.com/comment/46398017
type: AcceptedAnswer

http://stackoverflow.com/q/29091221
type: Question
answer count: 2
has title: regex jquery to replace number with link
has body: I have a page of database results where users occasionally type in a reference to another post. (The database is day event tracker for a scheduling office). The reference to the other post is always the posts ID (format of 001234). We uses these to match events with dockets and other paperwork from truck drivers. It is always a 6 digit number on its own. &lt;div class="eventsWrapper"&gt; Data from DB is output here using PHP in a foreach loop. Presents data in similar fashion to facebook for example. &lt;/div&gt; What I need to do is once the data in the above DIV is loaded, then go through and replace every whole 6 digit number (not part of a number) with the number as a hyperlink. It is important it only looks for number with a space either side: EG: Ref 001122 &lt;- like this - not like this -&gt; ignore AB001122 Once I have the hyperlink tag I can make the reference number clickable to take users directly to that post. I am not that good with regex but think it is something like: \b(![0-9])?\d{6}\b I have no idea how to search the DIV and then replace that regex with the hyperlink. Appreciate any help.
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29091430
tagged with: regex
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29091259

http://stackoverflow.com/q/29208648
has comment: http://stackoverflow.com/comment/46627465
downvote count: 4
answer count: 3
has comment: http://stackoverflow.com/comment/46627372
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/29209347
has comment: http://stackoverflow.com/comment/46627479
has comment: http://stackoverflow.com/comment/46627400
has body: The below code dynamically creates a span element. This part works. I am having trouble with altering the name of every new element with an incrementing javascript counter variable. The desired result would be: etc.. depending on the number of elements I choose to create.
type: Question
has answer: http://stackoverflow.com/a/29208787
has comment: http://stackoverflow.com/comment/46627450
has answer: http://stackoverflow.com/a/29208862
tagged with: javascript
tagged with: jquery
has title: How to print a javascript variable in a html element?

http://stackoverflow.com/comment/46364650
has text: @talemyn I've added my code. I've been able to 2 constraints (sum of grade cannot exceed 11) and freezing of other options once 3 valid selections are made. But I am unable to add further conditions in the checkbox.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29063897
score: 0

http://stackoverflow.com/q/29179000
favorite count: 0
linked to: http://stackoverflow.com/q/4244896
answer count: 3
duplicate of: http://stackoverflow.com/q/11256091
accepted answer: http://stackoverflow.com/a/29179014
tagged with: properties
type: AnsweredQuestion
upvote count: 0
has body: I am trying to use a variable to select from an array: This works: var myarray = {bricks:3000, studs:500, shingles:400, tiles:700}; function One() { alert(myarray.bricks); } But this does not work: var myarray = {bricks:3000, studs:500, shingles:400, tiles:700}; var myvalue = "bricks" function Two() { alert(myarray.myvalue); } How do I do this properly? Here is a fiddle to show what I am trying to accomplish: https://jsfiddle.net/chrislascelles/xhmx7hgc/2/
has answer: http://stackoverflow.com/a/29179014
type: Question
linked to: http://stackoverflow.com/q/11256091
tagged with: object
possible better answer: http://stackoverflow.com/a/29179007
score: -1
has title: Have a variable select from an array
has answer: http://stackoverflow.com/a/29179010
downvote count: 1
has answer: http://stackoverflow.com/a/29179007
tagged with: javascript

http://stackoverflow.com/a/29188992
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46592598
has comment: http://stackoverflow.com/comment/46609984
upvote count: 1
has comment: http://stackoverflow.com/comment/46593066
type: Answer
has comment: http://stackoverflow.com/comment/46601080
has comment: http://stackoverflow.com/comment/46601072
has body: Here you go: function print_stadtarchiv(print_picture) { if(!print_picture) $('#result_image').addClass('unprintable'); return window.print(); } It also looks like you have no DOCTYPE or html tags... This is likely to cause all sorts of rendering/not-rendering based issues. some stuff that should not be printed even more stuff that should not be printed some stuff more headlines some text print print without picture
answers question: http://stackoverflow.com/q/29188907
has comment: http://stackoverflow.com/comment/46593559

http://stackoverflow.com/q/29204074
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29204144
score: 0
tagged with: http://stackoverflow.com/tag/xml
has title: How to access xml node value on the basis of sibling node value using javascript?
type: UnansweredQuestion
type: Question
tagged with: xml-parsing
has body: I have a xml i.e Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 i get the value of author using xml dom parser in javascript. now i want to get the value of price node corresponding to value of author i get. how can i acheive this. for author i'm using this var xmlDoc=loadXMLDoc("books.xml"); var x=xmlDoc.getElementsByTagName("author"); var array = []; for (i=0;i<x.length;i++) { array.push(x[i].childNodes[0].nodeValue); alert(array.toString()); } thanks in advance

http://stackoverflow.com/comment/46467138
score: 0
has text: okay just oooooooooone more understanding follow up ^^: when I dont want to code an event on, but refer to a specific div in an attached html file e.g:... #headline ... how would I code that? atm I just use `$('#headline').toggleClass('active');` ... how would I need to rewrite that?
type: Comment
comment on: http://stackoverflow.com/q/29118727
type: QuestionComment

http://stackoverflow.com/comment/46656348
comment on: http://stackoverflow.com/q/29207304
has text: Yes, this is what I'm using except I've slightly modified to code: http://html5demos.com/dnd-upload I'm trying to get it to upload to a file on my server and then play the video with a new URL that my friends can link to each other...
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46610574
type: QuestionComment
has text: i did what u told me. Firstly created var pozX in enemies js.file but when I try to read its value in gracz. js file i get "cannot read property 'pozX' of undefined" var mob = start.mobki, "document.write(Math.round(mob.pozX));" this is how i try to read it
comment on: http://stackoverflow.com/q/29185870
score: 0
type: Comment

http://stackoverflow.com/a/29110916
accepted answer of: http://stackoverflow.com/q/29070627
has body: Here's the solution I've come up with. Note that in the code I use 'prefix' as a placeholder for whatever prefix you may use to distinguish your logic from AngularJS's. I have a couple of directives to handle touch start and end: directives.directive('prefixTouchstart', function () { return { restrict: 'A', link: function (scope, element, attrs) { element.on('touchstart', function (event) { scope.$apply(function () { scope.$eval(attrs.prefixTouchstart); }); }); } } }); directives.directive('prefixTouchend', function () { return { restrict: 'A', link: function (scope, element, attrs) { element.on('touchend', function (event) { scope.$apply(function () { scope.$eval(attrs.prefixTouchend); }); }); } } }) I then use the following directive to create the input fields. Note that touching one of the buttons and holding your finger there will progressively increment/decrement the input field. The model is only updated though when the touch end event fires. The reason for this is while updating the model in the setInterval logic works, AngularJS doesn't reflect these changes in the UI, and we can't call $apply because we'll simply get 'in progress' errors ($apply is called in the touchstart/touchend directives. cf. above). directives.directive('prefixNumericInput', ['$compile', function ($compile) { return { restrict: 'E', templateUrl: 'html-templates/numeric-input.html', transclude: true, scope: { prefixName: '@', prefixModel: '=', prefixPlaceholder: '@' }, link: function (scope, element, attrs, ctrl, transcludeFn) { var intervalId, inputElement = element.find('input'); var currentValue = scope.prefixModel ? scope.prefixModel : 0; inputElement.addClass('form-control'); // Add our buttons after the input's parent element $(element).after($compile(' ' + ' + ' + ' - ')(scope)); function decrementCurrentValue() { if (currentValue > 0) { --currentValue; return true; } return false; } function decrement() { if (decrementCurrentValue()) { inputElement[0].value = currentValue; } } …
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29070627

http://stackoverflow.com/a/29160987
answers question: http://stackoverflow.com/q/29160283
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29160283
type: Answer
score: 1
upvote count: 1
has body: response.getWriter().println(" "); This above code will never be rendered on the browser since you are forwarding you request to a JSP page, either using RequestDispatcher or using sendRedirect method. In both option, response will only be generated for what you have written on your JSP.

http://stackoverflow.com/comment/46398194
has text: @damluar The events don't get added to the queue until the timeout has happened. How the script host deals with the timeout is an implementation detail (ie it will vary between browsers etc) - it's only when the timeout has elapsed that the host will put the callback on the execution queue.
type: AnswerComment
comment on: http://stackoverflow.com/a/29082270
type: Comment
score: 2

http://stackoverflow.com/q/29085366
has comment: http://stackoverflow.com/comment/46424540
has body: I am new to angular js. I am trying to build simple app in which if If i load through ng-route it is not able to find view1.html whereas if I load from within same index.html it works. I already went through following post with same issue in which we have inject ibrary dependency of ng-route, but still it is not working index.html Test (view1 and index are under same directory) view1.html View1 Alpha Age {{phone.name}} {{phone.snippet}}
tagged with: javascript
has comment: http://stackoverflow.com/comment/46403772
has comment: http://stackoverflow.com/comment/46403614
downvote count: 0
has comment: http://stackoverflow.com/comment/65352737
tagged with: ngroute
has title: ng-route not able to load a view
favorite count: 0
has comment: http://stackoverflow.com/comment/46427440
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/21153616
has comment: http://stackoverflow.com/comment/46447559
has comment: http://stackoverflow.com/comment/46403935
score: 2
answer count: 0
upvote count: 2
tagged with: angularjs-ng-route
type: Question
has comment: http://stackoverflow.com/comment/46405612
has comment: http://stackoverflow.com/comment/65337359

http://stackoverflow.com/comment/46403600
comment on: http://stackoverflow.com/q/29076425
type: Comment
has text: Show the code. We are not yet equipped with telepathic powers.
type: QuestionComment
score: 1

http://stackoverflow.com/q/29183472
has title: Meteor: Select option from dynamically filtered dropdown
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Similar scenario as Meteor dynamically filter dropdown when another dropdown is selected : I'm able to populate the items in select #2 depending on select #1. But I cannot programmatically set a specific option of select #2 to selected - at least not right after the change event of select #1 - because the items are not yet populated. .html: Dropdown {{> hello}} {{#each products}} {{name}} {{/each}} Select One {{#each categories}} {{name}} {{/each}} Select One {{#each subCategories}} {{name}} {{/each}} .js: if (Meteor.isClient) { Template.hello.helpers({ products: function() { return Products.find(); }, categories: function() { return Categories.find(); }, subCategories: function() { return Session.get("selectedMainCat") && Categories.findOne({ name: Session.get("selectedMainCat") }).subCategories; } }); Template.hello.events({ "click li": function () { $("#main-cat").val(this.category); Session.set("selectedMainCat", $("#main-cat").val()); // now #sub-cat should be filled because of subCategories helper above $("#sub-cat").val(this.subCategory); // this should select the appropriate subcat, but doesn't. apparently it's slightly too early... }, "change #main-cat": function() { Session.set("selectedMainCat", $("#main-cat").val()); } }); } if (Meteor.isServer) { Meteor.startup(function () { Categories.remove({}); Categories.insert( { name: "MainCategory1", subCategories: [ {name: "SubCategory1.1"}, {name: "SubCategory1.2"} ] } ); Categories.insert( { name: "MainCategory2", subCategories: [ {name: "SubCategory2.1"}, {name: "SubCategory2.2"} ] } ); Products.remove({}); Products.insert({ name: "myProduct1", category: "MainCategory2", subCategory: "SubCategory2.2" }); Products.insert({ name: "myProduct2", category: "MainCategory1", subCategory: "SubCategory1.2" }); }); } collection.js: Products = new Mongo.Collection('products'); Categories = new Mongo.Collection('categories');
has comment: http://stackoverflow.com/comment/46583169
tagged with: meteor
answer count: 0
linked to: http://stackoverflow.com/q/27387222
type: UnansweredQuestion
upvote count: 1
score: 1

http://stackoverflow.com/q/29081246
has answer: http://stackoverflow.com/a/29081302
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29081302
linked to: http://stackoverflow.com/q/20279484
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29081318
has title: Why can't I access $(this) in ajax success
has answer: http://stackoverflow.com/a/29081318
duplicate of: http://stackoverflow.com/q/20279484
answer count: 2
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: The issue is pretty straight forward, I can not reference $(this) in the success section of my jQuery ajax call, for example this does not work (to hide the clicked element): $('.assigned').click(function (event) { event.preventDefault(); $.post("@Url.Action("method", "controller")", { TicketId: $(this).data("ticketid"), }, function (data, status) { $(this).hide(); }); }); its worth noting the data is sent. However this hides the element just fine: $('.assigned').click(function (event) { event.preventDefault(); $(this).hide(); $.post("@Url.Action("method", "controller")", { TicketId: $(this).data("ticketid"), }, function (data, status) { }); }); Why is this happening? Tested in FireFox
has comment: http://stackoverflow.com/comment/46395718
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46396031
has comment: http://stackoverflow.com/comment/46395980

http://stackoverflow.com/comment/46529529
has text: Could you explain why curl and wget could not get the job done? wget should be able to do this with the `-p -k` options.
type: Comment
comment on: http://stackoverflow.com/q/29154220
score: 0
type: QuestionComment

http://stackoverflow.com/a/29110874
type: Answer
has comment: http://stackoverflow.com/comment/46451330
has comment: http://stackoverflow.com/comment/46451127
score: 0
answers question: http://stackoverflow.com/q/29109608
has body: remove rendered function and use Template.home.events; try home.html {{> home}} {{#each feature}} {{text}} {{/each}} About Explore Blog Press/Contact home.js Template.home.helpers({ 'feature' : function () { return [ { 'text' : 'About', 'glyphicon' : 'glyphicon-sunglasses', 'color' : 'hover-yellow', 'path' : '#about' }, { 'text' : 'Explore', 'glyphicon' : 'glyphicon-road', 'color' : 'hover-red', 'path' : '#explore' }, { 'text' : 'Blog', 'glyphicon' : 'glyphicon-pencil', 'color' : 'hover-blue', 'path' : '#blog' }, { 'text' : 'Press/Contact', 'glyphicon' : 'glyphicon-envelope', 'color' : 'hover-green', 'path' : '#press-contact' } ]; }, }); Template.home.events({ 'click a[href^="#"]': function(event, template) { var $target = $(event.currentTarget.hash); $('html, body').animate({ scrollTop: $target.offset().top }); event.preventDefault(); } }); see demo http://questions-29109608.meteor.com
has comment: http://stackoverflow.com/comment/46451355

http://stackoverflow.com/q/29068088
has body: How can I change the starting point of a svg circle for animate it progressively begining at 0 o'clock? the default circle svg begin at 3 o'clock. My current circle ( hover for animation): #timeline{ position:fixed; width:500px; height:500px; top:50%; left:50%; margin-top:-250px; margin-left:-250px; overflow:hidden; pointer-events: all; z-index:99999; } #bluecircle{ stroke-dasharray:1510; stroke-dashoffset:1510; -webkit-transition:all 1s ease; transition:all 1s ease; } #bluecircle:hover{ stroke-dashoffset:0; } &lt;div id="timeline"&gt; &lt;svg x="0px" y="0px" width="500px" height="500px" viewBox="0 0 500 500"&gt; &lt;circle id="greycircle" fill="none" stroke="#727272" stroke-width="2" stroke-miterlimit="10" cx="249.85" cy="248.065" r="239.024"/&gt; &lt;circle id="bluecircle" fill="none" stroke="#2C75FF" stroke-width="3" stroke-miterlimit="10" cx="249.85" cy="248.065" r="239.024"/&gt;
tagged with: rotation
upvote count: 12
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29068366
favorite count: 0
tagged with: geometry
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: css
score: 12
answer count: 1
has title: SVG circle starting point
has answer: http://stackoverflow.com/a/29068366

http://stackoverflow.com/q/29076323
tagged with: tinyscrollbar
tagged with: javascript
tagged with: jquery
score: 0
has body: I am using Tiny Scrollbar. Want to achieve horizontal scrolling. Look example of #scrollbar2 Code of that is here. Markup code is at below. <<<<<< Content >>>>>>> JS code is as below $(document).ready(function(){ $("div.wrapper-head div.table-header").addClass("viewport").css('overflow-x','hidden'); $("div.wrapper-head div.div-table-row").addClass('overview').css('overflow-x','visible'); $("div.wrapper-head").css('overflow-x','visible'); scrollHtml = ' '; $("div.wrapper-head").prepend(scrollHtml); $("div.wrapper-head").tinyscrollbar({ axis: 'x' }); }); I am not getting any error in browser console, but I am not getting tiny scrollbar as well. What I want to achieve this thanks in advance.
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46387395
has comment: http://stackoverflow.com/comment/46386510
tagged with: horizontal-scrolling
type: Question
has title: Tiny Scroll bar : Scroll bar is not appearing

http://stackoverflow.com/q/29100875
has comment: http://stackoverflow.com/comment/46432216
type: Question
has answer: http://stackoverflow.com/a/29101064
has body: how would i add onto this smooth scrolling function to change the color of the id that is scrolled to? $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); });
accepted answer: http://stackoverflow.com/a/29101050
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/29101050
tagged with: css
type: AnsweredQuestion
has title: change color of id when smooth scrolling
upvote count: 1
possible better answer: http://stackoverflow.com/a/29101064
downvote count: 1
has answer: http://stackoverflow.com/a/29101115

http://stackoverflow.com/a/29179314
downvote count: 0
type: Answer
has body: It looks like the closetext variable contains the ! and the inittext is where the extra space is added in because of inittext + " " even when there is nothing after the last time that is called, so try msg = inittext.trim() + closetext;
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29179296

http://stackoverflow.com/a/29390605
answers question: http://stackoverflow.com/q/29207329
type: Answer
score: 0
has body: Just in case someone else comes across this problem I am posting the Solution that worked for me: &lt;div id="EnquiryType" class="collapse col-md-12"&gt; &lt;ul data-bind="foreach: Items" class="list-inline"&gt; &lt;li&gt; &lt;input type="checkbox" data-bind="attr: { value: Id }, checked: Checked" /&gt; &lt;span data-bind="text: Text"&gt;&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; On Server Side I created a class Called: CheckBoxViewModel public class CheckBoxViewModel { public int Id { get; set; } public string Text { get; set; } public bool Checked { get; set; } } In My ViewModel Passed a List&lt;CheckBoxViewModel&gt; to the View, public class ViewModel{ public List&lt;CheckBoxViewModel&gt; Items {get;set;} } In the Knockout used the Mapping Plugin to Map ViewModel: var defaultModel = @Html.Raw(Json.Encode((CreateQuoteViewModel)Model)); var model = ko.mapping.toJS(defaultModel); ko.applyBindings(model); So basically I edited my Logic to use: @Thalsan's Answer.

http://stackoverflow.com/comment/46503405
comment on: http://stackoverflow.com/q/29139316
type: QuestionComment
has text: `Names` property not appear at "Sample data" ?
type: Comment
score: 0

http://stackoverflow.com/comment/46526532
type: Comment
type: QuestionComment
has text: The value is set by javascript. Will it automatically be set to that php variable?
comment on: http://stackoverflow.com/q/29152209
score: 0

http://stackoverflow.com/q/29182251
has title: How to hide scroll bar on page load?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has comment: http://stackoverflow.com/comment/46580685
has body: I have developed a single page website with 4 sections. Here is what my client wants: The scrollbar should be hidden on page load If the user scrolls past the second section, the scrollbar should appear. My client gave me this website as an example: http://diagnosite.com/ How can I do this?
has answer: http://stackoverflow.com/a/29182321
has comment: http://stackoverflow.com/comment/46580794
has comment: http://stackoverflow.com/comment/46580727
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46580706
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46475422
has text: Well can u give an example, I dont know what you exactly mean
comment on: http://stackoverflow.com/a/29124501
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46584222
comment on: http://stackoverflow.com/a/29184149
type: AnswerComment
score: 0
has text: $('.favourate_dextop').css('background-image', 'url("' + image_url + '")') like this
type: Comment

http://stackoverflow.com/comment/46585600
score: 0
has text: Firstly, format your I/O. Second, input some code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29185006

http://stackoverflow.com/comment/46380672
comment on: http://stackoverflow.com/a/29070956
score: 0
has text: It is specific to your question, you mentioned 4th element. So if you want to removed nth row then use arr.splice(n-1,1). Here first parameter is the index of the row, and second parameter for how many element you want to remove. In your case of 2D array, it means how many rows you want to delete.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46546410
has text: make a fiddle for this?
score: 1
comment on: http://stackoverflow.com/q/29163608
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29180992
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/46578493
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29181127
type: Question
has answer: http://stackoverflow.com/a/29181015
tagged with: javascript
has title: I want to count how many questions are attended by user
answer count: 2
has body: I want to count how many question are user attended. If user click any one options from one question I want to increment one value. Ex: if user attend 7/10 the count will be 7. Questions //////////// A) B) C) B) Questions //////////// A) B) C) B)
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46485288
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29129382
has text: Well that's what `focusout` does. When you click on input field form is gaining focus and then for clicking button, you're leaving input field which is essentially leaving the focus on the form, that's why event handler is fired. The issue is that you shouldn't try to register `focusout` event on form because a form on its own renders nothing the user can observe. All the input elements in the form are the ones which can attain and leave focus

http://stackoverflow.com/comment/46643624
type: QuestionComment
type: Comment
has text: since you are using Google Chrome, you could open the Developer Tools (Ctrl + Shift + I) and check the elements tab. It will show you the effective CSS against each element and help you debug. It will be very difficult to find out where it is going wrong, unless you show the navigator elements and css too.
score: 0
comment on: http://stackoverflow.com/q/29216002

http://stackoverflow.com/q/29179482
has title: ASP.Net Model to Javascript - Passing Data from server to client
has comment: http://stackoverflow.com/comment/46575775
answer count: 1
tagged with: jquery
has body: Hey guys quick question what is the best approach on converting Model to Javascript. I tried using this @{ var arr = new string[3]; arr[0] = "1"; arr[1] = "2"; arr[2] = "3"; var jason = JsonConvert.SerializeObject(Model); } &lt;script type="text/javascript"&gt; var string = '@jason'; var variable2 = jQuery.parseJSON(string); alert(variable2.Id); &lt;/script&gt; as you can guess it did not work, I look through the sample of jQuery which should work but I am not sure if it is compatible with JsonConvert of .net Its my first time on programming in the client side so this is quite a simple question but I tried looking the answer from the net. Mostly I see are uber complicated answers and at least 3 and higher old so I am guessing there should be an easier way to do this now?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46575770
score: 0
has comment: http://stackoverflow.com/comment/46575780
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/73544873

http://stackoverflow.com/comment/46409719
score: 0
type: Comment
type: AnswerComment
has text: The ordeal with the promises array, is that code I put in my dateChange() function? I only say because I still get the "Uncaught TypeError: Cannot read property 'then' of undefined" which I stated previously
comment on: http://stackoverflow.com/a/29088023

http://stackoverflow.com/a/29063500
upvote count: 1
answers question: http://stackoverflow.com/q/29062789
type: Answer
downvote count: 0
score: 1
has body: Protractor element functions run asynchronously and return promises. try this... describe("list test", function() { it('Description of the test', function () { browser.get('app/#/list'); element.all(by.repeater('list in listData.myLists')).count() .then(function (amount) { // ... Here You add an item element.all(by.repeater('list in listData.myLists')).count() .then(function (secondAmount) { expect(secondAmount).toEqual(amount + 1); }) }) }); });

http://stackoverflow.com/a/29156563
has comment: http://stackoverflow.com/comment/46565804
has comment: http://stackoverflow.com/comment/46563151
answers question: http://stackoverflow.com/q/29156371
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/46565204
has comment: http://stackoverflow.com/comment/46565156
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46557436
has body: It could be that the different programs are outputting videos with different amounts of keyframes, can you compare the amount of keyframes for the video that works to the one that doesn't?

unit-testing
tags question: http://stackoverflow.com/q/29072518
tags question: http://stackoverflow.com/q/29214664
tags question: http://stackoverflow.com/q/29208897
tags question: http://stackoverflow.com/q/29085125
tags question: http://stackoverflow.com/q/29070985
tags question: http://stackoverflow.com/q/29124807
tags question: http://stackoverflow.com/q/29164677
tags question: http://stackoverflow.com/q/29109613
tags question: http://stackoverflow.com/q/29170970
tags question: http://stackoverflow.com/q/29124416
tags question: http://stackoverflow.com/q/29129335
type: Tag
tag name: unit-testing
tags question: http://stackoverflow.com/q/29165262
tags question: http://stackoverflow.com/q/29124364
tags question: http://stackoverflow.com/q/29202966
tags question: http://stackoverflow.com/q/29129873

http://stackoverflow.com/q/29076841
has body: I have one html page where all data's are coming dynamically with some mobile numbers. How can I wrap all mobile numbers into anchor tag using javascript. Example: +91 9999999999 HTML: Tel: +022 23334976 Tel: +91 8976817722 . . . . Tel: +91 8976817725 Please help me to write common js for handling above type of html page.
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46390135
has answer: http://stackoverflow.com/a/29077651
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: How to wrap any mobile number's into Anchor tag using javascript
type: Question
accepted answer: http://stackoverflow.com/a/29077651
tagged with: tel
has comment: http://stackoverflow.com/comment/46387817
tagged with: javascript

http://stackoverflow.com/q/29172652
accepted answer: http://stackoverflow.com/a/29172909
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29172909
score: 1
has title: How to set up an array in order to get radio button values without using jQuery
has answer: http://stackoverflow.com/a/29174228
type: Question
tagged with: javascript
answer count: 2
tagged with: radio-button
upvote count: 1
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29174228
has body: I am having trouble setting up an array in order to get the value of the radio buttons. These are the radio buttons that I have in my form: &lt;form name="artistImages"&gt; //This is the form tag &lt;legend&gt; Gallery &lt;/legend&gt; &lt;input type="radio" name="artist" value="Z"&gt;&lt;img src="zedd.png" height="82" width="68"&gt; &lt;input type="radio" name="artist" value="T"&gt;&lt;img src="taylorswift.jpg" height="82" width="68"&gt; &lt;input type="radio" name="artist" value="P"&gt;&lt;img src="pharrell.jpg" height="82" width="68"&gt; &lt;input type="radio" name="artist" value="B"&gt;&lt;img src="beyonce.jpg" height="82" width="68"&gt; &lt;input type="radio" name="artist" value="D"&gt;&lt;img src="drake.jpg" height="82" width="68"&gt; &lt;input type="radio" name="artist" value="E"&gt;&lt;img src="eminem.jpg" height="82" width="68"&gt; &lt;input type="button" id="mybutton" value="GetValue" onClick="getRadioValue(radioArray)"/&gt;&lt;br&gt; &lt;input id="image" type="text" name="name" size="20"&gt; and this is the javascript &lt;script&gt; var radioArray = [document.forms.artistImages.artist]; function getRadioValue(radioArray){ var i var text = document.getElementById('image').value; for (i = 0; i &lt; radioArray.length; i++){ if(radioArray[i].checked) return radioArray[i].value; var text = radioArray[i].value; }; }; &lt;/script&gt;

http://stackoverflow.com/comment/46462652
score: 0
type: Comment
has text: I have to wait, it for the answer to be able to be selected.
comment on: http://stackoverflow.com/a/29117306
type: AnswerComment

http://stackoverflow.com/a/29109467
has comment: http://stackoverflow.com/comment/46463983
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46457066
upvote count: 2
has body: This is because Velocity currently does not parse initial transform values. From the docs: Note that Velocity's performance optimizations have the byproduct of ignoring outside changes to transform values (including initial values as defined in your stylesheets, but this is remedied via Forcefeeding). (You can manually set transform values within Velocity by using the Hook function.) This will be addressed in future version but currently follow the advice below to use forcefeeding to fix it.
has comment: http://stackoverflow.com/comment/46501372
downvote count: 0
has comment: http://stackoverflow.com/comment/46457052
answers question: http://stackoverflow.com/q/29098425

http://stackoverflow.com/comment/46398508
comment on: http://stackoverflow.com/q/29076847
type: Comment
type: QuestionComment
has text: @DawsonLoudon: good point, I added the code of the plugin... if that is the issue, is there any other way to call the success?
score: 0

http://stackoverflow.com/a/29147463
score: 1
has comment: http://stackoverflow.com/comment/46621010
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46520685
has comment: http://stackoverflow.com/comment/46522515
type: Answer
has body: Currently this feature is not available in ver 0.11.x . You can achieve it by using the Model.query() or Model.native (depending on your adapter) as these will skip all validations and hooks. http://sailsjs.org/#!/documentation/reference/waterline/models/native.html http://sailsjs.org/#!/documentation/reference/waterline/models/query.html Their are other work arounds, but since your just adding data for testing, then this method should work.
answers question: http://stackoverflow.com/q/29136306
accepted answer of: http://stackoverflow.com/q/29136306
upvote count: 1

http://stackoverflow.com/a/29087066
has body: Here is what I ended up using: function listGuns(guns) { for (var speargun in guns) { // modify the log message here console.log("Behold! " + speargun + ", with " + guns[speargun]["heft"] + " heft!"); }
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29086562
type: Answer

http://stackoverflow.com/comment/46455255
comment on: http://stackoverflow.com/a/29113038
type: Comment
has text: @SteveClanton sorry, I don’t get what you mean? I assume by “down the line” OP meant that it only worked when you hover over the divs from top to bottom, but not the other way around. This solution should work in whatever order you hover over the elements, no?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/50776911
has text: I have the exact same issue, i guess it has to do with that the controller is loaded before the app itself.. (trough the ng attribute?) so what should be the correct approach for the controllers part
comment on: http://stackoverflow.com/a/29209083
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/46539782
has text: See in this link svg path selected by a select menu, i want to select a path in svg using mouse click and i want to apply color http://matthewrea.com/work/svgColorPicker/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29159500
score: 0

http://stackoverflow.com/q/29186749
tagged with: requirejs
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46607718
tagged with: javascript
tagged with: amd
tagged with: routes
has title: Error while processing route: Cannot read property 'connectOutlet' in Ember.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46596856
downvote count: 0
has answer: http://stackoverflow.com/a/29198268
score: 1
has body: I'm getting the following error after upgrading Ember to the latest version: Error while processing route: portfolio Cannot read property 'connectOutlet' The error takes place whenever I navigate for example from: http://localhost:8080/#/portfolio to: http://localhost:8080/#/publications The weird thing is that if I refresh the pages many times sometimes it works and some times it's doesn't so feels like some file is loaded too late or maybe loaded twice. aplication.hbs The application view renders the header, footer and main container, which contains the application {{outlet}}. {{outlet}} index.hbs My index view renders a couple of subviews: {{view view.CvSummaryView}} routes In all my routes I'm only adding the model() function. I'm not overriding renderTemplate() or anything else. define([ 'Ember' ], function (Ember) { "use strict"; return Ember.Route.extend({ model: function() { var result = {}; $.ajax({ async: false, dataType: "json", url: './website/js/models/portfolio.json', success: function(data){ result.portfolio = data; } }); return result; } }); } ); I tried the following with no luck: renderTemplate: function(){ this.render({ outlet: "main", into: "application" }); } Do you have any ideas about what can be the root cause of this issue? The entire app source code can be found at https://github.com/remojansen/remojansen.github.io/tree/master/website/js UPDATE 1 I've been reading the Ember documentation and I added {{outlet "main"}} into my application template and tried with: renderTemplate: function() { this.render('blog', { // the template to render into: 'application', // the template to render into outlet: 'main' // the name of the outlet in that template }); } The I've been debugging the Ember code and I reached this function: function appendView(route, view, options) { if (options.into) { var parentView = route.router._lookupActiveView(options.into); var teardownOutletView = generateOutletTeardown(parentView, options.outlet); if (!route.teardownOutl…
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/29198268
tagged with: ember.js

http://stackoverflow.com/q/29115505
has title: Image not showing in modal on thumbnail click
tagged with: bootstrap-modal
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29115534
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: When I select a thumbnail from the gallery I want the modal window to pop up and display the image inside. It pops up, but the image isn't displaying, I'm getting the 'alt' message. Here is my HTML and javascript. $("#pop").on("click", function () { $('#modalPreview').attr('src', $('#imageresource').attr('imagesrc')); $('#imageModal').modal('show'); }); &lt;div id="row"&gt; &lt;div id="sortable"&gt; @foreach (var image in Model.Images) { @*&lt;li&gt;this is an image&lt;/li&gt;*@ &lt;div class="col-sm-6 col-md-4"&gt; &lt;div class="thumbnail"&gt; @{ var base64 = Convert.ToBase64String(image.ImageThumbnail); var thumbSrc = String.Format("data:image/gif;base64,{0}", base64); var base64Modal = Convert.ToBase64String(image.Image); var imgSrcModal = String.Format("data:image/gif;base64,{0}", base64Modal); } &lt;a id="pop" href="" data-toggle="modal" data-target="#myModal"&gt; &lt;img id="imageresource" src="@thumbSrc" data-imagesrc="@imgSrcModal" alt="image not found" width="203" height="136" /&gt; &lt;/a&gt; &lt;div class="caption"&gt; &lt;h3&gt;Thumbnail label&lt;/h3&gt; &lt;p&gt;...&lt;/p&gt; &lt;p&gt;&lt;a href="#" class="btn btn-primary" role="button"&gt;Button&lt;/a&gt; &lt;a href="#" class="btn btn-default" role="button"&gt;Button&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; } &lt;/div&gt; &lt;div class="modal fade" id="imageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt; &lt;a href="" data-toggle="modal" data-target="#myModal"&gt; &lt;img id="modalPreview" alt="image not found" width="255" height="255" /&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/29097354
tagged with: node.js
has body: I am creating an html page for node.js using jade. It works as I want but if I uncomment out the fifth line - with the javascript source location - the sphere div is no longer nested inside content wrapper but is at the same level as it. Why is this? This is really confusing me. And yes you are right - I don't really know what I am doing! extends layout block content div(id="contentwrapper", resize="true", keepalive="true" ) div(id="sphere") //script(src='/javascripts/draw.js') div(id="demo") |jQuery is not present. You must install jQuery in this folder for the demo to work. form(action="") div(class="form-item",id="color",name="color",value="#123456") label(for="color") div(id="picker")
downvote count: 0
has comment: http://stackoverflow.com/comment/46425656
score: 1
type: Question
tagged with: javascript
tagged with: pug
upvote count: 1
has comment: http://stackoverflow.com/comment/46428970
favorite count: 0
answer count: 0
type: UnansweredQuestion
has title: Why is the inclusion of this js affecting the nested divs in my jade layout?

http://stackoverflow.com/q/29087995
answer count: 0
downvote count: 0
score: 1
has body: I have a server API which holds session state in the form of managed objects. Unfortunately, there is no way to get references to those managed objects apart from when they are created. This means there is a need to destroy the objects when the web application is finished with them (otherwise they accumulate on the server and eventually I hit a limit where no more can be created). I have this cleanup code in controller destroy event handlers, but they don't seem to be called when the user, say, refreshes the browser. What's a proper Angular-ish way to call cleanup code on refresh or close? Is there such a pattern or should the server API be refined to provide a way to get such references? Unfortunately, I'm not in a position to be able to change the server API easily.
has title: How to call cleanup code in Angular on browser refresh
type: Question
has comment: http://stackoverflow.com/comment/46410438
tagged with: destroy
tagged with: javascript
tagged with: controller
upvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3888902

http://stackoverflow.com/a/29165748
answers question: http://stackoverflow.com/q/29165712
upvote count: 2
has comment: http://stackoverflow.com/comment/46550243
type: Answer
has comment: http://stackoverflow.com/comment/46550175
score: 2
downvote count: 0
has body: Take a look here: while(i&lt;=50) { function op(a) { a -= 0.02; if(a &lt; 0) { a = 1; } document.getElementById("slide").style.opacity = a; } } You are not incrementing your 'i' counter variable, resulting in an infinite loop, and hence browser crashing. Replace with this: while(i&lt;=50) { function op(a) { a -= 0.02; if(a &lt; 0) { a = 1; } document.getElementById("slide").style.opacity = a; } i++; //increment the counter variable to prevent an infinite loop }

http://stackoverflow.com/comment/46901416
score: 0
has text: @barry-johnson - So I have tried a few different debounce libraries, the first two (underscore and lodash) seemed to cause some kind of conflict with the version of jquery I was using, so I found an angular specific version (shahata's angular-debounce) which seemed to be compatible and execute properly. The strange thing is, that it doesn't seem to fix the issue even as a bandage fix. Am going to dive into this further and see what I can uncover.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29188712

http://stackoverflow.com/comment/46403820
type: Comment
has text: Start by indenting, if you want to understand the code
type: QuestionComment
comment on: http://stackoverflow.com/q/29085533
score: 4

http://stackoverflow.com/a/29191104
has body: 'navigation' class will be as like below code without 'overflow-y', 'overflow-x' .navigation { position: relative; background-color: #4F4F4F; width: 100%; min-width: 910px; box-shadow: 0px 2px 3px rgba(0,0,0, .4); z-index: 10; /* overflow-y: hidden; */ /* overflow-x: auto; */ height: auto; } demo
answers question: http://stackoverflow.com/q/29191023
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46596307
has comment: http://stackoverflow.com/comment/46596345

http://stackoverflow.com/comment/46618622
score: 0
has text: @Petroff No, same happens. Used the callback and it goes to the top, alerts my msg and then goes back to the very point it was before the refresh (what suggests it can't be just a matter of coincidence, it's not going anywhere in the middle of the page, the browser knows where it wants to scroll to). tried your code on Firefox and works great
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29203545

http://stackoverflow.com/a/29090109
type: Answer
has comment: http://stackoverflow.com/comment/46432965
has body: The onClick doesn't trigger because there hasn't been a click - a click is a mousedown followed by a mouseup on the same element. If the mouse is no longer over the same element, the browser can't consider it to be a click - I believe this even fails to become in some cases when the mouse moves (try a link and move the mouse, see if it still follows the link), though at least in my testing scrolling with the mouse down still keeps it as a click if you scroll back. From http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mouseevents: The click event occurs when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. In your case, while the mouse is not moving, the 'click' isn't occurring over 'an' element, or if there is just one element under the mouse, its the body element, and not what you had in mind. As far as fixing this, you have several options: Don't scroll the page away while the mouse is down - this is almost certainly confusing/surprising to the user no matter what they were clicking on Don't require a click event, but use a mousedown (as it sounds like you are doing now) Slowly scroll to the new location, perhaps with a delay and an animated scroll so that a quick click would not be affected. Keep in mind however that buttons are supposed to respond to clicks, allowing the user to hold the mouse down and potentially change their mind by moving the mouseaway before they release.
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29079118
has comment: http://stackoverflow.com/comment/46433848
has comment: http://stackoverflow.com/comment/46420914
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46433054
answers question: http://stackoverflow.com/q/29079118

http://stackoverflow.com/q/29075166
tagged with: php
score: 2
has title: How to make contenteditable save permanently and globally?
upvote count: 2
has body: I am trying to create a page which is very similar to Goodle-Docs, where everybody with access to the page will simply be able to edit the text. However my problem is that I can only get these changes to save locally, how do I make users edit the content-editable text so that the change is visible on all devices? I am using this tutorial, http://www.developerdrive.com/2012/06/allowing-users-to-edit-text-content-with-html5/ but the changes of the page are only saved locally. Here is my code: Here is the element - Edit the text and click to save for next time
type: Question
has comment: http://stackoverflow.com/comment/46388750
has answer: http://stackoverflow.com/a/64385143
has comment: http://stackoverflow.com/comment/46384099
has answer: http://stackoverflow.com/a/29087491
tagged with: javascript
has comment: http://stackoverflow.com/comment/46387485
has comment: http://stackoverflow.com/comment/46383934
answer count: 2
has comment: http://stackoverflow.com/comment/46386293
has comment: http://stackoverflow.com/comment/46387716
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
tagged with: contenteditable
type: UnansweredQuestion

http://stackoverflow.com/comment/46467855
has text: You can use just 'browserify' command as it's described on http://browserify.org/.
comment on: http://stackoverflow.com/a/29120264
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/34068540
has body: Unfortunately this may happen. Sometimes, as I had misfortune to deal with, it was due to firewall somewhere in between me, server and other client. For ping timeouts you may try to increase ping interval on server side io = require( 'socket.io' )( httpServer, { pingInterval: 60000 } );
type: Answer
downvote count: 2
answers question: http://stackoverflow.com/q/29073746
score: -2
upvote count: 0
has comment: http://stackoverflow.com/comment/55937995

http://stackoverflow.com/comment/46411714
type: QuestionComment
type: Comment
has text: If you want to update $scope.formData with the input value of form-payment, just use ng-model in the input elements of form-payment. The sample of Card Number will be like this.
score: 0
comment on: http://stackoverflow.com/q/29089163

http://stackoverflow.com/comment/46549230
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29165149
has text: can you show the code

http://stackoverflow.com/comment/46613301
type: AnswerComment
has text: @brodster, the Javascript is the same. With the current HTML, it's changing the name attribute. If you just have the class, it will add the name :) Here is the proof: https://jsfiddle.net/7teq1o9f/38/
comment on: http://stackoverflow.com/a/29200476
score: 0
type: Comment

http://stackoverflow.com/comment/46371520
type: QuestionComment
comment on: http://stackoverflow.com/q/29067531
has text: Thanks for your comment, have been struggling with ACE API for an hour with no luck
score: 0
type: Comment

http://stackoverflow.com/q/29136425
has comment: http://stackoverflow.com/comment/46497995
tagged with: google-apps-script
has body: I have been working with Google's Candlestick charts and customized everything to my needs, except that the width of the lines above and below the candlestick cannot be modified, or simply I have not found a way to do so. My code looks like this: &lt;script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"&gt;&lt;/script&gt; &lt;script&gt; google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Mon', 20, 28, 38, 45], ['Tue', 31, 38, 55, 66], ['Wed', 50, 55, 77, 80], ['Thu', 77, 77, 66, 50], ['Fri', 68, 66, 22, 15] // Treat first row as data as well. ], true); var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div')); chart.draw(data, { selectionMode: 'multiple', backgroundColor: { strokeWidth: 3, stroke: 'black', }, vAxis: { gridlines: { count: -1, }, minorGridlines: { count: 4, } }, hAxis: { textStyle: { color: 'white', } }, focusTarget: 'category', colors: ['black', 'black'], legend: 'none', theme: 'maximized', candlestick: { hollowIsRising: 'false', risingColor: { fill: 'green', stroke: 'black', strokeWidth: 1, // Here you can clearly see that I changed the candlestick's stroke to a smaller value which would basically be the same as decreasing the "border width". }, fallingColor: { fill: 'red', stroke: 'black', strokeWidth: 1, // Here you can clearly see that I changed the candlestick's stroke to a smaller value which would basically be the same as decreasing the "border width". } } }); } &lt;/script&gt; &lt;div id="chart_div" style="width: 900px; height: 500px;"&gt;&lt;/div&gt; This works perfectly fine, however, the lines that appear above and below are perhaps "bigger" or in terms of styling "fat" which does not combine with the candlestick's strokeWidth. The styling appears ugly and the transition does not quite fit. Is there a way to set these line to the same size as the c…
tagged with: google-visualization
has title: Google Sheets Candlestick Chart modify high and low line width?
tagged with: javascript
score: 0
tagged with: candlestick-chart
has comment: http://stackoverflow.com/comment/46498685
tagged with: css
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46529116
type: Question

http://stackoverflow.com/comment/46520232
comment on: http://stackoverflow.com/a/29146317
type: Comment
has text: I would still prefer filter instead of manually looping through and pushing.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29153046
score: 1
has comment: http://stackoverflow.com/comment/46528140
type: Question
tagged with: arrays
has body: I have an array that I am passing to a javascript file. In the controller I have the array printing out and it appears like so... ["123456789", "987654321", "147852369", "369852147"] This array is set to the instance variable @array in the controller. I'm sending this array to a JavaScript file by setting @array as a variable in the view. var array = "&lt;%= @array %&gt;"; Note: I've tried var array = "&lt;%=raw @array.to_json %&gt;"; as well. Then in the JavaScript file I am simply printing the array in the console like so... console.log(array); However when it is printed in the console the output looks like this. [&amp;quot;123456789&amp;quot;, &amp;quot;987654321&amp;quot;, &amp;quot;147852369&amp;quot;, &amp;quot;369852147&amp;quot;] When I check the typeof through jQuery it comes back as a string instead of an array. I do not want to see the &amp;quot;. Eventually I want to use these values as selectors when running some JavaScript functions. Through these steps, what am I doing wrong that is producing the &amp;quot;? edit: This is how I am initially creating my array. CONTROLLER @original= large_array_of_hashes # I am grabbing only specific data from the hash. Only what comes after @errors=&gt; @data = @original.scan(/@errors=&gt;"(.*?)"/).flatten.map{ |msg| msg.gsub(/(\.|\s+)/, '').strip } @array = [] @data.each{|data| @array &lt;&lt; data}
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46527598
has answer: http://stackoverflow.com/a/29153390
answer count: 3
has title: Remove &quot; when printing an array in the JavaScript console
has answer: http://stackoverflow.com/a/29153325
has comment: http://stackoverflow.com/comment/46527665
has comment: http://stackoverflow.com/comment/46527711
has answer: http://stackoverflow.com/a/45179134
upvote count: 1
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/29153390
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/45179134

http://stackoverflow.com/a/29082912
answers question: http://stackoverflow.com/q/29082803
has body: I'm not sure if you're using multiple document.ready calls for a reason but if possible, you should combine these into one: $(function() { $('[name="c1"]').on('change', function() { $('[name="i1"]').val('Wargo'); }); $('[name="c2"]').on('change', function() { $('[name="i2"]').val('Wargo'); }); $('[name="c3"]').on('change', function() { $('[name="i3"]').val('Wargo'); }); $('[name="c4"]').on('change', function() { $('[name="i4"]').val('Daily'); }); $('[name="c5"]').on('change', function() { $('[name="i5"]').val('Daily'); }); }); Multiple document.ready functions are permitted and should work in theory. It sounds like an error may be getting thrown which is preventing the others from being executed. Having them combined in a single function will give you an all or nothing result.
type: Answer
has comment: http://stackoverflow.com/comment/46398936
score: 1
has comment: http://stackoverflow.com/comment/46399328
upvote count: 1
has comment: http://stackoverflow.com/comment/46399379
downvote count: 0
has comment: http://stackoverflow.com/comment/46399181

http://stackoverflow.com/q/29190896
type: Question
has body: I am making a game and am having an issue because when the left key is held down the character should go left and when the right key is held down the character should go right. This is all working but the problem is when a key is pressed the character moves slightly in the corresponding direction, waits about half a second until the computer realizes the key is being held down, then the character moves as I want it to. How do I get rid of the delay after the key is held down? Here is my code for moving the character. $(document).keydown(function(key) { switch(parseInt(key.which, 10)) { case 37: $('#player').animate({left:'-=5px'}, 1); break; case 39: $('#player').animate({left:'+=5px'}, 1); break; } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
has title: No delay between key press
tagged with: delay
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29191638
score: 0
tagged with: keypress
answer count: 1
type: UnansweredQuestion
tagged with: 2d-games
linked to: http://stackoverflow.com/q/3691461

http://stackoverflow.com/a/29070265
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: You are assigning _fieldData.push(elm[widget.dataname]) to data and .push() method returns the new array length, so you need to push the element first and then assign the array itself. _fieldData.push(elm[widget.dataname]) return { name: elm[widget.seriesname], data:_fieldData}; });
accepted answer of: http://stackoverflow.com/q/29070171
answers question: http://stackoverflow.com/q/29070171
type: Answer

http://stackoverflow.com/comment/46627765
type: QuestionComment
has text: For a better practice, actually modal content you load with a http request should not contain any javascript. It should only return the hmtl code. Your main page should manage that javascript logic. But in this current approach you're using, i guess changing "$( document ).ready" to "$(function() {}) should resolve the issue..
score: 1
comment on: http://stackoverflow.com/q/29208793
type: Comment

http://stackoverflow.com/a/29206018
has comment: http://stackoverflow.com/comment/46625032
has comment: http://stackoverflow.com/comment/46623790
answers question: http://stackoverflow.com/q/29205973
has comment: http://stackoverflow.com/comment/46624151
has body: Write the following code before your body tag ends: &lt;script type="text/javascript"&gt; $(document).ready(function() { $("input[name=txtaccept]").on("click", function() { $( this ).parent().parent().css( "background-color", "red" ); }); $("input[name=txtreject]").on("click", function() { $( this ).parent().parent().css( "background-color", "green" ); }); }); &lt;/script&gt; &lt;/BODY&gt;
has comment: http://stackoverflow.com/comment/46623262
has comment: http://stackoverflow.com/comment/46622933
has comment: http://stackoverflow.com/comment/46624008
type: Answer
has comment: http://stackoverflow.com/comment/46624436
has comment: http://stackoverflow.com/comment/46624562
score: 0
has comment: http://stackoverflow.com/comment/46624864

http://stackoverflow.com/comment/46475691
comment on: http://stackoverflow.com/q/29122193
type: Comment
type: QuestionComment
has text: Thnaks. Please can you do it in raw code example ? I can also prepare some jsfidlle for example. Update, i try implement your suggestion [here](http://jsfiddle.net/u8903dca/) I have two canvas, but still the same bug..
score: 0

http://stackoverflow.com/comment/46523047
comment on: http://stackoverflow.com/a/29150392
type: Comment
score: 1
type: AnswerComment
has text: Thanks for your help, and super quick response. :D

http://stackoverflow.com/a/29129187
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29110166
answers question: http://stackoverflow.com/q/29110166
has body: This ended up being because we had a directive named filter... A bad mistake on our part!
score: 0

http://stackoverflow.com/a/29063558
has body: I think you should change var obj = (object)js.ExecuteScript("return window.allRegions;"); to List&lt;object&gt; list = js.ExecuteScript("return window.allRegions;") as List&lt;object&gt;; since, return window.allRegions; does not return a string but array of objects. Edit Just went through the page and looks like window.allRegions returns a List of json objects. And, does feel like creating a list of json object can be unwanted overwhelming of programming. I suggest you to narrow down the goal either with modifying the javascript or performing some filtering like following. var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(30)); var tournament = wait.Until(ExpectedConditions.ElementExists(By.Id("tournament-fixture-wrapper"))); IJavaScriptExecutor js = _driver as IJavaScriptExecutor; //getting count of regions long count = (long)js.ExecuteScript("return window.allRegions.length;"); for (int i = 0; i &lt; count; i++) { //grab the name of countries if that's what you wanted string name = js.ExecuteScript("return window.allRegions[" + i + "].name;") as string; Console.WriteLine(name); } Print: Africa Albania Algeria ... Zambia Zimbabwe
accepted answer of: http://stackoverflow.com/q/29063326
answers question: http://stackoverflow.com/q/29063326
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46373468
has comment: http://stackoverflow.com/comment/46363392
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/46386944
score: 3

http://stackoverflow.com/q/29102355
favorite count: 0
has comment: http://stackoverflow.com/comment/46457999
type: UnansweredQuestion
tagged with: google-closure
has body: I have a JavaScript module that is compiled using Google Closure. This module needs to be included in a web page that also includes some 3rd party unrelated code. The problem is both pieces of code are using the namespace "com" so: com.companyone.x.y.z and com.companytwo.x.y.z It seems that closure compiler is automatically generating the code to create the name space like so: var com = {mycompany: {}}; And therefore overwriting anything else that has previously used the com namespace. If I were to write this by hand I'd check if the namespace exists first like so: var com=com||{}; com.mycompany=com.mycompany||{}; As temporary solution I'm thinking of automatically replacing the "var com={" with "var com=com||{" but it seems hacky. Is there a way to ensure the Closure Compiler doesn't wipe the overwrite the existing com namespace?
upvote count: 1
downvote count: 1
type: Question
tagged with: google-closure-compiler
tagged with: javascript
has title: Google Closure Namespace Clash
score: 0
has comment: http://stackoverflow.com/comment/46475564
answer count: 1
has answer: http://stackoverflow.com/a/30009914

http://stackoverflow.com/comment/46564166
type: Comment
comment on: http://stackoverflow.com/a/29172338
score: 0
type: AnswerComment
has text: I also get: Uncaught TypeError: undefined is not a function

http://stackoverflow.com/a/29086315
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29085877
has comment: http://stackoverflow.com/comment/46405579
has comment: http://stackoverflow.com/comment/46405670
has body: You should be able to use top.location from subdomain.mysite.com to read the parent urls of partners-domain-containing-search-results.com: e.g. from an iframe hosted on mysubdomain.mysite.com and embedded in partners-domain-containing-search-results.com?hello=true#blabla you should be able to run: top.location.hash &gt;"#blabla" top.location.search &gt;"?hello=true" Note: you cannot modify the other domain's location object or you will see: Uncaught SecurityError: Blocked a frame with origin "http://domain2.com" from accessing a frame with origin "http://domain.com". Protocols, domains, and ports must match.

http://stackoverflow.com/comment/46453472
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29112151
has text: sorry but i am misunderstanding but i do not understand this "I'm not a developer" and "I want to write a basic web app" its sounds like a my mom want to repair cars but she is not a car mechanists...
score: 0

http://stackoverflow.com/comment/46626538
has text: I have checked the source code and for reason it changed field id from idOtherInfo to jform_idOtherInfo_lbl. I have no idea why. So i added _lbl on the end of the id. Now it works. Thanks a lot.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29204584

http://stackoverflow.com/q/29165644
has comment: http://stackoverflow.com/comment/46634078
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46632735
has comment: http://stackoverflow.com/comment/46634358
tagged with: sequelize.js
has comment: http://stackoverflow.com/comment/46769889
tagged with: node.js
has comment: http://stackoverflow.com/comment/46646905
upvote count: 13
has comment: http://stackoverflow.com/comment/46634437
tagged with: orm
has comment: http://stackoverflow.com/comment/46633277
possible better answer: http://stackoverflow.com/a/57364502
has comment: http://stackoverflow.com/comment/46633443
score: 13
has answer: http://stackoverflow.com/a/29287044
has answer: http://stackoverflow.com/a/57364502
has body: Okay so i have the following three models Module: var Module = sequelize.define('module', { id: DataTypes.INTEGER, name: DataTypes.STRING, description: DataTypes.STRING, category_id: DataTypes.STRING, module_type_id: DataTypes.STRING, gives_score: DataTypes.INTEGER, duration: DataTypes.STRING, price: DataTypes.STRING }, { freezeTableName: true} ) Competence: Competence = sequelize.define('competence', { id: DataTypes.INTEGER, name: DataTypes.STRING, organization_id: DataTypes.INTEGER, competence_type_id: DataTypes.INTEGER },{freezeTableName:true}) Module_has_competence: Module_has_competence = sequelize.define('module_has_competence', { id: DataTypes.INTEGER, module_id: DataTypes.INTEGER, competence_id: DataTypes.INTEGER, score: DataTypes.STRING },{ freezeTableName: true} }) As you can see the relation between the tables are an n:m So now i want to find all the Competence that a Module has: So i created the following relationship: Module.hasMany(Competence, {through: Module_has_competence, foreignKey: 'module_id'}); However when i try to run: retrieveById: function (quote_id, onSuccess, onError) { Module.find({include: [{ all: true }],where: {id: quote_id}}) .success(onSuccess).error(onError); } it returns nothing. But if i delete the relationship it returns only the Module Can anyone tell me what i am doing wrong? When i debug When i debug it does not log any sql sadly it seems it is just ignoring the sql call ?
type: Question
type: AnsweredQuestion
has title: Sequelize hasMany through another table
has comment: http://stackoverflow.com/comment/46769655
has comment: http://stackoverflow.com/comment/46646859
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/29287044

http://stackoverflow.com/comment/46563989
score: 0
type: QuestionComment
has text: @Noitidart: Well thanks for defending it. Like you say, where else was I supposed to ask for help with it?
type: Comment
comment on: http://stackoverflow.com/q/29164759

http://stackoverflow.com/comment/46509192
type: Comment
score: 1
has text: 1. Could you please clean up your code. [opinions following] 2. Please don't capitalize HTML tags 3. Please don't use tables for layout. 4. Please don't use inline code (`onclick="get_values()"`) 5. Please rephrase your problem description, it is hard to understand what is wrong. 6. Did you tried basic debugging steps?
type: QuestionComment
comment on: http://stackoverflow.com/q/29143020

http://stackoverflow.com/q/29201160
has answer: http://stackoverflow.com/a/29201223
answer count: 1
tagged with: javascript
score: 0
has body: I am trying to Add the ability to Remove a field on my form with Javascript but It isn't working. I have commented out my Remove field below. How can I fix it? $(document).ready(function() { var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var x = 1; //initlal text box count $(add_button).click(function(e){ //on add input button click e.preventDefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append(" <%=j(options_from_collection_for_select(Tournament.all.where(tour_id: 1), 'id', 'event'))%> ") // Remove '") //add input box } }); $(wrapper).on("click",".remove_field", function(e){ //user click on remove text e.preventDefault(); $(this).parent('div').remove(); x--; })
type: UnansweredQuestion
tagged with: ruby-on-rails
has title: Javascript Remove field
type: Question

http://stackoverflow.com/q/29112167
answer count: 1
has comment: http://stackoverflow.com/comment/46453554
tagged with: selectable
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46454525
has comment: http://stackoverflow.com/comment/46453491
has comment: http://stackoverflow.com/comment/46454282
has answer: http://stackoverflow.com/a/29112760
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/46454478
has comment: http://stackoverflow.com/comment/46477430
has comment: http://stackoverflow.com/comment/46454114
has comment: http://stackoverflow.com/comment/46454140
has title: jQueryUI Selectable (if element hasClass ui-selected) not working?
tagged with: jquery-ui
has body: I'm rather new to jQuery (like a couple days experience so far), so I may be asking a rather stupid question however: I'm having some trouble with jQueryUI's .selectable, I'd like to have a list of four different tabs on the right side whilst when clicking each one different imagery/text content will appear on the left. Every time I click on a different tab I need it to add the new content whilst removing all the content from a previous tab if one was clicked on. My issue is that it continuously adds the classes, buttons and text on top of each other, when I need it to clear other pre-existing content and add the new. Also when it is first run the default tab is the top so the top content should be showing as well... Here is a visual look at what I'm trying to achieve: http://puu.sh/gELQi/211165f55a.png JSFiddle: http://jsfiddle.net/p5gsby49/8/ Below is the code I wish to add to each tab, the first three lines being what would be added when each tab is clicked, and then removed if they click on another tab. $(".elementOneInfo").addClass("imageClassOne"), $(".elementOneInfo").append(" MORE "); $(".elementOneInfo").append(" Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque, vitae possimus. Quis debitis harum fugiat, placeat, modi nesciunt temporibus. Nesciunt rem necessitatibus, commodi harum a beatae amet consectetur. Porro, quis! "); $(".elementTwoInfo").addClass("imageClassTwo"), [...] I then have the Selectable jQueryUI itself: $('#elements').selectable(); I have attempted to use an if statement such as: if ($('#elements .elementOne').hasClass('ui-selected')) { $(".elementOneInfo").addClass("imageClassOne"), [...] } & this is my HTML Title1 Title2 Title3 Title4 Thanks for reading, I hope someone may be able to enlighten me on how this could be achieved, I have been able to add the look and feel of the visual image I sent with one tab but as soon as soon as I added the switching of tabs into the mix it just didn't work.
has comment: http://stackoverflow.com/comment/46453917
linked to: http://stackoverflow.com/q/29125511
has comment: http://stackoverflow.com/comment/46453774
type: Question
has comment: http://stackoverflow.com/comment/46453673
has comment: http://stackoverflow.com/comment/46455585
has comment: http://stackoverflow.com/comment/46453670
has comment: http://stackoverflow.com/comment/46454573

http://stackoverflow.com/comment/46382841
type: Comment
comment on: http://stackoverflow.com/a/29065662
has text: `document.getElementById("smallblueleft").className` won't work on svg elements because it's unfortunately not a `DOMString` but a read-only `SVGAnimatedString` object. I'd recommend just using `setAttribute` for the class attribute, unless `classList` is available.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46441027
type: Comment
comment on: http://stackoverflow.com/a/29105520
score: 1
type: AnswerComment
has text: Gonna get ugly fast if this goes 50 levels deep like the OP suggests.

http://stackoverflow.com/q/29207878
has comment: http://stackoverflow.com/comment/46637841
tagged with: node.js
has answer: http://stackoverflow.com/a/34499455
answer count: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53904273
has answer: http://stackoverflow.com/a/36894131
has answer: http://stackoverflow.com/a/35167917
type: Question
tagged with: ecmascript-6
upvote count: 54
linked to: http://stackoverflow.com/q/28782656
possible better answer: http://stackoverflow.com/a/35002082
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/35002082
favorite count: 0
has body: I have isomorphic app written in ES6 on client with Babel transpiler. I want my express server to have the same ES6 syntax as client code. Unfortunately require('babel/register') doesn't work.. server.js require('babel/register'); // doesn't work // require('babel-core/register); doesn't work.. const env = process.env.NODE_ENV || 'development'; const port = process.env.NODE_PORT || 1995; const http = require('http'); const express = require('express'); const address = require('network-address'); let app = express(); app.set('port', port); app.use(express.static(path.join(__dirname, 'public'))); app.get('*', (req, res) =&gt; { res.send('Hello!'); }); http.createServer(app).listen(app.get('port'), function () { console.info('Demo app is listening on "%s:%s" env="%s"', address(), app.get('port'), env); });
has answer: http://stackoverflow.com/a/29425761
accepted answer: http://stackoverflow.com/a/29425761
has answer: http://stackoverflow.com/a/29208246
has answer: http://stackoverflow.com/a/52187746
downvote count: 0
tagged with: babeljs
has title: require('babel/register') doesn't work
score: 54

http://stackoverflow.com/comment/46615628
type: AnswerComment
comment on: http://stackoverflow.com/a/29201788
has text: Aaaah, I get the idea. I had never really had to do anything like this with my newly started Node.js journey, I imagine this would help a lot in situations where you need way more callbacks, so it doesn't get messy. I'll be doing it like this from now on. And the code (this code) works, by the way, thank you.
type: Comment
score: 1

http://stackoverflow.com/comment/46639826
comment on: http://stackoverflow.com/q/29215071
score: 0
type: Comment
type: QuestionComment
has text: @ZivWeissman: yep, I'm loading `jquery-1.11.2.min.js` first and then `jquery-ui.min.js `. jquery is loaded once only.

http://stackoverflow.com/comment/46570545
has text: Can you post the HTML as well?
type: Comment
score: 3
comment on: http://stackoverflow.com/q/29176409
type: QuestionComment

http://stackoverflow.com/comment/46565246
type: QuestionComment
has text: So, is the problem that it is not being enabled after the user answers the questions? Or does the button never disable?
comment on: http://stackoverflow.com/q/29173683
score: 0
type: Comment

http://stackoverflow.com/a/66015331
score: 4
answers question: http://stackoverflow.com/q/29203312
type: Answer
has comment: http://stackoverflow.com/comment/120147232
has body: For anyone coming from react or anything similar to react router, here are two simple functions: export function saveScrollPosition(context: any) { let path = context.router.route.location.pathname; let y = window.scrollY; sessionStorage.setItem("scrollPosition_" + path, y.toString()); } export function restoreScrollPosition(context: any) { let path = context.router.route.location.pathname; let y = Number(sessionStorage.getItem("scrollPosition_" + path)); window.scrollTo(0, y); }
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/29132680
has body: I'm currently using one page to spawn a new window, with a timed playback URLs in it. Many of the pages it's loading respond to hash navigation. I'm doing this like: window.open(url,"playback"); As we play through the URLs, we should see the page respond accordingly. The problem I've run into however, is that the window.open() call actually reloads the page when the hash is changed. For instance, loading "pageA.htm", then "pageB.htm#tab2" works flawlessly. The issue however is that when I try to go from "pageB.htm#tab2" to "pageB.htm#tab3"; the page reloads (responding properly to hash) completely instead of just firing "onhashchange" as I'd expect. Is there an alternative to window.open() that I should call for hash-only changes, that will prevent full page reload? Edit: The final solution looks something like this: playbackWindow = window.open(url,"playback"); Then when we want to change the hash: playbackWindow.location.href = "poundIt";
type: AnsweredQuestion
has title: How can I change the location.hash of a target window, without reloading the page?
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: window.open
tagged with: hash
type: Question
accepted answer: http://stackoverflow.com/a/29132913
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/29132905
has answer: http://stackoverflow.com/a/29132905
has answer: http://stackoverflow.com/a/29132913
tagged with: javascript

http://stackoverflow.com/comment/46381792
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29073931
has text: that is called event delegation.

http://stackoverflow.com/a/55382329
score: 4
has body: May be too late but for the records: Yes, the RTCPeerConnection is based on sequence. You can refer here for good explanation. I too struggled to control the flow and errors didn't mean much. Based on my successful research/implementation (Chrome v74), to enforce sequence do (you can also see any sample online or here): Send CreateOffer from Caller (signalling part; custom transport to the other users); enable PeerConnection.onnegotiationneeded => CreateOffer() only for Caller Callee can be ready with video/audio streams added it to RTCPeerConnection on its side, then accepts offer and sends answer to Caller (signalling part) Caller gets the answer and adds the video/audio streams to RTCPeerConnection conditionally when PeerConnection.connectionState == "new", the tricky parts: condition connectionState == "new" ensures it does not add again as offer / answer might be exchanged many times with state being connecting etc. Another is, if you add video/audio streams before this step, it will be hard to control the ice sdp flowing and raising errors at wrong states (relates to comment from Benjamin Trent, here) (signalling part) since offer, answer is exchanged, now many ice events flows are exchanged (signalling part) Connection should be established (assuming STUN configured and if peer to peer not possible, TURN required) I hope I have highlighted few points missing online when you get hands on into this.
answers question: http://stackoverflow.com/q/29108654
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/q/29111401
favorite count: 0
accepted answer: http://stackoverflow.com/a/29119159
has answer: http://stackoverflow.com/a/29112313
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46452370
type: Question
tagged with: mongodb
score: 5
has answer: http://stackoverflow.com/a/29119159
has title: How to convert date from mongodb to JavaScript or jQuery?
upvote count: 5
has body: I have a mongodb set up and I'm storing date and time alongside other data. The problem is that when I receive the data back the date and time is in a strange format and I'm not sure how I can handle this with JavaScript or jQuery. my schema: var carSchema = mongoose.Schema ({ carType: String, notes: String, created: {type: Date, default: Date.now} }); this is what I'm getting in the JavaScript object: created: "2015-03-15T14:01:16.447Z" How can I convert this to Time and date? Can anyone help please?
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/29112313

http://stackoverflow.com/q/29191788
tagged with: sum
downvote count: 3
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46598224
score: -2
tagged with: javascript
has body: I have the following table: +-----------+-------------+------------+--------------+--------+-----+ | Tariff No | Description | Net Weight | Gross Weight | Amount | COO | +-----------+-------------+------------+--------------+--------+-----+ | 900011 | xyz | 40 | 50 | 1000 | IT | +-----------+-------------+------------+--------------+--------+-----+ | 900011 | xyz | 40 | 50 | 1500 | IT | +-----------+-------------+------------+--------------+--------+-----+ | 400222 | abc | 50 | 60 | 1000 | CA | +-----------+-------------+------------+--------------+--------+-----+ | 400222 | def | 40 | 50 | 2000 | DE | +-----------+-------------+------------+--------------+--------+-----+ I need to summarize this table apropos the columns “Tariff No” and “COO” such that the resulting table is as follows: +-----------+-----+------------+--------------+--------+ | Tariff No | COO | Net Weight | Gross Weight | Amount | +-----------+-----+------------+--------------+--------+ | 900011 | IT | 80 | 100 | 2500 | +-----------+-----+------------+--------------+--------+ | 400222 | CA | 50 | 60 | 1000 | +-----------+-----+------------+--------------+--------+ | 400222 | DE | 40 | 50 | 2000 | +-----------+-----+------------+--------------+--------+ Note that the resulting table doesn't have the “Description” column. How do I do this using JavaScript?
has comment: http://stackoverflow.com/comment/46597525
tagged with: summary
has title: How to summarize rows based on multiple conditions using JavaScript?
answer count: 1
has answer: http://stackoverflow.com/a/29192380
accepted answer: http://stackoverflow.com/a/29192380
has comment: http://stackoverflow.com/comment/46598221
favorite count: 0
has comment: http://stackoverflow.com/comment/46598571
type: AnsweredQuestion

http://stackoverflow.com/comment/46642122
type: AnswerComment
has text: Using an array should be the solution. There’s obviously more to this than the code that you’ve shown, though. Is there a reason an array won’t work?
score: 0
comment on: http://stackoverflow.com/a/29216121
type: Comment

http://stackoverflow.com/comment/46401657
comment on: http://stackoverflow.com/q/29084326
has text: Show us what you have tried in canvas so far
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29172615
answers question: http://stackoverflow.com/q/29171262
type: Answer
has comment: http://stackoverflow.com/comment/46564171
score: 0
has body: Try this...

http://stackoverflow.com/a/29214543
has body: You can use javascript with the window.screen properties : link window.screen.availHeight window.screen.availWidth
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46638867
answers question: http://stackoverflow.com/q/29214389

http://stackoverflow.com/comment/46418243
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29093107
has text: I cannot do that as the data in both the JSONS are same as in The x axis is the date and the y axis is the value if i merge the two jsons the data for the same date will overlap each other. for eg: json1 [{date:02-03-2015, val1:14}] and json2 [{date:02-03-2015, val1:30}] In this case only the second value will be displayed in the same graph instead of two different graphs

http://stackoverflow.com/a/29098047
score: 0
has comment: http://stackoverflow.com/comment/46432759
accepted answer of: http://stackoverflow.com/q/29097858
has body: This below line actually does a innerHTML which means your img tag is lost you may have to move the IMG tag out of the youtube_video container and do a hide and show toggle mechanism for the youtube_video container and the IMG tag elm.addClass("player").html(ifr);
has comment: http://stackoverflow.com/comment/46432162
answers question: http://stackoverflow.com/q/29097858
has comment: http://stackoverflow.com/comment/46435945
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46470174
type: Comment
has text: If I remove the 2 parameters and create a function of the php code it crashes. Since it is just infinite looping. This doesn't work.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29120080

http://stackoverflow.com/comment/110663703
has text: your case solving only same set of words before numbers
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29180529
type: AnswerComment

http://stackoverflow.com/a/64848888
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/29067450
score: 2
downvote count: 0
has body: Here is another suggestion about how you can achieve this. You just need to grab the url of the QRCode and assign it to an img tag source in html. It's possible to do that with the toDataUrl() api of node-qrcode. Here is the definition : toDataURL(text, [options], [cb(error, url)]) Returns a Data URI containing a representation of the QR Code image. If provided, canvasElement will be used as canvas to generate the data URI. canvasElement Type: DOMElement Canvas where to draw QR Code. text Type: String|Array Text to encode or a list of objects describing segments. options type Type: String Default: image/png Data URI format. Possible values are: image/png, image/jpeg, image/webp. rendererOpts.quality Type: Number Default: 0.92 A Number between 0 and 1 indicating image quality if the requested type is image/jpeg or image/webp. cb Type: Function Callback function called on finish. So in order to display the neo QRCode, this is how I suggest you to do it based on the documentation: const fs = require('fs'); const path = require('path'); const express = require('express'); const router = module.exports = express.Router() const QRCode = require('qrcode') router.get('/', (req, res) => { QRCode.toDataURL('Hello World !').then(url => { res.send(` QRCode Generated `) }).catch(err => { console.debug(err) }) }); Coded

http://stackoverflow.com/comment/46438528
has text: You could do something like assign the result of $_SERVER['QUERY_STRING'] to a variable, then assign the result of explode on & to a variable. Finally, in a loop, explode that variable on '=' and you'll have the key/value pairs from the query string on each loop iteration. Compare the keys to 'user' to make sure it's there, and that keys value should be 'Abelard'. Check out the online PHP manual for the explode function. Also, make sure your tests are specific to what you're looking for. NEVER make assumptions about data coming in. That's how you get hacked.
score: 0
comment on: http://stackoverflow.com/a/29067745
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29090608
answer count: 2
has answer: http://stackoverflow.com/a/29090630
tagged with: jquery
has answer: http://stackoverflow.com/a/29090654
has comment: http://stackoverflow.com/comment/46413536
tagged with: php
type: UnansweredQuestion
type: Question
has title: How to Hide/Show 'div' using jQuery?
has comment: http://stackoverflow.com/comment/46413630
tagged with: javascript
has body: How can I show the text box depending on the user's selection in a dropdown box? <?php for($i=0;$i<=128;$i++){ echo " ".$i." "; } ?> Other: If the user selects 1 - the text box will not show. Then if the user selects more than 2 -> the will show. Here's my jQuery: Any suggestions?
score: 0

http://stackoverflow.com/comment/46490328
type: QuestionComment
has text: Your resulting HTML is not the result of default rendering. There is no div with standard rendering and standard or OneUI theme. The label is next to checkBox if you use XPages "out of the box".
comment on: http://stackoverflow.com/q/29124217
score: 0
type: Comment

http://stackoverflow.com/q/29103972
tagged with: promise
has body: I'm still learning about Promises and I'm facing a problem. Maybe you can help me. I have a task which does some checks before running the real stuff. Some of those checks are sync, others are async. So I'd like to have something like this: q.all([ jenkins.checkConfig, gitlab.checkConfig, sonar.checkConfig ]) .then( function() { doSomethingReallyCoolHere(); } ); But what if sonar.checkConfig is not a promise ? How can I give it a promise behavior ? Currently I'm doing this var checkConfig = function() { var qChecked = q.defer(); var isOK = awesomeSyncTestHere(); if (isOK) { qChecked.resolve(); } else { qChecked.reject(); } return qChecked.promise; } But it looks stupid. I guess that's not the good way to do it, right ? Thanks a lot
has answer: http://stackoverflow.com/a/29104297
accepted answer: http://stackoverflow.com/a/29104297
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/46439069
tagged with: javascript
has title: Promises: q.all() with mixed sync and async functions
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/23780918
tagged with: http://stackoverflow.com/tag/q
favorite count: 0

http://stackoverflow.com/a/29116727
answers question: http://stackoverflow.com/q/29116598
downvote count: 0
type: Answer
has body: it seems to be you have not passed the $http module to your main controller. function Main($scope,$http) { $scope.items = []; $scope.loadMore = function() { $http.get('/echo/json'). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available $scope.items += data; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. console.log("call failed"); }); }; $scope.loadMore(); } working demo
score: 1
upvote count: 1

http://stackoverflow.com/a/29098041
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46435548
has comment: http://stackoverflow.com/comment/46456557
upvote count: 1
has body: Can you try the following ..? function getStatus(url) { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState === 4){ request.status;//this contains the status code } }; request.open("GET", url , true); request.send(null); }
answers question: http://stackoverflow.com/q/29097819
type: Answer

http://stackoverflow.com/comment/55825613
comment on: http://stackoverflow.com/a/29094018
score: 0
type: AnswerComment
type: Comment
has text: @Moogs I've found a case with Babel 6 where the descriptor of `prototype` has `writable: true`. Hence I edited your answer and removed the **always** part of it in your first paragraph. This check **does not work for me**.

http://stackoverflow.com/q/29105947
tagged with: chai
has title: Babel / Karma / Chai gives TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions
possible better answer: http://stackoverflow.com/a/42439394
type: Question
has answer: http://stackoverflow.com/a/42439394
tagged with: testing
downvote count: 0
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/44666529
has answer: http://stackoverflow.com/a/29130322
favorite count: 0
score: 8
has body: I having trouble figuring out why this test is not passing. var expect = require('chai').expect; describe('HelloComponent', function() { it('passes a quite simple test', function() { expect(1 + 4).to.equal(5); }); }); produces this error: DEBUG [web-server]: serving: /Users/ivan/dev/react-starter/node_modules/karma/static/context.html DEBUG [web-server]: serving (cached): /Users/ivan/dev/react-starter/node_modules/mocha/mocha.js DEBUG [web-server]: serving (cached): /Users/ivan/dev/react-starter/node_modules/karma-mocha/lib/adapter.js DEBUG [web-server]: serving (cached): /Users/ivan/dev/react-starter/test/front-end/tests.webpack.js Chrome 41.0.2272 (Mac OS X 10.10.2) HelloComponent passes a quite simple test FAILED TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at new Assertion (/Users/ivan/dev/react-starter/test/front-end/tests.webpack.js:2166:43 &lt;- webpack:///~/chai/lib/chai/assertion.js:33:42) at chai.expect (/Users/ivan/dev/react-starter/test/front-end/tests.webpack.js:3592:13 &lt;- webpack:///~/chai/lib/chai/interface/expect.js:9:11) at Context.&lt;anonymous&gt; (/Users/ivan/dev/react-starter/test/front-end/tests.webpack.js:89:6 &lt;- webpack:///test/front-end/hello-spec.js:10:4) It might have something to do with babel wrapping things in strict mode? Does anyone know what steps I can start to take to figure out what's going here? The code is open source and available here: https://github.com/UWFosterIT/react-starter/tree/gulp-webpack to install and reproduce this error: git clone https://github.com/UWFosterIT/react-starter.git npm install gulp test:karma
tagged with: karma-runner
upvote count: 8
accepted answer: http://stackoverflow.com/a/29130322
type: AnsweredQuestion

java
tags question: http://stackoverflow.com/q/29217167
tags question: http://stackoverflow.com/q/29102330
tags question: http://stackoverflow.com/q/29205310
tags question: http://stackoverflow.com/q/29169817
tags question: http://stackoverflow.com/q/29146453
tags question: http://stackoverflow.com/q/29103203
tags question: http://stackoverflow.com/q/29183814
tags question: http://stackoverflow.com/q/29216262
tags question: http://stackoverflow.com/q/29160613
tags question: http://stackoverflow.com/q/29093107
tags question: http://stackoverflow.com/q/29068134
tags question: http://stackoverflow.com/q/29076334
tags question: http://stackoverflow.com/q/29150088
tags question: http://stackoverflow.com/q/29075850
tags question: http://stackoverflow.com/q/29072598
tags question: http://stackoverflow.com/q/29179427
tags question: http://stackoverflow.com/q/29066157
tags question: http://stackoverflow.com/q/29211960
tags question: http://stackoverflow.com/q/29138232
tags question: http://stackoverflow.com/q/29203464
tags question: http://stackoverflow.com/q/29180583
tags question: http://stackoverflow.com/q/29174212
tags question: http://stackoverflow.com/q/29145829
tags question: http://stackoverflow.com/q/29199945
tags question: http://stackoverflow.com/q/29100559
tags question: http://stackoverflow.com/q/29092211
tags question: http://stackoverflow.com/q/29145724
tag name: java
tags question: http://stackoverflow.com/q/29139704
tags question: http://stackoverflow.com/q/29184604
tags question: http://stackoverflow.com/q/29202237
tags question: http://stackoverflow.com/q/29103721
tags question: http://stackoverflow.com/q/29078461
tags question: http://stackoverflow.com/q/29129846
tags question: http://stackoverflow.com/q/29082950
tags question: http://stackoverflow.com/q/29139322
tags question: http://stackoverflow.com/q/29133342
tags question: http://stackoverflow.com/q/29154309
tags question: http://stackoverflow.com/q/29094664
tags question: http://stackoverflow.com/q/29106586
tags question: http://stackoverflow.com/q/29185892
tags question: http://stackoverflow.com/q/29200222
tags question: http://stackoverflow.com/q/29207018
tags question: http://stackoverflow.com/q/29102667
tags question: http://stackoverflow.com/q/29203622
tags question: http://stackoverflow.com/q/29179967
tags question: http://stackoverflow.com/q/29106411
tags question: http://stackoverflow.com/q/29131811
tags question: http://stackoverflow.com/q/29172001
tags question: http://stackoverflow.com/q/29079315
type: Tag
tags question: http://stackoverflow.com/q/29207592
tags question: http://stackoverflow.com/q/29125610
tags question: http://stackoverflow.com/q/29145265
tags question: http://stackoverflow.com/q/29217185
tags question: http://stackoverflow.com/q/29134964
tags question: http://stackoverflow.com/q/29188685
tags question: http://stackoverflow.com/q/29160283
tags question: http://stackoverflow.com/q/29156886
tags question: http://stackoverflow.com/q/29197577

http://stackoverflow.com/comment/62865236
type: AnswerComment
type: Comment
has text: I don't think that's how the ExtractText plugin works. You would still need to include the style loader.
comment on: http://stackoverflow.com/a/30539642
score: 1

http://stackoverflow.com/comment/46496428
comment on: http://stackoverflow.com/q/29135132
has text: tag was used for css purposes(will fix it asap). I want to save the variables c_degree[0],c_degree[1] and so on in javascript variables (using a loop running for the number of rows in the table) and passing the javascript variables to the ajax function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29100352
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: In fiddle $("#sortable").sortable({ cancel: ".fixed" }); $("#sortable").disableSelection(); this example the item 3,5 are fixed but when i moved Item 7 to above to Item 3 Item 3 Changes it position to 4, i want it to remain in 3rd position(Item 3 and Item 7) rest of Items can drag and drop by the user. How can i achieve this functionality?
has title: JQuery Sortable with fixed row
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29128028
tagged with: jquery-ui-sortable
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/46437312

http://stackoverflow.com/comment/120360686
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/63949662
has text: This one is nice but does require you to target ES2019.
type: Comment

http://stackoverflow.com/q/29205567
has answer: http://stackoverflow.com/a/64604351
has title: Use of Web Speech API in commercial application
tagged with: firefox
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I want to create a commercial web application based on speech recognition. I have found the Web Speech API (https://w3c.github.io/speech-api/) currently only supported by Chrome. Can I use this API for free for my commercial application? Is there a limit on the number of uses per day, or a free quota that I must not exceed?
type: Question
tagged with: webspeech-api
score: 5
tagged with: google-chrome
answer count: 1
upvote count: 5
type: UnansweredQuestion

http://stackoverflow.com/comment/46646269
type: QuestionComment
has text: What's used instead then @Teemu
score: 0
comment on: http://stackoverflow.com/q/29216928
type: Comment

http://stackoverflow.com/comment/46533844
score: 1
comment on: http://stackoverflow.com/q/29155322
has text: See http://stackoverflow.com/questions/26905929/three-js-2xmeshes-using-same-vector-as-position/26916159#26916159.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46414945
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29069996
has text: its ok i fixed it, i changed the document.calc to the document. ***name of the form***
score: 0

http://stackoverflow.com/comment/46488629
type: Comment
type: QuestionComment
has text: See latest edit. That was simply a transcription error. I removed a number of the other injected services, and internal code for readability.
comment on: http://stackoverflow.com/q/29131207
score: 0

http://stackoverflow.com/a/29133983
has body: Since go is contained within init_page(), each time you queue up a new one, it's getting a different instance of the function defined. Each one of those also has it's own y variable, as declared in init_page, which will have the value that was assigned to it from the current value of x at the time init_page was called - that's why you're seeing the behaviour you are.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29133928
downvote count: 0

http://stackoverflow.com/comment/46502818
type: Comment
has text: @alexchenco, only `return` is added, I have use overloaded `.text()` function to set replaced string.
comment on: http://stackoverflow.com/a/29139145
type: AnswerComment
score: 0

http://stackoverflow.com/q/29160814
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29160960
tagged with: jstree
tagged with: angularjs-directive
has title: how do you get a reference to the directive object instance in angularJS?
has body: So basically I have a directive which wraps a jquery plugin (jsTree if that matters). All i want is just a way to get the directive object so that I can use the exposed plugin object and do some modifications without really building a func into my directive. var ngJSTree = angular.module('jsTree.directive', []); ngJSTree.directive('jsTree', ['$http', function($http) { var treeDir = { restrict: 'EA', fetchResource: function(url, cb) { return $http.get(url).then(function(data) { if (cb) cb(data.data); }); }, . . . init: function(s, e, a, config) { treeDir.managePlugins(s, e, a, config); this.tree = $(e).jstree(config); treeDir.manageEvents(s, e, a); } }; return treeDir; } ]); I could very well just implement a registry mechanism of my own and add it to map for each directive , but is there a simpler way like possibly giving an id and accessing it . Something like how dojo had dijit.byId or like how jquery plugins give you access through the dom (Weird but works !!!) .
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/q/29190397
possible better answer: http://stackoverflow.com/a/29239742
has answer: http://stackoverflow.com/a/29239742
has body: I'm using Node.js and Express. I just implement Cloudinary to upload image from user, and store the image id to my MySQL database. I tried this tutorial from Cloudinary's documentation: http://cloudinary.com/documentation/node_image_upload. Everything works well, except at the final step, I need to get the image_id. var url = require('url') var url_parts = url.parse(req.body.coverurl, true) console.log(url_parts) //DEBUG var query = url_parts.query console.log(query) //DEBUG var preloaded_file = new cloudinary.PreloadedFile(query.image_id) if (preloaded_file.is_valid()) { var image_id = preloaded_file.identifier() console.log("Img ID:" + image_id) } else { console.log("Invalid upload signature") } The req.body.coverurl is something like: image/upload/v1426989769/f08eodnwt5zqfwb2bgpd.png#f63f1fe77c7f536447e079f3dd10829b5a15d862 The url_parts is: { protocol: null, slashes: null, auth: null, host: null, port: null, hostname: null, hash: '#f63f1fe77c7f536447e079f3dd10829b5a15d862', search: '', query: {}, pathname: 'image/upload/v1426989769/f08eodnwt5zqfwb2bgpd.png', path: 'image/upload/v1426989769/f08eodnwt5zqfwb2bgpd.png', href: 'image/upload/v1426989769/f08eodnwt5zqfwb2bgpd.png#f63f1fe77c7f536447e079f3dd10829b5a15d862' } And..., variable query is empty. query.image_id is invalid so can't get the image id, also can't verify the signature. I don't know why Cloudinary give this invalid callback string. Or how can I solve this problem. Thank for your help. And forgive me for my bad English :) Update my submit_idea.hbs {{{imgtag}}} Save in my routes/submit.js router.get('/submit/idea', function(req, res, next){ // just render the submit_idea.hbs with some Cloudinary variable }) router.post('/submit/idea', function(req, res, next){ var url = require('url') var url_parts = url.parse(req.body.coverurl, true) var query = url_parts.query var preloaded_file = new cloudinary.PreloadedFile(query.image_id) if (preloaded_file.is_valid()) { var image_id = preloaded_file.identifier() …
tagged with: image-uploading
tagged with: node.js
has title: Can't get image_id from Cloudinary in NodeJS
type: AnsweredQuestion
tagged with: cloudinary
type: Question
has answer: http://stackoverflow.com/a/29192923
has comment: http://stackoverflow.com/comment/46596143
tagged with: javascript
has comment: http://stackoverflow.com/comment/46595276
tagged with: express
has comment: http://stackoverflow.com/comment/46599113
accepted answer: http://stackoverflow.com/a/29192923
score: 0
answer count: 2

http://stackoverflow.com/a/29211421
has body: Since Id's are unique, you shouldnot give same Id to all the buttons, Rather give all the buttons a same class. And then you can run for loop: var radioButtons = document.getElementsByClassName("your class name"); for(var i=0;i&lt;radioButtons.length;i++) { radioButtons[i].disabled = true; }
answers question: http://stackoverflow.com/q/29211229
type: Answer
downvote count: 2
score: -2
upvote count: 0
has comment: http://stackoverflow.com/comment/67293344

http://stackoverflow.com/q/29062770
has body: I've been struggling for a while making websites compatible for desktop, tablet and mobile at once. There are loads of libraries to handle pointer events on touch devices. One of them is hand.js, which combines mouse and touch in pointer events, without me having to consider what device it is used for. Hand.js is working superb, exept for one problem. On touch devices, a pointerdown event is triggered even if it is intended as the start of a scroll or pinch. There are solutions to work around this, but instead of adding more and more javascript, I considered ditching all libraries for touch and let the browser decide for itself. To accomplish this, I'm thinking of using (or abusing :-) the <a href""> tag. Instead of (for simplicity I use onclick inline instead of add an eventlistener) using: Hello I could use Hello The benefit of this solution would be: the device browser decides how to handle the click/touch, whilst zooming and scrolling is still enabled without triggering any unwanted action. there is no need to register any event to the button. I don't need any library I've created a fiddle and (to my surprise) it is working. However, I'm no expert, hence my question: Can I use this method without running into problems?
favorite count: 0
has title: Using <a href""> instead of click/touch/pointer event
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: href
tagged with: javascript
tagged with: touch
downvote count: 0

http://stackoverflow.com/a/29081272
has body: I suggest you to use requestAnimationFrame instead of setinterval. Here is an example with a variable number of colors : https://jsfiddle.net/y38q271f/4/ var canv2 = document.getElementById("canvas2"); var ctx2 = canv2.getContext("2d"); var r = 60, sAngle = 0, angle = 0, eAngle = 0; var tourTime = 3; var speed = 360 / (tourTime * 1000); // degrees per millisecond. var initTime = 0; var colors = ['#0f0', '#1f0', '#2f0', '#3f0', '#4f0', '#5f0', '#6f0', '#7f0', '#8f0', '#9f0', '#af0', '#bf0', '#cf0', '#df0', '#ef0', '#ff0', '#fe0', '#fd0', '#fc0', '#fb0', '#fa0', '#f90', '#f80', '#f70', '#f60', '#f50', '#f40', '#f30', '#f20', '#f10', '#f00']; function anim(time) { if (initTime == 0) initTime = time; time -= initTime; var ang = (time * speed) % 360; var n = colors.length; var i, angS, angE, color; for (i = 0 ; i &lt; colors.length ; i++) { color = colors[i]; angS = i * 360 / n; if (angS &gt; ang) break; angE = Math.min((i + 1) * 360 / n, ang); ctx2.beginPath(); ctx2.arc(200, 80, r, Math.PI * angS / 180, Math.PI * angE / 180); ctx2.lineTo(200, 80); ctx2.closePath(); ctx2.fillStyle = color; ctx2.fill(); }; window.requestAnimationFrame(anim); } window.requestAnimationFrame(anim);
has comment: http://stackoverflow.com/comment/46395981
score: 0
answers question: http://stackoverflow.com/q/29080289
type: Answer

http://stackoverflow.com/q/29132125
has title: How to dynamically modify in materialize css framework
has answer: http://stackoverflow.com/a/58425666
accepted answer: http://stackoverflow.com/a/29494547
score: 33
has comment: http://stackoverflow.com/comment/91505071
type: Question
has answer: http://stackoverflow.com/a/37586066
upvote count: 33
has comment: http://stackoverflow.com/comment/46491478
linked to: http://stackoverflow.com/q/2712124
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46492525
has answer: http://stackoverflow.com/a/50879519
has answer: http://stackoverflow.com/a/54731231
has answer: http://stackoverflow.com/a/31360135
tagged with: materialize
answer count: 7
possible better answer: http://stackoverflow.com/a/29493290
favorite count: 0
has answer: http://stackoverflow.com/a/29494547
has answer: http://stackoverflow.com/a/29493290
has body: I just started using the materialize css framework. Now, materialize converts any select tag into a collection of ul and li elements. Before, using JQuery, I was able to do this: var $selectDropdown = $("#dropdownid"); $selectDropdown.empty(); $selectDropdown.html(' '); var value = "some value"; $selectDropdown .append($("&lt;option&gt;&lt;/option&gt;").attr("value",value).text(value)); My html is just a sample select tag: Before, this was working. Now it fails. What would be an alternative for repopulating this dropdown dynamically using javascript?
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/29170361
tagged with: object
has comment: http://stackoverflow.com/comment/46559376
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46559467
accepted answer: http://stackoverflow.com/a/29170831
has comment: http://stackoverflow.com/comment/46559579
answer count: 2
downvote count: 0
tagged with: events
has comment: http://stackoverflow.com/comment/46559007
favorite count: 0
has comment: http://stackoverflow.com/comment/46559353
possible better answer: http://stackoverflow.com/a/29170438
has answer: http://stackoverflow.com/a/29170438
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29170831
score: 1
has body: I have an Object function Object(name, button) { this.name = name; this.button = button; var alert = function () { alert("x"); }; } var ExampleOne = new Object('Example One', $('.exampleButton')); How can I make the function inside the object fire on an event of Object[button]... Using - ExampleOne.button.click(function () { ExampleOne.alert(); }); Doesn't work.
upvote count: 1
type: Question
has title: Add function to Object with an element selector

http://stackoverflow.com/a/29079229
downvote count: 1
has comment: http://stackoverflow.com/comment/60555231
upvote count: 5
answers question: http://stackoverflow.com/q/29079172
type: AcceptedAnswer
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/111785866
accepted answer of: http://stackoverflow.com/q/29079172
has body: It looks like it's attempting to print before the has loaded, move the call to print inside an event handler for the load event of window by opening the link as a data URI or Blob, for example var code = '\ \ \ \ \ \ \ '; window.open('data:text/html,' + code, '_blank', 'width=600,height=600'); Don't forget you may need to HTML encode the tags in code You could probably just listen for load on the instead, but if you ever do anything more complicated than tring to print a single image you may find it breaks again in future doc.write(' '); Where printFunction is the print function for all browsers

http://stackoverflow.com/comment/46501982
type: Comment
type: QuestionComment
has text: It's common to pass data into functions as arguments.
comment on: http://stackoverflow.com/q/29138991
score: 0

http://stackoverflow.com/comment/46458843
has text: Check your console? Is there any error?
score: 0
comment on: http://stackoverflow.com/q/29115091
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46462607
comment on: http://stackoverflow.com/a/29117100
has text: Yes I have all the files. Mail me I'll provide you all the files. Then you can check easily, Because I am a JAVASCRIPT beginner.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29182807
has comment: http://stackoverflow.com/comment/46581717
has comment: http://stackoverflow.com/comment/46581753
downvote count: 0
score: 1
type: Answer
has body: Just use HTML interpreter for the same, var d = document.createElement("div"); d.innerHTML = "&amp;#9679;&amp;#9679;&amp;#9679;&amp;#9679;&amp;#9679;"; input.setAttribute("placeholder", d.innerText);
upvote count: 1
has comment: http://stackoverflow.com/comment/46581696
answers question: http://stackoverflow.com/q/29182732

http://stackoverflow.com/a/29132200
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Actually your if can't be evaluated to true since api can't be all the values you check. I guess you need an and (&amp;&amp;) instead of an or (||): if ((api != 'abosp') &amp;&amp; (api !='sersp') &amp;&amp; ... In this case, you can use an associative array to have more succinct code: d = {abosp: 1, sersp: 1, volsp: 1, consp: 1, givsp: 1, blosp: 1}; if (!d[api]) api = 'cussp';
answers question: http://stackoverflow.com/q/29132136

http://stackoverflow.com/q/29192278
has comment: http://stackoverflow.com/comment/46598383
score: 0
tagged with: sqlite
has comment: http://stackoverflow.com/comment/46598547
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46598695
has comment: http://stackoverflow.com/comment/46598722
linked to: http://stackoverflow.com/q/1898178
has title: store json data in sqlite(phonegap app)
has comment: http://stackoverflow.com/comment/46598739
accepted answer: http://stackoverflow.com/a/29192527
type: AnsweredQuestion
tagged with: cordova
has comment: http://stackoverflow.com/comment/46598349
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29192527
type: Question
has comment: http://stackoverflow.com/comment/46598427
tagged with: javascript
has body: How can I store the JSON data that is decoded into SQLite Database. The app is built using phonegap. Here is the function in which the json data is getting decoded. function onNotification(e) { switch( e.event ) { case 'message': $("#app-status-ul").append(' MESSAGE -> MSG: ' + e.payload.message + ' '); var j=JSON.stringify(e); $("#app-status-ul").append(' MESSAGE -> MSG DECODED: ' + j + ' '); //android only $("#app-status-ul").append(' MESSAGE -> MSGCNT: ' + e.payload.msgcnt + ' '); //amazon-fireos only $("#app-status-ul").append(' MESSAGE -> TIMESTAMP: ' + e.payload.timeStamp + ' '); break; } } Here the JSON message is decoded and stored to a variable j. It is getting displayed properly. I want to store that into SQLite database. I tried by adding the plugin but it is showing error like "This is not responding". How can I store the message into SQL database. Here is what I get when I try to display j. MESSAGE -> MSG: undefined MESSAGE -> MSG DECODED: {"payload":{"0":{"medicine_name":null},"1":{"tm_1":null},"2":{"tm_2":null},"3":{"tm_3":null},"4":{"dosage":null},"5":{"medicine_name":null},"6":{"tm_1":null},"7":{"tm_2":null},"8":{"tm_3":null},"9":{"dosage":null},"10":{"medicine_name":null},"11":{"tm_1":null},"12":{"tm_2":null},"13":{"tm_3":null},"14":{"dosage":null},"15":{"medicine_name":null},"16":{"tm_1":null},"17":{"tm_2":null},"18":{"tm_3":null},"19":{"dosage":null},"20":{"medicine_name":null},"21":{"tm_1":null},"22":{"tm_2":null},"23":{"tm_3":null},"24":{"dosage":null},"25":{"medicine_name":null},"26":{"tm_1":null},"27":{"tm_2":null},"28":{"tm_3":null},"29":{"dosage":null},"30":{"medicine_name":null},"31":{"tm_1":null},"32":{"tm_2":null},"33":{"tm_3":null},"34":{"dosage":null},"35":{"diagnosis":null},"36":{"instructions":null}}," Please help. This is what i tried to do for storing it into SQL. But it didnt work $("#app-status-ul").append(' MESSAGE -> MSG: ' + e.payload.message + ' '); var db = window.sqlitePlugin.openDatabase({name: "drrem.db", location: 1}); d…
has comment: http://stackoverflow.com/comment/46598666

http://stackoverflow.com/a/29128675
type: Answer
has comment: http://stackoverflow.com/comment/46483193
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46483320
has body: You could take advantage of your 2dp prevision, and multiply all your numbers by 100 first, then do the mathematics using integers. EG, a float error occurs in this simple average (I am just using 1dp for this example): (0.1 + 0.2) / 2 0.15000000000000002 But this works: (0.1*10 + 0.2*10) / (2*10) 0.15 Some good reading here: http://floating-point-gui.de/basic/ and here: How to deal with floating point number precision in JavaScript? and a really precise fix to do it using decimals is to use this: https://github.com/dtrebbien/BigDecimal.js Example for 2 dp: var numbers = [0.10, 0.20, 0.30] var simple_average = numbers.reduce(function(a, b) { return a + b }) / numbers.length console.log(simple_average) var smart_average = numbers.map(function(a) { return a * 100 }).reduce(function(a, b) { return a + b }) / (numbers.length * 100) console.log(smart_average) This demo can be run here -- http://repl.it/e1B/1
has comment: http://stackoverflow.com/comment/46483871
has comment: http://stackoverflow.com/comment/46484299
accepted answer of: http://stackoverflow.com/q/29128434
has comment: http://stackoverflow.com/comment/46483390
has comment: http://stackoverflow.com/comment/46484185
score: 0
answers question: http://stackoverflow.com/q/29128434

http://stackoverflow.com/comment/46621065
score: 0
comment on: http://stackoverflow.com/q/29204983
type: Comment
has text: What is the result you are getting with this code? I tested it on fiddle, seems to work . https://jsfiddle.net/8vda06xw/
type: QuestionComment

http://stackoverflow.com/comment/46406242
comment on: http://stackoverflow.com/a/29079980
type: Comment
has text: Is the page in question on the same subdomain as the URL you are POSTing to? Cross domain restrictions apply.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29136356
has answer: http://stackoverflow.com/a/29136481
type: Question
upvote count: 2
answer count: 2
tagged with: window.location
tagged with: javascript
has answer: http://stackoverflow.com/a/32393884
favorite count: 0
downvote count: 0
tagged with: angularjs
has title: window.location.href/reload causing AngularJS [$rootScope:infdig] 10 $digest() iterations reached
type: UnansweredQuestion
has body: I know this is causing the problem, as if I were to change window.location.href/reload to $location.path(), it works just fine. Now, I do not see any performance errors when running the code (usability) Just kidding, this breaks the app in IE but works in Chrome when using window. What I am doing is forcing some updates to reflect on the site when a user logs in/out, and to do that I need to refresh the page once I change their route. Using $location.path and $state.go change my URL but do not reload/refresh the page to reflect the site updates. Is there any way for AngularJS to natively redirect and reload a route/page without getting this loop warning/error? Or is there a way to still use the window.location.href/reload and now have AngularJS freak out? The error Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n }; newVal: 8; oldVal: 7","fn: function(context) {\n try {\n for(var i = 0, ii = length, part; i And then there is a paragraph-long error below those starting with: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations....
score: 2

http://stackoverflow.com/a/29071271
type: Answer
has body: May be there are change listeners registered on #pass, #pass_con elements. Changing the value of these nodes programatically will not trigger a change event. Manually triggering the change event for the listeners to be notified.
score: 0
answers question: http://stackoverflow.com/q/29071217

http://stackoverflow.com/q/29201149
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
has body: lately, I've been trying to show some images but I can't figure out why this is happening: I have an array of objetcs coming from the back-end as follows: [ { Description:"blablablalb", title:"blablabla", images:[ { path:1.jpg }, { path:2.jpg } ] } ] Now, I want to show the images with the information, so I have the next structure: {{work.title}} Everything is working well excep this piece of code: ng-src="{{assets/img/work.images[0].path}} That gives me a NaN in the attribute, could somebody kindly explain me why this is happening? Note: if I use {{work.images[0].path}} outside the ng-src, I get the image path as expected Thanks in advance!
has title: Accesing array inside of object with ng-src
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/29201173
upvote count: 1
answer count: 1

http://stackoverflow.com/q/29131688
has title: How to guard against scope objects getting changed?
favorite count: 0
possible better answer: http://stackoverflow.com/a/29131764
tagged with: angularjs
tagged with: single-page-application
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46489179
downvote count: 1
has answer: http://stackoverflow.com/a/29132023
accepted answer: http://stackoverflow.com/a/29132023
type: Question
has answer: http://stackoverflow.com/a/29131764
tagged with: javascript
score: 0
answer count: 2
upvote count: 1
has body: I'm an Angular noob. In an app I have taken over there is an object in the scope that defines the role of the current user (e.g. user.role=REGULAR). Is there a way to keep a user from opening firebug and changing user.role=ADMIN? For example, I have seen code that shows a tab based on a value in a scope, but I'm not sure how to keep a user from changing that value (and getting access to the tab). Is there a pattern to deal with this? Does everything access-related need to come directly from a web service/protected remote location?

wordpress
tags question: http://stackoverflow.com/q/29097101
tags question: http://stackoverflow.com/q/29111889
tags question: http://stackoverflow.com/q/29132941
tags question: http://stackoverflow.com/q/29088717
tags question: http://stackoverflow.com/q/29209045
tags question: http://stackoverflow.com/q/29071762
tags question: http://stackoverflow.com/q/29157037
tags question: http://stackoverflow.com/q/29163125
tags question: http://stackoverflow.com/q/29090074
tags question: http://stackoverflow.com/q/29170605
tags question: http://stackoverflow.com/q/29170385
tags question: http://stackoverflow.com/q/29215744
tags question: http://stackoverflow.com/q/29163860
tags question: http://stackoverflow.com/q/29066459
tags question: http://stackoverflow.com/q/29200406
tags question: http://stackoverflow.com/q/29090697
tags question: http://stackoverflow.com/q/29089954
tags question: http://stackoverflow.com/q/29088598
tags question: http://stackoverflow.com/q/29110107
tags question: http://stackoverflow.com/q/29160350
tags question: http://stackoverflow.com/q/29133438
tags question: http://stackoverflow.com/q/29094985
tags question: http://stackoverflow.com/q/29201195
tag name: wordpress
tags question: http://stackoverflow.com/q/29119014
tags question: http://stackoverflow.com/q/29166673
tags question: http://stackoverflow.com/q/29211232
tags question: http://stackoverflow.com/q/29167782
tags question: http://stackoverflow.com/q/29135576
tags question: http://stackoverflow.com/q/29188176
tags question: http://stackoverflow.com/q/29144971
tags question: http://stackoverflow.com/q/29093380
tags question: http://stackoverflow.com/q/29142030
tags question: http://stackoverflow.com/q/29101659
tags question: http://stackoverflow.com/q/29075863
tags question: http://stackoverflow.com/q/29174776
tags question: http://stackoverflow.com/q/29096098
tags question: http://stackoverflow.com/q/29066337
tags question: http://stackoverflow.com/q/29132198
tags question: http://stackoverflow.com/q/29122488
tags question: http://stackoverflow.com/q/29185936
tags question: http://stackoverflow.com/q/29094915
tags question: http://stackoverflow.com/q/29101302
type: Tag
tags question: http://stackoverflow.com/q/29153084
tags question: http://stackoverflow.com/q/29088842

http://stackoverflow.com/a/29155286
has comment: http://stackoverflow.com/comment/46531408
upvote count: 3
has body: Directly, you can't. As per the spec, an HTMLCollection in the HTML DOM is live, it's automatically updated when the underlying document is changed. It only has the property HTMLCollection.length that's read-only and the methods HTMLCollection.item() and HTMLCollection.namedItem(). If you want to alter it, you will have to turn it into an array or an object.
has comment: http://stackoverflow.com/comment/46531610
downvote count: 0
has comment: http://stackoverflow.com/comment/46532336
answers question: http://stackoverflow.com/q/29155242
type: Answer
has comment: http://stackoverflow.com/comment/46532485
score: 3

http://stackoverflow.com/a/29208828
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46659945
has comment: http://stackoverflow.com/comment/46660057
type: Answer
has comment: http://stackoverflow.com/comment/46628208
has comment: http://stackoverflow.com/comment/46658312
upvote count: 1
has comment: http://stackoverflow.com/comment/46659559
has comment: http://stackoverflow.com/comment/46628822
has comment: http://stackoverflow.com/comment/46660366
has comment: http://stackoverflow.com/comment/46660251
has body: You should place empty table &lt;table id="list"&gt;&lt;/table&gt; inside of HTML fragment. You should convert the empty table to grid by usage $("#list").jqGrid({...}); after the &lt;table&gt; is already placed on the page. UPDATED: You have the problem with loading data from url: kimsHost + 'Service.svc/json/getIngredients/'. I recommend you to do the following: Add loadError callback. See the answer for details. Add the following options/callbacks: ajaxGridOptions: { contentType: "application/json" }, serializeRowData: function (data) { return JSON.stringify(data); }, gridview: true, autoencode: true I recommend you to consider to use loadonce: true option. You should use it if the server returns all data and not implemented server side paging, sorting and filtering/searching. I recommend to remove unneeded index properties from colModel, verify that sortname: 'Timestamp' is the option which you really need. You should remove trailing , at the end of colModel. The syntax ...},] is error in JavaScript. The error will be ignored by most modern web browsers, but some web browsers, like IE8, can find it critical. It's better to fix syntax of JavaScript code.
has comment: http://stackoverflow.com/comment/46661795
has comment: http://stackoverflow.com/comment/46659846
answers question: http://stackoverflow.com/q/29208502

http://stackoverflow.com/a/29097131
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29097051
score: 2
answers question: http://stackoverflow.com/q/29097051
downvote count: 0
has body: Don't set the remaining time. Set the actual time and let JavaScript calculate the remaining time at each interval and your problem is solved.
has comment: http://stackoverflow.com/comment/46429967
has comment: http://stackoverflow.com/comment/46424999
has comment: http://stackoverflow.com/comment/46430849
has comment: http://stackoverflow.com/comment/46430194
upvote count: 2
has comment: http://stackoverflow.com/comment/46431177

http://stackoverflow.com/comment/46539668
type: AnswerComment
has text: there is 1 more problem . It should be col1[j] = array[i]; col2[j] = array[i+1]; col3[j] = array[i+2]; But it still dont show marker on map when i read from file
comment on: http://stackoverflow.com/a/29150879
type: Comment
score: 0

http://stackoverflow.com/comment/46565222
type: AnswerComment
type: Comment
has text: I see. The index.html does have jQuery included. Where do I get the jQuery wrapped version of Fine Uploader? Thanks!
comment on: http://stackoverflow.com/a/29173361
score: 0

http://stackoverflow.com/a/29084488
accepted answer of: http://stackoverflow.com/q/29084298
type: AcceptedAnswer
downvote count: 0
has body: You can use your code but will need a callback. A better way would be look into promises. function authenticate(onsuccess, onfail) { $.ajax({ //TODO: Securely send this (ssl?) type: 'POST', url: 'includes/clientAuthenticate.php', data: { username: username, password: password}, success:function(data){ onsuccess(data); // you should check if this is a function }, error:function(jqXHR, textStatus, errorThrown){ onfail(errorThrown); } }); function attemptEventSubmit(eKey) { authenticate( function(ajaxData){ emailEvent('whatever you want to send'); }, function(errThrown){ alert(errThrown); }); }
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29084298
upvote count: 2

http://stackoverflow.com/comment/49769219
has text: It does give out tags, but only to the video owner. You can go here https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list, authorize your request with OAuth 2.0 and on your own videos you will be given tags. Sadly, this doesn't work with PHP API even with authentication due to some bug.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29062821
score: 0

http://stackoverflow.com/a/29080576
type: Answer
score: 0
has body: Something I like to do is have an event listen for any time you scroll, and when window.scrollY gets to the desired point, then I run animations/functions/whatever. I might also add in a boolean or int value that changes when you apply the change so that you are not constantly making the change every time the if or else statement passes. (may be why it is lagging for you) var changesMade = 0; window.onscroll = function() { if (window.scrollY &gt; 100 &amp;&amp; changesMade != 1) { $('#algemeen').css('position','fixed'); $('#algemeen').animate({ top: '0px', left: '70%', width: '10%' }, 200); changesMade = 1; } else if (window.scrollY &lt; 100 &amp;&amp; changesMade != 0) { $('#algemeen').css('position','absolute'); $('#algemeen').animate({ top: '300px', left: '100px', width: '200px' }, 200); changesMade = 0; } } Hope this is helpful.
answers question: http://stackoverflow.com/q/29080295

http://stackoverflow.com/q/29102260
tagged with: javascript
has comment: http://stackoverflow.com/comment/46434719
score: 0
has comment: http://stackoverflow.com/comment/46435072
has title: javascript works in debugger but not in run mode
answer count: 0
has comment: http://stackoverflow.com/comment/46434711
type: UnansweredQuestion
type: Question
has body: i am using google.api to validate address and then make an ajax call to insert into database if the address is valid. but the google code is executed after if ((lati === undefined) &amp;&amp; (longi=== undefined))where its setting the address invalid. Can some please suggest why its not executing google.map before it checks the lati and longi for undefined. $( document ).ready(function() { var geocoder = new google.maps.Geocoder(), lati,longi; $("#editDistributor").dialog({ autoOpen: false, height: 550, width: 550, modal: true, buttons: { "save": function() { if ($( "#distAddress" ).val()) {tempAddress = $( "#distAddress" ).val();} if($( "#distCity" ).val()) tempAddress = tempAddress + $( "#distCity" ).val(); if($( "#distState" ).val()) tempAddress = tempAddress + $( "#distState" ).val(); if($("#distZip").val()) tempAddress = tempAddress + $("#distZip").val(); geocoder.geocode({'address': tempAddress }, function(results, status) { if(status) { google.maps.GeocoderStatus.OK: lati=results[0].geometry.location.k; longi=results[0].geometry.location.D; } }); if ((lati === undefined) &amp;&amp; (longi=== undefined)){ alert ( "Invalid Address"); }else{ var dialog = $(this); var mapContent = new Object(); if($( "#distCompany" ).val() != undefined){ mapContent.name=$( "#distCompany" ).val(); }else{ alert("Please enter company Name"); } $.ajax({ type: "POST", url: window.location.origin+"/"+window.location.pathname.split("/")[1]+"/map/create", data: JSON.stringify(mapContent), dataType: "html", contentType: 'application/json; charset=utf-8', success: function(response){ alert("yes"); }, error: function(){ alert("Failure"); } }); } }, close: function() { $(this).dialog("close"); } } }); thanks
has comment: http://stackoverflow.com/comment/46434606

arrays
tags question: http://stackoverflow.com/q/29085881
tags question: http://stackoverflow.com/q/29137218
tags question: http://stackoverflow.com/q/29201149
tags question: http://stackoverflow.com/q/29146220
tags question: http://stackoverflow.com/q/29156619
tags question: http://stackoverflow.com/q/29082065
tags question: http://stackoverflow.com/q/29079348
tags question: http://stackoverflow.com/q/29168795
tags question: http://stackoverflow.com/q/29151321
tags question: http://stackoverflow.com/q/29201759
tags question: http://stackoverflow.com/q/29096818
tags question: http://stackoverflow.com/q/29163300
tags question: http://stackoverflow.com/q/29177094
type: Tag
tags question: http://stackoverflow.com/q/29098558
tags question: http://stackoverflow.com/q/29214824
tags question: http://stackoverflow.com/q/29156441
tags question: http://stackoverflow.com/q/29067781
tags question: http://stackoverflow.com/q/29108288
tags question: http://stackoverflow.com/q/29148791
tags question: http://stackoverflow.com/q/29199909
tags question: http://stackoverflow.com/q/29156947
tags question: http://stackoverflow.com/q/29156592
tags question: http://stackoverflow.com/q/29118745
tags question: http://stackoverflow.com/q/29162022
tags question: http://stackoverflow.com/q/29179346
tags question: http://stackoverflow.com/q/29172422
tags question: http://stackoverflow.com/q/29188908
tags question: http://stackoverflow.com/q/29186838
tags question: http://stackoverflow.com/q/29192862
tags question: http://stackoverflow.com/q/29211564
tags question: http://stackoverflow.com/q/29178443
tags question: http://stackoverflow.com/q/29121383
tags question: http://stackoverflow.com/q/29150072
tags question: http://stackoverflow.com/q/29202098
tags question: http://stackoverflow.com/q/29156272
tags question: http://stackoverflow.com/q/29078694
tags question: http://stackoverflow.com/q/29205597
tags question: http://stackoverflow.com/q/29204126
tags question: http://stackoverflow.com/q/29062633
tags question: http://stackoverflow.com/q/29151700
tags question: http://stackoverflow.com/q/29113362
tags question: http://stackoverflow.com/q/29134414
tags question: http://stackoverflow.com/q/29140301
tags question: http://stackoverflow.com/q/29065836
tags question: http://stackoverflow.com/q/29178606
tags question: http://stackoverflow.com/q/29136052
tags question: http://stackoverflow.com/q/29133392
tags question: http://stackoverflow.com/q/29106857
tags question: http://stackoverflow.com/q/29183861
tags question: http://stackoverflow.com/q/29149409
tags question: http://stackoverflow.com/q/29072506
tags question: http://stackoverflow.com/q/29098098
tags question: http://stackoverflow.com/q/29198650
tags question: http://stackoverflow.com/q/29143467
tags question: http://stackoverflow.com/q/29103458
tags question: http://stackoverflow.com/q/29087854
tags question: http://stackoverflow.com/q/29210769
tags question: http://stackoverflow.com/q/29095746
tags question: http://stackoverflow.com/q/29066590
tags question: http://stackoverflow.com/q/29191525
tags question: http://stackoverflow.com/q/29147834
tags question: http://stackoverflow.com/q/29172355
tags question: http://stackoverflow.com/q/29153046
tags question: http://stackoverflow.com/q/29143693
tags question: http://stackoverflow.com/q/29212517
tags question: http://stackoverflow.com/q/29107655
tags question: http://stackoverflow.com/q/29104260
tags question: http://stackoverflow.com/q/29065668
tags question: http://stackoverflow.com/q/29197838
tags question: http://stackoverflow.com/q/29177729
tags question: http://stackoverflow.com/q/29063666
tags question: http://stackoverflow.com/q/29168585
tags question: http://stackoverflow.com/q/29211116
tags question: http://stackoverflow.com/q/29159342
tags question: http://stackoverflow.com/q/29159478
tags question: http://stackoverflow.com/q/29150130
tags question: http://stackoverflow.com/q/29084275
tags question: http://stackoverflow.com/q/29086580
tags question: http://stackoverflow.com/q/29186879

http://stackoverflow.com/q/29091840
tagged with: deployment
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46424943
has comment: http://stackoverflow.com/comment/46444679
score: 0
has title: how to make achanges to an already deployed meteor app in windows
tagged with: javascript
tagged with: meteor
has comment: http://stackoverflow.com/comment/46481900
has body: I have an already deployed meteor app on a digital ocean server. I need to add just a few lines of code and make the changes. Is there any other method rather than using meteor up as it requires ubuntu and im using windows 7, i dont want to use virtual box.
type: UnansweredQuestion

http://stackoverflow.com/q/29150535
tagged with: polygons
upvote count: 1
has title: Cannot clip polygon using d3.js
type: AnsweredQuestion
score: 1
type: Question
has body: I am trying to take a polygon and cut another polygon with its intersecting area. I thought d3.geom.polygon 's method clip would work but I seem to get all sorts of weird problems when I try it in the below fiddle. http://jsfiddle.net/RussellAsher/335089x2/8/ If anyone knows how I would do this with or without d3.js I would be eternally thankful. d3 methods I am trying to use: var p1 = d3.geom.polygon(arrayOfPolygons[0].points); var p2 = d3.geom.polygon(arrayOfPolygons[1].points); p2.clip(p1);
accepted answer: http://stackoverflow.com/a/29464836
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29464836
tagged with: geometry
tagged with: d3.js

http://stackoverflow.com/a/29175021
type: Answer
has comment: http://stackoverflow.com/comment/46568275
has body: Try structuring the code like this: &lt;script&gt; function onSuccess(returnVal) { alert('Success! ' + returnVal); }; function getval(sel){ var selectValue = sel.value; console.log('selectValue: ' + selectValue); google.script.run .withSuccessHandler(onSuccess) .getuserpass(sel.value); }; &lt;/script&gt; You can iterate through the object to see what is really in it, as a debugging test. for (var propertyVal in sel) { console.log('this property: ' + propertyVal); console.log('this value: ' + sel[propertyVal]); }; And see what is really in the object.
answers question: http://stackoverflow.com/q/29174066
has comment: http://stackoverflow.com/comment/46568521
score: 0
has comment: http://stackoverflow.com/comment/46568766

http://stackoverflow.com/comment/123134940
has text: My SBC kept failing Klaus' tests because I was calculating twos complement (by adding carry) first, before passing it on to ADC (with carry-add disabled). That caused me much pain. Your simple code of SBC(x) => ADC(~x) is amazing and worked! Thank you!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29224684

http://stackoverflow.com/comment/46449222
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29109850
has text: Depends on what your term.tag is. Try just `term.tag && term.id`.

http://stackoverflow.com/comment/46534717
type: AnswerComment
comment on: http://stackoverflow.com/a/29157045
score: 0
type: Comment
has text: is the "youridnumber" supposed to be the php echo that echoes the id retrieved from the database?

http://stackoverflow.com/q/29067453
accepted answer: http://stackoverflow.com/a/29067559
tagged with: logic
has comment: http://stackoverflow.com/comment/46370416
answer count: 3
tagged with: intervals
favorite count: 0
has comment: http://stackoverflow.com/comment/46370471
possible better answer: http://stackoverflow.com/a/29067687
has title: overlapping of 3 intervals: what is the fastest way
has answer: http://stackoverflow.com/a/29067687
tagged with: python
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29067559
score: -1
tagged with: overlapping
type: Question
has body: Give 3 intervals (a,b) , (c,d) , (e,f), what is the fastest way to detect (i.e. have a yes/no answer) if exists a value t that is at the same time a&lt;=t&lt;b AND c&lt;=t&lt;d AND e&lt;=t&lt;f ? Is it also possible to compute the range of t that satisfies this condition, min(t),max(t) ? Moreover, is it possible to do the same without any hypotesis about the order? (i.e. it could be also b&lt;a or a&lt;b) I've found a well known solution for two segments but for three is not trivial. Any js or python example code is welcome. EDIT: corrected condition requirements
upvote count: 0
has answer: http://stackoverflow.com/a/29067799
tagged with: javascript

http://stackoverflow.com/comment/46480332
type: AnswerComment
has text: I see what your saying, but getting a conflict with this method! error: 'stateData is not defined!!"
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29126865

http://stackoverflow.com/q/29197990
has comment: http://stackoverflow.com/comment/46608988
type: Question
has comment: http://stackoverflow.com/comment/46612323
has body: I have various .change jquery methods in order to populate one dropdown using data from another dropdown; this works correctly. Now, I am having trouble automatically firing these .changes using .trigger("change") in an explicit function. This explicit function should automatically select the correct dropdown items such that after the first trigger's ajax completes, the next should execute etc. function populate(id, block, chapter) { $("#Chapters").val(chapter).trigger("change"); $("#Blocks").val(block).trigger("change"); $("#IDs").val(id); } Here are the ajax powered methods for populating the respective dropdowns: (NOTE: I have used async:false to try mitigate my waiting problem; i see that this is most likely not the solution and that the solution may lie somewhere in my explicit function shown above) $('#Chapters').change( function () { var selectedVal = $(this).val(); $.ajax("/Library/GetBlocksByChapter", { async: false, data: { "chapterId": selectedVal }, type: "POST", success: function (data) { $("#Blocks").empty().append("&lt;option value='0'&gt;--Select a Block--&lt;/option&gt;"); $("#IDs").empty().append("&lt;option value='0'&gt;--Please Select a Block First--&lt;/option&gt;"); $.each(data, function (index, value) { $("#Blocks").append("&lt;option class='form-control' value='" + value["dbid"] + "'&gt;" + value["name"] + "&lt;/option&gt;"); } ); } }); } ); $('#Blocks').change( function () { var selectedVal = $(this).val(); $.ajax("/Library/GetIDsByBlock", { async: false, data: { "blockId": selectedVal }, type: "POST", success: function (data) { $("#IDs").empty(); $.each(data, function (index, value) { $("#IDs").append("&lt;option class='form-control' value='" + value["dbid"] + "'&gt;" + value["name"] + "&lt;/option&gt;"); } ); } }); } ); To make things a bit clearer: I have 3 dropdowns, the first one populates the second one etc. I have a few buttons on the page that call the method populate(id, block, chapter) in order to auto select the dropdowns; where i…
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46613186
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46613083
answer count: 0
has title: JQuery trigger("change") on Completion of another trigger("change"), where .change includes ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46608507

http://stackoverflow.com/comment/46467441
has text: I see your point. I guess I am passing in the same thing twice to displayFullPricing! Yes, I am trying to track which productVariant.prices is selected and then set it to true while setting the others to false so I can then update some JSON (Thats why I was using the foreach function). I will refactor it. Thanks
type: AnswerComment
comment on: http://stackoverflow.com/a/29099211
score: 0
type: Comment

http://stackoverflow.com/comment/46478740
has text: It seems that there is already an answer that works for this question: http://stackoverflow.com/questions/19313017/detect-if-two-browser-windows-are-open-to-the-same-site
comment on: http://stackoverflow.com/q/29125928
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29217021
has body: Inner function cannot call the outer function’s arguments object If you have function outer(){ function inner(){ doSomething(arguments); } } then arguments refers to the arguments of the function immediately containing the line. So to the arguments of inner. You cannot get to the arguments of outer from there. Inner function can call the outer function’s parameters directly. function outer(a,b,c){ function inner(d,e,f){ doSomething(a,b,c); } } As long as you keep the argument (and local variable) names distinct, you can still access the parameters to outer from inside inner (here, those are a, b, and c).
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29216881
downvote count: 0

http://stackoverflow.com/comment/46422807
type: Comment
score: 0
type: AnswerComment
has text: I fully understood logic, i checked ID as well, not assigned to other elements, i did check with other pages as well, but what so ever reason, it seems "selected" property is not applied to option element, i always get first entry\value of option in drop down when i click on edit.
comment on: http://stackoverflow.com/a/29093095

http://stackoverflow.com/q/29184118
tagged with: sails.js
has comment: http://stackoverflow.com/comment/46620529
tagged with: javascript
downvote count: 0
has title: Sails Js : sails.sockets.blast returns 2 same events to subscribed clients
has comment: http://stackoverflow.com/comment/46607670
favorite count: 0
has comment: http://stackoverflow.com/comment/46655759
has comment: http://stackoverflow.com/comment/46620407
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
has body: I am using the model life cycle callback to emit an event whenever a new instance is created but subscribed clients receive two events instead of one. Any idea how to fix this? afterCreate : function(user, next){ sails.sockets.blast('users', {verb : 'created', data : user}); next(); } And here is my io.socket.on io.socket.on('users', function(msg){ switch (msg.verb) { case "created": console.log("User Created"); $scope.users.push(msg.data); $scope.showAddUserForm(false); clearForm() $scope.$digest(); break; case "destroyed": console.log("User Deleted"); console.log($scope.users); var index = _.findIndex($scope.users,{'id': msg.data.id}); $scope.users.splice(index,1); $scope.showEditOrDeleteUserForm(false); $scope.$digest(); break; }
type: Question

http://stackoverflow.com/a/29118959
answers question: http://stackoverflow.com/q/29118197
has body: You can do this with little help of jQuery. The idea is to use jQuery to query XML document: var xml = $.parseXML('<?xml version="1.0" encoding="UTF-8" standalone="yes"?> VX-61522,VX-61520,VX-61519,VX-61515,VX-61513,VX-61514,VX-61525,VX-61523 Final Cut Server shapeTag lowres original house_format_audio_through portal_mf129489 no '); var value = $(xml).find('field > name').filter(function(){ return $(this).text() === 'portal_mf129489' }).siblings('value').text(); $('body').append(value);
score: 1
has comment: http://stackoverflow.com/comment/46465471
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46447238
type: Comment
has text: The ` ` tag is not an absolute. So you have formatting for a nav that will be applied to any other nav you add to the page. You could use a div instead.
type: QuestionComment
comment on: http://stackoverflow.com/q/29108766
score: 0

http://stackoverflow.com/q/29139394
score: 0
answer count: 3
has body: I have an array of strings in a specific order and would like to arrange a different array of objects to match the original array order. var arrangement = ["third", "first" "second"]; var myObjs = [ { name: "thing", position: "first" }, { name: "thing", position: "second" }, { name: "thing", position: "third" } ]; So that the output would be: var myObjs = [ { name: "thing", position: "third" }, { name: "thing", position: "first" }, { name: "thing", position: "second" } ]; Any ideas on a good way to approach this? Cheers,
has answer: http://stackoverflow.com/a/29139451
has answer: http://stackoverflow.com/a/29139526
type: AnsweredQuestion
has title: Arrange array of objects by corresponding array of strings
accepted answer: http://stackoverflow.com/a/29139451
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29139446
has answer: http://stackoverflow.com/a/29139446

ytplayer
tag name: ytplayer
type: Tag
tags question: http://stackoverflow.com/q/29164551

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/29067681
tags question: http://stackoverflow.com/q/29141833
tags question: http://stackoverflow.com/q/29162275
tags question: http://stackoverflow.com/q/29105335
tags question: http://stackoverflow.com/q/29189330
tags question: http://stackoverflow.com/q/29165034
tags question: http://stackoverflow.com/q/29164358
tags question: http://stackoverflow.com/q/29168007
tags question: http://stackoverflow.com/q/29140168
tags question: http://stackoverflow.com/q/29190286
tags question: http://stackoverflow.com/q/29138830
tags question: http://stackoverflow.com/q/29177977
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/29164107

http://stackoverflow.com/a/29082641
accepted answer of: http://stackoverflow.com/q/29080504
upvote count: 2
has comment: http://stackoverflow.com/comment/46465565
score: 2
answers question: http://stackoverflow.com/q/29080504
has body: This undocumented usage: infoWindow.content = html; May be the issue. Should be: infoWindow.setContent(html); The .content property went away or is no longer supported issue
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46421874
type: Answer

http://stackoverflow.com/a/29167195
has comment: http://stackoverflow.com/comment/46587502
has comment: http://stackoverflow.com/comment/46605771
type: Answer
has comment: http://stackoverflow.com/comment/46622276
has comment: http://stackoverflow.com/comment/46621670
has body: Hope I did get it good: don't use return false path to continue navigation. Html: &lt;a id="your_anchor" href="&lt;?php the_permalink() ?&gt;" title="nothing" rel="bookmark"&gt;Click Here&lt;/a&gt; JS: document.getElementById("your_anchor").addEventListener("click", function () { window.open("http://www.yoursite/xxxxx.html", '_blank'); } New window open, user continue navigation to ?php the_permalink() ? page, example here: http://jsfiddle.net/041ammg4/
answers question: http://stackoverflow.com/q/29165957
score: 0
has comment: http://stackoverflow.com/comment/46625626

http://stackoverflow.com/comment/46626121
comment on: http://stackoverflow.com/q/29207787
score: 0
has text: The problem you must be having right now, is that both the icons are being replaced since `a i` matches all. You need to replace it with `this > i`. Try that and let me know :)
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29174502
answer count: 3
has comment: http://stackoverflow.com/comment/46568764
downvote count: 0
has comment: http://stackoverflow.com/comment/46566901
favorite count: 0
has answer: http://stackoverflow.com/a/29174583
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29174583
has body: I want to try to do something like this, where I change the href location for a specific div. I know I can use an Iframe but I am trying to avoid frames. Is there any way to accomplish this, where a user click a button and the source of just a single div changes but the rest of the site stays the same. &lt;script&gt; function chdiv() { document.getElementById("div2").location.href="google.com"; } &lt;/script&gt; &lt;div id="div1"&gt; &lt;button id="change" onclick="chdiv();" &lt;/div&gt; &lt;div id="div2"&gt; &lt;div&gt;
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46568539
has title: Possible to change location.href of a div without using iframe?
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46567651
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29174604
has comment: http://stackoverflow.com/comment/46567808
has answer: http://stackoverflow.com/a/29174604
has answer: http://stackoverflow.com/a/29174614
has comment: http://stackoverflow.com/comment/46568001

http://stackoverflow.com/comment/46580194
type: QuestionComment
has text: possible duplicate of [Scroll to bottom of div?](http://stackoverflow.com/questions/270612/scroll-to-bottom-of-div)
comment on: http://stackoverflow.com/q/29181926
score: 0
type: Comment

http://stackoverflow.com/q/29201896
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46615766
has comment: http://stackoverflow.com/comment/46615937
score: 1
has body: So, I was trying to make HTML appear at the click of a button, but instead of inserting the HTML right where the script tag was, the entire page was overwritten with the code that was supposed to be generated. After experimenting, I found that something simple like document.write(" " + "Hello!" + " ") would simply insert it as it should. On the other hand, the code I was trying to do replaced the entire page. Does anyone know how to fix this? Here is some example code. function writeIFrame() { document.write(' Check out my YouTube channel here and subscribe!'); }
linked to: http://stackoverflow.com/q/802854
has comment: http://stackoverflow.com/comment/46616059
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46616508
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/36902703
tagged with: document.write
has answer: http://stackoverflow.com/a/47035520
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: document.write() overwrites entire page
has comment: http://stackoverflow.com/comment/46616048
favorite count: 0

http://stackoverflow.com/a/29096393
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29096355
has body: Because...myApp is not defined. Add a var in front of it to declare it. Otherwise, you're relying on The Horror of Implicit Globals (which only "works" in loose mode anyway), so JSHint is quite rightly telling you not to do that.
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29096355
score: 2

http://stackoverflow.com/q/29106586
type: UnansweredQuestion
tagged with: android
tagged with: python
tagged with: java
type: Question
has body: i installed Docker in debian wheezy 64bit and when i try to run it these error are displayed: /usr/local/bin/docker: line 1: --2015-03-17: command not found /usr/local/bin/docker: line 2: syntax error near unexpected token (' /usr/local/bin/docker: line 2:Resolving get.docker.io (get.docker.io)...162.242.195.84' how to solve this problem? thanks
has title: Docker not run in debian wheezy
tagged with: ios
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29106853
answer count: 1

http://stackoverflow.com/a/29107790
type: Answer
answers question: http://stackoverflow.com/q/29107655
has comment: http://stackoverflow.com/comment/46445602
has body: When you join the array, it is calling the "toString" of each element. In this case, they are DOM elements and return their type. You can use map first to create a new array of strings containing the value of each option: http://jsfiddle.net/Lfx6r5sm/ var genres = arr.map(function(el){ return el.value; }).join(', ');
accepted answer of: http://stackoverflow.com/q/29107655
upvote count: 9
type: AcceptedAnswer
downvote count: 0
score: 9

http://stackoverflow.com/comment/46469890
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29121224
score: 0
has text: @cufare several ways, one is to include in the beggining your php file , and then you will just add the minimum php needed inside the div, for example a php variable containing all you need from the server side, another easy way is to make an ajax call to the php and the response then will affect that div using jquery .

http://stackoverflow.com/a/29198374
answers question: http://stackoverflow.com/q/29198250
accepted answer of: http://stackoverflow.com/q/29198250
has body: The construct document.getElementById('BranchOne').addEventListener("click", setBranch("BranchOne")); will pass the result of the function setBranch as the second parameter to the event listener (which leads to an error of course, as it's not a function). Instead of adding repeated listeners which only differentiate in the passed string, which apparently is the ID of the element, try this: document.getElementById('BranchOne').addEventListener("click", function(event) { setBranch(event.target.id); }); This is only a rough suggestion, but should at least work with some enhancements probably, see fiddle
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/q/29141423
tagged with: angularjs
has body: I have an input field. When there is a keyup on this field, I send a request with AJAX and $http service of angular. My problem is when another keyup event is triggered, I need to cancel all pending requests. I have seen a lot of answers, but I have not found a solution. I tried two things : A service that I call App.factory('findArticlesService', function($http, $q) { var self = this; self.canceller = null; return { getArticles: function(route, formData) { if (self.canceller) { self.canceler.resolve("Other request is pending"); } var deferred = $q.defer(); self.canceller = $q.defer(); $http.post(route, angular.toJson(formData), {timeout: self.canceller.promise}).success(function(data) { deferred.resolve({data: data}); }); return deferred.promise; } }; }); App.controller('mainCtrl', ['$scope', '$http', '$q', 'findArticlesService', function($scope, $http, $q, findArticlesService) { var res = findArticlesService.getArticles(route, $scope.formData); console.log(res); }]); It doesn't work well. And this : var canceller = $q.defer(); canceller.resolve(); $http.post(route, angular.toJson($scope.formData), {timeout: canceller.promise}).then(function(data) {...}); This cancel all requests before they are sent. Can you help me ?
score: 4
has answer: http://stackoverflow.com/a/29181046
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46520742
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/46521023
has comment: http://stackoverflow.com/comment/46520177
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29181046
has comment: http://stackoverflow.com/comment/46520721
upvote count: 4
has comment: http://stackoverflow.com/comment/46509363
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has title: How to cancel pending requests in AngularJS?

http://stackoverflow.com/comment/46659694
comment on: http://stackoverflow.com/a/29214114
score: 1
type: AnswerComment
type: Comment
has text: Good to hear. At least you now have a very fast chat application.

http://stackoverflow.com/comment/46444024
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29106857
has text: @Kevin B Math[].. is empty array created after executing the code
score: 0

http://stackoverflow.com/comment/46498077
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29136535
has text: I believed that the only was true when included directly into the html. Thanks.

http://stackoverflow.com/comment/46375108
score: 0
type: QuestionComment
type: Comment
has text: is there any other error in your console
comment on: http://stackoverflow.com/q/29069996

http://stackoverflow.com/q/29128864
tagged with: forms
answer count: 1
tagged with: jquery
has body: I am creating a script that will enable me to submit a form by pressing the Enter key but i do not want it to submit the form when i press Shift+Enter. Rather when i press Shift + Enter i would like the input to expand just like on Facebook comment. So far I was able to get the form to submit by pressing enter with this &lt;script&gt; $(document).ready(function() { $('#comment').keyup(function(e) { if(e.keyCode == 13) { var comment = $('#comment').val() var sid = $('#sid').val() if(comment == "") { /*alert("Please write something in comment.");*/ } else { $("#commentbox").append("&lt;div class='commentarea'&gt;"+comment+"&lt;/div&gt;"); $.post("index.php", {sid:sid,comment:comment},function(data) { }) $('#comment').val(""); } } }); }); &lt;/script&gt; Problem and Question With this code, when i press Shift and Enter, apparently Jquery recognize it as Enter instead of Shift and Enter, therefore it validates the form . How to make jquery differentiate between Shift + Enter from Enter , How to make jquery submit the form only when Enter alone is pressed ?
accepted answer: http://stackoverflow.com/a/29128935
has title: How to submit an input form by pressing Enter BUT not submit it when shift and enter are pressed
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/29128935
tagged with: javascript

http://stackoverflow.com/a/29082154
upvote count: 2
answers question: http://stackoverflow.com/q/29082067
has comment: http://stackoverflow.com/comment/46397316
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46397363
has body: In compilers I have worked with, this is done by passing an implicit parameter on the call stack along with the explicit parameters. Of course it may vary based on the compilation or interpretation engine, but this is the simplest approach.
has comment: http://stackoverflow.com/comment/46397558
downvote count: 0

http://stackoverflow.com/a/29177327
type: Answer
answers question: http://stackoverflow.com/q/29176393
has body: I found the solution, the trick is to call $window.getSelection().removeAllRanges(); before calling element[0].blur();
score: 0

http://stackoverflow.com/q/29076660
possible better answer: http://stackoverflow.com/a/29076813
tagged with: javascript
has answer: http://stackoverflow.com/a/29076813
accepted answer: http://stackoverflow.com/a/29076746
answer count: 2
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29076746
has title: encoding values using javascript for #, single and double quotes
score: 1
upvote count: 1
has body: This is the function that I am using to get the value of querystring through javascript. function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } I am also calling this function: function GenerateCode() { var trendingitemvalue = getParameterByName('q'); alert(trendingitemvalue); var script = " <\/script>"; script += "\n " codearea.value = script; } What am I trying to do? I am getting the value of querystring through the function getParameterByName('q') and then framing a script tag (var script) and assigning this value to a textarea field. for example this is the weburl: http://hashgurus.com/q.aspx?q=%23BDMELODI_161 where (q = #BDMELODI_161) I am getting the value of q(which is the querystring) and framing the script value. The final value of script looks like this through this code: but i need exactly what is in the querystring. The expected result should be like this: Also I need to take care of single and double quotes of the querystring properly. Is there any function in javascript to encode these values?
type: Question
downvote count: 0

http://stackoverflow.com/comment/46447147
score: 0
has text: how about something DI-ish, like `Job.updateJob = function (url) {` ? (maybe where you call it from has razor, or maybe the place that calls the call has razor; going back far enough something HAS to right?)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29108765

http://stackoverflow.com/comment/46572646
type: Comment
has text: or you could see the `React.createClass` ....
comment on: http://stackoverflow.com/q/29177444
score: 0
type: QuestionComment

http://stackoverflow.com/a/38734795
has body: Here is a simple script using JQuery that handles mousemove and keypress events. If the time expires, the spinner-wrap event is fired. &lt;script type="text/javascript"&gt; var idle = 0; $(document).ready(function () { //Increment the idle time counter every seconds. var idleInterval = setInterval(timerIncrement, 1000); // 1 seconds //Zero the idle timer on mouse move. $(this).mousemove(function (e) { idle = 0; }); // zero the idle timer on keypress $(this).keypress(function (e) { idle = 0; }); }); function timerIncrement() { idle = idle + 1; if (idle &gt; 5) { // 5 seconds $('.spinner-wrap').trigger('click'); } } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/29149410
has comment: http://stackoverflow.com/comment/64888412
upvote count: 1
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/64845623

http://stackoverflow.com/a/29138787
type: Answer
has comment: http://stackoverflow.com/comment/46501593
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29138656
has body: change your css body body { /*background:url('');*/ background-color:#1E1F21; /*Back Colors*/ position:fixed; width:1400px; height:1440px; font-family: Lucida Sans Unicode, Lucida Grande, sans-serif; font-size: 16px; } You does figure out to use position:fixed but inserted it in wrong place,this will fix your items in the same place. You can change the width and height value to fulfill advance requirment. check : http://codepen.io/anon/pen/YPdyGJ
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29138656
downvote count: 0

http://stackoverflow.com/a/29151261
score: 0
answers question: http://stackoverflow.com/q/29151105
type: Answer
has body: I think you have to use path's to define your text. and attach your hover style to those path's The text area is a rectangle, so your event will fire when you enter that rectangle.

meteor
tags question: http://stackoverflow.com/q/29084781
tags question: http://stackoverflow.com/q/29115858
tags question: http://stackoverflow.com/q/29103285
tags question: http://stackoverflow.com/q/29127089
tags question: http://stackoverflow.com/q/29165661
tags question: http://stackoverflow.com/q/29201648
tags question: http://stackoverflow.com/q/29149107
tags question: http://stackoverflow.com/q/29065528
tags question: http://stackoverflow.com/q/29115417
tags question: http://stackoverflow.com/q/29197247
tags question: http://stackoverflow.com/q/29194044
tags question: http://stackoverflow.com/q/29183247
tags question: http://stackoverflow.com/q/29153538
tags question: http://stackoverflow.com/q/29172258
tags question: http://stackoverflow.com/q/29171033
tags question: http://stackoverflow.com/q/29131178
tags question: http://stackoverflow.com/q/29115811
tags question: http://stackoverflow.com/q/29094612
tags question: http://stackoverflow.com/q/29174128
tags question: http://stackoverflow.com/q/29162901
tags question: http://stackoverflow.com/q/29086511
tags question: http://stackoverflow.com/q/29105062
tags question: http://stackoverflow.com/q/29087045
tags question: http://stackoverflow.com/q/29159219
tags question: http://stackoverflow.com/q/29120340
tags question: http://stackoverflow.com/q/29140773
tags question: http://stackoverflow.com/q/29155555
type: Tag
tags question: http://stackoverflow.com/q/29145900
tags question: http://stackoverflow.com/q/29186834
tags question: http://stackoverflow.com/q/29116183
tags question: http://stackoverflow.com/q/29114578
tags question: http://stackoverflow.com/q/29149846
tags question: http://stackoverflow.com/q/29132989
tags question: http://stackoverflow.com/q/29184341
tags question: http://stackoverflow.com/q/29195813
tags question: http://stackoverflow.com/q/29183472
tags question: http://stackoverflow.com/q/29172041
tags question: http://stackoverflow.com/q/29170596
tags question: http://stackoverflow.com/q/29130274
tags question: http://stackoverflow.com/q/29171040
tags question: http://stackoverflow.com/q/29148854
tags question: http://stackoverflow.com/q/29198178
tags question: http://stackoverflow.com/q/29154616
tags question: http://stackoverflow.com/q/29148759
tags question: http://stackoverflow.com/q/29104207
tags question: http://stackoverflow.com/q/29124902
tags question: http://stackoverflow.com/q/29110381
tags question: http://stackoverflow.com/q/29155681
tags question: http://stackoverflow.com/q/29171725
tags question: http://stackoverflow.com/q/29109608
tag name: meteor
tags question: http://stackoverflow.com/q/29156176
tags question: http://stackoverflow.com/q/29064876
tags question: http://stackoverflow.com/q/29108711
tags question: http://stackoverflow.com/q/29091840
tags question: http://stackoverflow.com/q/29173516
tags question: http://stackoverflow.com/q/29169600
tags question: http://stackoverflow.com/q/29136098
tags question: http://stackoverflow.com/q/29189225

http://stackoverflow.com/q/29076571
type: Question
has comment: http://stackoverflow.com/comment/46387844
tagged with: tableview
tagged with: javascript
has title: How to show TableView Data on a new Window by clicking the data
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46388206
type: UnansweredQuestion
tagged with: titanium
has comment: http://stackoverflow.com/comment/46388459
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29080729
has body: I am creating an app which will show all user data in tableView which on click of particular record the full data of the user should get displayed. The data is json object responce. i have tried the following code, it works perfectly till first table, records get display in tabular format but when i click on the record it show an error. i have have written the follwing code for these var tableData = []; var tableView = Ti.UI.createTableView(); function srch() { var client=Ti.Network.createHTTPClient({ onload: function(e){ var obj=JSON.parse(this.responseText); var deal, deals, row, nameLabel, skillkLabel ; for(var i=0 ; i &lt; obj.entities.length ; i++) { deal=obj.entities[i]; row = Ti.UI.createTableViewRow({ height : 'auto', hasChild : true }); nameLabel= Ti.UI.createLabel({ text : deal.name, font : { fontSize : '16dp', fontWeight : 'bold'}, height : 'auto', left : '10dp', color : '#000', top : '5dp', touchEnabled: false }); skillkLabel = Ti.UI.createLabel({ text : deal.skill, font : { fontSize : '16dp'}, height : 'auto', left : '150dp', color : '#000', bottom : '0dp', touchEnabled: false }); row.add(nameLabel); row.add(skillkLabel); tableData.push(row); } tableView.setData(tableData); window2.add(tableView); window2.open(); }, } tableView.addEventListener('click', function(e){ viewDetails(e.rowData.tableData); }); function viewDetails(data) { var self =Ti.UI.createWindow({ backgroundColor : '#fff', }); var detailData = []; var detailTable= Ti.UI.createTableView(); var detailRow =Ti.UI.createTableViewRow(); var name= Ti.UI.createLabel({ text : data.nameLabel, top : '10dp', left : '10dp' }); detailRow.add(name); var skill =Ti.UI.createLabel({ text : data.skillkLabel, top : '30dp', left : '10dp' }); detailRow.add(skill); var city = Ti.UI.createLabel({ text : data.city, top : '60dp', left : '10dp' }); detailRow.add(city); detailData.push(detailRow); detailTable.setData(detailData); self.add(detailTable); self.open(); } while executing the viewDetails() function , it g…

http://stackoverflow.com/q/29118982
has body: I'm having problem displaying 24hr time string converted to 12hr format using moment.js still looking for a solution html code &lt;div id="showtime"&gt;&lt;/div&gt; Javascript &lt;script&gt; (function() { // instantiate a moment object var convert24hr = moment("15:30", "HH:mm").format("hh:mm A"); // display value of moment object in #displayMoment div var eDisplayMoment = document.getElementById('showtime'); eDisplayMoment.innerHTML = convert24hr; })(); &lt;/script&gt; Update Forgot to add CSS to styles #showtime { font-size:30px; }
tagged with: momentjs
type: Question
has title: Moment.js not displaying results
has comment: http://stackoverflow.com/comment/46465131
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29119218
has comment: http://stackoverflow.com/comment/46464994
has comment: http://stackoverflow.com/comment/46464984
type: UnansweredQuestion

http://stackoverflow.com/comment/46596124
type: Comment
type: QuestionComment
has text: @HiteshSiddhapura, It is jquery and it dynamically loads on page but has a search with a submit button and the second drop down list doesn't load after the first search.
comment on: http://stackoverflow.com/q/29190904
score: 0

http://stackoverflow.com/comment/46507800
score: 0
type: Comment
has text: I think this is what i do on this line: $('.video-wrapper').prepend(e);
comment on: http://stackoverflow.com/a/29138955
type: AnswerComment

http://stackoverflow.com/comment/46465251
comment on: http://stackoverflow.com/q/29119012
has text: found a function toJSON()
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29181661
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: In a form (itemSelectionForm), I am rendering multiple tables with ng-repeat. And in each table I have radio buttons which have names appended with index. Now, I want to write an angular JS directive (selectAtleastOneItemToReturn) that I would put on the form (with select-atleast-one-item) which will do form validation based on children tables radio button. Now, I don't know how I access those children tables radio buttons and their values in that directive so that I can write validation code. And, if radio buttons value changes I want to do validation again and again. And if the form is invalid , the next button would be disabled. The HTML is as below. Action Item Description {{item.description}} Option 2 Option 3 Next
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29182142
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Anguarjs Directive at Form Level, accessing all fields and checking for validation

http://stackoverflow.com/comment/46500007
comment on: http://stackoverflow.com/q/29137495
score: 0
has text: Well, you can estimate it, but it might be off eventually unless you add the actual element widths. You mention in your edit that elm_no gives you the wrong result. Could you please post some data or a screenshot with values? I'm curious how wrong/off it is. Your method seems correct but might be off by one element because it's telling you the "leftmost" percentage and therefore only elements that have passed out of view.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29065210
accepted answer of: http://stackoverflow.com/q/29065135
answers question: http://stackoverflow.com/q/29065135
upvote count: 2
type: AcceptedAnswer
has body: You might check out hammer.js for responding to touch and swipe events.
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/30222216
type: Answer
has body: I created a service to handle EnquireJS media queries in my Angular application that might be of use to you: https://gist.github.com/schuyberg/034a9982bf8326c19fc9 For your case here, the service would look something like this: services.factory('max480', ['$rootScope', '$timeout', function ($rootScope, $timeout) { var max480 = { watch: function() { enquire.register('screen and (max-width: 480px)', max480handler); }, unwatch: function() { enquire.unregister('screen and (max-width: 480px)'); }, ismatch: function(callback) { $rootScope.$on('match480', callback); }, notmatch: function(callback) { $rootScope.$on('unmatch480', callback); }, }; var max480handler = { match: function() { $timeout(function(){ $rootScope.$emit('match480'); }); }, unmatch: function(){ $rootScope.$emit('unmatch480'); } }; return max480; }]); Then, inject the service in your controller, and use the following to register the enquire listener, and act on changes: // this setup can live in your controller $scope.isCollapsed = false; $window.collapsed = false; angular.element(document.querySelector('[ng controller="CollapseCtrl"]')).scope().isCollapsed=false; // use the service to listen for, and react to changes max480.watch(); max480.ismatch(function(){ $scope.isCollapsed = true; $window.collapsed = true; angular.element(document.querySelector('[ng-controller="CollapseCtrl"]')).scope().isCollapsed=true; }); max480.notmatch(function(){ $scope.isCollapsed = false; $window.collapsed = false; angular.element(document.querySelector('[ng-controller="CollapseCtrl"]')).scope().isCollapsed=false; }); This service has the advantage of being reusable throughout your application. You can also use max480.unwatch(); to unregister the listener if you need to.
answers question: http://stackoverflow.com/q/29141827
score: 0

http://stackoverflow.com/q/29201222
upvote count: 3
type: Question
score: 3
has answer: http://stackoverflow.com/a/29201559
tagged with: javascript
answer count: 2
has title: How to dynamically generate waypoints using jquery waypoints?
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29201500
has body: So basically, I'm trying to create dynamic waypoints for this menu I am creating. I have several waypoints that need to be created(30+). Here is what I have so far: //arrays var contentArray = new Array( "#1790", "#1792", "#1794", "#1720", "#1724", "#1726", "#1728", "#1647", "#1649", "#1651", "#1660", "#1662", "#1664", "#1667", "#1669", "#1671", "#1678", "#1680", "#1683", "#1686", "#1688", "#1690", "#1692", "#1694", "#1696", "#1698", "#1700", "#1702", "#1704", "#1706", "#1708", "#1710", "#1712", "#1714", "#1716", "#1680-1", "#1680-2" ); var tabArray = new Array( "1739", "1740", "1741", "1742", "1743", "1744", "1745", "1736", "1748", "1749", "1750", "1751", "1752", "1753", "1754", "1755", "1757", "1758", "1761", "1763", "1764", "1765", "1766", "1767", "1768", "1769", "1770", "1772", "1773", "1774", "1775", "1776", "1779", "1780", "1781", "1759", "1760" ); for(var i=0; i&lt;contentArray.length; i++){ $(contentArray[i]).waypoint({ handler: function (direction) { if(direction == "down") { $("#menu-item-" + tabArray[i]).addClass("red-bg"); } else { $("#menu-item-" + tabArray[i]).removeClass("red-bg"); } }, offset: 0 }) } The arrays may look a little funky but each index of each array is supposed to correspond with the other array index. However, each time I run this, the tabArray always returns undefined since it is out of scope. Is there any way to get around issue? Any and all help is appreciated! Thanks!

http://stackoverflow.com/comment/46406330
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29067799
type: AnswerComment
has text: But is what I need ... read the condition: ... if exists a value t that is at the same time a<=t<b AND c<=t<d AND e<=t<f. Thus, it two intervals overlap it is no neccessary true that the third covers the same coverlapping range.

http://stackoverflow.com/comment/46427423
has text: @albanx it's easy to inject stuff there. A good practice is to actually disable all inline scripting https://developer.chrome.com/extensions/contentSecurityPolicy
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29098115

execute
tags question: http://stackoverflow.com/q/29163593
tag name: execute
type: Tag

http://stackoverflow.com/comment/59037347
type: AnswerComment
type: Comment
has text: THANK YOU for posting! You solved my problem i've had for 2 days now! The documentation for babel is **terrible**!
comment on: http://stackoverflow.com/a/35167917
score: 4

http://stackoverflow.com/comment/46422639
score: 0
type: Comment
type: QuestionComment
has text: @Magrangs- what do you mean will affect everything? there is other solution which you recommended to use which is elegant ...?
comment on: http://stackoverflow.com/q/29095219

http://stackoverflow.com/q/29213323
has comment: http://stackoverflow.com/comment/46636270
possible better answer: http://stackoverflow.com/a/29213442
has comment: http://stackoverflow.com/comment/46636182
has comment: http://stackoverflow.com/comment/46636200
has answer: http://stackoverflow.com/a/29213636
accepted answer: http://stackoverflow.com/a/29213503
score: -3
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46636241
has title: How would I do this in a for loop?
has comment: http://stackoverflow.com/comment/46636302
type: Question
downvote count: 4
has answer: http://stackoverflow.com/a/29213563
has comment: http://stackoverflow.com/comment/46636180
has body: I'm being told that my lucky numbers math.random code is repetitive code and to combine it with the output string or user a for loop. How would i do this in a for loop? function showFortune() { // Quotes to grab from array. var quotes = new Array(5) quotes[0] = "The road to riches is paved with homework."; quotes[1] = "Ignore your previous fortune."; quotes[2] = "Avoid taking unnecessary gambles."; quotes[3] = "You love peace."; quotes[4] = "A friend asks only for your time and not your money."; // Spacer for between numbers var space = (' ') // Get random lucky numbers var number1 = Math.floor(Math.random() * 60 + 1); var number2 = Math.floor(Math.random() * 60 + 1); var number3 = Math.floor(Math.random() * 60 + 1); var number4 = Math.floor(Math.random() * 60 + 1); var number5 = Math.floor(Math.random() * 60 + 1); var number6 = Math.floor(Math.random() * 60 + 1); // Get a number for picking the quote var rand_int = Math.floor(Math.random() * 5); // Show the quote &amp; number document.getElementById("fortuneArea").innerHTML = (quotes[rand_int] + "&lt;br /&gt;" + "Lucky numbers:" + space + "&lt;b&gt;" + number1 + space + number2 + space + number3 + space + number4 + space + number5 + space + number6 + "&lt;/b&gt;"); } // end function b { color: #FF0000; font-weight: normal; } &lt;form action=""&gt; &lt;p&gt; &lt;input type="button" value="Show my fortune!" onclick="showFortune();" /&gt; &lt;/p&gt; &lt;/form&gt; &lt;div id="fortuneArea"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/46636267
has answer: http://stackoverflow.com/a/29213442
answer count: 7
has answer: http://stackoverflow.com/a/29213503
tagged with: javascript
has answer: http://stackoverflow.com/a/29213452
has answer: http://stackoverflow.com/a/29213522
has answer: http://stackoverflow.com/a/29213965
favorite count: 0

http://stackoverflow.com/q/29200686
downvote count: 0
has title: Nodejs module files and concat
type: AnsweredQuestion
score: 1
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46613799
tagged with: gulp
favorite count: 0
tagged with: gulp-concat
tagged with: module
has body: I've been looking at nodejs and how to create and require modules. Makes sense and works great. I am interested though in using a concat function gulp-concat at the moment to concat all the js files into one js file. This got me thinking that it is not possible when setting up a modular environment as when using the require function requires the modules to be in other files. Is there a standard way of dealing with this? Are the files supposed to be in separate files?
tagged with: node.js
has answer: http://stackoverflow.com/a/29200848
accepted answer: http://stackoverflow.com/a/29200848

http://stackoverflow.com/comment/46504327
type: Comment
has text: Don't output `$_GET` directly into the HTML. Ensure santization is taken into place first.
comment on: http://stackoverflow.com/a/29140165
score: 1
type: AnswerComment

http://stackoverflow.com/a/29126643
has comment: http://stackoverflow.com/comment/46481072
has comment: http://stackoverflow.com/comment/46480460
type: Answer
has comment: http://stackoverflow.com/comment/46480613
has comment: http://stackoverflow.com/comment/46480101
has comment: http://stackoverflow.com/comment/46480179
score: 0
has comment: http://stackoverflow.com/comment/46480722
has comment: http://stackoverflow.com/comment/46479994
has comment: http://stackoverflow.com/comment/46479746
has comment: http://stackoverflow.com/comment/46480607
has comment: http://stackoverflow.com/comment/46480845
has comment: http://stackoverflow.com/comment/46480259
accepted answer of: http://stackoverflow.com/q/29125018
has comment: http://stackoverflow.com/comment/46481300
has comment: http://stackoverflow.com/comment/46481189
answers question: http://stackoverflow.com/q/29125018
has body: Passing 'this' to the handler should give you the element that was clicked. Is this what you want? Add One Two Three</span
type: AcceptedAnswer

http://stackoverflow.com/q/29121361
tagged with: php
score: 1
has comment: http://stackoverflow.com/comment/46469489
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/29121491
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: AJAX and php JSON connect DB and retern values
has comment: http://stackoverflow.com/comment/46472916
has body: I am new in using AJAX i try to make a image buttons when click return a resualts from a query as JSON form. I make the image buttons and write an jQuery to test it when i click to show an alert and is work after i replase the alert with an AJAX but is not work. in php make a connection with db , execute the queries and make the JSON array heare is the code of making the JSON array The ajax code $.ajax({ type: "POST", url: "routing.php", data: { data : JSON.stringify(ar)}, dataType : "JSON", success: function(data){ var jsonAr = JSON.parse(data); alert(data); } }); PHP file server side //header('Content-Type: application/json'); if(isset($_POST['data'])){ $obj = json_decode($_POST['data']); //some php operation } echo $obj; The code is work but give this error from server side from php POST http://xxxx/xxxxxx/routing.php [HTTP/1.0 500 Internal Server Error 39ms]
tagged with: ajax
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/46383802
score: 1
has text: Whenever you ask questions, please take the time to proper format the source code. A correct indention will not only help others to understand your code but will also help you to maintain it.
comment on: http://stackoverflow.com/q/29074936
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29065743
type: Question
accepted answer: http://stackoverflow.com/a/29065947
has title: Replace next occurrence of a string
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has comment: http://stackoverflow.com/comment/46367166
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29065947
has body: I am playing around, trying to make something that I might use in the future for an project that I have idea for. However, I can't seem to make it work properly. I am sure that this is not the best way to do it, but it's the only way I was able to think of. Hence it may be why I can't make it work either. Problem: Well the problem is that the function does not replace the next word occurrence in a string of multiple existing words. Instead it goes back to the same word that is first in a string. I tried some RegExp solutions from here, but failed to make it work. What is it suppoused to do? Just to loop trough each word and highlight it for a moment. It should use that generateTime array to set different looping time for each word. Later on that will be an JSON object mostlikely. CodePen Demo / Example Here's the JS code only: var // -&gt; textElement = $( '.text' ), contentReplace = textElement.text().replace( /[^\w ]/g, '' ).split( /\s+/ ), generateTime = [], inc = 0, interval = false; // Generate random time for ( var i = 0; i &lt;= contentReplace.length; i++ ) { generateTime.push( Math.random() * (1 - 0.1) + 0.1 ); } // Interval for looping trough words var ticker = setInterval(function () { if ( inc == ( generateTime.length - 2 ) ) { clearTimeout( ticker ); } if ( ! interval ) { setTimeout(function () { textElement .html( textElement.text().replace(contentReplace[inc], '&lt;span&gt;' + contentReplace[inc] + '&lt;/span&gt;') ); inc++; interval = false; }, generateTime[inc] * 1000); } interval = true; }, 500); If anyone could help me to resolve this problem I'm having
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46367452
has comment: http://stackoverflow.com/comment/46367190

http://stackoverflow.com/q/29113974
tagged with: google-chrome
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29116834
has title: Chrome extension logic is not wοrking
type: Question
accepted answer: http://stackoverflow.com/a/29116834
tagged with: javascript
has body: I've managed to get most of my Chrome extension working, but there is a problem I can't work out. You can grab it here if you want and load it as an unpacked extension. After loading it works like this. You are prompted that they need to enter a URL on the options page. You enter a URL (e.g. http://example.com) on the options page as asked and click save, and then when you click the icon in the toolbar you can see the web page appear in the popup. If you then go and removes the URL from the options page and clicks save, then the popup does not show the original prompt page they saw at the beginning. I think this code (from popup.js) is at fault, but I can't see why it won't work. var url = localStorage.url; var alturl = chrome.extension.getURL("need-to-enter-url.html"); var element = document.getElementById("testerURL"); if (url != undefined || url != null) { element.src = url; } else { element.src = alturl; };
score: 0
tagged with: google-chrome-extension
answer count: 1

http://stackoverflow.com/q/29189330
has title: Rails: end of file reached
accepted answer: http://stackoverflow.com/a/29189847
tagged with: ruby-on-rails
type: Question
tagged with: debugging
tagged with: javascript
tagged with: eof
tagged with: ruby-on-rails-4
answer count: 1
downvote count: 0
has body: Working in my Rails development environment, everything peachy, then went away to lunch and now I get "end of file reached" error in browser. Anyone know what's going on? Here's same response from curl: $ curl http://localhost:7000 EOFError at / ============= &gt; end of file reached app/views/application/_javascript.html.slim, line 1 --------------------------------------------------- ``` ruby &gt; 1 = javascript_include_tag :application 2 3 = yield :javascript 4 ``` App backtrace ------------- - app/views/application/_javascript.html.slim:1:in `_app_views_application__javascript_html_slim__3196685002532601281_70250473343220' - app/views/layouts/full_width.html.slim:24:in `_app_views_layouts_full_width_html_slim___489443475469111239_70110396332180' - app/controllers/home_controller.rb:6:in `index' Full backtrace -------------- - activesupport (4.1.9) lib/active_support/core_ext/marshal.rb:6:in `load_with_autoloading' - sprockets (2.11.0) lib/sprockets/cache/file_store.rb:19:in `block in []' - sprockets (2.11.0) lib/sprockets/cache/file_store.rb:19:in `[]' - sprockets (2.11.0) lib/sprockets/caching.rb:14:in `cache_get' - sprockets (2.11.0) lib/sprockets/caching.rb:84:in `cache_get_hash' - sprockets (2.11.0) lib/sprockets/caching.rb:54:in `cache_asset' - sprockets (2.11.0) lib/sprockets/index.rb:93:in `build_asset' - sprockets (2.11.0) lib/sprockets/base.rb:287:in `find_asset' - sprockets (2.11.0) lib/sprockets/index.rb:61:in `find_asset' - sprockets (2.11.0) lib/sprockets/environment.rb:75:in `find_asset' - sprockets (2.11.0) lib/sprockets/base.rb:295:in `[]' - sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:123:in `asset_digest_path' - sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:76:in `compute_asset_path' - actionview (4.1.9) lib/action_view/helpers/asset_url_helper.rb:132:in `asset_path' - sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:91:in `asset_path'
favorite count: 0
score: 6
upvote count: 6
has answer: http://stackoverflow.com/a/29189847
type: AnsweredQuestion

http://stackoverflow.com/q/29095180
has answer: http://stackoverflow.com/a/29112680
has body: I want this widget to show even when I click the textbox. How can I achieve this ? I using jdewit timepicker here my code HTML jQuery: $('#timepicker1').timepicker({ minuteStep: 15 });
type: Question
tagged with: javascript
tagged with: jquery
has title: Jdewit Timepicker show widget on text and icon click
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/46566679
type: AnswerComment
type: Comment
has text: Hi Ben, yes, resume page will be opened up if the login is successful. What I mean is if I just directly open the resume page, is there a way that I can make it go to login page? Because I do not want the resume page opened without login.
comment on: http://stackoverflow.com/a/29174333
score: 0

http://stackoverflow.com/a/29179014
answers question: http://stackoverflow.com/q/29179000
has body: Use the [] notation. var myarray = {bricks:3000, studs:500, shingles:400, tiles:700}; function One() { alert(myarray.bricks); } var myvalue = "bricks" //supplied here to make example work function Two() { alert(myarray[myvalue]); } Demo
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29179000
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29111969
tagged with: javascript
tagged with: ajax
upvote count: 14
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/61116236
tagged with: xmlhttprequest
has title: How do display actual network error to user when using XMLHttpRequest?
has answer: http://stackoverflow.com/a/45690554
score: 14
has body: XMLHttpRequest.status is typically just '0' if some network type error has occurred trying to make an Ajax/XMLHttpRequest call. But surely there should be a way of telling the user exactly what the network error was, e.g. whether the DNS resolution failed, or the connection was actively refused, or even whether the connection was made but then aborted before any valid HTTP response was sent? I.E. at least prints out some extra info in the JavaScript console, e.g. SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. But it's hardly very friendly, and I can't see how to query that info from javascript to translate into something I can show to the user. I don't mind if it has to be implemented differently for different browsers, but I'm struggling to see any way of fetching in this information at all currently. BTW at a minimum I'd want to be able to distinguish: a) no internet connectivity (e.g. wifi disconnected) b) DNS failure (can't resolve the name) c) couldn't establish TCP connection to server (either actively refused or timed out) d) invalid response (not an HTTP response) e) SSL certificate failure In any case where a valid HTTP response IS returned, but is not status 200 OK, it's fine - I can get a sensible error message to display to the user. But for anything else there doesn't seem to be a way to distinguish the various possible types of errors. In my application the user is responsible for supplying the address to make the Ajax requests to, so if they get it wrong I want to be able to tell them why the request is failing.
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/46453053
answer count: 2
has comment: http://stackoverflow.com/comment/46453231
has comment: http://stackoverflow.com/comment/46453743

http://stackoverflow.com/comment/46476326
comment on: http://stackoverflow.com/a/29089977
score: 0
type: AnswerComment
type: Comment
has text: If you can't code your way out of a paper bag, then your not ready to learn a framework. Someone being a beginner in a framework should be well versed in their desired language.

http://stackoverflow.com/comment/47725848
comment on: http://stackoverflow.com/q/29140710
type: Comment
type: QuestionComment
has text: But then I wouldn't get errors that are actual errors which prevent execution, right? Also, it's already set as false, so doesn't change anything..
score: 0

http://stackoverflow.com/a/29211148
has comment: http://stackoverflow.com/comment/46632014
has body: try this var keys = {A: 'a', B: 'b' }, foo = {}; for (key in keys) { foo[key] = keys[key] }
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29210868
has comment: http://stackoverflow.com/comment/46632501
downvote count: 0

http://stackoverflow.com/a/29142822
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29142146
answers question: http://stackoverflow.com/q/29142146
type: Answer
has body: You can use replace with func param like 'Macy&amp;#39;s'.replace(/&amp;#(.+?);/g,function(_, $1){ return '%'+(+$1).toString(16); //create the new substring (to put in place of the substring received from parameter #1) }); //"Macy%27s"
score: 3
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/46624558
has text: @Andrus: You start editing inside of `beforeSelectRow`. `$.jgrid.getCellIndex` the the index of the clicked column. So, it seems to me, that you can just use the returned value as the option of `editRow`: `$this.jqGrid("editRow", rowid, {focusField: colName});` and remove the next line `PutFocus(e.target);`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29206648
score: 1

http://stackoverflow.com/a/29124254
type: Answer
has body: If the question is simply to write the line of code as short as possible, consider caching in a variable what's redundant (it's also better for perfs as it reduces the number of lookups): var n = in.some.namespace; n.hello.apply(n, some_args);
answers question: http://stackoverflow.com/q/29122811
score: 0

http://stackoverflow.com/comment/46639635
has text: Is that the only CSS you have?
comment on: http://stackoverflow.com/q/29215071
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46468375
type: QuestionComment
comment on: http://stackoverflow.com/q/29120520
type: Comment
score: 0
has text: thanks, I have tried but I still have the same issue.

http://stackoverflow.com/a/29155822
answers question: http://stackoverflow.com/q/29155753
has body: It's calling it many times, it's just using the same object defined at the start. Change it so dateObject is redefined on each call: function update(){ var dateObject=new Date(); var time=dateObject.getHours()+" : "+dateObject.getMinutes()+" : "+dateObject.getSeconds(); document.getElementById('date_label').innerHTML=time; setTimeout(main,100); };
score: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46532356
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29155753

http://stackoverflow.com/a/29176199
downvote count: 0
answers question: http://stackoverflow.com/q/29176189
has body: You can do that like so document.querySelector('.basePrice').innerHTML = 'different text' FIDDLE
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/29170378
upvote count: 2
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29170699
linked to: http://stackoverflow.com/q/27737333
type: Question
has body: So, I am writing a protractor test to log into an app. When a user logs in successfully a popup notification appears stating "you have successfully logged in." Right now I am doing a browser.sleep() to wait for the popup to pop up after the login button is clicked. I don't like doing this, on slower networks Protractor is not waiting long enough and the test is failing when I try to catch the popup or alert because alert.accept() is running too soon. Is there a way to wait the promise from the login to return to continue on with the test? UPDATE: I think that I have figured it out. So I'm doing this: LoginView.loginButton.click().then(function () { browser.wait(exc.alertIsPresent()).then(function () { App.catchAlert(); }) }); This seems to be working, but I haven't tested it on a slower network. What do you think?
tagged with: protractor
answer count: 1
downvote count: 0
has title: AngularJS Protractor: waiting for a service callback?
tagged with: javascript
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/46437500
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29103750
has text: Awesome. I love how technology advances. Thanks!

http://stackoverflow.com/q/29093211
tagged with: loops
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46418102
has title: simplifying a long list of click functions
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -1
has body: I'm using an image slider on my site: http://arirang.hr/cocohouse/accommodation/CHfood_en.html . It works well for me. When visitor click a thumbnail below the slider it jumps to the particular image. It's done by having a click function for the each thumbnail. Started with few thumbnails only. Having quite a lot now. Ended up with a long list of click functions there. Guess that a proper way should be by some kind of loop there. When visitor clicks any thumbnail to start the loop that finds which one is clicked and call the cycle with the clicked number.
has answer: http://stackoverflow.com/a/29093304
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/46417947
upvote count: 1
has answer: http://stackoverflow.com/a/29093345

http://stackoverflow.com/comment/46527854
score: 1
has text: Thanks man :) you pointed me in the right direction, I did go with the Factory.... also I needed to make sure that my `ng-model` on the selects were correct: Child `<select ng-model="term.tag"` Parent `<select ng-model="main.the_tag.tag"` `the_tag`
comment on: http://stackoverflow.com/a/29153230
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29121205
tagged with: javascript
has body: var temp = Testing(A, B, C, D); In the above case I need inside the function parameters list. (i.e., A,B,C,D) in array list. (i.e., arr[0]=A, arr[1]=B etc.,). Thanks &amp; Advance....
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/46469189
has comment: http://stackoverflow.com/comment/46470853
tagged with: jquery
has answer: http://stackoverflow.com/a/29121769
has comment: http://stackoverflow.com/comment/46476233
has comment: http://stackoverflow.com/comment/46468995
favorite count: 0
has answer: http://stackoverflow.com/a/29121757
score: -3
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29121757
accepted answer: http://stackoverflow.com/a/29121769
downvote count: 3
has comment: http://stackoverflow.com/comment/46469870
type: Question
has title: Get the Variable name inside the function in javascript

http://stackoverflow.com/q/29204276
downvote count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/29204636
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16778336
tagged with: bootbox
has title: Standalone javascript library to create modal dialogues
score: -1
type: Question
tagged with: modal-dialog
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/67858942
favorite count: 0
has body: I am looking for a lightweight library to create elegant modal dialogues with different purpose (alerts, confirmation, prompt, forms). A library similar to Bootbox.js but without JQuery and Bootstrap dependencies would be perfect. Note: I already know how to create modals using native javascript here, or using pure CSS examples here. I am looking for a library to facilitate this task.
tagged with: css
has comment: http://stackoverflow.com/comment/66101254
has answer: http://stackoverflow.com/a/29204636

http://stackoverflow.com/q/29142180
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/46507951
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 2
has body: I have something like this (based from Show value outside the ng-repeat): {{ Brands[?].BrandDetails.Text }} // i want show element selected value &lt;li ng-repeat="Brand in Brands"&gt; &lt;a href="#"&gt; {{Brand.BrandDetails.Text}} &lt;/a&gt; &lt;/li&gt; Actually it shows only first BrandDetails.Text but if i have 3 &lt; li> attribute doesn't work. It shows always the first result instead the item i selected.. How can i solve? edit: what i want is that when i click on the item of this kind of menu, it shows me the Brand.BrandDetails.Text of corrispondent item outside the ng-repeat.. So i can use the result from everywhere in my html
accepted answer: http://stackoverflow.com/a/29142412
has title: Get value outside ng-repeat angular
upvote count: 3
has comment: http://stackoverflow.com/comment/46507893
has comment: http://stackoverflow.com/comment/46508182
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/20494072
tagged with: javascript
has comment: http://stackoverflow.com/comment/46507985
has answer: http://stackoverflow.com/a/29142412
answer count: 1

http://stackoverflow.com/q/29162275
type: Question
has comment: http://stackoverflow.com/comment/46544669
has comment: http://stackoverflow.com/comment/46545808
tagged with: rails-geocoder
tagged with: javascript
has title: Explain how to apply css on infowindow boder thet is red boorder in gmap4rails map, or provide simple demo code
score: 0
tagged with: ruby-on-rails-4
tagged with: css
has body: I have to apply CSS properties such as border: red ,height , width on an info window box. I have to use gmap4rails gem for map display , it works superbly but I have problems applying. the CSS i.e ( border: red , hight and width ), to info-window that is generated when click on marker. I also read doc but this created lot of confusion on my mind. controller code : @hash = Gmaps4rails.build_markers(@users) do |user, marker| marker.lat user.latitude marker.lng user.longitude marker.title user.title marker.infowindow render_to_string(:partial => "infowindow", :locals => { :object => user}) marker.json({ :address => user.address.split(',').first }) end partal is : _infowindow UserAddress : <%= object.address %> Description : <%= object.description%> Title : <%= object.title %> Button1 BUtton2 #info { border: 5px solid blue; }
tagged with: gmaps4rails
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/46543904
has comment: http://stackoverflow.com/comment/46545397

http://stackoverflow.com/q/29196855
favorite count: 0
has comment: http://stackoverflow.com/comment/46608810
has title: Google Maps: Multiple Custom HTML Markers
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29200909
type: Question
score: 9
tagged with: google-maps
upvote count: 9
tagged with: javascript
tagged with: google-maps-api-3
has body: I have been working on this fiddle, and I'd like some advice. As you can see, I can't get multiple markers to render in the correct place. No matter what I do, both markers render based on the location of the second marker in the htmlMarker[i] array. Thanks for your help! For reference, here is the JS: var overlay; function initialize() { var myLatLng = new google.maps.LatLng(62.323907, -150.109291); var mapOptions = { zoom: 11, center: myLatLng, mapTypeId: google.maps.MapTypeId.SATELLITE }; var gmap = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); function HTMLMarker(lat,lng){ this.lat = lat; this.lng = lng; this.pos = new google.maps.LatLng(lat,lng); } HTMLMarker.prototype = new google.maps.OverlayView(); HTMLMarker.prototype.onRemove= function(){} //init your html element here HTMLMarker.prototype.onAdd= function(){ div = document.createElement('DIV'); div.className = "htmlMarker"; div.innerHTML = '&lt;img src="http://www.vcsd.org/img/icon/red.png"&gt;'; var panes = this.getPanes(); panes.overlayImage.appendChild(div); } HTMLMarker.prototype.draw = function(){ var overlayProjection = this.getProjection(); var position = overlayProjection.fromLatLngToDivPixel(this.pos); var panes = this.getPanes(); panes.overlayImage.style.left = position.x + 'px'; panes.overlayImage.style.top = position.y + 'px'; } //to use it htmlMarker = []; htmlMarker[0] = new HTMLMarker(gmap.getCenter().k, gmap.getCenter().D); htmlMarker[1] = new HTMLMarker(gmap.getCenter().k+.05, gmap.getCenter().D+.05); htmlMarker[0].setMap(gmap); htmlMarker[1].setMap(gmap); } I have updated the fiddle (see update) to do some logging inside of HTMLMarker(); and at the end of the script. Here is the output: HTMLMarker(lat,lng)= 62.323907, -150.10929099999998 HTMLMarker(lat,lng)= 62.373906999999996, -150.05929099999997 HTMLMarker.prototype.draw=500.5001116444473, 296.6240725676762 HTMLMarker.prototype.draw=573.3178894222365, 139.71828594914405 So it looks like the correct info is gett…
answer count: 1
has comment: http://stackoverflow.com/comment/46608843
downvote count: 0
accepted answer: http://stackoverflow.com/a/29200909

http://stackoverflow.com/a/29083407
has body: There are three ways of solving this issue: 1) Don’t use the original CSS rules for it but query the DOM instead: var $selector = document.querySelector('#desc a:hover'); var computedStyle; var background = []; // Read value of background and write into background array for (var i = 0; i &lt; $selector.length; i++) { computedStyle = window.getComputedStyle($selector[i], null); background.push(computedStyle.getPropertyValue('background')); } 2) Exclude external styelsheets: This excludes foreign stylesheets so you don’t run into security issues (but it then misses out matching selectors of external stylesheets) var getCSSHost = function (href) { var fakeLinkOfSheet = document.createElement('a'); fakeLinkOfSheet.href = href; return fakeLinkOfSheet.host; }; var sheetHost = getCSSHost(stylesheet.href); if ((sheetHost !== window.location.host)) { return; //exit early, i.e. return false } // else go on 3) Proxy external resources As John suggested in his answer you could also proxy the external resources to the same server and port to get it working. This is a big effort and you should probably consider this if nothing else works only.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46421633
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29076242
type: Answer
answers question: http://stackoverflow.com/q/29076242

http://stackoverflow.com/q/29133150
downvote count: 0
has answer: http://stackoverflow.com/a/29133337
favorite count: 0
possible better answer: http://stackoverflow.com/a/29133337
score: 1
has title: Google Place Autocomplete API doesn't return the results in the correct language
tagged with: localization
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29157308
type: AnsweredQuestion
tagged with: autocomplete
has body: I'm using the same code from the documentation page https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform and I also set the &amp;language=en while loading the script. When I search for München the city field is populated with Munich, but when I search for an address in München (for example: Residenzstraße, Munich, Germany) the city field is populated with München instead of Munich. It seems that autocomplete.getPlace() doesn't take into consideration the language specified while loading the script. The issue is reproducible also on the documentation link provided. How can I specify that I always want the results in english?
has answer: http://stackoverflow.com/a/29134448
tagged with: javascript
tagged with: google-maps-api-3
answer count: 3
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/29134448

http://stackoverflow.com/a/29117534
type: Answer
accepted answer of: http://stackoverflow.com/q/29117294
answers question: http://stackoverflow.com/q/29117294
has body: You will need to return your data in a JSON format for AngularJS. Instead of generating the whole via PHP, simply arrange the data in a PHP variable and send it back as JSON, using encode_json(...). After that, in your HTML page, simply create a &lt;table&gt; &lt;tr ng-repeat="object in items"&gt; where ng-repeat represents the loop over the data you will receive. And add a script to resolve these items: var app = angular.module('myItems', []); app.controller('myController', function($scope, $http) { $http.get("http://my.url/my_objects.php").success(function (response) { $scope.items = response; }); });
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/46614547
has text: possible duplicate of [Select all DIV text with single mouse click](http://stackoverflow.com/questions/1173194/select-all-div-text-with-single-mouse-click)
comment on: http://stackoverflow.com/q/29201272
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46548201
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29164542
has text: @stanze that is just the initialization, the toggling happens in `scope.disabled = !scope.disabled;`

http://stackoverflow.com/q/29211960
tagged with: java
has answer: http://stackoverflow.com/a/29214615
type: Question
tagged with: nashorn
tagged with: javascript
score: 4
has body: I am parsing Unix shell command outputs in a JavaScript executed by Java's script engine. I often need to split strings by a variable amount of whitespace and have decided to use a regular expression for this. So far, in Rhino (Java 7 and prior), I could use the following to split strings by whitespace: line.split("\\s+") This no longer works in Nashorn (Java 8 and later), the string is simply not split at all. I have to use the following for Nashorn: line.split(new RegExp("\\s+")) Now - of course you might say - this does not work in Rhino. However, I need to maintain compatibility to Java 7 for at least a year to come, so I need a solution that works with both script engines. I tried this a rather ugly workaround: new java.lang.String(line).split("\\s+") Surprisingly with no luck in Nashorn. Apparently, it somehow forces the creation of its NativeString counterpart for strings. Is there a nice solution to split by a variable amount of whitespace, one that works with both script engines? Or do you have to go the "dirty" way - ie determine the script engine from within the script (if that is even possible)?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46633486
favorite count: 0
tagged with: regex
upvote count: 4
accepted answer: http://stackoverflow.com/a/29214615
has title: Nashorn and Rhino: Splitting strings by whitespace regexp
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46659346
tagged with: rhino

http://stackoverflow.com/a/29101330
type: Answer
answers question: http://stackoverflow.com/q/29073433
accepted answer of: http://stackoverflow.com/q/29073433
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: The solution is to use the param vm instead of referencing it as document.impForm.vm: function loadabc(vm) { var xmlhttp; //alert(vm); if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } //alert("called"); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { var jsonObj = JSON.parse(xmlhttp.responseText); for(i = 0; i &lt; jsonObj.length; i++) { var createOption = document.createElement("option"); //alert("Jeason has Passed Data"); createOption.value = jsonObj[i].aId; createOption.text = jsonObj[i].aName; //alert("id" + createOption.value); //alert("Name" + createOption.text); vm.options.add(createOption); // &lt;-- Here! //alert("Added"); } } } xmlhttp.open("get", "${pageContext.request.contextPath}/Admin_Search_con?flag=loaddetail", true); xmlhttp.send(); }

http://stackoverflow.com/a/29209083
has comment: http://stackoverflow.com/comment/50776911
answers question: http://stackoverflow.com/q/29207740
has comment: http://stackoverflow.com/comment/50777344
has comment: http://stackoverflow.com/comment/46628942
score: 0
type: Answer
has body: You have loaded angular, but you have yet to bootstrap it since you load your scripts dynamically, using ng-app attribute is not an option so you need to call angular.bootstrap(document.body, ['app']); see https://docs.angularjs.org/api/ng/function/angular.bootstrap

http://stackoverflow.com/comment/46550681
comment on: http://stackoverflow.com/q/29165955
has text: Maybe this helps https://api.jquery.com/event.stoppropagation/ It will stop propagation above in DOM tree.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46472009
comment on: http://stackoverflow.com/q/29122615
score: 0
has text: That `"</"+"script>"` will just render as exactly that when the template is used. The concatenation can _only_ take place if that bit is interpreted as JS.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29188908
tagged with: object
has body: How do I determine what the index of an object is within an array? Take the following setup: var item = [ { identifier: "id1", }, { identifier: "id2", }, { identifier: "id3", } ]; I know what the object value is and that it exists and currrently have it stored like this currentValue = "id2"; What i'd like to know is that "id2" equals to (in this case) index 1.
type: Question
tagged with: arrays
has answer: http://stackoverflow.com/a/29188929
tagged with: javascript
score: 0
answer count: 1
has title: Determine index of a JS object in array while knowing the object value
type: UnansweredQuestion

http://stackoverflow.com/comment/46464984
comment on: http://stackoverflow.com/q/29118982
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/arunpjohny/4uvk6fm1/1/ - looks just fine
score: 0

http://stackoverflow.com/q/29171458
answer count: 2
tagged with: javascript
tagged with: event-handling
tagged with: jquery
has title: Jquery - .one does not unbind
score: 0
possible better answer: http://stackoverflow.com/a/29171964
accepted answer: http://stackoverflow.com/a/29181212
has answer: http://stackoverflow.com/a/29181212
has comment: http://stackoverflow.com/comment/46562243
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29171964
has body: i have the following situation: i have an animated graph, at the end of the animation i want to add a click handler to a "dead" link, which then hides the actual slide and shows the next. i bind it with .one, cause i dont want to fire it again after loading. so it works, it shows the next slide, but the event is not unbinding. even if i unbind it manually it fires the event. can someone give me a clue? thx jesta $("li#slide3").off().on("click", $(this), function() { $("#slide3 .device").animate({opacity:1}, 1000, function() { $("#slide3 .device").animate({opacity:0}, 1000, function() { console.log($("li#slide3 img.graph_adds").data("height")); $("li#slide3 img.graph_adds").animate({height:$("li#slide3 img.graph_adds").data("height")}, 1500, function() { $("#book_container").one("click", "a#book", function(ev) { ev.stopImmediatePropagation(); ev.preventDefault(); if (!animBook) { initialiseAnimatedImages(); } $("li.active_slide").fadeOut(500, function() { $("li#slide4").addClass("active_slide").fadeIn(1000); resetSlides(); }).removeClass("active_slide"); }); }); }); }); });
type: Question

http://stackoverflow.com/q/29142030
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29142428
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29142428
has title: Changed POST to GET. Now Ajax is returning multiple posts
has comment: http://stackoverflow.com/comment/46507990
tagged with: wordpress
tagged with: php
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46508114
has body: When I used POST instead of GET for the call, it was taking a really long time for the wait. So, since I wasn't actually sending any data, I tried switching to GET. The speed increased a bit but now instead of grabbing the one post I need, it returns several posts. I'm guessing I need to alter the loop somehow in the function but I'm not sure what to do. Can someone help me out? Call $.ajax({ type: 'get', url: ajaxURL, data: {'action': 'load-content', post_id: post_id }, success: function(response) { // Wait until all images are loaded $('#project-container').html(response).imagesLoaded().then(function() { // Fire again to rearrange the slide in the DOM resize(); // Remove all 'hover' classes $('article.project').removeClass('hover-sticky grayscale-sticky'); $('article.project img').removeClass('nohover'); // Remove the loading icon $('.loading-icon').remove(); // If the user has scrolled... if ($(window).scrollTop() !== 0) { // First scroll the page to the top $('html, body').animate({ scrollTop : 0 },400, function() { matchContainerHeight(); projectStyles(); }); // If the user has not scrolled... } else { matchContainerHeight(); projectStyles(); } return false; }); } }); Function <?php /** * Ajax functions */ // Return the post content to the AJAX call function my_load_ajax_content () { $args = array( 'p' => $_POST['post_id'], 'post_type' => 'projects' ); $post_query = new WP_Query( $args ); while( $post_query->have_posts() ) : $post_query->the_post(); ?> <?php the_title( ' ', ' ' ); the_content(); if( get_field('client') ): ?> Client(s): <?php the_field('client'); ?> <?php endif; ?> <?php $cat_names = wp_list_pluck( get_the_category(), 'cat_name'); echo join( ', ', $cat_names ); ?> <?php if( get_field('url') ): ?> <a class="first after" href="http://<?php the_field('url'); ?>" target="_blank"><?php the_field('url'); ?> <?php endif; ?> <?php if( have_rows('slides') ): ?> <?php if( have_rows('slides') ): $slideNumber = 0; while ( have_rows('slides') ) : the_row(); …
type: Question

http://stackoverflow.com/q/29174185
tagged with: express
score: 2
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29198682
tagged with: handlebars.js
has body: I'm generating a handlebars view with hbs for express js framework, and I need to access the variables I pass to the view from inside a separate JavaScript file. For example: var foo = {{user.name}} Obviously this code throws an error, but what is the preferred way of getting hbs variables inside JavaScript? Currently I'm running another ajax request to get the same data. but I think it is not wise to make another request for the same data...
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46566744
upvote count: 2
type: Question
has title: Accessing handlebars variable inside client js file
has answer: http://stackoverflow.com/a/29198682
tagged with: javascript

http://stackoverflow.com/comment/46538425
comment on: http://stackoverflow.com/q/29111607
has text: Thanks - I figured as much, as I have gone through the documentation closely. Can you point me in the direction where I can achieve this? I've tried to use the jQuery.slimScroll API directly but again with no luck.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29138752
type: Answer
accepted answer of: http://stackoverflow.com/q/29138638
score: 3
has body: Using a html form element instead of a div should do the trick: replace: with should work. For more information see http://api.jquery.com/serialize/
type: AcceptedAnswer
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/29138638

http://stackoverflow.com/a/29181015
score: 0
answers question: http://stackoverflow.com/q/29180992
type: Answer
has body: here is your answer: (jquery) var total = $(':radio:checked').length;

http://stackoverflow.com/q/29075534
tagged with: refluxjs
favorite count: 0
has title: In React JS, when should you use a store vs directly manipulating the view's state?
has answer: http://stackoverflow.com/a/29084872
tagged with: flux
has body: Now I understand the concept of stores as the source of truth for a React app, but it seems that sometimes using stores is overkill, especially in UI-only situations. For example, say I'm making an app which contains a list of movies. The app contains a search bar which lets you filter these movies according to their title. Should the value of this search bar (let's call it searchTerm) be contained in a store? Its only impact is on the list of movies shown, which is purely a UI feature. It won't be sent to the server or saved to local storage. So in my handleTextChange function, should I alert a store, or simply set the component's state: Should it be this (using a store): var Actions = Reflux.createActions([ "searchChanged" ]); var Store = Reflux.createStore({ listenables: [Actions], getInitialState: function () { return data; }, onSearchChanged: function (searchTerm) { this.trigger(data.filter(function (el) { return el.name.toLowerCase().indexOf(searchTerm.toLowerCase()) != -1; })); } }); var View = React.createClass({ mixins: [Reflux.connect(Store, "movies")], handleTextChange: function (e) { Actions.searchChanged(e.target.value); }, render: function(){ //Render here. Somewhere there is this input element: &lt;input onChange={this.handleTextChange} type="text"/&gt; } )}; or this (not using a store): var Store = Reflux.createStore({ getInitialState: function () { return data; }, }); var View = React.createClass({ mixins: [Reflux.connect(Store, "movies")], handleTextChange: function (e) { this.setState({searchTerm: e.target.value}); }, render: function(){ var filtered = this.movies.filter(function (el) { return el.name.toLowerCase().indexOf(this.state.searchTerm.toLowerCase()) != -1; }); //Render here using the filtered variable. Somewhere there is this input element: &lt;input onChange={this.handleTextChange} type="text"/&gt; } } The latter example is obviously simpler. Is there a good reason to use a store to filter the data? Or should the view have a searchTerm …
has answer: http://stackoverflow.com/a/29078080
accepted answer: http://stackoverflow.com/a/29084872
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29078080
type: Question
tagged with: reactjs
score: 5
upvote count: 5
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/46385001
downvote count: 0

http://stackoverflow.com/a/29098667
has comment: http://stackoverflow.com/comment/46428713
has body: The this in the each() callback will be the elements themselves, not their jQuery wrapper. You need to do this: jQuery(this).find('iframe').contents().find('body').css('background-color', settings.color);
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29098549
type: Answer
answers question: http://stackoverflow.com/q/29098549
score: 2
has comment: http://stackoverflow.com/comment/46428408
downvote count: 0

http://stackoverflow.com/a/29186228
downvote count: 1
type: Answer
has body: this uses jquery ui to accomplish what you want. it pops up a dialog waits 3 seconds then closes it 3 seconds later JSFiddle: jsfiddle.net/mcf2280/tbyuys9w/7/ $(function() { $("#popupBasic").dialog({ autoOpen: false }); $(".navButton").click(function() { var text = $(this).text(); $("#popupBasic").html('&lt;p&gt;'+text+'&lt;/p&gt;'); $("#popupBasic").dialog('open') window.setTimeout(closeAlert, 3000); }); function closeAlert(){ $("#popupBasic").dialog('close'); } });
has comment: http://stackoverflow.com/comment/46587910
answers question: http://stackoverflow.com/q/29185895
upvote count: 0
has comment: http://stackoverflow.com/comment/46588291
has comment: http://stackoverflow.com/comment/46589315
score: -1
has comment: http://stackoverflow.com/comment/46588276

http://stackoverflow.com/q/29212359
has comment: http://stackoverflow.com/comment/46634496
favorite count: 0
possible better answer: http://stackoverflow.com/a/29212422
answer count: 5
accepted answer: http://stackoverflow.com/a/29214918
has answer: http://stackoverflow.com/a/29212422
has answer: http://stackoverflow.com/a/29212502
has answer: http://stackoverflow.com/a/29212485
has answer: http://stackoverflow.com/a/29212456
has comment: http://stackoverflow.com/comment/46634595
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46634579
has comment: http://stackoverflow.com/comment/46634200
upvote count: 1
has comment: http://stackoverflow.com/comment/46634719
has comment: http://stackoverflow.com/comment/46634728
has comment: http://stackoverflow.com/comment/46634275
type: Question
has comment: http://stackoverflow.com/comment/46634309
has comment: http://stackoverflow.com/comment/46635231
score: 1
has comment: http://stackoverflow.com/comment/46634432
has comment: http://stackoverflow.com/comment/46634310
has comment: http://stackoverflow.com/comment/46636238
has answer: http://stackoverflow.com/a/29214918
has comment: http://stackoverflow.com/comment/46634240
has body: I'm trying to refresh some Javascript knowledge for an upcoming interview. I was reading a blog that says "The delete operator returns true if the delete was successful." and then shows an example of it in use: var christmasList = {mike:"Book", jason:"sweater" } ​delete christmasList.mike; // deletes the mike property​ In that example it looks like delete is used in the manner that a void function (in the general programming sense -- I know that JS doesn't require declarations like void) would be. Can someone explain to me, or give me a link to, the documentation that explains how JS functions can act with different return values, and does such require separate implementations for each return value?
has comment: http://stackoverflow.com/comment/46634243
has comment: http://stackoverflow.com/comment/46634640
downvote count: 0
tagged with: javascript
has title: Confused about Javascript. A boolean function can act as a void function?

javascript-objects
tags question: http://stackoverflow.com/q/29179346
tags question: http://stackoverflow.com/q/29067715
tags question: http://stackoverflow.com/q/29086562
tags question: http://stackoverflow.com/q/29153370
tags question: http://stackoverflow.com/q/29113526
type: Tag
tag name: javascript-objects
tags question: http://stackoverflow.com/q/29067781
tags question: http://stackoverflow.com/q/29103458
tags question: http://stackoverflow.com/q/29066590

http://stackoverflow.com/comment/46368764
score: 0
type: AnswerComment
has text: You are great, thanks! unfortunately it's late here and I'm too tired right now to read understand and trying it, but will definitely come back for it tomorrow and will let you know :)
type: Comment
comment on: http://stackoverflow.com/a/29064381

http://stackoverflow.com/a/29169964
answers question: http://stackoverflow.com/q/29169649
score: 0
accepted answer of: http://stackoverflow.com/q/29169649
type: AcceptedAnswer
type: Answer
has body: In your function you're printing the variable names, not their values. Use it like this instead: function productLink(product) { var link="&lt;li&gt;" + "&lt;img src=" + product.pic + "&gt;" + "&lt;h2&gt;" + product.name + "&lt;/h2&gt;" + "&lt;p&gt;" + product.desc + "&lt;/p&gt;" + "&lt;p&gt;" + product.price + "&lt;/p&gt;" + "&lt;/li&gt;"; return link; }

http://stackoverflow.com/a/29087292
accepted answer of: http://stackoverflow.com/q/29086530
has comment: http://stackoverflow.com/comment/46408237
answers question: http://stackoverflow.com/q/29086530
has body: It looks like you are using static map url but you have embed map? https://www.google.com/maps/embed/v1/directions ?key=API_KEY &amp;origin= &amp;destination=
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46408074
type: Answer

http://stackoverflow.com/comment/46440193
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29103275
score: 0
has text: I wouldn't recommend you loop through 20000 files and use the request method. Maybe an alternative is to use a read stream with promises?

http://stackoverflow.com/comment/46362812
has text: Beware that your code is falling prey to [*The Horror of Implicit Globals*](http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html) because you don't declare your variables.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29063385
score: 0

http://stackoverflow.com/q/29123250
answer count: 1
has comment: http://stackoverflow.com/comment/46487661
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46474760
has comment: http://stackoverflow.com/comment/46473165
has title: How can I remove $data, $parent etc. from the DOM (KnockoutJS)
has comment: http://stackoverflow.com/comment/46474669
has body: I have just started using knockout so if some stuff is ugly please do tell me! One thing I really want to do is get rid of $parent, $data etc. from the DOM if possible. I have seen ways to do this elsewhere but can't remember where. Snippet is attached, if someone can point me in the right direction it would be appreciated. //used to abstract out the jQuery dependancies - just in case at some point in the future jQUery is replaced with another library. function activeClassSingle(element, standardClass, activeClass){ $(element).siblings().removeClass(activeClass).addClass(standardClass); $(element).removeClass(standardClass).addClass(activeClass); } //helper class in a helper file ko.bindingHandlers.buttonGroupChecked = { init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var value = valueAccessor(); var newValueAccessor = function () { return { click: function () { value(allBindingsAccessor.get('val')); } } }; ko.bindingHandlers.event.init(element, newValueAccessor, allBindingsAccessor, viewModel, bindingContext); }, update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { if (allBindingsAccessor.get("val") == ko.unwrap(valueAccessor())) { activeClassSingle(element, "btn-info", "btn-success"); } } } //raw data var adults = [ {val: 1, text: "1"}, {val: 2, text: "2"}, {val: 3, text: "3"}, {val: 4, text: "4"}, {val: 5, text: "5"}, {val: 6, text: "5+"} ]; //viewmodel etc. var ViewModel = function () { this.adultsNo = ko.observable(2); }; var vm = new ViewModel(); ko.applyBindings(vm);
tagged with: data-binding
has comment: http://stackoverflow.com/comment/46473241
tagged with: knockout.js
downvote count: 1
type: Question
tagged with: knockout-3.0
tagged with: custom-binding
tagged with: javascript
has comment: http://stackoverflow.com/comment/46485837
score: -1
has comment: http://stackoverflow.com/comment/46474201
has answer: http://stackoverflow.com/a/29179669
upvote count: 0

http://stackoverflow.com/a/29106434
has comment: http://stackoverflow.com/comment/46442612
type: Answer
has comment: http://stackoverflow.com/comment/46442687
upvote count: 1
downvote count: 1
has body: This doesn't seem like a clean approach to solving this problem. First, relying on exact heights could be really buggy, since if one pixel changes, your code get thrown off. Considering using less than/greater than vs equals or settings a class on the elements. Also, you should declare your jQuery variables once. A quick refactor: $(function() { var foo = $('ul img:nth-child(3n+3)'); var bar = $('ul img:nth-child(3n+4)'); switch(foo.height() + bar.height()) { case == 1092: // You really should avoid relying on exact heights // Maybe try some other method to determine style foo.addClass('style1a'); bar.addClass('style1b'); break; case == 2460: foo.addClass('style2a'); bar.addClass('style2b'); break; case == 1776: foo.addClass('style2a'); bar.addClass('style3b'); break; }
score: 0
answers question: http://stackoverflow.com/q/29106063

http://stackoverflow.com/a/29180934
upvote count: 1
has comment: http://stackoverflow.com/comment/46578412
type: Answer
has comment: http://stackoverflow.com/comment/46578355
downvote count: 0
has comment: http://stackoverflow.com/comment/46578335
has body: var _stop = false; try { var loop = function () { if(!_stop) { if (some condition is met) { stop(); } /* Do something. */ loop(); } }; } catch(e) { } function stop() { _stop = true; throw new Error("USE IT WITH PRECAUTION"); } The loop above does you job of exiting entire loop, But I will say its horribly wrong way of doing thing as ideally function should be 1) mutating the state variables 2) or should be computing the values. 3) or should be determining error state to stop the execution further It should never be bothered about how the control flow of function caller is and ways to stop function caller execution flow.
answers question: http://stackoverflow.com/q/29180409
score: 1

http://stackoverflow.com/q/29146497
answer count: 1
favorite count: 0
tagged with: beautifulsoup
type: UnansweredQuestion
downvote count: 2
has body: I am trying to crawl a webpage having infinite scrolling.So i could get get only images until first load and cant get them again. I even tried to find the ajax application call made for loading the images from Inspect Element-> Network. But found that its not making any ajax call,but the images are still loading. Is there a way to hide the get requests made to get those images?
score: -1
upvote count: 1
type: Question
has title: How do i crawl images from a website of infinite scrolling where the api is hidden and i cant get it from by using Inspect Element->Network
has answer: http://stackoverflow.com/a/29146565
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46469705
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29120505
has text: that's because you have removed `"GetYearsResult": {` from `JSON` string

http://stackoverflow.com/comment/46641258
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29215600
has text: _“I changed the question”_ – and yet, you added no more actual _useful_ information as to what you actually want to achieve. _“I need to select multiple elements at once”_ – _what_ “multiple elements”, what do you need to select them _for_, etc.

http://stackoverflow.com/comment/46380234
has text: @HaltlolXD http://jsfiddle.net/arunpjohny/dkk2nqyg/5/ can you create a demo of the problem
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29072653

http://stackoverflow.com/comment/46517879
score: 2
has text: OMG...my eyes are bleeding!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29147658

http://stackoverflow.com/comment/46373914
comment on: http://stackoverflow.com/q/29069002
score: 0
type: Comment
type: QuestionComment
has text: yes thats what i mean, whenever i scroll down i need to fade in, and when scroll up and down again i need to animate the fadding in again

http://stackoverflow.com/q/29075863
type: Question
accepted answer: http://stackoverflow.com/a/29076102
tagged with: woocommerce
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
upvote count: 2
tagged with: css
has body: I am developing an eCommerce website using wordpress and cilo wordpress theme. The site is coming all together on desktop and other media but when my screen size is less than 769px, add to cart button is not working for signle product page. Click here to see an example post The theme is working perfectly on the demo This theme use woocommerce inside theme folder tried other themes on my site, where add to cart is working on mobile site I tried to upgrade everything including the latest version of the theme and the wordpress itself Any suggestions, please?
type: AnsweredQuestion
score: 1
tagged with: wordpress
has title: Wordpress WooCommerce add to cart not working on mobile site
downvote count: 1
has answer: http://stackoverflow.com/a/29076102

http://stackoverflow.com/comment/46430465
score: 0
type: AnswerComment
has text: I meant, put the "'<?php echo hash('sha1', 'my-secret-key' . $_REQUEST["email"]); ?>" code to a separate PHP file, and then call this PHP file via AJAX.
type: Comment
comment on: http://stackoverflow.com/a/29099387

http://stackoverflow.com/comment/46502050
type: QuestionComment
comment on: http://stackoverflow.com/q/29138858
has text: I'm not personally familiar with Flexicapture, and there isn't a tag already in StackOverflow so I'm guessing most people aren't familiar with it. There really isn't much information in your question about what you are struggling with. Is there some way to frame your question in terms of what you tried and what didn't work?
score: 0
type: Comment

http://stackoverflow.com/comment/46521905
comment on: http://stackoverflow.com/q/29144091
score: 0
type: Comment
type: QuestionComment
has text: @AnkitSaroch Thank you. That's exactly the same issue!

http://stackoverflow.com/q/29105523
tagged with: jquery
has body: I'm using Jquery's ajax method, and I need help parsing data coming back from backend server. server response will be either "valid" or "not valid. Currently my "if statement logic is not working, this is what I have tried so far). $.ajax({ url: 'php/phone-valid.php', type: 'POST', data: {userid: $.trim($('#userid').val())}, success: function(data) { console.log(data); if (result.indexOf("not valid")) { ("#mustbevalid").val("You must validate your phone number"); console.log("Phone hasn't been validated"); e.preventDefault(); }; } }); Your help is highly appreciated.
accepted answer: http://stackoverflow.com/a/29105616
tagged with: ajax
type: AnsweredQuestion
type: Question
has title: jquery parse ajax response
has answer: http://stackoverflow.com/a/29105616
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29105635
has comment: http://stackoverflow.com/comment/46441090
score: 0
has answer: http://stackoverflow.com/a/29105635
answer count: 2

http://stackoverflow.com/q/29092701
tagged with: firefox-addon
tagged with: firefox
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46453280
favorite count: 0
has title: What does paragraph about figuring out XUL elements mean in MDN document: "How to convert an overlay extension to restartless"
tagged with: xul
score: 1
upvote count: 1
tagged with: overlay
type: Question
type: AnsweredQuestion
has body: Recently a friend of mine and I have been working on a Firefox extension. He handed the code to me today, and I've been trying to make it restartless. I used the tutorial from How to convert an overlay extension to restartless (on MDN). Since I don't have much experience working with JavaScript and extensions in general, I was wondering if anyone could help to understand what step number 6 means here in this tutorial. They are saying we can't use "no more XUL overlays", and I understand this. What I don't understand is that how to this part: Figure out what XUL elements you need to create for your add-on to add your interface, where it needs to go into a XUL window, and how to do it. Docs: document.getElementByID(), document.createElement(), Element reference, Node reference (DOM elements are also nodes). I decided against using document.loadOverlay, since it's very buggy. I'm not sure if this helps much, but here is the code for our overlay.xul. Again, sorry if the question is really basic, any help is much appreciated. If I need to provide more code please let me know. At this point I thought only the code for our overlay.xul file is important. &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;overlay id="my-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt; &lt;script type="application/javascript;version=1.7" src="overlay.js"/&gt; &lt;/overlay&gt;
has answer: http://stackoverflow.com/a/29111078
tagged with: javascript
has comment: http://stackoverflow.com/comment/46418266
accepted answer: http://stackoverflow.com/a/29111078

http://stackoverflow.com/comment/46439413
type: Comment
comment on: http://stackoverflow.com/a/29104373
score: 0
type: AnswerComment
has text: Sorry for not taking this thing in front of you earlier as i did not this would cause any problem

http://stackoverflow.com/comment/46408563
score: 0
type: Comment
type: QuestionComment
has text: And you don't worry about search engines indexing and ranking your pages?
comment on: http://stackoverflow.com/q/29087756

http://stackoverflow.com/comment/46549319
comment on: http://stackoverflow.com/q/29164415
type: Comment
type: QuestionComment
has text: so, what will I do for it...
score: 0

http://stackoverflow.com/q/29080255
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/46394040
answer count: 1
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/29080561
accepted answer: http://stackoverflow.com/a/29080561
has title: knockout variable not defined
favorite count: 0
downvote count: 0
has body: I'm relatively new to Knockout.js and am having trouble getting this computed observable working. In short, I want to disable a button until the textarea has input. Here is the HTML: For the textarea: For the button: Save Note And here is my .js: var vm = { text1: ko.observable(""), } vm.hasInput = ko.computed(function() { return this.text1(); }, vm); ko.applyBindings(vm); When running in firebug, I get an error from the console that reads: ReferenceError: text1 is not defined I should add that I am referencing this fiddle to create my code: http://jsfiddle.net/oliverw/s2VmL/1/ EDIT: The "click:addNote" part of the button was for something else. I forgot to remove it in this snippet as the "addNote" functionality is working just fine. I apologize for the confusion and I thank you all for noticing it. Because of this, it appears that T.J. has answered my question. I had the bindings working improperly within the ViewModel and the bindings were causing conflict.
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46393800
tagged with: observable

http://stackoverflow.com/a/29148268
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46558576
has comment: http://stackoverflow.com/comment/46565550
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46559426
has comment: http://stackoverflow.com/comment/46558717
answers question: http://stackoverflow.com/q/29142910
has body: You should be able to use setAttribute to create name value pairs. document.getElementById("embed").setAttribute("name", "albert"); document.getElementById("embed").setAttribute("phone", "123456"); Then you can access the values with getAttribute later, although I am not sure if "embed" is a reserved word for an element id.
has comment: http://stackoverflow.com/comment/46566868
accepted answer of: http://stackoverflow.com/q/29142910
has comment: http://stackoverflow.com/comment/46566397

twitter-bootstrap
tags question: http://stackoverflow.com/q/29189650
tags question: http://stackoverflow.com/q/29113467
tags question: http://stackoverflow.com/q/29112838
tags question: http://stackoverflow.com/q/29084072
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/29074773
tags question: http://stackoverflow.com/q/29161862
tags question: http://stackoverflow.com/q/29165557
tags question: http://stackoverflow.com/q/29159315
tags question: http://stackoverflow.com/q/29215897
tags question: http://stackoverflow.com/q/29194125
tags question: http://stackoverflow.com/q/29137353
tags question: http://stackoverflow.com/q/29170799
tags question: http://stackoverflow.com/q/29077966
tags question: http://stackoverflow.com/q/29113222
tags question: http://stackoverflow.com/q/29123765
tags question: http://stackoverflow.com/q/29208793
tags question: http://stackoverflow.com/q/29075209
tags question: http://stackoverflow.com/q/29093751
tags question: http://stackoverflow.com/q/29169443
tags question: http://stackoverflow.com/q/29161946
tags question: http://stackoverflow.com/q/29079749
tags question: http://stackoverflow.com/q/29171498
tags question: http://stackoverflow.com/q/29130845
tags question: http://stackoverflow.com/q/29121876
tags question: http://stackoverflow.com/q/29160899
tags question: http://stackoverflow.com/q/29215718
tags question: http://stackoverflow.com/q/29084771
tags question: http://stackoverflow.com/q/29158500
tags question: http://stackoverflow.com/q/29173888
tags question: http://stackoverflow.com/q/29182231
tags question: http://stackoverflow.com/q/29088177
tags question: http://stackoverflow.com/q/29110117
tags question: http://stackoverflow.com/q/29113180
tags question: http://stackoverflow.com/q/29173878
tags question: http://stackoverflow.com/q/29169238
tags question: http://stackoverflow.com/q/29204053
tags question: http://stackoverflow.com/q/29176558
tags question: http://stackoverflow.com/q/29113612
tags question: http://stackoverflow.com/q/29214210
tags question: http://stackoverflow.com/q/29093991
tags question: http://stackoverflow.com/q/29191039
tags question: http://stackoverflow.com/q/29107653
tags question: http://stackoverflow.com/q/29165111
tags question: http://stackoverflow.com/q/29139516
tags question: http://stackoverflow.com/q/29192882
tags question: http://stackoverflow.com/q/29090047
tags question: http://stackoverflow.com/q/29095865
tags question: http://stackoverflow.com/q/29164667
tags question: http://stackoverflow.com/q/29182451
tags question: http://stackoverflow.com/q/29096165
type: Tag
tags question: http://stackoverflow.com/q/29068051
tags question: http://stackoverflow.com/q/29178661
tags question: http://stackoverflow.com/q/29149890
tags question: http://stackoverflow.com/q/29146459
tags question: http://stackoverflow.com/q/29116352
tags question: http://stackoverflow.com/q/29173864
tags question: http://stackoverflow.com/q/29210399
tags question: http://stackoverflow.com/q/29119160
tags question: http://stackoverflow.com/q/29070494
tags question: http://stackoverflow.com/q/29113507
tags question: http://stackoverflow.com/q/29108828
tags question: http://stackoverflow.com/q/29208395
tags question: http://stackoverflow.com/q/29114783
tags question: http://stackoverflow.com/q/29153937
tags question: http://stackoverflow.com/q/29185220
tags question: http://stackoverflow.com/q/29144604
tags question: http://stackoverflow.com/q/29133372
tags question: http://stackoverflow.com/q/29082358
tags question: http://stackoverflow.com/q/29210921
tags question: http://stackoverflow.com/q/29154976
tags question: http://stackoverflow.com/q/29119076
tags question: http://stackoverflow.com/q/29208819
tags question: http://stackoverflow.com/q/29160515
tags question: http://stackoverflow.com/q/29210719
tags question: http://stackoverflow.com/q/29121830
tags question: http://stackoverflow.com/q/29087455
tags question: http://stackoverflow.com/q/29182991
tags question: http://stackoverflow.com/q/29095653

http://stackoverflow.com/comment/46559845
type: QuestionComment
has text: It might be that `LotInfo.SubmitError`has quotation marks in it that will terminate the string and make the generated javascript incorrect.
comment on: http://stackoverflow.com/q/29170719
score: 1
type: Comment

http://stackoverflow.com/q/29107317
type: AnsweredQuestion
has body: I try to check error code coming back from mongo in node.js server Comparison succeeds in both the cases Which one is the correct one and should be used? Please excuse my limited understanding on this. I have code like this if (err['code'] == '11000') { console.log("Single Quote String"); } if (err['code'] == 11000) { console.log("With out single quote"); } Output is: Single Quote String With out single quote
has answer: http://stackoverflow.com/a/29107395
type: Question
has title: javascript equality operation succeeds for both single quote string and number
has comment: http://stackoverflow.com/comment/46444347
tagged with: javascript
has answer: http://stackoverflow.com/a/29107362
score: 0
has answer: http://stackoverflow.com/a/29107380
possible better answer: http://stackoverflow.com/a/29107432
has comment: http://stackoverflow.com/comment/46444517
has answer: http://stackoverflow.com/a/29107432
accepted answer: http://stackoverflow.com/a/29107362
answer count: 4

http://stackoverflow.com/a/29156541
upvote count: 1
has body: As a matter of style, the function getTargetProduct doesn't need all this boilerplate code with promises. You want to return a simple promise wrapping your local data targetProduct. The function can be much cleaner : var getTargetProduct = function() { return $q.when(targetProduct); } Note: In the following, for convenience purpose, I will refer to your service testService by the name productService, and I will refer to your controller navController by the name ProductController The controller NavController (gets the products as follows : productService.getProducts().then(function(products) { $scope.products = products; } When the user sets a target product (unchanged) : $scope.setTargetProduct = function(targetProduct) { testService.setTargetProduct(targetProduct) } Solution 1: nested controllers If ProductDetailController is a nested controller of ProductController, the data targetProduct is shared without any logic from your part. Solution 2: controllers not linked by a parent-child relationship If the two controllers are not linked by a parent-child relationship, you can use $broadcast for broadcasting an updateTargetProduct event, and $on for handling that event. In the controller from which we set the target product, we will find : $rootScope.$broadcast('updateTargetProduct', targetProduct); Note : $broadcast will broadcast the event from the rootscope down to the child scopes. And in ProductDetailController, we will listen for this event : $scope.$on('updateTargetProduct', function(event, data) { // play with the received data }
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46534394
has comment: http://stackoverflow.com/comment/46534454
has comment: http://stackoverflow.com/comment/46534834
type: Answer
has comment: http://stackoverflow.com/comment/46534633
accepted answer of: http://stackoverflow.com/q/29156023
answers question: http://stackoverflow.com/q/29156023

http://stackoverflow.com/comment/46423944
comment on: http://stackoverflow.com/q/29094822
score: 0
has text: @Jai : Not really..Just want to know if there is any event that can be used to focus the first row on grid load..
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/123216467
comment on: http://stackoverflow.com/a/60614830
has text: After around 4 hours of searching on the internet, I got this answer that worked for me. Thanks @Hien
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/29070323
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: laravel
has title: Get option value when changing option in angularjs?
type: Question
has body: I need to update rate text box when user selecting from master_items. How it is possible, HTML, 0" ng-click="removeInputElement($index)"> Here,when user select an option from master items,I want to update corresponding rate field.Here select box is working fine and each options has correct value,but I dont know how can I get selected option value. My master_items JSON is, { "total": 5, "per_page": 100, "current_page": 1, "last_page": 1, "next_page_url": null, "prev_page_url": null, "from": 1, "to": 5, "data": [ { "id": 63, "name": "Lumia 6252", "description": null, "unit": null, "rate": "12.00", "created_by": 0, "updated_by": null, "delete_by": null, "created_at": "2015-03-15 17:38:40", "updated_at": "2015-03-15 17:38:40", "deleted_at": null, "status": 1 } } .
has comment: http://stackoverflow.com/comment/46375570
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46375641
has answer: http://stackoverflow.com/a/29070372
downvote count: 2
upvote count: 1

http://stackoverflow.com/comment/46567408
type: QuestionComment
has text: what is `sel`? Is it an object? Is it a form object? How is `sel` getting passed to the `getval` function?
comment on: http://stackoverflow.com/q/29174066
score: 0
type: Comment

http://stackoverflow.com/comment/46484033
has text: @JLRishe hi. if you have a chance can you view this post, especially the post directly above this one by me. thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/29128188
score: 0
type: Comment

http://stackoverflow.com/comment/46562309
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29172001
has text: The [`WebEngine` javadocs](http://docs.oracle.com/javase/8/javafx/api/javafx/scene/web/WebEngine.html) have sections "Evaluating JavaScript expressions" and "Calling back to Java from Javascript". Do the techniques there address your needs?
score: 0

http://stackoverflow.com/q/29194780
has body: I'm getting this error, Argument 'ctrl1' is not a function, got undefined on running the latest angularjs v1.3.15. Should my syntax be any different here? This is the html &lt;body ng-app="app"&gt; &lt;div ng-controller="ctrl1"&gt; {{color}} {{root_color}} &lt;/div&gt; &lt;div ng-controller="ctrl2"&gt; {{color}} {{root_color}} &lt;/div&gt; &lt;/body&gt; And this is the angularjs code angular.module('app', []).controller('ctrl1', ['$scope', function ctrl1($scope){ $scope.color = "yellow"; $scope.root_color = "red"; }]); angular.module('app', []).controller('ctrl2', ['$scope', function ctrl2($scope){ $scope.color = "yellow"; $scope.root_color = "red"; }]);
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/29194841
tagged with: javascript
has answer: http://stackoverflow.com/a/29194853
accepted answer: http://stackoverflow.com/a/29194853
has comment: http://stackoverflow.com/comment/46602646
has answer: http://stackoverflow.com/a/29194841
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46602871
favorite count: 0
has title: why am i getting this error in simple angularjs program?
tagged with: angularjs

http://stackoverflow.com/comment/46450078
score: 0
has text: Basically, your `scope.alertMessage` should be a function that returns `alertService.alertMessage`. Then in the template, use `{{alertMessage()}}`. This way, the message displayed will be updated each digest cycle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29110146

http://stackoverflow.com/a/29125688
has comment: http://stackoverflow.com/comment/46478887
has body: You're trying to use a jQuery function (.on) Try this: $(_btnAjax).on('click', function(e) { // some ajax } Although I think you should use a id or class selector like: // selector should be whatever your button has as id or class property. // (preferably an id since this won't conflict with other classes) $('#btnAjax').on('click', function(e) { // some ajax }
score: 0
answers question: http://stackoverflow.com/q/29125559
type: Answer
has comment: http://stackoverflow.com/comment/46507177

http://stackoverflow.com/comment/46609491
type: QuestionComment
comment on: http://stackoverflow.com/q/29198319
has text: ` `
score: 0
type: Comment

http://stackoverflow.com/comment/46594105
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29189565
has text: you don't need a reviver to get data out. in fact, you shouldn't stringify() it at all if you want to use the data as discrete pieces. `message.action` and `message.data.id` seem to be what you want.
score: 0

http://stackoverflow.com/comment/46642652
type: AnswerComment
has text: Not that weird! There's only 1 obvious way to parse local storage data and remove the last item from an Array. :)
type: Comment
comment on: http://stackoverflow.com/a/29215154
score: 0

http://stackoverflow.com/q/29074185
type: Question
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29101700
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46382739
tagged with: ruby-on-rails
linked to: http://stackoverflow.com/q/22537311
tagged with: angular-ui-router
has title: How to globally implement Authentication with AngularJS, Devise and UI Router?
has body: I'm quite new to Angular so this might be a newbie question. I'm trying to implement a simple task manager (just an exercise) with Rails as backend and Angular as frontend. So far I followed a tutorial and everything worked fine. Now I want to globally implement Authentication. That means: When a user is not registered and logged in, she should see a splash page or the login page. I don't want to do that in every single Angular controller, because DRY. So I figured the UI Router might be a good place. And I have a slight suspicion that maybe $httpProvider.interceptors might be useful. This is how far I got. I can check if a user is authenticated and prevent the page from loading. But nothing more. How would I go from here? Are there any good tutorials out there I missed? This question on Stackoverflow goes in a similar direction but doesn't solve my problem since they are not using Devise. Thanks! // app.js var app = angular.module("TaskManager", ['ui.router', 'templates', 'Devise']) .config([ '$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){ $stateProvider .state('home', { url: '/home', templateUrl: 'home/_home.html', controller: 'MainCtrl', resolve: { projectPromise: ['projects', function(projects) { console.log($rootScope); return projects.getAll(); }] } }) .state('projects', { url: '/projects/{id}', templateUrl: 'projects/_projects.html', controller: 'ProjectsCtrl', resolve: { project: ['$stateParams', 'projects', function($stateParams, projects) { return projects.get($stateParams.id); }] } }) .state('login', { url: '/login', templateUrl: 'auth/_login.html', controller: 'AuthCtrl', onEnter: ['$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function() { $state.go('home'); }) }] }) .state('register', { url: '/register', templateUrl: 'auth/_register.html', controller: 'AuthCtrl', onEnter: ['$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function() { $state.go('home'); }) }] }); $urlRouterProvi…
has comment: http://stackoverflow.com/comment/46383535
tagged with: devise
tagged with: javascript
score: 4

http://stackoverflow.com/q/29203084
has answer: http://stackoverflow.com/a/29203093
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29203093
has comment: http://stackoverflow.com/comment/46618186
tagged with: typeof
answer count: 1
tagged with: javascript
has body: Somehow a variable with the data 4 inside of it is reporting as a string with the typeof operator instead of as number? Is this any issue with the Code Academy editor? https://i.sstatic.net/09dBW.png var languages = { english: "Hello!", french: "Bonjour!", notALanguage: 4, spanish: "Hola!" }; // print hello in the 3 different languages for(var item in languages) { if(typeof item !== "number") { console.log(languages[item] + " " + typeof item); } }
score: 0
has title: typeof is reporting string instead of number

http://stackoverflow.com/q/29130291
type: Question
tagged with: dom
score: 0
tagged with: javascript
tagged with: jquery
has title: dropzone.js cloning form wont allow click
tagged with: dropzone.js
has comment: http://stackoverflow.com/comment/46489166
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am using dropzone.js and have a form that is appended to the dom when a user clicks a button. I want the user to be able to add this form several times so am trying to clone it before adding. However, the problem I am running into is that when I append the cloned version of the form the form is not clickable (aka the user cant add an image) but when I do not use the cloned form and just use the original one in the dom it works properly. When I compare the html appended it is exactly the same... Below is the html: Drop files here to upload I am new to javascript and dropzone.js so please let me know if I am missing anything obvious. Thanks!
answer count: 0
has comment: http://stackoverflow.com/comment/46489410
has comment: http://stackoverflow.com/comment/46486368

http://stackoverflow.com/comment/46722949
comment on: http://stackoverflow.com/q/29150050
type: Comment
type: QuestionComment
has text: @Brian Vanderbusch: Don't confuse "valid" or "legitimate" with "on-topic". Sure, this question may be valid - it just doesn't belong here because the OP is asking for external resources. Removing that portion entirely would make the question on-topic, but it would also render your answer obsolete.
score: 0

http://stackoverflow.com/comment/46639674
has text: How can you do it then?
comment on: http://stackoverflow.com/a/29214939
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46511624
score: 1
comment on: http://stackoverflow.com/q/29144361
type: Comment
type: QuestionComment
has text: Rather than passing the ID into your `doStuff` function you could just pass in the element. This would mean you'd not have to give an `id` attribute to your dynamically-added `input` element at all. `doStuff(document.getElementByID(SEED_ID))` in your `window.onload`, then `doStuff(stuff)` in your `doMoreStuff()` function.

http://stackoverflow.com/comment/46626859
type: Comment
score: 1
has text: `$(".checkbox")` selects any element with `class="checkbox"`... To select the `checkbox` **element** use `$("input[type='checkbox']")` instead
comment on: http://stackoverflow.com/q/29208315
type: QuestionComment

http://stackoverflow.com/comment/46487301
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29130776
has text: Did you try location.href = "your_url"; ?

http://stackoverflow.com/q/29076233
has comment: http://stackoverflow.com/comment/46392820
answer count: 0
tagged with: clipboard
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46387917
upvote count: 1
has comment: http://stackoverflow.com/comment/46391312
has body: I am using paste execCommand to get the system clipboard data. document.execCommand("Paste", null, null); var paste = pasteTarget.innerText; I am trying to read data in every one sec delay, but pasteTarget.innerText is always returning null. I am executing the above code in the handle message from native client. It seems this code is not executing on background page. How to execute the code in background page? I am using the pepper API example(nacl_sdk\pepper_35\examples\api\input_event). common.js function getClipboard() { var pasteTarget = document.createElement("div"); pasteTarget.contentEditable = true; var actElem = document.activeElement.appendChild(pasteTarget).parentNode; pasteTarget.focus(); document.execCommand("Paste", null, null); var paste = pasteTarget.innerText; console.log("paste = " + paste); actElem.removeChild(pasteTarget); return paste; }; Whenever right button is clicked I am trying to get the clipboard data. But always null is returned. manifest.json { "name": "Input Event", "version": "35.0.1916.114", "minimum_chrome_version": "35.0.1916.114", "manifest_version": 2, "description": "Input Event Example", "offline_enabled": true, "icons": { "128": "icon128.png" }, "app": { "background": { "scripts": ["background.js"] } }, "key": "[binary]", "oauth2": { "client_id": "903965034255.apps.googleusercontent.com", "scopes": ["https://www.googleapis.com/auth/drive"] }, "permissions": [ "clipboardWrite", "clipboardRead" ] }
score: 1
tagged with: google-nativeclient
has comment: http://stackoverflow.com/comment/46393364
type: Question
has comment: http://stackoverflow.com/comment/46397819
has comment: http://stackoverflow.com/comment/46393458
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46393559
has comment: http://stackoverflow.com/comment/46391280
tagged with: google-chrome-extension
has title: execCommand not working in chrome extension
has comment: http://stackoverflow.com/comment/46391837
favorite count: 0
linked to: http://stackoverflow.com/q/7144702

http://stackoverflow.com/comment/46596140
comment on: http://stackoverflow.com/a/29189954
has text: @Lu4 Well spotted, sir! I fixed it in that other question, and for future readers of this answer, you should know that I edited my answer here to include the fixed version as well.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46413157
comment on: http://stackoverflow.com/a/29090082
type: Comment
has text: Hmm, this looks like something very useful, however they aren't background images, the table is already constructed with image elements inside each td element like because the images are shapes that are being dragged by the user and placed in another table. I need to have the images location randomized on each new turn, and when the page loads so that they can not remember where each shape lies. Would this work even though they are not background images?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46470172
type: Comment
comment on: http://stackoverflow.com/q/29121871
score: 0
has text: FYI JS has no dictionary type, although you can mimic the same behaviour using an object.
type: QuestionComment

http://stackoverflow.com/comment/46446023
has text: @dooburt just edited my answer with a more simplistic explanation of what i think is going on with your code
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29107332
type: Comment

http://stackoverflow.com/comment/46581526
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29182664
type: AnswerComment
has text: @JeremyThille Both solutions will work. `bind` allows you to pass the scope. Also you need to return a function when setting `mainSubmitHandler(form, subSubmitHandler)` to the property `submitHandler` of the validator.

timer
tag name: timer
tags question: http://stackoverflow.com/q/29121224
tags question: http://stackoverflow.com/q/29158228
type: Tag
tags question: http://stackoverflow.com/q/29202449
tags question: http://stackoverflow.com/q/29210501
tags question: http://stackoverflow.com/q/29095216
tags question: http://stackoverflow.com/q/29201648
tags question: http://stackoverflow.com/q/29132880

http://stackoverflow.com/comment/48310897
has text: errand can i ask a question how can i put the span text as value for each respective input text i want to put it as hint like for example in input for `7th floor` i will add the `7th floor` as hint
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29117847

http://stackoverflow.com/a/29383844
downvote count: 0
answers question: http://stackoverflow.com/q/29206832
type: Answer
score: 3
upvote count: 3
has body: Use @import url('css4.css') in one of your existing css page. Then use specificity to be highlighted your new code as bellow: Html : The text css1.css : .aclass{ color : red; } css4.css : ul.ulclass li.liclass a.aclass{ color: green; } Then you will have green color in your a element

http://stackoverflow.com/comment/46445555
score: 0
has text: Also, I like to be able to all the other (own) methods and properties of the Strings I'm looking at. I just want the actual contents of the String to not be so messy.
comment on: http://stackoverflow.com/q/29107835
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46444213
type: AnswerComment
score: 0
type: Comment
has text: @Egidi: Try `console.log(res)`
comment on: http://stackoverflow.com/a/29105077

http://stackoverflow.com/a/29124884
has comment: http://stackoverflow.com/comment/46476354
type: Answer
has comment: http://stackoverflow.com/comment/46476370
has comment: http://stackoverflow.com/comment/46476314
has body: On submit of the form, the page will refresh. So in your function, you must prevent the default behaviour and submit your form via AJAX. In case the second form need to be shown based on the response from the first form, Then do the form replacement logic after the readyState event fired in AJAX. function Vanish(event) { event.preventDefault(); // Specify the id of the form. var IDofForm = "quest"; // Specify the id of the div containing the form. var IDofDivWithForm = "question"; // Specify the id of the div with the content to replace the form with. var IDforReplacement = "email"; // This line submits the form. // Get all the form elements and submit the form using ajax manually. // document.getElementById(IDofForm).submit(); // This replaces the form with the replacement content. // Put this code inside the success of ajax request document.getElementById(IDofDivWithForm).innerHTML = document.getElementById(IDforReplacement).innerHTML; }; In your code: &lt;form action="" method="POST" name="quest" id="quest" onsubmit="Vanish(event);"&gt;
answers question: http://stackoverflow.com/q/29124796
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29124796

http://stackoverflow.com/q/29206832
has title: Use a new CSS file to override current website's
has comment: http://stackoverflow.com/comment/46935660
has comment: http://stackoverflow.com/comment/46759251
has comment: http://stackoverflow.com/comment/46624240
has answer: http://stackoverflow.com/a/29264077
has comment: http://stackoverflow.com/comment/46624447
has comment: http://stackoverflow.com/comment/46759253
has answer: http://stackoverflow.com/a/29383844
has answer: http://stackoverflow.com/a/29397181
has comment: http://stackoverflow.com/comment/46624348
linked to: http://stackoverflow.com/q/1598899
type: Question
has answer: http://stackoverflow.com/a/29340818
has answer: http://stackoverflow.com/a/29387722
has answer: http://stackoverflow.com/a/29264744
has comment: http://stackoverflow.com/comment/46950147
has comment: http://stackoverflow.com/comment/46728127
has comment: http://stackoverflow.com/comment/46624401
tagged with: javascript
has comment: http://stackoverflow.com/comment/46728559
possible better answer: http://stackoverflow.com/a/29388019
tagged with: jquery
has answer: http://stackoverflow.com/a/29375380
has answer: http://stackoverflow.com/a/29387997
has answer: http://stackoverflow.com/a/29269359
score: 22
has answer: http://stackoverflow.com/a/29264547
has answer: http://stackoverflow.com/a/29388019
has comment: http://stackoverflow.com/comment/46944212
has comment: http://stackoverflow.com/comment/46624424
has comment: http://stackoverflow.com/comment/46760127
has comment: http://stackoverflow.com/comment/46625473
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46625423
has comment: http://stackoverflow.com/comment/46759966
tagged with: css
has comment: http://stackoverflow.com/comment/46624550
linked to: http://stackoverflow.com/q/11833759
favorite count: 0
has comment: http://stackoverflow.com/comment/46624587
has comment: http://stackoverflow.com/comment/46735502
answer count: 12
downvote count: 2
has comment: http://stackoverflow.com/comment/46791328
has comment: http://stackoverflow.com/comment/46625884
has comment: http://stackoverflow.com/comment/46777204
accepted answer: http://stackoverflow.com/a/29269359
has answer: http://stackoverflow.com/a/29353430
has body: My website has currently 3 CSS files that are automatically included as a part of the website and I do not have access to the source i.e. index.html of the website but I do have access to the CSS files of my website. I am trying to use my own style to override my websites CSS files and create a new CSS file that would contain all the styling that I would like to overwrite on my website. I have tried using @import url(css4.css) and I have placed that at the top of my last CSS file but that wouldn't overwrite the last CSS file's styling. How can I achieve this?
has comment: http://stackoverflow.com/comment/46624446
upvote count: 24
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46624246

http://stackoverflow.com/q/29077268
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46391665
tagged with: php
answer count: 0
tagged with: tablesorter
upvote count: 1
linked to: http://stackoverflow.com/q/1998449
type: Question
has comment: http://stackoverflow.com/comment/46389176
has comment: http://stackoverflow.com/comment/46389513
has title: Use jQuery plugin tablesorter in Yii view
score: 1
has body: I’m trying to include the jQuery plugin tablesorter in my Yii view for “turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes”. I am aware that CGridView would be a more elegant version to do this in Yii but I am mainly interested in getting the jQuery plugin to work. As of now, the table is not sortable although other jQuery functions (e.g., a pop-up window or a toggle button) work. Any ideas what I am doing wrong? This is my view: <?php Yii::app()->clientScript->registerCoreScript('http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'); Yii::app()->clientScript->registerScript('buttonscript'," $('button').click(function(){ $('p').slideToggle(); }); ",CClientScript::POS_READY); Yii::app()->clientScript->registerScriptFile('/jquery.tablesorter.js'); Yii::app()->clientScript->registerScript('tablescript'," $(document).ready(function() { $('#myTable1').tablesorter(); } ); ",CClientScript::POS_READY); ?> <?php echo " This is a paragraph. "; echo " Toggle between slide up and slide down for a p element "; echo " Last Name First Name Smith John Jones Martha Noble Donna Smith Mickey "; ?> Edit: Must be a path problem. When I hotlink directly to jquery.tablesorter.js, it works fine. Question can be closed.
downvote count: 0
tagged with: yii
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46391600

http://stackoverflow.com/a/29090533
has body: Is this what you want? $("#service-block").hover(function () { var $elem = $(this).find('.title'); console.log("id of element: ", $elem.attr("id")); console.log("height of element: ", $elem.height()); //added due to your variable name });
accepted answer of: http://stackoverflow.com/q/29090356
answers question: http://stackoverflow.com/q/29090356
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29209181
tagged with: google-maps-api-3
answer count: 3
has answer: http://stackoverflow.com/a/31898753
has comment: http://stackoverflow.com/comment/46631391
favorite count: 0
has body: I would like to customize my infoWindow adding "border-radius" and "background-color", but in each similar question that I have searched here, the answer is to use google-maps-utility-library-v3... I know that is a good solution, (infact for other reasons I use that), but I would like to know if is there another way to achieve what I want to do... I tried in this way, with jquery: var infoWindow; //like global variable var centrocircle= new google.maps.LatLng(X,Z); var circleOptions = new google.maps.Circle({ strokeColor: colore, strokeOpacity: 1, strokeWeight: 2, fillColor: colore, fillOpacity: 0.85, map: map, center: centrocircle, info: ' home ', radius: raggio*770 }); google.maps.event.addListener(circleOptions, 'domready', function() { var l = $('#hook').parent().parent().parent().siblings(); for (var i = 0; i < l.length; i++) { if($(l[i]).css('z-index') == 'auto') { $(l[i]).css('border-radius', '16px 16px 16px 16px'); $(l[i]).css('border', '2px solid red'); } } }); google.maps.event.addListener(circleOptions, 'click', function() { infoWindow.setPosition(this.center); infoWindow.setContent(this.info); infoWindow.open(map,this); }) but doesn't work.... I hope can you help me... thanks! EDIT var infoWindow; //like global variable var tooltipHTML = ' '+ ' '+ ' '+ ' NAME CUSTOMER '+ ' '+ ' MORE INFO OF: CUSTOMER '+ ' '+ ' '; And var centrocircle= new google.maps.LatLng(X,Z); var circleOptions = new google.maps.Circle({ strokeColor: colore, strokeOpacity: 1, strokeWeight: 2, fillColor: colore, fillOpacity: 0.85, map: map, center: centrocircle, info: tooltipHTML, radius: raggio*770 }); google.maps.event.addListener(circleOptions, 'click', function() { infoWindow.setPosition(this.center); infoWindow.setContent(this.info); infoWindow.open(map,this); })
has answer: http://stackoverflow.com/a/29224814
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29224814
downvote count: 1
type: Question
tagged with: google-maps
upvote count: 0
possible better answer: http://stackoverflow.com/a/29209436
tagged with: javascript
has title: How to customize infoWindow (but without using google-maps-utility-library-v3)?
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/29209436

http://stackoverflow.com/comment/46638781
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29214445
has text: oh an use the img width attribute for that test instead of css based width.
score: 0

http://stackoverflow.com/q/29141274
tagged with: audio
has comment: http://stackoverflow.com/comment/46506543
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29141484
has comment: http://stackoverflow.com/comment/46506101
tagged with: internet-explorer-8
has title: Audio tag alternatives for IE8
has body: I'm trying to create a button which plays and pauses audio when clicked. This works fine in Google Chrome and newer browsers although I need it to support IE 8 as well. I've tried using &lt;embed&gt; tags and have changed the triggers to fit the embedded audio but it still doesn't play or pause in IE 8? I'd like to use jQuery if possible. HTML &lt;audio id="sound" src="sound.mp3"&gt;&lt;/audio&gt; JavaScript/jQuery $(document).ready(function() { $('.toggle-snd').click(function() { if ($('#sound').prop("paused") == false) { $('#sound').trigger("pause"); $('.toggle-snd').text('Play interview'); $('.toggle-snd').toggleClass('active2'); } else { $('#sound').trigger("play"); $('.toggle-snd').text('Pause interview'); $('.toggle-snd').toggleClass('active2'); } }); });
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46506467
downvote count: 0
has comment: http://stackoverflow.com/comment/46506655
score: 1
tagged with: jquery
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/11953656
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29071528
tagged with: jquery
has comment: http://stackoverflow.com/comment/46504173
score: 0
has title: Add 'Blink' feature in Ember Table
upvote count: 1
tagged with: ember.js
downvote count: 1
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/46495839
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/28747040
type: Question
has body: Here are issues if click on an updating column (to sort) blink feature does not work. if i try to filter, blink feature goes crazy. i am not sure if there are better ways to implement 'Blink'. Because i'm not sure the way i keep 'previousValue' and apply'clearStyles' method are correct. here is the link to previous discussion. How to apply 'Blink' feature in Ember Table? Kindly add suggestions.
tagged with: ember-table
has comment: http://stackoverflow.com/comment/98745691
tagged with: javascript

http://stackoverflow.com/q/29198250
score: 1
has answer: http://stackoverflow.com/a/29198374
type: Question
tagged with: function
possible better answer: http://stackoverflow.com/a/29198370
tagged with: addeventlistener
has body: I am in the process of changing some of my code from onClick to addEventListener because of the various benefits I have read about and for the purpose of separation of concerns. One of the problems I have run into however is that whereas with onClick, I was able to call a function and pass a parameter, I am now finding that if I attempt to pass a parameter when using addEventListener, the function is immediately carried out using the given parameter. &lt;!-- Choose Branch and Open Menu --&gt; &lt;script type="text/javascript"&gt; document.getElementById('BranchOne').addEventListener("click", setBranch("BranchOne")); document.getElementById('BranchOne').addEventListener("click", CategoryMenu); document.getElementById('BranchTwo').addEventListener("click", setBranch("BranchTwo")); document.getElementById('BranchTwo').addEventListener("click", CategoryMenu); document.getElementById('BranchThree').addEventListener("click", setBranch("BranchThree")); document.getElementById('BranchThree').addEventListener("click", CategoryMenu); document.getElementById('BranchFour').addEventListener("click", setBranch("BranchFour")); document.getElementById('BranchFour').addEventListener("click", CategoryMenu); function CategoryMenu() { document.getElementById('CategoryMenu').style.display = "block"; } &lt;/script&gt; I have taken instead to setting the branches by having two separate addEventListeners, one of which carries out the CategoryMenu function and one of which sets the branch in an external JS file, however, I now find that it seems to carry out all of these functions one after another and the branch always ends up being the final one in the series (BranchFour). Originally the Branch was taken as a parameter of CategoryMenu and then set in the external JS file using the CategoryMenu method. So to recap on on my main questions: -Why can I not seem to send a parameter inside of the addEventListener e.g. document.getElementById('BranchFour').addEventListener("click", CategoryMenu(…
downvote count: 0
tagged with: javascript
has title: JavaScript .addEventListener
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/29198346
favorite count: 0
has answer: http://stackoverflow.com/a/29198370
accepted answer: http://stackoverflow.com/a/29198374
type: AnsweredQuestion
tagged with: onclick

http://stackoverflow.com/comment/46454565
has text: @Isaiah - No, that's not what I said at all. `var x = cheese();` executes `cheese()` and what `cheese()` returns is another function that has not yet been run. You have to execute that returned function itself if you want it to run. That's what `x()` does. It executes the function that `cheese()` returned.
comment on: http://stackoverflow.com/a/29112569
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46536216
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29157298
has text: @BenAston I originally downvoted because it just seemed like something you could test and **know** that the comment doesn't work and shouldn't be used. It reads like a question where someone just asks things for the sake of asking and doesn't really have a reason behind what they're asking. And then, I saw Thilo's link, was very surprised, and upvoted your question and the answer. If you could edit your question, incorporating your response to j08691 I think a lot of the downvotes would go away, or at least stop happening.
type: Comment

http://stackoverflow.com/q/29098818
has comment: http://stackoverflow.com/comment/47604419
tagged with: angularjs
has body: I am implementing JWT authentication in an angular/laravel application and I have a problem with token refresh. Here the relevant code: PHP: the laravel-jwt listener that 'listen' for tymon.jwt.expired event: /** * Fired when the token has expired * @param \Exception $e * @return \Illuminate\Http\JsonResponse */ public function expired($e) { $token = \JWTAuth::parseToken(); Config::package('tymon/jwt-auth', 'jwt'); $ttl = Config::get('jwt::refresh_ttl'); $iat = Carbon::createFromTimestamp($token-&gt;getPayload()-&gt;get('iat')); $now = Carbon::now(); // if renew ttl is expired too, return 401, otherwise let // the application generate a new token to frontend if ($iat-&gt;diffInMinutes($now) &gt;= $ttl) { unset($iat, $now, $ttl); return response_failure( Lang::get('errors.api.auth.expired'), Config::get('status.error.unauthorized') ); } unset($iat, $now, $ttl); } PHP: the 'after' filter: /* |-------------------------------------------------------------------------- | JWT-Auth token-refresh Filter |-------------------------------------------------------------------------- | | The RefreshToken filter update the response headers by returning an | updated authentication token. | */ Route::filter('RefreshToken', function($route, $request, $response) { $token = JWTAuth::parseToken(); try { $token-&gt;toUser(); } catch (TokenExpiredException $e) { Config::package('tymon/jwt-auth', 'jwt'); $ttl = Config::get('jwt::refresh_ttl'); $iat = \Carbon\Carbon::createFromTimestamp($token-&gt;getPayload()-&gt;get('iat')); $now = \Carbon\Carbon::now(); if ($iat-&gt;diffInMinutes($now) &lt; $ttl) { $response-&gt;headers-&gt;set('Authorization', 'Bearer ' . $token-&gt;refresh()); } } }); PHP: The authenticated routes filters: Route::group(['before' =&gt; 'jwt-auth', 'after' =&gt; 'RefreshToken'], function () { ... }); JS: The interceptor that updates the localstorage 'use strict'; angular.module('App') .factory('ResponseInterceptor', ['SessionService', 'jwtHelper', '$location', '$q', func…
tagged with: php
has title: laravel / angularjs JWT token refresh
accepted answer: http://stackoverflow.com/a/30731755
has comment: http://stackoverflow.com/comment/47615242
possible better answer: http://stackoverflow.com/a/30726995
has answer: http://stackoverflow.com/a/30726995
type: Question
type: AnsweredQuestion
tagged with: jwt
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/39190994
answer count: 3
score: 5
tagged with: laravel-4
downvote count: 0
has answer: http://stackoverflow.com/a/30731755
has comment: http://stackoverflow.com/comment/47464872
favorite count: 0

http://stackoverflow.com/comment/46544079
score: 0
has text: btw, I am getting strange issue. sort <tag-file> shows good output on console. however, sort <tag-file> -o <sorted-tag-file> generates empty sorted-tag-file. Have never seen such an issue with 'sort' cmd on linux.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29161029

http://stackoverflow.com/comment/46438349
has text: You can't use `console.log` after a `return` statement.
comment on: http://stackoverflow.com/q/29104144
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46491301
has text: you welcome! My bad about "always" since "complete" tend to be deprecated An alternative construct to the complete callback option, the .always() method replaces the deprecated .complete() method.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29132384

http://stackoverflow.com/q/29203445
type: Question
has answer: http://stackoverflow.com/a/29203558
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
favorite count: 0
has title: Passing data from a static table to a database
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29203528
has body: I am a Java programmer but my boss doesn't care so he assigned me this project. So I'm seeking out help to the PHP or Javascript developers. We have data coming in from domain servers that test everything, wiring, heat, etc. All of this is scripted through Regina Rexx to a static table. I want to collect that data without rewriting all the Rexx programming. Since it's doing it's job, I thought the easy way to do this would be to grab the data from this file which outputs to an html file. I cannot send this link but it comes out just like an ordinary html file with a table. I want to put this info into a database mysql, PHP, on an Apache server. So specificly: Static table to a mysql database. Can someone point me in the direction or give me a pointer on this transition. My department are all hardware engineers, and I'm the closest thing to a PHP programmer but I haven't touched a database in 10 years. Yet it's like riding a bike.
tagged with: mysql
has comment: http://stackoverflow.com/comment/46619959
downvote count: 1

http://stackoverflow.com/q/29108966
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/29110905
has title: Conditionally create ajax url parameter to use with jQuery Validate
tagged with: ajax
has comment: http://stackoverflow.com/comment/46448104
has comment: http://stackoverflow.com/comment/46447657
favorite count: 0
has answer: http://stackoverflow.com/a/29110905
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46447636
has body: I have an issue with my jquery validate script. Essentially, what I need is: based on what is in the last portion of a string (isAdd), when the user clicks the send button, the script will choose between the if or else statement and send an ajax request to validate an input field. The server will send an true or false flag. If true, the form will submit, if false, the form will not be submitted. I think my code shows it better: // Waiting for the btnSave to be clicked $(document).on('click', '.btnSave', function (event) { // Here I get the action value in the form tag, split it in chunks and // get the last element in the array, assigned it to the isAdd variable var isAdd = $('#customerAddressForm').prop("action").split("/").pop(); // If the variable value is the same as "Shipping", it means that it's // the edit button that was clicked if (isAdd == "Shipping") { // I add the following rules to the input with id "inputAddressName" $('input[id="inputAddressName"]').rules("add", { required: true, noSpace: true, // Here I do the Ajax call, the value in the customerAddressId // is appended to the url. Example: // https://localhost:8443/mysite/useraccount/isExistingAddressName?addressName=Bill1&amp;customerAddressId=1232. // This get a true/false flag from the server remote: { url: "https://localhost:8443/mysite/usersite/addresses/isExistingAddressName", contentType: "application/json; charset=utf-8", data: { customerAddressId: function () { return $("#customerAddressForm").prop("action").split("/").pop(); } } } }); // If the variable value is not the same as "Shipping", it means that // it's the add button that was clicked } else { $('input[id="inputAddressName"]').rules("add", { required: true, noSpace: true, // Here I do the Ajax call for the add, a hardcoded value (-10) //for the customerAddressId is appended to the url. Example: // https://localhost:8443/mysite/useraccount/isExistingAddressName?addressName=Bill1&amp;customerAddressId=-10. //This get a true/false fla…
tagged with: jquery-validate
downvote count: 1
type: Question
upvote count: 0
answer count: 1

http://stackoverflow.com/comment/46434719
type: QuestionComment
has text: zzzzBov is right, you have to put the second ajax post inside the callback of geocode. Async call are executed after the main flow of your code. EDIT: Callback results are invoked after the main flow. EDIT 2: the document.ready is not the problem, you get the lati and longi variables after the request to geocode is completed, meanwhile your code keeps going and you evaluate variables before they are setted
score: 0
comment on: http://stackoverflow.com/q/29102260
type: Comment

http://stackoverflow.com/q/29138328
has comment: http://stackoverflow.com/comment/46501139
has answer: http://stackoverflow.com/a/29138446
type: Question
score: 0
answer count: 2
has body: I want when my webpage is loading it will be auto fullscreen without clicking on the body.You can take a look at my website that I want to make a change: TV. When you click it anywhere, it will be fullscreen. But I want to make it automatically fullscreen without click anything. I was wondering if I could use auto click to change onClick on the body? Because using onload nothing happened. Can you help me? I only use &lt;body onclick="toggleFullScreen()"&gt; in my html document. And this is the javascript of toggleFullScreen: function errorHandler() { alert('mozfullscreenerror'); } document.documentElement.addEventListener('mozfullscreenerror', errorHandler, false); // toggle full screen function toggleFullScreen() { if (!document.fullscreenElement &amp;&amp; // alternative standard method !document.mozFullScreenElement &amp;&amp; !document.webkitFullscreenElement) { // current working methods if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.mozRequestFullScreen) { document.documentElement.mozRequestFullScreen(); } else if (document.documentElement.webkitRequestFullscreen) { document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } } else { if (document.cancelFullScreen) { document.cancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } } }
has answer: http://stackoverflow.com/a/29138407
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to make auto click?
linked to: http://stackoverflow.com/q/11567993
type: UnansweredQuestion
upvote count: 1
tagged with: php
downvote count: 1
tagged with: fullscreen

http://stackoverflow.com/comment/46485190
score: 0
type: Comment
has text: Actually event callback anyway has access to `e.data`, there is a closure anyway. So one more var is not needed. I would say, that the issue here is that event is bound inside other event..
type: AnswerComment
comment on: http://stackoverflow.com/a/29129662

http://stackoverflow.com/comment/46509534
type: Comment
has text: what kind objects are the text boxes? or the app is a `webView` and you connect to url? By other side... even you app is low security, storing user/pass in plain text is **TOTALLY DISCOURAGED!**
comment on: http://stackoverflow.com/a/29142598
score: 0
type: AnswerComment

http://stackoverflow.com/q/29215488
has answer: http://stackoverflow.com/a/29267106
type: Question
tagged with: javascript
has title: Where to bind API and templates routes in webapp?
score: 0
answer count: 1
tagged with: backbone.js
tagged with: angularjs
type: UnansweredQuestion
tagged with: django
has body: So, I come forward with this question as a Django developer, since in Django we have the very useful template tags (and functions) reverse and static. I have been trying to find similar approaches for frameworks like Angular or Backbone, with no luck. We end up having hard references that I would like to avoid. I've been thinking about keeping a file with all the routes as JS constants but it feels like a rookie approach. What is a reasonable and broad take on this problem?

http://stackoverflow.com/comment/46402327
comment on: http://stackoverflow.com/q/29084657
has text: Could you give a link or write sort example, please?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29107332
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/46446023
answers question: http://stackoverflow.com/q/29106953
has comment: http://stackoverflow.com/comment/46446255
has comment: http://stackoverflow.com/comment/46447348
has body: If your doSomeReallyLongAndBoringFunction is really running asynchronously, then it doesn't make sense to run it the way you have setup. Edit - Here's a simple explanation of the way your code looks to be running vs a refactored version. It's been simplified , so you'll need to fill in the relevant sections with your actual implementation. var Promise = require('bluebird'); function myAsync() { setTimeout(function(){ return 'done sleeping'; }, 2000); }; //The way your code is running Promise.resolve() .then(function(){ return 'hello'; }) .then(function(done){ console.log(done); return myAsync(); //your error is here }) .then(function(done){ console.log(done); }); //refactored Promise.resolve() .then(function(){ return 'hello'; }) .then(function(done){ console.log(done); return new Promise(function(resolve) { setTimeout(function(){ resolve('done sleeping'); }, 2000); }); }) .then(function(done){ console.log(done); });
accepted answer of: http://stackoverflow.com/q/29106953
has comment: http://stackoverflow.com/comment/46446369
has comment: http://stackoverflow.com/comment/46444976
has comment: http://stackoverflow.com/comment/46446648

http://stackoverflow.com/q/29146300
has comment: http://stackoverflow.com/comment/46515141
answer count: 2
has title: parseInt() unexpectedly equating to NaN
tagged with: validation
has body: I have a textbox that may be blank or numeric (non-numeric characters are validated at a prior juncture). When I use intParse(), my integer outputs as NaN. My Code: HTML: Input number or leave blank to test jQuery: $('button').click(function() { //Check normal value... var $textboxvalue = $('#textbox').val(); alert("#textbox=" + $textboxvalue); //If no value, set as 0 to avoid Nan for intParse... var $textbox; if ($('#textbox').val()) { $textbox = $('#textbox').val(); } else{ $textbox = 0; } alert("$textbox=" + $textbox); //Parse integer... var $textboxParsed = parseInt($($textbox).val(), 10); alert("$textboxParsed=" + $textboxParsed); //Subsequent action... var $textboxPlus5 = $textboxParsed + 5; alert("$textboxPlus5=" + $textboxPlus5); }); JSFIDDLE: https://jsfiddle.net/f4n6rz1p/1/ Why is intParse() producing NaN and am I correct to conditionally change blank inputs to zero to avoid Nan for intParse()?
possible better answer: http://stackoverflow.com/a/29146560
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29146560
has comment: http://stackoverflow.com/comment/46515901
accepted answer: http://stackoverflow.com/a/29146367
has comment: http://stackoverflow.com/comment/46515685
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46515753
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46515167
has comment: http://stackoverflow.com/comment/46515414
has comment: http://stackoverflow.com/comment/46515352
score: 1
has comment: http://stackoverflow.com/comment/46515666
has comment: http://stackoverflow.com/comment/46515775
has answer: http://stackoverflow.com/a/29146367
type: Question

http://stackoverflow.com/q/29186379
score: 1
type: Question
has title: Firefox for Android Extension: How to trigger event on every page load?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29192168
tagged with: firefox-addon-restartless
tagged with: firefox-addon
tagged with: android
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I am trying to write a Firefox extension for Android that will fire an event every time the web page changes. It is monitoring which URLs are being loaded (all URLs) and the contents of the page loaded (via DOM inspection). My problem is that the window load event using the code below only gets loaded when a tab is opened, if you navigate away from the page, no events get fired. How do I hook into every page load event for any URL? This code is the entire contents of bootstrap.js: Components.utils.import("resource://gre/modules/Services.jsm"); var windowListener = { onOpenWindow: function(aWindow) { console.log('vipro.openWindow'); let domWindow = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowInternal || Components.interfaces.nsIDOMWindow); domWindow.addEventListener("UIReady", function onLoad() { domWindow.removeEventListener("UIReady", onLoad, false); console.log('vipro.openWindow.loaded'); // ** ONLY EVER FIRED ONCE ** // try { var browser = Services.wm.getMostRecentWindow("navigator:browser"); } catch(e) { console.log('vipro.openWindow.error.' + e.toString()); } console.log('vipro.openWindow.loaded.DONE'); }); console.log('vipro.openWindow.DONE'); }, onCloseWindow: function(aWindow) {}, onWindowTitleChange: function(aWindow, aTitle) {}, }; function startup(data, reason) { console.log('vipro.startup'); try { let wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); wm.addListener(windowListener); } catch(e) { console.log('vipro.startup.error.' + e.toString()); } console.log('vipro.startup.DONE'); } function shutdown() { console.log('vipro.shutdown'); } function install(aData, aReason) {} function uninstall(aData, aReason) {} I'm not fussed that the code above only works for new tabs and not existing (I've intentionally kept it simple), it's just the fact that when I navigate away from the initial new tab page, I don't get the oppo…
upvote count: 1

http://stackoverflow.com/q/29077888
answer count: 2
has answer: http://stackoverflow.com/a/29077924
possible better answer: http://stackoverflow.com/a/29078832
has answer: http://stackoverflow.com/a/29078832
has comment: http://stackoverflow.com/comment/46389118
accepted answer: http://stackoverflow.com/a/29077924
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46389768
tagged with: javascript
has comment: http://stackoverflow.com/comment/46393363
has body: Background: I'm a systems guy who switched to Front End development. Just dorking around with Angular. Got creative with data binding and now I'm trying to understand this behavior: Name {{ user.name }} Name {{ l }} http://jsfiddle.net/Lpm74dd8/ I would expect this to take my input from either box, mirror the text between the input boxes, and repeat each letter on its own line at the bottom. If I type "test" in one of the inputs, ng-repeat will break when a letter repeats. Typing the alphabet sequentially works as I expect. Why does ng-repeat break when input letters are duplicated? I have no practical use for this, I was just experimenting with Angular for fun and came across this and don't understand it.
tagged with: angularjs
type: Question
has title: AngularJS Data Binding Breaks ngRepeat + Strange Behavior
has comment: http://stackoverflow.com/comment/46389796
score: 0

http://stackoverflow.com/a/29114885
upvote count: 10
has comment: http://stackoverflow.com/comment/46664489
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29114485
has comment: http://stackoverflow.com/comment/46661157
has body: The Three.js editor. Converter. Blender exporter. Clara.io. Various other converters and exporters
has comment: http://stackoverflow.com/comment/46661437
type: Answer
has comment: http://stackoverflow.com/comment/46458763
accepted answer of: http://stackoverflow.com/q/29114485
score: 10

http://stackoverflow.com/a/29209859
type: Answer
answers question: http://stackoverflow.com/q/29209690
score: 0
has body: Have you tried email-links? Contact us

http://stackoverflow.com/comment/46468957
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29119093
has text: please see my question "Get the Variable name inside the function in javascript"

http://stackoverflow.com/comment/46406780
comment on: http://stackoverflow.com/a/29086926
score: 0
type: AnswerComment
has text: thanks for this tip, but it's not exactly what I want. The content in these div's changes from time to time, so I would prefer not to set a specific height at all.
type: Comment

http://stackoverflow.com/q/29103936
upvote count: 3
tagged with: post
type: Question
has comment: http://stackoverflow.com/comment/46439249
answer count: 2
has body: I have a text field on my website that contains an URL, i.e. "http://www.google.com". When the user changes that field, jQuery sends the change via POST to a PHP script that saves it to the database. The problem is that when jQuery tries to send the value of the changed field (i.e. "http://www.google.com"), a "403 Forbidden" error appears. It seems that "http://" is the problematic part. "ttp://" gets through and so does "http:/". Does the browser return the error for security reasons? Is there a way around it? EDIT: The event of changing the text field triggers this: $.ajax({ method: "POST", url: "updateproject.php", data: { "id": id, "field": this.name, "value": this.value } }); EDIT 2: Here's an image of the error. Should I ask my hosting provider about this?
has title: POST-ing an URL via AJAX (jQuery)
has answer: http://stackoverflow.com/a/29104909
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/29104824
has comment: http://stackoverflow.com/comment/46448145
favorite count: 0
has comment: http://stackoverflow.com/comment/46437889
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46438702
tagged with: php
has comment: http://stackoverflow.com/comment/46439776
score: 3

http://stackoverflow.com/comment/46556822
comment on: http://stackoverflow.com/q/29169112
type: QuestionComment
has text: Can we see the first couple lines of server.js?
type: Comment
score: 0

http://stackoverflow.com/q/29155008
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29155236
tagged with: click
has body: When i click id=dodaj_godzine_button i want to add current time to id=formularz_wpis_tresc (as string) I made this but it's doesn't work. $("#dodaj_godzine_button").click(function(){ var data = new Date(); var godzina = data.getHours(); var minuty = data.getMinutes(); var czas = godziny; czas += ((minuty &lt; 10) ? ":0" : ":"); $("#formularz_wpis_tresc").html("Godzina: " + czas + "\n"); }); Where i've made mistake?
has answer: http://stackoverflow.com/a/29155138
has comment: http://stackoverflow.com/comment/46530995
answer count: 4
has comment: http://stackoverflow.com/comment/46530980
favorite count: 0
possible better answer: http://stackoverflow.com/a/29155103
tagged with: time
has answer: http://stackoverflow.com/a/29155270
accepted answer: http://stackoverflow.com/a/29155270
upvote count: 1
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46530889
has answer: http://stackoverflow.com/a/29155103
score: 1
type: Question
has title: Add time to textarea after click button

http://stackoverflow.com/comment/46497790
type: QuestionComment
has text: If something depends on the result of an async operation, then everything has to become async, with nested callbacks, or using promises.
comment on: http://stackoverflow.com/q/29136385
score: 0
type: Comment

http://stackoverflow.com/comment/48071993
comment on: http://stackoverflow.com/q/29160692
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [Show datalist labels but submit the actual value](http://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value)

http://stackoverflow.com/a/29201927
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46616353
has comment: http://stackoverflow.com/comment/46616026
has body: success: function(data) { var body = data; console.log(body.length); //body/data is a string var text = body.split(' '); text.chunk = 0; text.chunkSize = 15; var increment = function(array,next) { if(next) { array.chunk = Math.min(array.chunk + array.chunkSize, array.length); } else { array.chunk = Math.max(array.chunk - array.chunkSize, 0); } var slice = array.slice( array.chunk, Math.min(array.chunk + array.chunkSize, array.length)); var chunk = slice.join(" "); } $("#prev").click(increment(text,false)); $("#button").click(increment(text, true)); } Is this what you need? Fastly coded, and without testing so use with caution.
answers question: http://stackoverflow.com/q/29201759
has comment: http://stackoverflow.com/comment/46616620
accepted answer of: http://stackoverflow.com/q/29201759
score: 0

http://stackoverflow.com/q/29192086
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29192145
score: 0
has answer: http://stackoverflow.com/a/29192439
possible better answer: http://stackoverflow.com/a/29192145
linked to: http://stackoverflow.com/q/29182587
has title: if condition based on a string in for loop in jquery
accepted answer: http://stackoverflow.com/a/29192439
type: AnsweredQuestion
tagged with: if-statement
type: Question
answer count: 2
tagged with: for-loop
has body: I will explain my question in the code itself. Please see the below code var monthNames = ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]; var ctdate = (new Date()).getMonth() + 1;// getting current month var str=new Date().getFullYear()+''; str= str.match(/\d{2}$/);//current year is 15(as this year is 2015) var strprev= str-1;//previous year is 14 var dynmonths = new Array(); dynmonths = monthNames.slice(ctdate).concat(monthNames.slice(0, ctdate)); //here the output comes for last 12 months starting from currentmonth-12 (i.e APR in this case) to current month (i.e MAR) //dynmonths = ["APR","MAY","JUN","JUL","AUG","SEP","AUG","SEP","OCT","NOV","DEC","JAN","FEB","MAR"]; //I am rotating dynmonths in a for loop to get full dates i.e between (01-APR-14 to 01-MAR-15) for (var i = 0, length = dynmonths.length; i &lt; length; i++) { var month = '01-' + dynmonths[i] + '-' + strcurrent; } But the problem is that month is taking 14for all the months. Which is wrong. After 01-DEC-14 the next month must be 01-JAN-15, 01-FEB-15 and so on. How to check DEC in for loop and after DEC year must change to year+1 Thanks in advance

http://stackoverflow.com/comment/46503304
has text: I have updated my code. but still i m unable to get popup alert on click
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29139642

http://stackoverflow.com/comment/46448190
type: AnswerComment
has text: I'm not sure I'm following the cheeky answer. The contents of a String object are an array of characters, but so are the contents of a string primitive, aren't they? So, why, in the object's case, should the console tediously show us every character separately? Also, I don't want to munge up the global String prototype. If Javascript allowed me to subclass String in a decent way, a lot of my headaches would disappear. In the meantime, I'm loading up individual String objects with methods and properties, which works, but is kind of ugly.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29108829

http://stackoverflow.com/comment/46523964
has text: @adeneo so which one is best suited if I have to reload the array 2 in 2mins?
comment on: http://stackoverflow.com/q/29150987
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29199358
answer count: 1
has answer: http://stackoverflow.com/a/29199533
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has title: Change the selected list element in a navigation list using plain JavaScript
type: Question
tagged with: javascript
has body: I have trouble in writing a script to change the appearance of the clicked tab in a webpage navigation list. In other words, I want to make the clicked tab appear as the selected (in code). I tried to do that by changing its id to selected_link and restoring the id of the previously selected tab. EDIT: Following jamespaned's suggestion, I replaced element IDs with classes. My tabs appear like in this picture: So, when I click to "bio", I want it to appear as "home" and "home" to appear as the other tabs. As I'm a newbie in JavaScript coding, I didn't managed to accomplish that. Here is what I've done: The HTML code for the (inline) navigation list: home bio publications software contact its respective CSS: nav ul { list-style:none; padding:0; margin:0; } nav li { background-color:black; display:inline; border:solid; border-width:1px 1px 0 1px; margin:0 5px 0 0; } nav li a { color:white; padding:0 10px; } .selected { background-color:white; padding-bottom: 1px; } .selected_link{ color:blue; } and the JavaScript which I've designed to accomplish this task, but it didn't worked: function changeSelected(clickedId) { var ulist = document.getElementById("navlist"); var elems = ulist.getElementsByTagName("class"); for (var i = 0; i < elems.length - 1; i++) { var sel = elems[i].getAttribute("class"); if (sel == selected) { var selli = elems[i]; break; } } selli.setAttribute("class", ""); selli.lastElementChild.setAttribute("class", ""); var clicked = document.getElementById(clickedId); clicked.setAttribute("class", "selected_link"); clicked.parentNode.setAttribute("class", "selected"); } How could I do that using only plain JavaScript?
score: 0

http://stackoverflow.com/a/32323249
score: -3
type: Answer
answers question: http://stackoverflow.com/q/29165155
has comment: http://stackoverflow.com/comment/91770495
downvote count: 7
has body: Of course you can. For example, if you want to write a simple factorial function in C++, you could do something like #include &lt;node.h&gt; using namespace v8; int factorial(int n) { if (n == 0) return 1; else return n * factorial(n - 1); } void Factorial(const FunctionCallbackInfo&lt;Value&gt;&amp; args) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); if (args.Length() != 2) { isolate-&gt;ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong number of arguments"))); } else { if (!(args[0]-&gt;IsNumber() &amp;&amp; args[1]-&gt;IsFunction())) { isolate-&gt;ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong arguments type"))); } else { int result = factorial(args[0]-&gt;Int32Value()); Local&lt;Function&gt; callbackFunction = Local&lt;Function&gt;::Cast(args[1]); const unsigned argc = 1; Local&lt;Value&gt; argv[argc] = { Number::New(isolate, result) }; callbackFunction-&gt;Call(isolate-&gt;GetCurrentContext()-&gt;Global(), argc, argv); } } } void Init(Handle&lt;Object&gt; exports) { NODE_SET_METHOD(exports, "factorial", Factorial); } NODE_MODULE(Factorial, Init) And in your JavaScript file, call it like this var factorialAddon = require('./addons/Factorial'); factorialAddon.factorial(5, function (result) { console.log(result); });
upvote count: 4

http://stackoverflow.com/comment/46387169
score: 1
comment on: http://stackoverflow.com/q/29076806
has text: Then that is your actual problem which you need to post after producing a sort of [mcve](http://stackoverflow.com/help/mcve)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29106276
answer count: 1
tagged with: php
accepted answer: http://stackoverflow.com/a/29106400
tagged with: laravel
has title: jquery array not getting all the values as well as not sent to laravel controller
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29106400
type: Question
has body: I made two custom jquery function that gets an array of data when checkbox is checked. I tried to assign the array as the value of a input field (type=hidden) and sent it to laravel controller. The problem is the the array is not populated properly when i checked several fields. Its only take one value and sent it to the controller. I need to take all the checked values as array and sent it to laravel controller. Please help me in this regard. I pasted my stuffs below : jquery: &lt;script&gt; var allvals = [] ; function categoryDelete(){ $('.categorySelect:checked').each(function(){ allvals = $(this).val(); }) return allvals; } function subcategoryDelete(){ $('.subcategorySelect:checked').each(function(){ allvals = $(this).val(); }) return allvals; } jQuery(document).ready(function($){ var deleteArray = [] ; $('.categorySelect').click(function(){ deleteArray = categoryDelete(); $('#deleteArray').attr('value',deleteArray); $('#deleteValue').attr('value',0); }) $('.subcategorySelect').click(function(){ deleteArray = subcategoryDelete(); $('#deleteArray').attr('value',deleteArray); $('#deleteValue').attr('value',1); }) }) &lt;/script&gt; html form: {{ Form::open(array('url' =&gt; 'manage-category/delete')) }} &lt;input type="hidden" id='deleteArray' name='deleteArray[]'&gt; &lt;input type="hidden" id='deleteValue' name='deleteValue[]'&gt; &lt;button id='deleteBtn' class="btn btn-sm red pull-right"&gt; Delete &lt;i class="fa fa-times"&gt;&lt;/i&gt; &lt;/button&gt; {{ Form::close() }} routes: Route::post('/manage-category/delete','CategoryController@deleteCategory'); controller: public function deleteCategory() { $deleteArray = Input::get('deleteArray'); $deleteValue = Input::get('deleteValue'); var_dump($deleteArray); die(); } debug result: array(1) { [0]=&gt; string(1) "2" }
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/54097524
score: 0
type: AnswerComment
has text: @prgbenz the data series is an array of points on the chart. You can simply iterate through each point to extract the information you need.
type: Comment
comment on: http://stackoverflow.com/a/29147699

http://stackoverflow.com/comment/46602481
has text: It can't be done without a function, because Javascript will block until the script executes and the page will not get updated untill then. setTimeout or setInterval is the way to go, and they both need a function as the first argument. Another possible way is to reload the script, but I won't recomment doing it like that. If you want a delay in your while loop, it is possible but the page will not get updated. For that just use the Date object and compare to a previous date plus the millisecs delay.
comment on: http://stackoverflow.com/q/29194460
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29077046
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46388676
type: Question
score: 0
has title: Overriding element.style
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29077167
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29077167
tagged with: css
has body: I am trying to make a responsive web page eg where the display changes with the screen size. I have the following HTML: Contact Us Information Venue Details Registration & Payment Agenda Home and the following in responsive.css: .navigation { width:100%; background-color:#3171B7; border-bottom:1px solid #ffffff; margin:0; text-transform:uppercase; font-size:16px; height:40%; padding-top:10px; display:none; } and the following in style.css: .navigation { float:right; margin:30px 0px 1px 0px; height:25px; width:100px; display:block; } .navigation a { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #FFFFFF; text-decoration: none; display:block; padding:0 5px; height:30px; } and the following JavaScript: var oNavChecker = 0; function fnResponsiveMenu() { if(oNavChecker == 0 ) { var oNav1 = document.getElementById("navMenu1"); oNav1.setAttribute('style', 'display:inline'); var oNav2 = document.getElementById("navMenu2"); oNav2.setAttribute('style', 'display:inline'); var oNav3 = document.getElementById("navMenu3"); oNav3.setAttribute('style', 'display:inline'); var oNav4 = document.getElementById("navMenu4"); oNav4.setAttribute('style', 'display:inline'); var oNav5 = document.getElementById("navMenu5"); oNav5.setAttribute('style', 'display:inline'); var oNav6 = document.getElementById("navMenu6"); oNav6.setAttribute('style', 'display:inline'); oNavChecker = 1; return; } if(oNavChecker == 1 ) { var oNav1 = document.getElementById("navMenu1"); oNav1.setAttribute('style', 'display:none'); var oNav2 = document.getElementById("navMenu2"); oNav2.setAttribute('style', 'display:none'); var oNav3 = document.getElementById("navMenu3"); oNav3.setAttribute('style', 'display:none'); var oNav4 = document.getElementById("navMenu4"); oNav4.setAttribute('style', 'display:none'); var oNav5 = document.getElementById("navMenu5"); oNav5.setAttribute('style', 'display:none'); var oNav6 = document.getElementById("navMenu6"); oNav6.setAttribute('style', 'display:none'); oNavC…
has comment: http://stackoverflow.com/comment/46387780
linked to: http://stackoverflow.com/q/14383668

http://stackoverflow.com/comment/46578000
type: AnswerComment
has text: Ask away! Then we'll see if I could answer.
comment on: http://stackoverflow.com/a/29180500
score: 0
type: Comment

http://stackoverflow.com/a/29192904
has body: Try Using .htaccess file Header add Access-Control-Allow-Origin "*" Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" CORS guide is here which lists all the possible ways to solve the problem regarding CORS.
answers question: http://stackoverflow.com/q/29192837
score: 0
type: Answer

http://stackoverflow.com/a/29177314
downvote count: 0
has body: You can use the normal HTML window functions. window.location.href = 'http://example.com'; Just be sure to include node-remote: 'http://example.com' in your package.json if you plan to use the default nodewebkit functionality when that page is loaded.
type: Answer
has comment: http://stackoverflow.com/comment/46596282
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29174575

http://stackoverflow.com/comment/46540690
score: 1
type: AnswerComment
has text: 1. Your function must return something 2. `array` is identical to `hashmap` - you simply assigned it.
type: Comment
comment on: http://stackoverflow.com/a/29160478

acrobat
type: Tag
tags question: http://stackoverflow.com/q/29120036
tags question: http://stackoverflow.com/q/29194025
tag name: acrobat
tags question: http://stackoverflow.com/q/29117314

http://stackoverflow.com/comment/46639068
type: QuestionComment
comment on: http://stackoverflow.com/q/29214004
has text: @Ondkloss can you guide me to use `linkedTo` in my example ?
score: 0
type: Comment

preventdefault
tags question: http://stackoverflow.com/q/29155123
tag name: preventdefault
type: Tag
tags question: http://stackoverflow.com/q/29079539
tags question: http://stackoverflow.com/q/29215742

http://stackoverflow.com/comment/111956411
has text: Sorry guys, it works now: `document.querySelector("template").innerHTML.interpolate(viewerData);`
type: Comment
score: 2
comment on: http://stackoverflow.com/a/41015840
type: AnswerComment

http://stackoverflow.com/a/29134742
downvote count: 0
has body: You're calling field.value when you've assigned value to field. var field = document.forms["garysForm"]["adultBox"].value; if (isNaN(field.value)) { Try this instead: var field = document.forms["garysForm"]["adultBox"]; if (isNaN(field.value)) {
type: Answer
has comment: http://stackoverflow.com/comment/46494920
upvote count: 1
has comment: http://stackoverflow.com/comment/46495077
answers question: http://stackoverflow.com/q/29134656
score: 1

autocomplete
tags question: http://stackoverflow.com/q/29148286
tags question: http://stackoverflow.com/q/29064809
tags question: http://stackoverflow.com/q/29185209
tags question: http://stackoverflow.com/q/29133150
tags question: http://stackoverflow.com/q/29163125
tags question: http://stackoverflow.com/q/29165399
type: Tag
tags question: http://stackoverflow.com/q/29147752
tags question: http://stackoverflow.com/q/29120270
tag name: autocomplete
tags question: http://stackoverflow.com/q/29066045
tags question: http://stackoverflow.com/q/29122009
tags question: http://stackoverflow.com/q/29096060

http://stackoverflow.com/q/29106857
has comment: http://stackoverflow.com/comment/46443518
has comment: http://stackoverflow.com/comment/46443736
type: Question
answer count: 2
duplicate of: http://stackoverflow.com/q/5187530
has comment: http://stackoverflow.com/comment/46443783
has comment: http://stackoverflow.com/comment/46443809
has title: Create array names dynamically based on string values in Array Javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/46444024
has comment: http://stackoverflow.com/comment/46444005
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29106915
has comment: http://stackoverflow.com/comment/46443855
has answer: http://stackoverflow.com/a/29107099
has comment: http://stackoverflow.com/comment/46443499
accepted answer: http://stackoverflow.com/a/29107099
favorite count: 0
has comment: http://stackoverflow.com/comment/46444130
has answer: http://stackoverflow.com/a/29106915
has body: var sub=["Maths","Chemistry","Physics"]; for(var i=0;i&lt;sub.length;i++) { var sub[i]=[]; // this line has error } I want to create and get result as below: Maths[],Chemistry[],Physics[] If it is not possible to get in this way is there any alternate in Javascript to achieve the same
has comment: http://stackoverflow.com/comment/46444100
downvote count: 3
linked to: http://stackoverflow.com/q/5187530
has comment: http://stackoverflow.com/comment/46443827
has comment: http://stackoverflow.com/comment/46443536
has comment: http://stackoverflow.com/comment/46443938
has comment: http://stackoverflow.com/comment/46444009
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46443765
has comment: http://stackoverflow.com/comment/46443609
score: -2

http://stackoverflow.com/q/29183737
has comment: http://stackoverflow.com/comment/46583776
downvote count: 0
tagged with: jquery
has body: Well, I spent hours on this problem and scanned the whole stackoverflow, but still do not know what to do. But what really gets me nuts is that such a trivial and the simplest in the world thing is not working. So, what I have now is a form with inputs and a button: {% csrf_token %} ENTER And I have this code which is supposed to send the form: $('#btn').one("click",function(){ // prevent from multiple submits $('#frm').validate({ // validate the form before submission ...general stuff: rules, messages, etc submitHandler:function(form){ $('#frm').submit(function(e){ //submitted on the second click. why??? ...prepare parameters for ajax call $.ajax({ type:'POST', ...general stuff }); e.preventDefault(); }) } }); }); The problem is, when a user clicks on submit button for the first time, then the form is not submitted, if, however, he or she clicks it for the second time, then it is submitted ok. I can't understand the logic behind such behaviour implemented in jquery. Besides, I should say, that I have tried many other tricks, like: form.submit(... $('#frm')[0].submit(... But they work not as expected, as if there is no callback function - I'm redirected to the url, but do not stay on the same page - just what I expect from e.preventDefault. I guess there is some sacred method or magic properties in jquery that I should use to make it work (like method one which prevents terrible multiple submits). But at this moment I do not know them. EDIT I also tried this trick: jQuery('#frm').submit(... but it works exactly like the first method - $('#frm').submit(... EDIT I found the third method which works like the previous one: $('form').submit(... To sum up, I have three different methods, but all of them work only when a user clicks on the button for the second time. And I have two methods that work in a standard manner and do not make it possible to use a callback function.
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/29184136
has comment: http://stackoverflow.com/comment/46583788
has answer: http://stackoverflow.com/a/29184136
has title: Unable to submit a form on the first click event
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29184371
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29184371
has comment: http://stackoverflow.com/comment/46583576
answer count: 2
has comment: http://stackoverflow.com/comment/46583548

http://stackoverflow.com/a/42612739
answers question: http://stackoverflow.com/q/29189225
has comment: http://stackoverflow.com/comment/94373819
downvote count: 0
has body: From meteor version 1.3.2, you can simply put the flag prodOnly or debugOnly. More info here
has comment: http://stackoverflow.com/comment/94158541
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/29190722
upvote count: 1
downvote count: 0
has body: Here's another approach, an ugly hack which turns the input into a JS array representation and then parses it using JSON.parse: function parse(str) { return JSON.parse('[' + str.split('') . join(',') . // insert commas replace(/\[,/g, '[') . // clean up leading commas replace(/,]/g, ']') . // clean up trailing commas replace(/\w/g, '"$&amp;"') // quote strings + ']'); } &gt;&gt; hack('A[B]C') &lt;&lt; ["A", ["B"], "C"] Now a stringifier to turn arrays back into the bracketed form: function stringify(array) { return Array.isArray(array) ? '[' + array.map(stringify).join('') + ']' : array; } Now your problem can be solved by: stringify(parse("[ABC[D][E[FG]]HIJK[LMN]]OPQR[STUVW]XYZ")[0])
type: Answer
answers question: http://stackoverflow.com/q/29186216
score: 1

http://stackoverflow.com/q/29135076
tagged with: jquery
answer count: 2
possible better answer: http://stackoverflow.com/a/29135296
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29136236
has title: Set the background color of nested elements from a repeating color swatch
tagged with: frontend
tagged with: css
has body: I have a fluid block layout running on this front end I’m working on. I want set the background color of a div with a certain class or it’s inner paragraph tag to a color that is taken from a five to eight color swatch that repeats. Example: red, green, blue, pink, yellow, red, green, blue, pink, yellow…. Originally I thought that this would be kinda straight forward using nth-child pseudo selector with a bit of added uglification via class/id selection, but the elements are nested within a few divs and I can’t get it to work. I’m not sure if I should be using javascript here or not, obviously I’d rather get it done with CSS as my javascript is quite weak, but I really don’t mind either way if someone can help me with a solution. I’ve had a look around and I understand how examples like http://jsfiddle.net/eudLg58p/ work, but I just can’t get that extra step to selecting nested divs. It’s possible I’m barking up the wrong tree. Here's the markup.. Home / Sample / Sample Directory Directory two Directory three Directory four Directory five Directory six Directory seven Directory eight Directory nine ..and here is my CSS... .icon-type{ position: absolute; top: 0; bottom: 0; left: 0; right: 0; background-color: white; } #bhe-body .icon-type p:nth-child(5n + 1){ color: pink; } #bhe-body .icon-type p:nth-child(5n + 2){ color: red; } #bhe-body .icon-type p:nth-child(5n + 3){ color: green; } #bhe-body .icon-type p:nth-child(5n + 4){ color: orange; } #bhe-body .icon-type p:nth-child(5n + 5){ color: purple; } My gut feeling is that I don't completely understand how the pseudo selector works and it possibly may not be the most efficient way to handle this task. Thanks, any help would be greatly appreciated :)
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/29136236
has answer: http://stackoverflow.com/a/29135296
tagged with: javascript

http://stackoverflow.com/q/29149890
has comment: http://stackoverflow.com/comment/46527929
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29153462
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/46527972
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/29153462
upvote count: 1
answer count: 1
has body: I am having trouble getting my tab content to appear properly on page load. What I have is a factory of Objects called apiList, I then use two ng-repeats, one which hits each object in the apiList, then the next one which iterates through that object and puts all of its data on the page. I use #tab{{$index}} to keep my data-toggles aligned between the buttons and tab-panes. The problem seems to be with how I use the active attribute on my tab-pane. I have three known test cases so far. I can only get information from the first Object by using the condition ng-class="{ 'active': $index == 0}" as in.. If I remove the conditional from the line then nothing appears And if I just add active to the pane value (with no condition) (i.e. They all appear. So my problem seems to be with how I need to turn on/off my active for the ng-repeat and I am just getting lost. Also, clicking on accounts/customers does not update the tabs. They both have the right data-toggle ID's (0 and 1) in respect to the tab-panes so I assume it is part of the active issue. And whenever I click on my tab panes, they do expand just fine. Here is my Factory, ng-repeat(s), and the code that was my original setup (functional). Factory .factory('APIMethodService', [function() { var Head = "api.verifyvalid"; return { apis: [ { accounts: [ { parameters : [ { name : "Accounts", version : "1.0" } ], uri: Head + "/v1/accounts/account_number", methods : [ { name: "Account Number", desc: "Returns the account number." }, { name: "Account Money", desc: "Returns the monetary amount within the account." } ] }, { parameters : [ { name : "Accounts", version : "2.0" } ], uri: Head + "/v2/accounts/account_number", methods: [ { name: "Account Number", desc: "Returns the account number." }, { name: "Account Money", desc: "Returns the monetary amount within the account." }, { name: "Account Token", desc: "Returns the account's token." } ] } ], customers:[ { parameters : [ { name : "Customers", version : "1.0" } ], uri: Hea…
has comment: http://stackoverflow.com/comment/46527859
has title: ng-repeat on bootstrap tab-content/tab-pane

http://stackoverflow.com/a/29190166
type: AcceptedAnswer
has body: There you go: [].unshift.apply(arr1, arr2);
score: 4
answers question: http://stackoverflow.com/q/29190141
has comment: http://stackoverflow.com/comment/46594760
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29190141
downvote count: 0
has comment: http://stackoverflow.com/comment/46594755

http://stackoverflow.com/comment/46447563
comment on: http://stackoverflow.com/q/29108987
type: Comment
type: QuestionComment
score: 2
has text: *"We have tried multiple different ideas of JavaScript..."* Show us, we will tell you what's wrong.

http://stackoverflow.com/a/29082035
has body: I'm not sure I understand the problem 100%, you want to access form labels based on its content yes? If so: Using the :contains() selector you can grab the form labels like this: var nameLabel = $("label:contains('name:')"); From there you could use the .next() method to grab the sibling element which in this case will be the span containing the input field. So to access the input you would do something like this: var nameInput = nameLabel.next().find('input'); From there use .val() to set its content like so: nameInput.val('John doe')
type: Answer
has comment: http://stackoverflow.com/comment/46403308
has comment: http://stackoverflow.com/comment/46401590
answers question: http://stackoverflow.com/q/29081789
has comment: http://stackoverflow.com/comment/46428859
score: 0

http://stackoverflow.com/comment/46625482
type: QuestionComment
has text: possible duplicate of [Create JSON object dynamically via JavaScript (Without concate strings)](http://stackoverflow.com/questions/16507222/create-json-object-dynamically-via-javascript-without-concate-strings)
score: 0
comment on: http://stackoverflow.com/q/29207527
type: Comment

http://stackoverflow.com/a/29133550
accepted answer of: http://stackoverflow.com/q/29133406
has comment: http://stackoverflow.com/comment/46492931
score: 6
answers question: http://stackoverflow.com/q/29133406
has body: The order is not guaranteed but is consistent. It means that _.forOwnRight is guaranteed to provide the result reversed from _.forOwn It's as per specification: it does not state how object's properties must be ordered so it's up to JS engine how to handle it (and they do that differently for performance reasons). A note: the order depends not only on the particular ES implementation, but also on runtime, since modern JS VMs do a lot of heuristics in runtime. For the ones curious about optimizations here is a good link (it seriously does not fit to cover in this Q/A): https://developers.google.com/v8/design
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46492822
type: Answer
upvote count: 6

http://stackoverflow.com/comment/46494934
type: Comment
comment on: http://stackoverflow.com/q/29134656
has text: tried that it doesn't help
score: 0
type: QuestionComment

http://stackoverflow.com/q/29190567
has title: Removing Previous Button on First Step jQuery Steps
has answer: http://stackoverflow.com/a/59639301
has answer: http://stackoverflow.com/a/29191045
upvote count: 9
has comment: http://stackoverflow.com/comment/46596132
tagged with: jquery-steps
answer count: 4
possible better answer: http://stackoverflow.com/a/30579078
has answer: http://stackoverflow.com/a/30579078
tagged with: javascript
has comment: http://stackoverflow.com/comment/46595673
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29191045
has comment: http://stackoverflow.com/comment/46595870
type: Question
has comment: http://stackoverflow.com/comment/46595545
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/46595843
favorite count: 0
downvote count: 2
has answer: http://stackoverflow.com/a/52719714
has body: I'm using jQuery Steps for my site signup wizard, works awesome with the exception that on the first step I'm getting the previous button, which really makes no sense since there is no previous content. I looked at the onInit() function in the API but there is no setting for enablePreviousButton, only enableFinishButton and enableCancelButton. Is there a way I can remove the Previous button on the first step? Requested code: $("#register-form").steps({ headerTag: "h3", bodyTag: "fieldset", autoFocus: true, onInit: function (event, current) { alert(current); }, labels: { finish: 'Sign Up ', next: 'Next ', previous: ' Previous' } }); HTML: <?= $lang_wizard_account; ?> <?= $lang_text_your_details; ?> * <?= $lang_entry_username; ?> <input type="text" name="username" value="<?= $username; ?>" class="form-control" placeholder="<?= $lang_entry_username; ?>" autofocus id="username" required> <?php if ($error_username) { ?> <?= $error_username; ?> <?php } ?> * <?= $lang_entry_firstname; ?> <input type="text" name="firstname" value="<?= $firstname; ?>" class="form-control" placeholder="<?= $lang_entry_firstname; ?>" id="firstname" required> <?php if ($error_firstname) { ?> <?= $error_firstname; ?> <?php } ?> ....

http://stackoverflow.com/q/29160521
score: 0
answer count: 1
has body: I have a SQL Server DB which has a datetime column. I have the date stored there as '2015-12-25 00:00:00.000'. I'm reading this data in to my JavaScript app through brezze and ASP.NET Web API. The date I see on JavaScript is 'Fri Dec 25 2015 05:30:00 GMT+0530 (Sri Lanka Standard Time)'. What do I have to do to retrieve the time as it is in the DB?
has answer: http://stackoverflow.com/a/29160666
type: UnansweredQuestion
has title: Javascript reading the date wrt local time zone
tagged with: javascript
type: Question
tagged with: datetime

http://stackoverflow.com/q/29118188
accepted answer: http://stackoverflow.com/a/29118350
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has body: I think I'm trying to doing a simple thing but probably i miss something. I've this little HTML OPEN with this simple CSS: .open { color: green; } .close { color: red; } Now want to catch .click() events on the div but i want to select the with the class selector. And for second i need to change the class and catch again a different .click() event based on the class. So I used this JQuery code: $('.open').click(function() { alert('open'); $(this).removeClass('open'); $(this).addClass('close'); $(this).text('CLOSE'); }); $('.close').click(function() { alert('close'); $(this).removeClass('close'); $(this).addClass('open'); $(this).text('OPEN'); }); But this not work: First click: right alert, class change, text change Second click: wrong alert, class not change, text not change You can check this jsfiddle: JsFiddle Example Can you help me? Thanks
type: Question
has answer: http://stackoverflow.com/a/29118378
has answer: http://stackoverflow.com/a/29118350
has title: Strange behaviour with jquery .click() event
score: 0
has answer: http://stackoverflow.com/a/29119910
possible better answer: http://stackoverflow.com/a/29118319
has answer: http://stackoverflow.com/a/29118319
answer count: 4

http://stackoverflow.com/comment/46455176
type: Comment
comment on: http://stackoverflow.com/a/29112996
score: 0
type: AnswerComment
has text: Still didn't work.... The listed items on the page stay the same even though $scope.data.inventory is different.

http://stackoverflow.com/comment/46634419
comment on: http://stackoverflow.com/a/29196952
type: Comment
has text: its very difficult to read the code in comment section please add it to main area il try to help you. i mean update the question.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46588047
score: 0
type: Comment
type: QuestionComment
has text: Sorry about my inglish.
comment on: http://stackoverflow.com/q/29185959

http://stackoverflow.com/a/37635003
downvote count: 0
answers question: http://stackoverflow.com/q/29170799
upvote count: 8
has body: in my case the fix was replacing with
type: Answer
score: 8

http://stackoverflow.com/comment/46614316
type: Comment
comment on: http://stackoverflow.com/a/29200776
type: AnswerComment
has text: BTW, You know why when I replace line 233 by line 232 the code breaks? I mean, I want clean URL's and I've read it can be only by using pushState, but it doesn't work... I'd be very grateful
score: 0

http://stackoverflow.com/comment/46578905
comment on: http://stackoverflow.com/q/29181069
type: Comment
type: QuestionComment
has text: @AmitSoni This is happening in IE8 only.. See my updated question
score: 0

http://stackoverflow.com/comment/46553230
type: AnswerComment
has text: Why should the OP try this? Please add an explanation of what you did and why you did it that way not only for the OP but for future visitors to SO.
type: Comment
comment on: http://stackoverflow.com/a/29163877
score: 0

http://stackoverflow.com/q/29161678
downvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29161782
accepted answer: http://stackoverflow.com/a/29161782
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: populate
tagged with: forms
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Hello I am doing a form and I used a populate method to fill a form out in jJQuery (Yes I know jquery is just a library) for testing. Now I save the data in the form using Json and Local Storage. Then I call back the object in local storage and use Json to turn it back into a string. The problem is the string will be the EXACT same as the string i hard coded into the populate method but when I put the string to replace it (so its always using current form saved data) it will not work correctly. I'm assuming it is something small. This is my object called back from local storage and turned back into a string. var myString = localStorage.getItem("all"); var myStringSave = JSON.stringify(myString); //my string myStringSave will contain for example: Name:'Joe',dateBirth:'01/02/1992' Which is the exact same as my hard coded one. However hardcoded works $('#frm').populate({Name:'Joe',dateBirth:'01/02/1992'}) But the one in the string will not work: $('#frm').populate(myStringSave) or $('#frm').populate({myStringSave}) I have been looking at it for a few hours and it makes no sense. The string is the exact same as my hard coded one, so why does it not work? Thank you any help is greatly appreciated.
has title: Javascript Using Local Storage, calling back the object and changing with Json to a string to use in a populate function

http://stackoverflow.com/a/29166833
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29166785
downvote count: 0
has body: Using a regex, as you asked: var a = "value1%7Cvalue2=%20a%20|value3" var regex = /\|.*/; a = a.replace(regex, ""); console.log(a); We match the | followed by an unlimited number of characters, and replace the match with the empty string. It's much easier to do with a split, though. a = a.split('|')[0] console.log(a)
type: Answer

http://stackoverflow.com/q/29085489
has title: Datepicker onSelect to format new date range
tagged with: javascript
has comment: http://stackoverflow.com/comment/46404016
tagged with: jquery-ui-datepicker
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46404203
has answer: http://stackoverflow.com/a/29116232
has comment: http://stackoverflow.com/comment/46403732
has body: I have 2 datepickers, one is a fromDate and one is a toDate. I can highlight the range from the fromDate to the toDate successfully in beforeShowDay(), but I need it to highlight when new values are selected. This triggers the onSelect statement. Is there a way to either: 1) trigger the beforeShowDay again? or 2) get all the dates of the new range and apply a css class to them? beforeShowDay: function(date){ if (date &gt;= initialFromDate &amp;&amp; date &lt;= initialToDate) { return [true, 'ui-individual-date', '']; } else { return [true, '', '']; } }, onSelect: function (dateText, obj) { var fromDate = new Date(dateText); var toDate = $(".dateDiv2").datepicker('getDate'); **get individual dates? if (individualdate &gt;= fromDate &amp;&amp; individualDate &lt;= toDate) apply css class or formatting to individualDate** },
tagged with: jquery
has comment: http://stackoverflow.com/comment/46435228
type: UnansweredQuestion
tagged with: datepicker
tagged with: css
has answer: http://stackoverflow.com/a/29102281
has comment: http://stackoverflow.com/comment/46434918
type: Question
has comment: http://stackoverflow.com/comment/46404937

http://stackoverflow.com/comment/46558007
comment on: http://stackoverflow.com/q/29156441
type: Comment
type: QuestionComment
has text: Whoops. So it is. Thank you.
score: 0

http://stackoverflow.com/q/29207018
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/46625555
has comment: http://stackoverflow.com/comment/46625339
has answer: http://stackoverflow.com/a/47885546
has comment: http://stackoverflow.com/comment/46626618
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46625234
has comment: http://stackoverflow.com/comment/46624967
has comment: http://stackoverflow.com/comment/46624676
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46625369
has comment: http://stackoverflow.com/comment/46625474
has comment: http://stackoverflow.com/comment/46625777
score: 1
tagged with: java
has body: I am creating a social networking site and I am facing one problem. I am fetching records from database and with each record I want to add one button so that I can change that record using that text box. But when I am updating record using that text box, it is getting value of the first text box only. If I am updating 2, 3, 4, 5 etc record then it is getting value of first text box. So please help me how can I get value of each and every text box - not just from the first one. Thanks in advance. Below is my code: &lt;% Statement st1; ResultSet rs1; Connection con; Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dfmc","root","93Pb3gaNv0"); String sql1="select * from user_table LIMIT 5"; st1 = con.createStatement(); rs1=st1.executeQuery(sql1); String id=null,name=null; while(rs1.next()){ id=rs1.getString("id"); name=rs1.getString("first_name"); %&gt; &lt;div&gt;&lt;input type="text" name="txt" id="name" /&gt; &lt;input type="button" name="btn" value="Rating" onclick="loadXMLDoc(&lt;%=id%&gt;)"&gt; &lt;p id="showname"&gt;&lt;%=name%&gt;&lt;/p&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; function loadXMLDoc(iid){ var idd=iid; var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("showname").innerHTML=xmlhttp.responseText; } } var name; name = document.getElementById("name").value; xmlhttp.open("GET", 'insert_rating?name='+name+'&amp;id='+idd+'', true); xmlhttp.send(); } &lt;/script&gt;
tagged with: mysql
has comment: http://stackoverflow.com/comment/46626842
has title: How to fetch value of dynamically created textbox in jsp
has comment: http://stackoverflow.com/comment/46625300
has comment: http://stackoverflow.com/comment/46625844
has comment: http://stackoverflow.com/comment/46624595
has comment: http://stackoverflow.com/comment/46625147

http://stackoverflow.com/a/29193471
downvote count: 0
has comment: http://stackoverflow.com/comment/76956159
score: 9
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29193314
upvote count: 9
accepted answer of: http://stackoverflow.com/q/29193314
type: Answer
has body: I create an anonymous JavaScript-function. This function is executed right in that moment the browser reads it. Not quite. You create a function expression. function () { } You then follow it with () which calls it a moment later. You could have done it like this: var myfunction = function ($) { ... }; myfunction(jQuery); I pass it the jQuery-Object (with ($) but I don't know why this is important at that point). No. You are defining a function. It accepts a single argument, the value of which gets assigned to a local variable called $. From now on my function 'speaks' jQuery (it understands its syntax - I am assuming). Syntax belongs to JavaScript, not jQuery. At the very end of my JavaScript-function I pass it the jQuery object again (but why would that be necessary?). Please enlighten me. You are passing the jQuery object for the first time. It is the argument you are passing to the function when you call it. The value of jQuery (the jQuery object) is assigned to the local $ variable. This is used for two purposes: It lets you use the $ variable without worrying about it being overwritten by Prototype JS, Mootools, or any of the other libraries that thought it was a good idea to use something as generic as $ as a variable name. It lets you have local variables that won't pollute the global scope. I tried the same function without the (jQuery) at the end. Now it is not working. I understand what is missing. But why is that (jQuery) at the end so important? The () are important because without them you won't call the function. The jQuery is important because otherwise $ would be undefined within the function. Now I STARTED my Javascript-function with the $ Here you are calling the function $() with your function expression as the argument. $ is a horribly overloaded function that does many different things depending on what type of argument you pass it. If you pass it a function, then it will assign that function as a document ready event handler. When the DOM has …

http://stackoverflow.com/q/29177728
type: Question
has title: handlebars multiple parameters
score: 0
tagged with: handlebars.js
answer count: 1
has comment: http://stackoverflow.com/comment/46573550
has answer: http://stackoverflow.com/a/29178140
has body: Here is my code: I left out the rest of the code (make it smaller) cause it spits on a span for a paging bootstrap control. Handlebars.registerHelper('pagingCode', function(label, page){ var html = ''; ... return new Handlebars.SafeString(html); }); My html: {{#each Paging}} &lt;li&gt; {{pagingCode label page}} &lt;/li&gt; {{/each}} My array: Paging is: [{"label":1,"page":1},{"label":2,"page":2},{"label":3,"page":3},{"label":4,"page":4},{"label":5,"page":5},{"label":"next","page":6}] My html output: [object Object]1 [object Object]2 [object Object]3 [object Object]4 [object Object]5 [object Object]6 When inside the helper pagingCode page is an object and label is the valid value in the array. Any ideas on what im doing wrong? Update: OK it was becuase nginx was caching the page so it was using the old html file it compiled.
type: UnansweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/55426847
type: AnswerComment
score: 0
type: Comment
has text: Unfortunately you can't use `btoa` in Parse cloud code - its that exact problem I came here to solve :)
comment on: http://stackoverflow.com/a/29115808

http://stackoverflow.com/q/29074956
tagged with: geometry
has comment: http://stackoverflow.com/comment/46385890
tagged with: mapbox
linked to: http://stackoverflow.com/q/1463364
has answer: http://stackoverflow.com/a/59069356
accepted answer: http://stackoverflow.com/a/29078521
type: AnsweredQuestion
has title: In Mapbox.js, how to smooth a polyline?
tagged with: leaflet
has answer: http://stackoverflow.com/a/29078521
has answer: http://stackoverflow.com/a/53550079
type: Question
has comment: http://stackoverflow.com/comment/46384095
score: 5
upvote count: 5
possible better answer: http://stackoverflow.com/a/59069356
tagged with: javascript
answer count: 3
downvote count: 0
favorite count: 0
has body: The code can be viewed at http://jsfiddle.net/qsr5bs6v/ Following are the lines to add a polyline L.polyline([[31.233, 121.465], [31.233499, 121.500634], [31.190172, 121.588107]], { color: '#000', smoothFactor: 10.0 }).addTo(map) As can be seen, there is an angle in the joint point of every two lines belonging to the polyline, like this, which is not so attractive: I was wondering whether there is an easy way to make the angle into a rounded curve in Mapbox.. (I saw this post about smoothing a polyline Smooth polyline with minimal deformation . In that post, I saw CHAIKIN'S ALGORITHMS is suggested but the drawback of that algorithm is that the smoothed curve doesn't pass directly through the control points... )

http://stackoverflow.com/q/29200318
has title: How to create objects that share some properties
tagged with: javascript
tagged with: ini
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29201246
has comment: http://stackoverflow.com/comment/46612962
has answer: http://stackoverflow.com/a/29200450
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46613045
linked to: http://stackoverflow.com/q/10430279
possible better answer: http://stackoverflow.com/a/29200450
accepted answer: http://stackoverflow.com/a/29201246
type: Question
linked to: http://stackoverflow.com/q/5134208
has body: I'm making a 2D game in HTML5 canvas which will have a lot of objects. Some of the objects shares some properties with each other. Some of the properties will be for only one object. Objects may have an empty value property. I want to to create a main object that will have the properties of all the objects. If there is an object with only 3 of the properties of the main object, the other properties will be empty. For example, lets say that all the possible properties for any object in the game are {a,b,c,d,e,f,g} and we have 2 objects in the game ob0 &amp; ob1. ob0's properties are a,c,d so I will fill them only and the other properties {b,e,f} will be blank. ob1's properties are b,e,f so I will fill them only and the other properties {a,c,d} will be blank. I thought of this presentation because of two things. the first thing is that I'm not very good in OOP and inheritance and other OOP things. and the second thing is about 2 years ago, in a game called Red Alert2, there was a .INI file, and in the file were all the objects in the game. Data were represented like this way [obj1] color=red width=100px cankill=yes [obj2] weapontype:4 canswim=yes weapontype=4 speed=20 For example, the property cankill is not in obj2 and obj2 couldn't kill in the game. But if you gave obj2 this property and gave it weapontype=10 it would kill in the game using the 10th weapon in the game. This tells me that if a property hasn't a value, it means that in the game it value will be zero or ?? Here comes my questions. How could that be done in JS? I mean can I really connect the .INI file with JS? Is there a more effective way to save the objects properties? I'm not asking to describe that way in two pages. I just want to know the main idea of that point. I thing my solution to this problem will experience the problem of overloaded size. If the game has 1000 properties, each object will be consisted of 1000 properties, when the object would need only 4 or 5 properties, and that will affect…
tagged with: object

http://stackoverflow.com/q/29162996
answer count: 2
has comment: http://stackoverflow.com/comment/46545376
tagged with: javascript
score: 0
has body: I did the checkbox work good, this is my one: $(document).ready(function(){ $('input[type="checkbox"]').click(function(){ if($(this).prop("checked") == true){ document.getElementById("srt").value = document.getElementById("Ultra").value; } else if($(this).prop("checked") == false){ document.getElementById("srt").value = ""; } }); }); At my display data part, I have the loop for to show all the record. I want after I click the checkbox the value I get from document.getElementById("Ultra").value and display on document.getElementById("srt").value. It work good at 1 record only, the rest I check didn't work. I think the problem is I display it on and the textbox I put in loop with loop for to display database. Any help? This one is php part: for ( $v = 0 ; $v < mysql_num_rows($result) ; $v++ ) { $row = mysql_fetch_assoc($result); ?> <?php echo' '.$row['aaa'].' '; echo' '.$row['bbb'].' '; echo' '.$row['ccc'].' '; echo' ';//////this one to display value i get echo' '.$row['dddr'].' '; } The value only display on 1 row only.
has title: My checkbox doesn't work with loop for to display data
has answer: http://stackoverflow.com/a/29163793
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29163176
accepted answer: http://stackoverflow.com/a/29163793
type: Question
has answer: http://stackoverflow.com/a/29163176

http://stackoverflow.com/comment/46453463
score: 0
comment on: http://stackoverflow.com/q/29111582
type: Comment
type: QuestionComment
has text: I will check this out tonight and let you know how it goes.

http://stackoverflow.com/q/29132459
accepted answer: http://stackoverflow.com/a/29132848
has comment: http://stackoverflow.com/comment/46491364
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46491337
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm learning jQuery and I'm using an online tutorial. I'm at the portion where we are learning about the replaceWith() function and how it can use another function as it's return results. Looking at the teachers code I don't understand how it's working. jQuery $("document").ready(function () { $("#example p").replaceWith(replacementFn); function replacementFn() { if ($(this).text().indexOf("1") != -1) { return " This is paragraph uno "; } } }); HTML This is paragraph 1 This is paragraph 2 This is paragraph 3 This is paragraph 4 This is paragraph 5 As the code is it works like I was shown. One paragraph is replaced with the "This is paragraph uno". But once I change the indexOf("1") to indexOf("6") everything in the Example div gets wiped out. What I don't understand is why when at least one paragraph meets the check everything works fine. But once none of them meet the check everything gets wiped out. Why doesn't the original code wipe everything but the paragraph that matches the check?
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46491096
type: Question
has title: Jquery ReplaceWith() using conditional function not behaving as I expected
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29132848

http://stackoverflow.com/a/29093003
answers question: http://stackoverflow.com/q/29092799
type: AcceptedAnswer
type: Answer
has body: try below code .it is event delegation isue $(document).on('click', '.open-popup-link',function(){ var popupSRC = $(this).parent('li').next('div.popup-product'); $.magnificPopup.open({ items: { src: popupSRC, }, type: 'inline' }); });
accepted answer of: http://stackoverflow.com/q/29092799
score: 0

http://stackoverflow.com/a/29176124
has comment: http://stackoverflow.com/comment/46632975
type: Answer
has body: obj.options(nCount) should be obj.options[nCount] obj is an HTMLSelectElement object. HTMLSelectElement doesn't have an options method, so the following is incorrect: obj.options(nCount) // XXX HTMLOptionsCollection objects do have an options property, which is documented as follows: Returns a HTMLOptionsCollection containing the set of &lt;option&gt; elements contained by this element. HTMLOptionsCollection has two methods: item(index) - returns the specific node at the given zero-based index (gives null if out of range) namedItem(name) - returns the specific node with the given DOMString (i.e., string) id. Returns null if no such named node exists. That means you should be using obj.options.item(nCount) HTMLOptionsCollection's parent class says In JavaScript, code that accesses HTMLCollection object, in order to get an item of the given HTMLCollection, the square bracket syntax can be used instead of directly calling the item() or namedItem() methods. Numeric values in the square brackets will work the same way as item(), string values will work the same way as namedItem(). That means you could also be using obj.options[nCount]
has comment: http://stackoverflow.com/comment/46632127
accepted answer of: http://stackoverflow.com/q/29175994
has comment: http://stackoverflow.com/comment/46634841
answers question: http://stackoverflow.com/q/29175994
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/29167880
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29167750
has body: Considering a menuItem directive on each li of your menu : //Don't forget the $location dependency, to retrieve the current path pf_app.directive('menuItem', ["$location", function ($location) { return{ restrict: 'A', link : function (scope, element, attr) { //Watch location change event scope.$on('$locationChangeSuccess', function(){ //Get the current path var path = $location.path(), //Get the child link of the current element href = element.children("a").attr("href").slice(1); //If the paths matches if (href == path) //Add the class element.addClass("active"); else //Remove it element.removeClass("active"); }); } } }]);

http://stackoverflow.com/a/29090555
score: 1
upvote count: 1
has body: You may want to use a for() loop to create each of your : var responseObject={}; responseObject.items=[ {snippet:{thumbnails:{high:{url:'http://lorempixel.com/50/5'}}}, id:{videoId:`A1213131`}}, {snippet:{thumbnails:{high:{url:'http://lorempixel.com/50/5'}}}, id:{videoId:`B1213131`}}, {snippet:{thumbnails:{high:{url:'http://lorempixel.com/50/5'}}}, id:{videoId:`C1213131`}} ]; for (var i = 0; i < responseObject.items.length; i++) { //create the anchor var a = document.createElement('a'); //set its href property a.href = '#'; //insert the thumbnail into it a.innerHTML = " "; //add the click event a.addEventListener('click', function(e) { //prevent it to act as an anchor; e.preventDefault(); //insert the iframe into #theVideo //note that if the iframe is already setted up, it may be better to only change its src property document.querySelector(theVideo>iframe).src=... document.getElementById('theVideo').innerHTML = " " + //only for the snippet example " http://www.youtube.com/embed/" + responseObject.items[this].id.videoId + " "; }.bind(i)); //.bind(i) will make our `i` var correspond to the `this` var of the fired event. // append the newly created to #response div document.getElementById('response').appendChild(a); }
accepted answer of: http://stackoverflow.com/q/29090079
answers question: http://stackoverflow.com/q/29090079
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46490575
type: Answer

http://stackoverflow.com/q/29121975
has comment: http://stackoverflow.com/comment/46470398
tagged with: coldfusion
score: -1
has comment: http://stackoverflow.com/comment/46471110
type: Question
has title: HTML with draggable elements to PDF
has comment: http://stackoverflow.com/comment/46470431
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29124360
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
has body: I have a report builder that when served up has several div elements with charts and graphs. Now the user can dragged and sorted these elements how they wish. My issue now is how to capture the html page so the PDF will reflect this new layout. Before I was capturing the html page in Coldfusions cfsavecontent and sending that to a process page to create the pdf. This does not work when elements have been dragged and sorted dynamically. Any ideas or suggestions would be helpful. Thanks. Report Data Here Report Data Here Report Data Here #strPDF# JQuery is used to make the elements draggable. Is it possible to recapture the page to pdf with the new element positions?
upvote count: 2
type: UnansweredQuestion
downvote count: 3

http://stackoverflow.com/q/29099292
tagged with: sha1
has title: Need Sha1 encryption in jquery/javascript
score: -4
has comment: http://stackoverflow.com/comment/46429736
has answer: http://stackoverflow.com/a/29099335
type: Question
has answer: http://stackoverflow.com/a/29099387
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29099335
has comment: http://stackoverflow.com/comment/46428946
has comment: http://stackoverflow.com/comment/46430024
answer count: 2
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/46430088
tagged with: jquery
favorite count: 0
has body: I have sha1 encryption coding in php &lt;?php echo hash('sha1', 'testing'.'abcdb'); ?&gt; but, my requirement should have to run the page xyz.html, so the above block is not working. So, I need to do sha1 encryption in jquery/javascript. Help me by providing coding for sha1 encryption. this is exactly have to be converted to scripts '&lt;?php echo hash('sha1', 'my-secret-key' . $_REQUEST["email"]); ?&gt;'
accepted answer: http://stackoverflow.com/a/29099387
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/50030059

http://stackoverflow.com/q/29148893
tagged with: http://stackoverflow.com/tag/json
has title: Populating a select box with JSON array results
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29149294
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has body: So I'm trying to populate a select box within my html with array objects using JSON results, I've been looking at all this code so long I don't think I'm seeing the simple solution to my problem. This is my callback function where I'm populating the select box. The JSON request has went through fine but I am stuck with a blank select box everytime. function getArtistsCallBack() { if (req.readyState == 4) { if (req.status == 200) { // TO DO: populate artistlist select box using JSON var response = req.responseText.parseJSON(); var artistSelect = document.getElementById("artistlist"); for (i=0;i&lt;response.artistsarray.length;i++){ var artist_id = response.artistsarray[i].artist; var artist = response.artistsarray[i].artist; artistSelect.options[artistSelect.options.length] = new Option(artist, artist_id, false, true); } } } } Here is the select box within the HTML for reference just in case; &lt;div id="artistscontent"&gt; &lt;select id="artistlist"&gt;&lt;/select&gt; &lt;/div&gt; This is artists.php where a database is queried for an array of objects, the array that is used previously; &lt;?php // Include utility files require_once 'include/config.php'; // Load the database handler require_once BUSINESS_DIR . 'database_handler.php'; // Load Business Tier require_once BUSINESS_DIR . 'collection.php'; $artistsarray = Collection::GetArtists(); print json_encode($artistsarray); $jsonresponse='{"artistsarray":['; foreach($artistsarray as $artist =&gt; $row) { $artist_id=$artist+1; $artist=$row['artist']; $jsonresponse .= '"artist_id":"' . $artist_id . '"},'; $jsonresponse .= '"artist:"' . $artist . '"},'; } $jsonresponse .= ']}'; echo $jsonresponse; ?&gt; Any help would be much appreciated! Thanks!
has comment: http://stackoverflow.com/comment/46535670
has comment: http://stackoverflow.com/comment/46520134
tagged with: select
has comment: http://stackoverflow.com/comment/46520240
has answer: http://stackoverflow.com/a/29149348
type: Question
has comment: http://stackoverflow.com/comment/46520099

http://stackoverflow.com/a/29195360
has comment: http://stackoverflow.com/comment/46603596
score: 0
accepted answer of: http://stackoverflow.com/q/29195348
has comment: http://stackoverflow.com/comment/46603982
has comment: http://stackoverflow.com/comment/46603798
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46603657
has comment: http://stackoverflow.com/comment/46603969
type: Answer
has comment: http://stackoverflow.com/comment/46603780
has comment: http://stackoverflow.com/comment/46603569
has comment: http://stackoverflow.com/comment/46603754
has comment: http://stackoverflow.com/comment/46603776
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29195348
has body: Regarding : SyntaxError: unterminated string literal How can I fix this problem? you should use backslash : goh("http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v=\ http://www.youtube.com/watch?v="); if you want to send pure linebreaks use \n as @amit answered.

http://stackoverflow.com/comment/46570827
has text: I don't understand the obsession with `===` and `!==` In most cases I know (really really know), what types I'm comparing, so why should I add that extra `=` in the first place?
comment on: http://stackoverflow.com/q/29176467
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29159496
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46539120
answer count: 1
has title: scroll lock in popup-overlay is not working
has body: I'm using popup-overlay js plugin. The scrolllock option seems to be not working. Anyone know how should I fix this? All I need is to be able to disable the page scrolling when the pop-up is active. and enable page scrolling when it's closed for mousewheel and touch divices. $('#theDIV').popup({ scrolllock: true });
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46539457
accepted answer: http://stackoverflow.com/a/29160222
has answer: http://stackoverflow.com/a/29160222

http://stackoverflow.com/comment/46542067
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29161269
has text: Explain `doesn't work`
score: 0

http://stackoverflow.com/comment/46583651
score: 0
has text: @ripa Accept the answer if you think this suits you
type: Comment
comment on: http://stackoverflow.com/a/29183658
type: AnswerComment

http://stackoverflow.com/a/29105733
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29103818
type: Answer
upvote count: 16
score: 16
has body: After referencing http://www.w3schools.com/jsref/event_oninput.asp it seems you can execute a method upon the change event of oninput. The following code retrieves and displays the numbers on the page. &lt;template name="myTemplate&gt; &lt;input id="slider" type="range" min="50" max="100" step="10" value="50"&gt; &lt;output id="output"&gt;&lt;/output&gt; &lt;/template&gt; client.js Template.myTemplate.rendered = function(){ document.getElementById("slider").oninput = function() { myFunction() }; } function myFunction() { var val = document.getElementById("slider").value //gets the oninput value document.getElementById('output').innerHTML = val //displays this value to the html page console.log(val) } THE METEOR WAY: Additionally, you may use the change eventType and map it how you want. This works when an input changes state. Template.yourTemplate.events({ 'change input[type=range]': function(event){ var sliderValue = event.currentTarget.value Session.set('sliderValueIs', sliderValue) //then you can get this session and return it in a helper to display on your page } })
accepted answer of: http://stackoverflow.com/q/29103818

http://stackoverflow.com/comment/46552996
score: 1
has text: To save it in a db, convert it into a string by JSON.stringify(jsonObj). And to make operations again with a json, convert the fetched string into json object by JSON.parse(jsonStr).
comment on: http://stackoverflow.com/q/29158791
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46463537
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29118021
type: AnswerComment
has text: What do you mean? I remove downvote when the answer is edited :)

http://stackoverflow.com/comment/136824295
type: AnswerComment
score: 0
type: Comment
has text: if page build complete after page load event the default functionality will not work
comment on: http://stackoverflow.com/a/29203491

http://stackoverflow.com/q/29109400
favorite count: 0
has comment: http://stackoverflow.com/comment/46448777
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46448653
has comment: http://stackoverflow.com/comment/46448689
has comment: http://stackoverflow.com/comment/46448605
upvote count: 0
has body: Here is my jQuery code: (function() { var overlay = { init: function() { $(' ', { class: 'overlay' }) .insertAfter('button'); } }; overlay.init(); })(); I would expect this to put a div under my button however the HTML that is created contains no div: Reveal More Info Sorry if this is a newbie question, I have just started learning. The HTML Head: jQuery rules
has comment: http://stackoverflow.com/comment/46448782
has title: jQuery very simple code seems to not work
has comment: http://stackoverflow.com/comment/46449047
has comment: http://stackoverflow.com/comment/46448959
has comment: http://stackoverflow.com/comment/46448529
type: Question
has comment: http://stackoverflow.com/comment/46448426
has answer: http://stackoverflow.com/a/29113696
answer count: 2
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/46448415
has comment: http://stackoverflow.com/comment/46448899
has comment: http://stackoverflow.com/comment/46448981
has comment: http://stackoverflow.com/comment/46448979
downvote count: 1
has comment: http://stackoverflow.com/comment/46448830
has answer: http://stackoverflow.com/a/29109861
has comment: http://stackoverflow.com/comment/46448431

http://stackoverflow.com/a/63071638
type: Answer
has body: If you have javascript control on the current dimensions (like going fullscreen, for instance, or simply by checking what viewport size the user is using), you can add a simple class in a parent div outside the SVG. Then, style the SVG text's font-size for both cases: when the parent div has such class (it tells you that your svg has scaled), and when the parent div hasn't such a class (i.e., the SVG is non-scaled). If this is your case, this simple solution works. .svg_text {font-size: 12px;} /* normal non-scaled SVG */ .case_for_big_screen_thus_SVG_scaled .svg_text {font-size: 6px;} /* this parent class only is added when viewport dimensions make your SVG to be scaled */
score: 0
answers question: http://stackoverflow.com/q/29117299

http://stackoverflow.com/comment/46547941
type: QuestionComment
has text: Would the SQL look like `SELECT year, cost, revenue FROM revenueTestData FULL OUTER JOIN costTestData ON revenueTestData.year = costTestData.year`?
score: 0
comment on: http://stackoverflow.com/q/29164164
type: Comment

http://stackoverflow.com/a/29184231
has comment: http://stackoverflow.com/comment/46586092
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29179410
has body: So I don't know if I understood your question correctly, but if you only want to display the information from Google Places API, you can use theirs getDetails() function. This will return an object. If you don't want to store the object, why not just deleting the object after each time the user for example switches the view? This way you will not store this information in your database, at least not permanently. Have a good one! Here is their full getDetails() manual: https://developers.google.com/maps/documentation/javascript/places#place_details_requests
answers question: http://stackoverflow.com/q/29179410

http://stackoverflow.com/a/29127423
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29127387
answers question: http://stackoverflow.com/q/29127387
has body: function hideElement(element){ element.style.display = "none"; } since you pass this as argument you do not need to 'catch' the element from it's ID
score: 0

http://stackoverflow.com/comment/46487770
has text: well u can also use a json or something. or XML . but something persitent needs to be there for sure
score: 0
comment on: http://stackoverflow.com/q/29127367
type: Comment
type: QuestionComment

http://stackoverflow.com/a/64134586
score: 0
answers question: http://stackoverflow.com/q/29150480
type: Answer
has body: This worked for me after a lot of research: $('#userList').DataTable().clear().destroy();

http://stackoverflow.com/comment/46590015
score: 0
type: AnswerComment
type: Comment
has text: Well not always, but yes for the map functions. Also, when using day it didn't work because you were replacing the value of that temporal variable. However, using dataSet.json[index], you change the value of the dataSet.json variable, and so it persists. Just remind this, inside a forEach / map, if you want the data to persist, you need to do or the index trick or be able to do something like this: _.each(dataSet.json, function(day, index) { day.hour = _.mapValues(day, function(n) { ... i.e. A property inside the temporal variable, that way it also persists in the dataSet.json variable.
comment on: http://stackoverflow.com/a/29187268

http://stackoverflow.com/comment/46587044
type: Comment
type: QuestionComment
has text: Hm, interesting, I haven't caught previously what you were prosing, nice idea, I think it should work, I'll try and respond what was my results
comment on: http://stackoverflow.com/q/29184737
score: 0

http://stackoverflow.com/q/29063443
has title: jQuery File Upload in Rails 4.x Nested Form
has answer: http://stackoverflow.com/a/29081084
accepted answer: http://stackoverflow.com/a/29081084
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion
type: Question
has body: I have a Horse model and a Photo model. I am using jQuery File Upload to resize (client side) images and save on Amazon s3 directly since I am using Heroku. I have seen other questions similar that use carrierwave, paperclip, or that are very old. I am not sure why you would use carrierwave/paperclip, but I think based on what heroku says, I do not want to have images hitting the server potentially causing time-outs. Heroku recommends using jQuery File Upload and shows js appending new file input with a value of the image's link (returned from amazon s3). I have this working when saving a photo separately. I now want to make it work in a nested form for Horse but js is not finding input (since it does not exist yet because it's nested I presume). I am using Cocoon for nested forms (I am open to anything that will work better). I am not too familiar with javascript/jQuery but a far as I can tell, Cocoon 'hides' the nested element until I click to add it via the add_association. haml view code: = link_to_add_association 'add photo', f, :photos html source before clicking 'add photo' &lt;div class='links'&gt; &lt;a class="btn btn-default btn-sm add_fields" data-association-insertion-method="after" data-association="photo" data-associations="photos" data-association-insertion-template="&amp;lt;div class=&amp;#39;nested-fields&amp;#39;&amp;gt; &amp;lt;fieldset class=&amp;quot;inputs&amp;quot;&amp;gt;&amp;lt;ol&amp;gt;&amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;horse[photos_attributes][new_photos][url]&amp;quot; id=&amp;quot;horse_photos_attributes_new_photos_url&amp;quot; /&amp;gt; &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;horse[photos_attributes][new_photos][_destroy]&amp;quot; id=&amp;quot;horse_photos_attributes_new_photos__destroy&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&amp;lt;a class=&amp;quot;remove_fields dynamic&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;remove photo&amp;lt;/a&amp;gt; &amp;lt;/ol&amp;gt;&amp;lt;/fiel…

http://stackoverflow.com/q/29188758
has comment: http://stackoverflow.com/comment/46592523
has comment: http://stackoverflow.com/comment/46592866
has title: How to keep fixed the size of a container with html5, css3 and javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46592714
answer count: 0
has comment: http://stackoverflow.com/comment/46592324
has comment: http://stackoverflow.com/comment/46592330
has body: HTML: JS: $('#rtgbo').prepend(' ' + data.message + ' '); Data is properly appending in my html id (from data.message), but causes the size of my site to be increased. I need that keep fixed the size of my site. Please help!
type: Question
has comment: http://stackoverflow.com/comment/46593166
has comment: http://stackoverflow.com/comment/46592227
tagged with: javascript
score: 0

http://stackoverflow.com/q/29160674
has comment: http://stackoverflow.com/comment/46540984
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29160935
tagged with: angularjs
type: UnansweredQuestion
has title: Moving code from jquery to angularjs
has comment: http://stackoverflow.com/comment/46541114
type: Question
has body: I have following code block in jQuery which I need to convert it into angularjs JS Code command: [ { name: "Delete", text: "", click: function (e) { e.preventDefault(); //add a click event listener on the delete button var tr = $(e.target).closest("tr"); //get the row for deletion var data = this.dataItem(tr); //get the row data so it can be referred later wnd.content(confirmationWindowTemplate(data)); //send the row data object to the template and render it wnd.open().center(); wnd.title("Delete Prospect"); $("#yesButton").click(function (e) { alert("hi") }) //$("#noButton").click(function (e) { $scope.noButton = function() { alert("hi!"); } }, ] HTML Code Yes No I have not posted the entire code as it would be too lengthy. I want to convert this jquery code into angularjs. As you can see I am trying to call Yes and No function with jQuery and Angularjs respectively. When I click on yes, I see an alert message "hi" but I don't get an alert message when I click on no. I am sorry if this question provides insufficient details. I am stuck on this from past 2 days. Any help would be appreciated.
has comment: http://stackoverflow.com/comment/46541103
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29203502
linked to: http://stackoverflow.com/q/5323550
has comment: http://stackoverflow.com/comment/46620404
type: Question
has comment: http://stackoverflow.com/comment/46759257
has title: Doesn't Google extension share localstorage?
tagged with: javascript
score: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/46637867
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46620414
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46621897
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/46626194
has body: I develop google extension. I defined popup.html in the manifest.js "browser_action" : { "default_icon": "icon19.png", "default_popup" : "popup.html" }, And, import myscript.js in popup.html &lt;script src="myscript.js"&gt;&lt;/script&gt; It store value in localStrage. localStorage['myid1_save'] = 'some value'. I also define content_scripts in the manifest.js it calls background.js. in the background.js. var myid1_save = localStorage['myid1_save']; alert(myid1_save); // -&gt; undefined it can't call localStorage value which popup.html saved How to fix this?

http://stackoverflow.com/comment/124085870
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/41227532
has text: it is bugous, I've tried Multer, Auth0, none works in every order

http://stackoverflow.com/comment/46637980
score: 0
has text: Don't pass self in the load function, it override the declared var containing the plugin.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29213004

http://stackoverflow.com/comment/46615335
comment on: http://stackoverflow.com/q/29201667
has text: Alright, so everything has to be pretty much inside of a callback? I'm also planning on storing the token inside of a database (which would be asynchronous too), so I would have to put callbacks within callbacks, and so on?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29139069
tagged with: javascript
has answer: http://stackoverflow.com/a/29139646
score: 0
has answer: http://stackoverflow.com/a/29139602
has body: here's the scenario: I have a node server running locally (for production purposes) and I get a file from it through the following function: function actualizarMapa() { $.getScript( "http://localhost/paradas.js" ).done(function( script, textStatus ) { console.log("paradas[0][6] de archivo ");console.log(paradas[0][6]); actualizoMarkers(paradas); }).fail(function( jqxhr, settings, exception ) { $( "#aviso" ).html( " Servidor fuera de servicio. Reintente luego " ); }); }; (The content of this file changes periodically in minutes) The content of paradas.js is an array: var paradas = [['01 - Teatro Solís - Liniers y Reconquista','-34.907822','-56.200436',3,1,'Oficina de Atención Movete',8,20,'1'],['02 - Templo Inglés - Reconquista y Treinta Tres','-34.909481','-56.204361',4,1,'Oficina de Atención Movete',12,20,'1'],['03 - Reconquista y Pérez Castellanos','-34.910782','-56.209106',5,1,'Oficina de Atención Movete',12,20,'1'],['04 - Hospital Maciel - Guaraní y Washington','-34.908863','-56.212181',6,1,'Oficina de Atención Movete',13,16,'1'],['05 - Mercado del Puerto - Piedras y Pérez Castellanos','-34.906021','-56.211327',7,1,'Oficina de Atención Movete',5,20,'1'],['08 - Plaza Matriz - Juan Carlos Gómez y Rincón','-34.906101','-56.203266',8,1,'Oficina de Atención Movete',9,20,'1'],['07 - Terminal Ciudadela Norte - Piedras y Juncal','-34.902901','-56.202896',9,1,'Oficina de Atención Movete',15,20,'1'],['06 - Banco de la República - Zabala y Piedras','-34.905022','-56.208302',10,1,'Oficina de Atención Movete',3,16,'1'],['Oficina de Atención Movete','-34.9067246','-56.2108961',0,-1,'Montevideo',0,0,'1'] ]; However the log doesn't display the correct value, paradas[0][6] should be 8 but it shows 11 instead. It seems it gets the value from another "ghost" variable. The HTML file has the script tag to this file also. Any ideas how I should do to get it correctly?. I tryed passing the array to the function but it didn't work. Thanks a lot in advance.
type: UnansweredQuestion
has title: Can't read the content of a remote variable which was stored locally
type: Question
answer count: 2

http://stackoverflow.com/a/29106769
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46443501
type: Answer
upvote count: 1
has body: Maybe something like this: Home and then... function test(el){ var className = $(el).attr('class'); console.log(className); }
score: 1
accepted answer of: http://stackoverflow.com/q/29106649
answers question: http://stackoverflow.com/q/29106649

http://stackoverflow.com/comment/46562611
score: 0
type: Comment
has text: Why u dont just test it?
type: QuestionComment
comment on: http://stackoverflow.com/q/29172206

http://stackoverflow.com/a/52712354
answers question: http://stackoverflow.com/q/29201426
score: 0
has body: moment.locale('ja'); var d = moment().format('今： YYYY年M月D日 (ddd) HH時mm分ss秒'); console.log(d); -&gt; 今： 2018年10月9日 (火) 11時03分06秒 jsfiddle.net/369shdep/33/
type: Answer

http://stackoverflow.com/comment/46384368
type: Comment
comment on: http://stackoverflow.com/a/29072767
type: AnswerComment
score: 0
has text: Thanks for your response, but see the last paragraph of my question. I'll see a way around it and will probably use variables to check if it should execute the done/error function. Something like Techfoobar has mentioned in the comments

http://stackoverflow.com/a/29084383
has comment: http://stackoverflow.com/comment/46402377
has body: The problem is that jQuery resolves its ajax promises with 3 arguments, which then become an array of values when you are using $.when on multiple promises. To get only the data (the first argument of each ajax callback), use var promise = $.when( ajaxRequest1, ajaxRequest2 ).then(function(resp1, resp2) { return [resp1[0], resp2[0]]; });
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46404348
has comment: http://stackoverflow.com/comment/46403524
answers question: http://stackoverflow.com/q/29084324
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29084324
has comment: http://stackoverflow.com/comment/46404442
type: Answer

http://stackoverflow.com/a/29194878
type: Answer
accepted answer of: http://stackoverflow.com/q/29194704
answers question: http://stackoverflow.com/q/29194704
score: 0
type: AcceptedAnswer
has body: These will find the next and previous image sources. Note you need quotes for the src attribute since it has a slash: $('.next').click(function() { var curr = $('#largeImage').attr('src'); curr = curr.replace('large','thumb'); var next = $('img[src="' + curr +'"]') .parent('li') .next() .find('img').attr('src'); alert(next); }); $('.prev').click(function() { var curr = $('#largeImage').attr('src'); curr = curr.replace('large','thumb'); var prev = $('img[src="' + curr + '"]') .parent('li') .prev() .find('img').attr('src'); alert(prev); });

highcharts
tags question: http://stackoverflow.com/q/29201324
tags question: http://stackoverflow.com/q/29119522
tags question: http://stackoverflow.com/q/29066057
tags question: http://stackoverflow.com/q/29138566
tags question: http://stackoverflow.com/q/29077388
tags question: http://stackoverflow.com/q/29162967
tags question: http://stackoverflow.com/q/29118926
tags question: http://stackoverflow.com/q/29156730
tags question: http://stackoverflow.com/q/29176839
tags question: http://stackoverflow.com/q/29214004
tags question: http://stackoverflow.com/q/29165981
tags question: http://stackoverflow.com/q/29113801
tags question: http://stackoverflow.com/q/29172776
tags question: http://stackoverflow.com/q/29164139
tags question: http://stackoverflow.com/q/29129684
tags question: http://stackoverflow.com/q/29088803
tags question: http://stackoverflow.com/q/29165739
tags question: http://stackoverflow.com/q/29172829
tags question: http://stackoverflow.com/q/29192998
tags question: http://stackoverflow.com/q/29144399
tags question: http://stackoverflow.com/q/29098839
tags question: http://stackoverflow.com/q/29095095
tags question: http://stackoverflow.com/q/29163157
tags question: http://stackoverflow.com/q/29170350
tags question: http://stackoverflow.com/q/29203738
tags question: http://stackoverflow.com/q/29110529
tags question: http://stackoverflow.com/q/29086297
tags question: http://stackoverflow.com/q/29155334
tags question: http://stackoverflow.com/q/29145461
tags question: http://stackoverflow.com/q/29103993
tags question: http://stackoverflow.com/q/29167399
tags question: http://stackoverflow.com/q/29154881
tags question: http://stackoverflow.com/q/29148308
tags question: http://stackoverflow.com/q/29134451
tags question: http://stackoverflow.com/q/29071649
tags question: http://stackoverflow.com/q/29209491
tags question: http://stackoverflow.com/q/29154616
tags question: http://stackoverflow.com/q/29094123
tags question: http://stackoverflow.com/q/29195047
tags question: http://stackoverflow.com/q/29192828
tags question: http://stackoverflow.com/q/29192266
tags question: http://stackoverflow.com/q/29118883
type: Tag
tags question: http://stackoverflow.com/q/29096459
tags question: http://stackoverflow.com/q/29082636
tags question: http://stackoverflow.com/q/29108853
tags question: http://stackoverflow.com/q/29118064
tag name: highcharts
tags question: http://stackoverflow.com/q/29180276
tags question: http://stackoverflow.com/q/29147250
tags question: http://stackoverflow.com/q/29217805

http://stackoverflow.com/a/29177109
type: Answer
score: 2
downvote count: 0
has body: Thanks to @tawpie's answer I figured out a workaround for this issue I'm having. That setInterval made me thing about my custom seekbar been updated (correctly) while the audio is playing and in calculating the width of it I was using audio duration value and from that results that the duration is working after media file play method is fired. The problem is that loadedmetadata event doesn't return the correct duration value (in some browsers like android webView), but after audio played for at least 1s the duration is updated and you can use it. So you can forget about loadedmetadata event and jump straight to canplay event and from there you can make something like this: var myAudio = new Audio(); myAudio.src = 'file://mnt/sdcard/audio.mp3'; myAudio.load(); myAudio.correctDuration = null; myAudio.addEventListener('canplay', function(){ myAudio.play(); myAudio.muted = true; setTimeout(function(){ myAudio.pause(); myAudio.currentTime = 0; myAudio.muted = false; myAudio.correctDuration = myAudio.duration; },1000); }); ...of course, you can use volume = 0.0/1.0 instead of mute. Another method would be to create a helper function (in my case - a AngularJS service) which takes your src value and uses the code above and returns the correctDuration. This one is preferred if you have listeners to audio timeUpdate which changes the DOM. The Media plugin works exactly the same way - if the audio haven't played for at least 1s you cannot use getDuration() method or duration property inside a interval/timeout wrapper to get the correct duration. I think the video element behaves similarly. I'll test it these days. Hope this workaround helps!
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29157863
answers question: http://stackoverflow.com/q/29157863

http://stackoverflow.com/a/29106120
score: 1
has body: The answer is no... You have access to variables which are in parent-scopes through something known as closure. function a () { var aValue = 1; console.log(aValue); // 1 function b () { aValue += 1; } console.log(aValue); // 1 b(); console.log(aValue); // 2 } This works because when you define a function (the place where the source-code is actually written in the file), that function is given reference to all of the variables in its parent's scope (and its parent's, et cetera, up to window). window, itself, is a ...special-case function, as far as variables are concerned. Think of it like b.secretTable.parent.secretTable.aVar += 1; ...you hit a reference error when you run out of .parent elements to climb up, and you still haven't found that variable name anywhere. Relying on the scope-tables for setting undeclared variables on window (if you set a value to a variable, it climbs up that scope chain, until it finds the scope where the var was declared, or it runs out of .parent elements... ...which is window, and then sets the value there) is approximately the worst thing, ever. ...relying on closure references, in general, is fantastic, in controlled ways, though. Relying on tight closure references (building thunks / currying functions / et cetera) is key for JavaScript that doesn't look like Java.
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29105923
type: Answer

http://stackoverflow.com/comment/46417734
has text: Please provide some code.
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29093108

http://stackoverflow.com/comment/46518816
comment on: http://stackoverflow.com/q/29147890
has text: Yes, I will edit the code above...
score: 0
type: Comment
type: QuestionComment

fuelux
tags question: http://stackoverflow.com/q/29210803
tag name: fuelux
type: Tag

list
type: Tag
tags question: http://stackoverflow.com/q/29070246
tags question: http://stackoverflow.com/q/29085341
tags question: http://stackoverflow.com/q/29180858
tag name: list
tags question: http://stackoverflow.com/q/29175519
tags question: http://stackoverflow.com/q/29200556
tags question: http://stackoverflow.com/q/29083099

http://stackoverflow.com/a/29136708
type: Answer
has body: Document sizes are a browser compatibility nightmare because, although all browsers expose clientHeight and scrollHeight properties, they don't all agree how the values are calculated. There used to be a complex best-practice formula around for how you tested for correct height/width. This involved using document.documentElement properties if available or falling back on document properties and so on. The simplest way to get correct height is to get all height values found on document, or documentElement, and use the highest one. This is basically what jQuery does: var body = document.body, html = document.documentElement; var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
upvote count: 7
answers question: http://stackoverflow.com/q/29134864
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/46533824

http://stackoverflow.com/comment/67673283
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29146612
has text: To make fixed columns you can use jQuery plugin http://www.jqueryscript.net/table/jQuery-Plugin-For-Fixed-Table-Header-Footer-Columns-TableHeadFixer.html

http://stackoverflow.com/comment/46628571
type: Comment
type: QuestionComment
has text: Notice that with the `return` statement inside the `while` loop it will never run more than once.
comment on: http://stackoverflow.com/q/29209090
score: 0

http://stackoverflow.com/comment/46421771
has text: Thank you for answer. Sorry but I still didn`t get how to achieve the correct letters order. In the example its **Á,Č,É,Š,S,Ů,Ž,Z** and the correct order is **Á,Č,É,S,Š,Ů,Z,Ž**.
type: AnswerComment
comment on: http://stackoverflow.com/a/29066159
score: 0
type: Comment

http://stackoverflow.com/a/29069540
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29069282
score: 0
accepted answer of: http://stackoverflow.com/q/29069282
type: Answer
has body: try this it worked First name: Last name: Student ID: Biography: Result:

http://stackoverflow.com/q/29163255
favorite count: 0
has comment: http://stackoverflow.com/comment/46545869
score: 2
has answer: http://stackoverflow.com/a/29163327
type: AnsweredQuestion
has title: Execute after setTimeout finished
has answer: http://stackoverflow.com/a/29163331
upvote count: 2
tagged with: loops
possible better answer: http://stackoverflow.com/a/29163327
type: Question
has comment: http://stackoverflow.com/comment/46545771
has comment: http://stackoverflow.com/comment/46545708
accepted answer: http://stackoverflow.com/a/29163331
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: Probably not very suitable title, but the question is the following. I've got this piece of code var someprogram = function(){ if(stopprocess) return; //do things setTimeout(someprogram, 1000); } setTimeout(someprogram, 1000); Sofar it works. After some number ot iterations, lets say 12, stopprocess is true and whole thing stops. I want to do some more things after the return. So the question is what is the best way to rewrite the structute to be able to do so? Because I need the timeout, but I don't know how else to stop the whole thing without using a return-statement. Any ideas? (I have only one javascript file for this task)

http://stackoverflow.com/q/29067146
tagged with: object
has comment: http://stackoverflow.com/comment/46370314
has comment: http://stackoverflow.com/comment/46369967
tagged with: prototype-oriented
has comment: http://stackoverflow.com/comment/46370526
tagged with: javascript
has comment: http://stackoverflow.com/comment/46370979
has comment: http://stackoverflow.com/comment/46369929
tagged with: prototype
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46370150
has comment: http://stackoverflow.com/comment/46370170
has comment: http://stackoverflow.com/comment/46370018
tagged with: prototype-chain
has body: I have an incomplete clone of Object.prototype, made to the best of my knowledge, can you show me how to finish it!? The Code function duplicate_object_prototype(){ var aRef=[ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', '__proto__' ]; var clone = Object.create(null); for(var i in aRef){ var ref = aRef[i]; var pro = Object.prototype[ref]; clone[ref] = pro; Object.defineProperty(clone,ref,{ writable:false, enumerable:false, configurable:false }); }; console.log('clone:',clone); return clone; } The Concept Create the clone, then: Object.defineProperty(Object.prototype,'str',{get:function(){ return JSON.stringify(this); }}) Because, through inheritance, Array.prototype now has the str property, configure Array's prototype chain to point to the clone when it should point to Object.prototype Object.setPrototypeOf(Array.prototype, clone); The Logic Now Array points to the clone, no modifications to Object.prototype will be inherited by any Array instance!
favorite count: 0
has comment: http://stackoverflow.com/comment/46370407
has comment: http://stackoverflow.com/comment/46370075
has title: how do i create an Object.prototype clone
has answer: http://stackoverflow.com/a/29067407
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46370195
accepted answer: http://stackoverflow.com/a/29067407
upvote count: 1
downvote count: 1
type: Question

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/29150760

http://stackoverflow.com/a/29199226
score: 1
downvote count: 0
has body: You can call a controller function inside the link block. You can also $emit an event in the directive and listen to the it in the controller (maybe there is a use case for that). It seems that you want to call it on mouseenter. You can do that by binding to the mouseenter event in the directive link. The catch is you need to $apply the changes. Take a look at the following piece of code, which contains all 3 examples: http://jsbin.com/cuvugu/8/. (also pasted below) Tip: You might want to pay attention to how you name your directives. To use a directive as my-directive you need to name it as myDirective. var app = angular.module('App', []); app.directive('myDirective', function () { function directiveLink(scope){ scope.$emit('customEvent'); } return { restrict: 'EA', scope: {}, link: directiveLink, controller: function ($scope) { $scope.bar = 'bar'; $scope.myFunction = function () { $scope.bar = 'foobar1'; }; $scope.$on('customEvent', function (){ $scope.myFunction(); }); }, template: "Foo {{bar}}" }; }); app.directive('anotherDirective', function () { function directiveLink(scope){ scope.myFunction(); } return { restrict: 'EA', scope: {}, link: directiveLink, controller: function ($scope) { $scope.bar = 'bar'; $scope.myFunction = function () { $scope.bar = 'foobar2'; }; }, template: "Foo {{bar}}" }; }); app.directive('mouseDirective', function () { function directiveLink(scope, element){ element.bind('mouseenter', function(){ scope.$apply(function(){ scope.myFunction(); }); }); element.bind('mouseleave', function(){ scope.$apply(function(){ scope.myOtherFunction(); }); }); } return { restrict: 'EA', link: directiveLink, controller: function ($scope) { $scope.bar = 'no'; $scope.myFunction = function () { $scope.bar = 'yes'; }; $scope.myOtherFunction = function () { $scope.bar = 'no'; }; }, template: "Mouse Enter: {{bar}}" }; }); I also included an example with a distinct controller in the JS Bin link. That doesn't really change anything, but it seems to be an import…
has comment: http://stackoverflow.com/comment/47893242
answers question: http://stackoverflow.com/q/29197586
has comment: http://stackoverflow.com/comment/46631245
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47843211

google-maps-api-3
tags question: http://stackoverflow.com/q/29129727
tags question: http://stackoverflow.com/q/29186043
tags question: http://stackoverflow.com/q/29094418
tags question: http://stackoverflow.com/q/29204412
tags question: http://stackoverflow.com/q/29161127
tags question: http://stackoverflow.com/q/29183851
tags question: http://stackoverflow.com/q/29165386
tags question: http://stackoverflow.com/q/29146831
tags question: http://stackoverflow.com/q/29131250
tags question: http://stackoverflow.com/q/29117793
tags question: http://stackoverflow.com/q/29156292
tags question: http://stackoverflow.com/q/29099608
tags question: http://stackoverflow.com/q/29133520
tags question: http://stackoverflow.com/q/29114798
tags question: http://stackoverflow.com/q/29171630
tags question: http://stackoverflow.com/q/29085955
tags question: http://stackoverflow.com/q/29148820
tags question: http://stackoverflow.com/q/29182835
tags question: http://stackoverflow.com/q/29117295
tags question: http://stackoverflow.com/q/29196855
tags question: http://stackoverflow.com/q/29117931
tags question: http://stackoverflow.com/q/29092286
tags question: http://stackoverflow.com/q/29062708
tags question: http://stackoverflow.com/q/29179410
tags question: http://stackoverflow.com/q/29133150
tags question: http://stackoverflow.com/q/29121221
tag name: google-maps-api-3
type: Tag
tags question: http://stackoverflow.com/q/29202303
tags question: http://stackoverflow.com/q/29163300
tags question: http://stackoverflow.com/q/29157626
tags question: http://stackoverflow.com/q/29212571
tags question: http://stackoverflow.com/q/29065938
tags question: http://stackoverflow.com/q/29152146
tags question: http://stackoverflow.com/q/29095640
tags question: http://stackoverflow.com/q/29176753
tags question: http://stackoverflow.com/q/29119190
tags question: http://stackoverflow.com/q/29185308
tags question: http://stackoverflow.com/q/29122580
tags question: http://stackoverflow.com/q/29168539
tags question: http://stackoverflow.com/q/29209181
tags question: http://stackoverflow.com/q/29080504
tags question: http://stackoverflow.com/q/29101088
tags question: http://stackoverflow.com/q/29160146
tags question: http://stackoverflow.com/q/29150249

http://stackoverflow.com/comment/46644886
has text: Thank you. I'm new to Gulp (node.js in general) and I really need to spend some time on streams
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29216935

http://stackoverflow.com/q/29129873
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: webbrowser-control
has comment: http://stackoverflow.com/comment/46494706
answer count: 0
type: UnansweredQuestion
has title: Testing .NET's WebBrowser.ObjectForScripting
upvote count: 1
tagged with: unit-testing
type: Question
linked to: http://stackoverflow.com/q/22239357
tagged with: c#
has body: I'm trying to 'augment' JavaScript by using WebBrowser.ObjectForScripting. A piece of 'augmented' JavaScript has a function that takes an object, does something, and calls a callback that is provided on that object. I also want to fail fast and throw an exception if a callback is not a function, in other words, I'd write something like this (this is a very simple example, a real function validation would be probably include that it has apply and call): [ComVisible(true)] public class MyScriptingObject { public void Foo(dynamic obj) { Type objType = obj.GetType(); var toStringRes = objType.InvokeMember( "toString", System.Reflection.BindingFlags.InvokeMethod, null, obj, null); if (!toStringRes.StartsWith("function")) { throw new Error("`data.callback` must be a function"); } //do something useful obj.callback("some data"); } } A call in the JavaScript world would look like: window .external .Foo( { callback: function (data) { alert('That is what we have got from C# ' + data); } }); How can I unit test method Foo()? Which test data do I provide? Ultimately, I want to know whether obj.callback() has been called. However, in order to get to the stage where it is executed we need to pass the validation first. And the problem is to pass data in such a way that obj.callback is both a method and also has toString() and possibly apply().

http://stackoverflow.com/comment/46493086
comment on: http://stackoverflow.com/q/29118654
score: 0
type: QuestionComment
has text: Ok so after a lot of headache and research I now know what was the problem. IFrames. The particular element I'm trying to modify resides inside an iframe and I can't access it via simple javascript. Is there some workaround available to userscripts to solve this issue?
type: Comment

http://stackoverflow.com/comment/46517120
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29147264
score: 0
has text: My first guess is that `window.onload` does not append functions, but overwrites them.

http://stackoverflow.com/q/29163566
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29165035
answer count: 1
tagged with: angular-ui
tagged with: angularjs
type: UnansweredQuestion
has body: Thank you in advance Q.1 I would like to format the Angular-UI Bootstrap date and time pickers. Every time I change the time or date the output is in the following manner Today is: "2015-03-19T22:00:00.000Z". Obviously this is in correct. And my Node-Mysql is filled with this date formatting What's more bizzar is that There is 1 day subtracted in the date, On the time it subtracts 2 hours. My Time zone is GMT+2 See MyBin. When I click on the date again to change it I want the date to stay as 2015-03-20 and the time to 11:20 Q.2 How can I properly validate the following Adults Your name is required. Your name is required to be at least 3 characters My js Looks like this $scope.adults = 4; $scope.children = 2; $scope.myAdults = []; for (i = 0; i < $scope.adults; i ++) { $scope.myAdults.push({}); } If I have just one form it works fine. But if I have more than one The validation messages only show up on the last one. Most Important is Q1 Thank you again.
type: Question
has title: Format Angular Date for DB storage

http://stackoverflow.com/q/29097497
accepted answer: http://stackoverflow.com/a/29097733
tagged with: javascript
score: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29097733
has title: Comparing 2 javascript numeric values in IF condition
type: AnsweredQuestion
upvote count: 1
has body: I set up a validation function in javascript to validate the values from the HTML page: &lt;script&gt; function validate() { var tterr = document.sngo2a.ttime; //This variable captures the value in field ttime var ttserr = document.sngo2a.sngottime; //This variable captures the value in field sngottime var errortimecheck = 0; if(ttserr.value &gt; tterr.value) { errortimecheck = 1; var sentence31 = "ERROR!! \n\nTravel time in Stop-&amp;-Go cannot be greater than the \nTotal travel time"; alert(sentence31); alert(ttserr.value); alert(tterr.value); } else { errortimecheck = 0; } } &lt;/script&gt; I'm getting the following values from the html page: ttime = 10 sngottime = 7 I then expected not to see any alert messages. However, I'm getting the alert message "ERROR!! Travel time in........." To make things even more confusing, when I replaced sngottime from 7 to 1. The logic runs fine. When displaying the values for tterr.value and ttserr.value, they seem to be displayed correctly. Can anyone help me out in figuring out the issue?
downvote count: 1
type: Question

http://stackoverflow.com/q/29095865
downvote count: 0
tagged with: twitter-bootstrap
has body: Hello i have a problem with my navbar. I want to animate it on scroll and change his height. When i scroll a bit down it should animate smaller and when im at the top of the page it should aniamte bigger. The standard height is 100px. The problem is when im at the top of the page it takes a delay, which i need to wait, until it animates. They delays gets longer if i scroll first to the bottom of the page and then back to the top. The has a height of 11000px. This is my code for it: $(document).on("scroll",function(){ if($(document).scrollTop()&gt;500) { $( ".navbar" ).animate({height: 50} ,{duration:100}); } else if($(document).scrollTop()==0) { alert("dhsihsp"); $( ".navbar" ).animate({height: 100} ,{duration:100}); } }); Maybe u can help me. I use Google Chrome and Bootstrap 3.
has comment: http://stackoverflow.com/comment/46423959
tagged with: navbar
type: Question
possible better answer: http://stackoverflow.com/a/29098127
upvote count: 2
has comment: http://stackoverflow.com/comment/46425812
has comment: http://stackoverflow.com/comment/46424264
answer count: 2
has title: Change Height of Navbar on Scroll Jquery with Bootstrap3
tagged with: javascript
has comment: http://stackoverflow.com/comment/46426489
tagged with: jquery
has answer: http://stackoverflow.com/a/29098081
accepted answer: http://stackoverflow.com/a/29098081
favorite count: 0
has comment: http://stackoverflow.com/comment/46425897
tagged with: css
has answer: http://stackoverflow.com/a/29098127
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/29117783
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29117900
type: Question
has comment: http://stackoverflow.com/comment/46463101
has title: javascript / jquery setting var not happening
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29117900
answer count: 1
has comment: http://stackoverflow.com/comment/46463042
has comment: http://stackoverflow.com/comment/46463745
has body: I have a rather perplexing problem that I cannot seem to resolve. The line in question is var currentactive = $("products-grid-pager ul li[class='active'] a").attr("pageid"); This var is always returning as undefined, however if I pause the debugger after this line and use the console to get $("products-grid-pager ul li[class='active'] a").attr("pageid"); then I get the desired result. Why will my var not set?

http://stackoverflow.com/q/29207529
has title: How to add or remove buttons to editable jquery datatables based on certain conditionals
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/30921073
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: I am using editable jquery datatables inside a .js file but when initializing the datatable, I want to be able to add buttons based on conditions. For example, if user only has Update access right but not Delete, only show Update button. So I have two options, either be able to add the buttons based on those conditions or be able to remove the button completely after initializing the datatable instead of only hiding it. What I have tried: I had no luck finding anything to try for the first option (adding buttons only when conditions are met) For the second option, I tried using CSS visibility and adding both buttons and later hiding one but if I only need the second one, the "placeholder" for the first (hidden) button makes the second button seem floating to the right. Are there any other options or methods I can use?
type: Question
tagged with: datatable
has answer: http://stackoverflow.com/a/32904029

http://stackoverflow.com/q/29064005
has comment: http://stackoverflow.com/comment/46365151
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46364708
tagged with: javascript
has title: Create a terminal style selection engine in JS used as simple selection method
type: Question
score: 0
has body: I would like to create a terminal style input method that would allow users to type dir or get and execute a series of commands I specify. In function it would be similar to a select menu where the selected/executed choice takes you to the page you want. I've investigated plugins such as http://terminal.jcubic.pl/ but this is more robust than I need. I essentially want the look of a terminal but would like to be able to execute certain commands on a per page basis. Such as look, run, walk. Similar to the classic Space Quest Kings Quest Games or in the last two decades subservient chicken. This is essentially a tip of the hat to the retro factor. I am at a bit of a loss of where to start and would greatly appreciate any help or direction you all could provide.
tagged with: canvas
tagged with: css

http://stackoverflow.com/q/29101325
has answer: http://stackoverflow.com/a/29161000
has title: Why length of XMLHttpRequest response differs from size of requested file?
score: 4
tagged with: response
type: Question
upvote count: 4
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: filesize
has body: If actual size of file is 6327 bytes (and content-length in response header is 6327), then why length of XMLHttpRequest response (value of xhr.response.length in code below) is different: 6085 in Chrome (Version 41) and 5961 in Firefox (Version 36)? //run this code somewhere on google.com to avoid access error var xhr = new XMLHttpRequest(); xhr.open('GET','https://www.google.com/images/errors/robot.png',true); xhr.onreadystatechange=function(e){ if(xhr.readyState==4&amp;&amp;xhr.status==200){ console.log(xhr.response.length); } }; xhr.send(); Command xhr.setRequestHeader('Content-Type','image/png'); or command xhr.setRequestHeader('Content-Type','application/zip'); does not help.
tagged with: xmlhttprequest
type: UnansweredQuestion

http://stackoverflow.com/q/29117225
has answer: http://stackoverflow.com/a/29117497
type: Question
answer count: 2
has body: I have a 2D array of x and y coordinates in Javascript, where the array looks like this: ---> 0: &nbsp; &nbsp; &nbsp;&nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 ..... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {x:1, y:1}, {x:1, y:2} ..... ---> 1: &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 ..... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {x:1, y:1}, &nbsp; &nbsp; &nbsp;{x:1, y:2} ..... So if I for instance write Array[0][0].x, the output is 1. I would like to turn this array into a JSON string, which would have the following syntax: { "name0": [ { "0": [ { "x": "1", "y": "1" }, { "x": "1", "y": "2" } ], "1": [ { "x": "1", "y": "2" }, { "x": "2", "y": "1" } ] } ], "name1": [ { "0": [ { "x": "1", "y": "1" }, { "x": "1", "y": "2" } ], "1": [ { "x": "1", "y": "2" }, { "x": "2", "y": "1" } ] } ] } where name0 and name1 (nameX) are not inside the mentioned 2d array, but passed from somewhere else inside the function where I am creating the JSON. Also, each nameX object is supposed to be pushed into the JSON with the call of this function.
tagged with: arrays
has answer: http://stackoverflow.com/a/29117338
tagged with: javascript
score: 0
tagged with: multidimensional-array
type: UnansweredQuestion
has title: Converting multidimensional arrays into JSON (string) in Javascript
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/29203928
tagged with: asp.net
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29204013
score: 0
tagged with: javascript
has body: The value must be retrived from javascript alert to textbox without losing runat="server". code as follow &lt;script type="text/javascript"&gt; $(".btn-group &gt; button.btn").on("click", function () { var name = this.innerHTML; ; $('#TextBox1').html(name); }); &lt;/script&gt;
accepted answer: http://stackoverflow.com/a/29204013
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29203978
has title: How to get value from javascript alert to textbox in asp.net
has answer: http://stackoverflow.com/a/29203978

http://stackoverflow.com/comment/46504964
type: Comment
has text: pressing enter on what element? like textbox is in focus and enter is pressed?? it can be achieved using form submission OR you have to listen to keypress/keydown event on entire document. this is not clear from your question.
type: QuestionComment
comment on: http://stackoverflow.com/q/29140626
score: 0

http://stackoverflow.com/comment/46638248
type: Comment
comment on: http://stackoverflow.com/a/29214445
has text: Hi thanks for the answer. This was pointed out in the comments and I tried it. Didn't change anything for me.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29162402
has comment: http://stackoverflow.com/comment/46566673
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46582345
has answer: http://stackoverflow.com/a/29178053
has comment: http://stackoverflow.com/comment/46554334
possible better answer: http://stackoverflow.com/a/29177665
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46572832
has comment: http://stackoverflow.com/comment/46566730
linked to: http://stackoverflow.com/q/18245611
has comment: http://stackoverflow.com/comment/46580421
has title: Mocha test timeouts when testing length of array
tagged with: javascript
tagged with: mocha.js
tagged with: tdd
has comment: http://stackoverflow.com/comment/46572481
answer count: 3
has comment: http://stackoverflow.com/comment/46558637
has comment: http://stackoverflow.com/comment/46565761
has answer: http://stackoverflow.com/a/29177665
favorite count: 0
has comment: http://stackoverflow.com/comment/46563749
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46565661
has comment: http://stackoverflow.com/comment/46558416
has body: I'm testing a little node module with mocha and expect.js and I'm having a bit of a headache. This is the test definition: it('Should return an expansion array that contains all the objects that comes along within a single group', function (done) { visibility.expand(data, config.data, companies, groups, function (error, expansion) { expect(error).to.be(null); expect(expansion).to.be.an('array'); expect(expansion).to.have.length(2); expect(expansion.toString()).to.eql([testCompaniesIds[2], testCompaniesIds[3]].toString()); done(); }); }); data is a wrapper for database access and functionality. I initialize it in the before method of my test suite. config.data holds an object with config params (not relevant) companies is an array of strings groups is an array of strings The problem that i'm facing is that when Mocha reaches this line expect(expansion).to.have.length(2); and the length is different from 2, instead of throwing an error like: Expected 2 but length was 1 it simply stops and throw an error because of the timeout. I verified that the test executed until that line. A bit more of information: the method that I'm testing receives an array of company names and an array of group names. Each group contains an array of company database id's. The expected behaviour of the method is to return an array with corresponding company id's merged with the array of company id's belonging to the group object. Edit 2 due to possible duplicate: I was wrong. It was indeed executing in the scope of a promise. Edit due to possible duplicate: the expectation in not executing in the scope of a promise (when using promises and executing expect in either resolve or reject functions is the promise who catch the error). Thanks in advance!
has answer: http://stackoverflow.com/a/29345620
accepted answer: http://stackoverflow.com/a/29345620
linked to: http://stackoverflow.com/q/11235815
tagged with: node.js

http://stackoverflow.com/comment/46462994
type: Comment
comment on: http://stackoverflow.com/q/29114798
type: QuestionComment
has text: what does your `waypts` look like when you alert it (or do `console.log()`)?
score: 0

http://stackoverflow.com/comment/46611780
comment on: http://stackoverflow.com/q/29197627
score: 1
type: Comment
has text: I edited your question... never say things like "I'm in urgent need so please help"... nobody cares, and it makes people not want to answer your question. Do you really believe that by saying you have an urgent problem that someone will answer your question more quickly than they would anyway? No, that is not the case. Please, ask focused specific questions here and you will get good answers.
type: QuestionComment

http://stackoverflow.com/comment/46447001
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29107475
type: Comment
has text: @Blazemonger I couldn't found a satisfy answer so if you think that this question was already answered, please give me here title of duplicated question.

http://stackoverflow.com/q/29169945
has answer: http://stackoverflow.com/a/39015140
has comment: http://stackoverflow.com/comment/65425437
upvote count: 10
has body: I have written a program that indicates all instances of a desired wordclass in a text. This is how I do it: Make an array of words from the entire text Iterate this array. For each word, look what its first letter is. Jump to the corresponding array in an object of all words of the selected wordclass (e.g 'S') and iterate it. Break if the word is found and push it into an array of matches. After all words are checked, iterate the array of matches and highlight each one in the text. A text which consists of 240000 words is processed in 100 seconds regarding nouns and about 4.5 seconds regarding prepositions on my machine. I am looking for a way to improve performance and those are the ideas I could come up with: Rearrange the items in each block of my wordlist. Sort them in a way that if the word starts with a vocal, all items that have a consonant as its second character come first and vice versa. (in the assuming that words with double vocals or consonants are rare) Structure the text into chapters and process only the currently shown chapter. Are those solid ideas and are there any more ideas or proven techniques to improve this kind of processing?
has answer: http://stackoverflow.com/a/39035799
has answer: http://stackoverflow.com/a/39021745
score: 8
favorite count: 0
has answer: http://stackoverflow.com/a/39037989
has title: Increasing performance on text processing
has comment: http://stackoverflow.com/comment/46558392
has comment: http://stackoverflow.com/comment/65451838
has comment: http://stackoverflow.com/comment/65451842
tagged with: text
type: AnsweredQuestion
tagged with: performance
tagged with: process
possible better answer: http://stackoverflow.com/a/39021745
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/65407810
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29170665
has answer: http://stackoverflow.com/a/29170162
accepted answer: http://stackoverflow.com/a/29170162

http://stackoverflow.com/comment/46373981
comment on: http://stackoverflow.com/q/29069002
type: Comment
type: QuestionComment
has text: Or you can take also a look at this demo http://jsfiddle.net/tw6g2oeu/18/ that uses a plugin I've created in this answer: http://stackoverflow.com/a/27462500/383904
score: 0

http://stackoverflow.com/q/29102048
has comment: http://stackoverflow.com/comment/46434676
tagged with: local-storage
type: Question
has answer: http://stackoverflow.com/a/29102122
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46435794
has body: I have a scope function that returns an object (in JSON format) it gets from local storage (using this service https://github.com/grevory/angular-local-storage): $scope.getLsKeys = function(){ $scope.lsKeys = localStorageService.get('accountKeys'); return $scope.lsKeys; }; I want to iterate over the returned object's property with an ng-repeat like so: &lt;button ng-click="console.log(key)" ng-repeat="item in getLsKeys()"&gt;&lt;/button&gt; The problem is that since getLsKeys/localStorageService return a new object every digest cycle, Angular gets confused about what objects it should be watching, since it thinks it has never seen the object before (which is technically true). The error message is: Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: $watchCollectionWatch; newVal: 81; oldVal: 79"],["fn: $watchCollectionWatch; newVal: 83; oldVal: 81"],["fn: $watchCollectionWatch; newVal: 85; oldVal: 83"],["fn: $watchCollectionWatch; newVal: 87; oldVal: 85"],["fn: $watchCollectionWatch; newVal: 89; oldVal: 87"]] All attempts to use "track by" in the ng-repeat fail, as the collection is stored as an object, not as an array (I unfortunately can't change my coworkers code to make that change). Is there any way to easily solve this problem? The only solution I've come up with is to iterate over $scope.lsKeys instead and just update it whenever local storage is modified, but that really defeats the entire purpose of Angular. EDIT: The local storage is modified during application runtime and needs to be read by Angular; that is, getLsKeys needs to be called during run-time, not just initialization.
has comment: http://stackoverflow.com/comment/46434138
has comment: http://stackoverflow.com/comment/46434119
has comment: http://stackoverflow.com/comment/46434889
has title: How to ng-repeat over an object stored in Local Storage
has comment: http://stackoverflow.com/comment/46435002
type: UnansweredQuestion

http://stackoverflow.com/comment/46425919
type: Comment
comment on: http://stackoverflow.com/a/29097432
score: 0
type: AnswerComment
has text: The way you use your modal it's not the same that i use it. I can't found the solution in your code

http://stackoverflow.com/a/29164008
answers question: http://stackoverflow.com/q/29163608
has body: You can iterate through jquery's each function as: var makelist; $.each(objData, function(i, data){ makelist = '&lt;li&gt;'+data.title+'&lt;/li&gt;'; $("#conatiner").append(makelist); });
type: Answer
score: 0

http://stackoverflow.com/q/29127509
has comment: http://stackoverflow.com/comment/46481172
has answer: http://stackoverflow.com/a/29127641
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/22929862
has comment: http://stackoverflow.com/comment/46481144
has comment: http://stackoverflow.com/comment/46481316
score: 0
has answer: http://stackoverflow.com/a/29127655
type: UnansweredQuestion
tagged with: regex
type: Question
answer count: 2
has body: Is there a way to find element using regex to search in its text. So for example, if element p has word kobra in it then jquery selector returns the list of those elements optionally wrapping matched words in span element. I need it to create search functionality. Basically there is a li based list. User enters a term, then all elements are gotten using that regex to element selector, then upon clicking next user is scrolled to that position.
has title: Find element in which regex matches using jquery?

http://stackoverflow.com/q/29097630
has body: My javascript Date received like this. trip.Date: "/Date(1426530600000)/" How can i convert this to Date format I tried this working: var dt = new Date(1426530600000); // output: Tue Mar 17 2015 00:00:00 GMT+0530 (India Standard Time) Is there any other predefined methods to convert this "/Date(1426530600000)/"
has comment: http://stackoverflow.com/comment/46426062
has answer: http://stackoverflow.com/a/29097814
linked to: http://stackoverflow.com/q/17779744
has answer: http://stackoverflow.com/a/29097786
duplicate of: http://stackoverflow.com/q/23796347
has title: JavaScript Date receive as object like this trip.Date: "/Date(1426530600000)/"
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29097938
has comment: http://stackoverflow.com/comment/46425692
type: Question
linked to: http://stackoverflow.com/q/23796347
has answer: http://stackoverflow.com/a/29097938
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29097786
has comment: http://stackoverflow.com/comment/46425737
score: 0
answer count: 3

http://stackoverflow.com/q/29130814
has body: I've been trying to debug a webpage on mobile firefox without the remote debugger. To do that I thought I could use some javascript intercept all calls to console.log, console.error console.warn etc. and print to div. But I can't seem to get it print out anything other than the first test logs. AFAICT, No logs from the browser or the other scripts seem to appear in the page element. This is the code: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Clang in JS&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;link href="css/bootstrap.css" rel="stylesheet"&gt; &lt;style&gt; body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ } &lt;/style&gt; &lt;link href="css/bootstrap-responsive.css" rel="stylesheet"&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="navbar navbar-inverse navbar-fixed-top"&gt; &lt;div class="navbar-inner"&gt; &lt;div class="container"&gt; &lt;button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/button&gt; &lt;!--a class="brand" href="lua.vm.js.html"&gt;lua.vm.js&lt;/a&gt; &lt;div class="nav-collapse collapse"&gt; &lt;ul class="nav"&gt; &lt;li&gt;&lt;a href="lua.vm.js.html"&gt;Benchmarks+FAQ&lt;/a&gt;&lt;/li&gt; &lt;li class="active"&gt;&lt;a href="repl.html"&gt;REPL&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="script_example.html"&gt;Script Example&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div--&gt;&lt;!--/.nav-collapse --&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;div class="hero-unit"&gt; &lt;h2&gt;Clang in JS&lt;/h2&gt; &lt;p&gt;This is &lt;a href="http://clang.llvm.org/"&gt;Clang&lt;/a&gt; running in JS, ported by &lt;a hr…
type: Question
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: web-console
favorite count: 0
score: 2
upvote count: 2
type: UnansweredQuestion
has title: Redirecting Firefox's web console output to a page element
linked to: http://stackoverflow.com/q/20256760
has comment: http://stackoverflow.com/comment/125838694
has answer: http://stackoverflow.com/a/29133965

http://stackoverflow.com/comment/46429575
comment on: http://stackoverflow.com/a/29099204
score: 1
type: AnswerComment
has text: @gal007 `e.preventDefault()` already cancels any other element behaviour, I think the default `onclick` function is just faster since its written in native code, and overwriting it replaces it with slower JS. It will work, but this is really better practise.
type: Comment

http://stackoverflow.com/a/29113255
has comment: http://stackoverflow.com/comment/46456468
type: AcceptedAnswer
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46457467
answers question: http://stackoverflow.com/q/29113210
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29113210
has comment: http://stackoverflow.com/comment/46456128
downvote count: 1
has comment: http://stackoverflow.com/comment/46463646
has comment: http://stackoverflow.com/comment/46455763
has body: db.collection.find returns a Cursor which is A pointer to the result set of a query. Clients can iterate through a cursor to retrieve results. By default, cursors timeout after 10 minutes of inactivity Refer : http://docs.mongodb.org/manual/reference/method/db.collection.find if you want to store result of find() you can iterate over it . eg. collection= db.collection('users'); result =collection.find().forEach(function(item){ //here item is record. ie. what you have to do with each record. })
has comment: http://stackoverflow.com/comment/46458288
has comment: http://stackoverflow.com/comment/46456232

http://stackoverflow.com/a/29161423
accepted answer of: http://stackoverflow.com/q/29160687
type: Answer
has body: Yes, you could use some plug-in, but this logic is not incredibly hard to write yourself. The basic notion is to keep reducing the amount of text until it fits. This sounds expensive, but in practice it works fine, and could be optimized if necessary. // Populate an element with text so as to fit into height function truncate(elt, content, height) { function getHeight(elt) { return elt.getBoundingClientRect().height; } function shorten(str) { return str.slice(0, -1); } elt.style.height = "auto"; elt.textContent = content; // Shorten the string until it fits vertically. while (getHeight(elt) &gt; height &amp;&amp; content) { elt.textContent = (content = shorten(content)) + '...'; } } To use this: truncate(div, "Some very long text to be truncated", 200) To use with HTML content, adapt/extend as necessary.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46609338
answers question: http://stackoverflow.com/q/29160687
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29073267
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46380725
has body: I am currently facing some issues related to ionic-tabs and Floating tabs concept. Currently using ionic framework..I am building a mobile app in which I want tabs to get fixed below header once the page is scrolled till the position where the tab is. I have kept ion-tabs inside ion-content. After getting the scroll position I have added a class "fixed". As it adds the class fixed,the background changes to white (no content visible) and the tabs get hidden instead of getting fixed at the position below header. $scope.onScroll = function() { var scrollWidth = $(".bar".height() + $(".maincontent".height(); console.log($ionicScrollDelegate.getScrollPosition()); console.log(scrollWidth); if (parseInt($ionicScrollDelegate.getScrollPosition().top) > scrollWidth) { $('ion-tabs').addClass('fixed'); } else { $('ion-tabs').removeClass('fixed'); } }; .fixed { left: 0; top: 44px; position: fixed; z-index: 100; width: 100%; }
has comment: http://stackoverflow.com/comment/48429381
has comment: http://stackoverflow.com/comment/47947026
type: UnansweredQuestion
type: Question
has title: tabs in ionic framework
tagged with: ionic-framework
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/30331931
tagged with: javascript
has comment: http://stackoverflow.com/comment/46381219
tagged with: controller
has comment: http://stackoverflow.com/comment/48818618

http://stackoverflow.com/q/29157708
type: Question
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/8013429
has comment: http://stackoverflow.com/comment/46536069
type: UnansweredQuestion
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/46536076
has body: I'm developing Google Chrome Extension and I need to know when the tab is being reloaded or redirected to another page. chrome.tabs.onUpdated.addListener(function callback) let's me know when the tab is being redirected simply by checking if changeInfo.url is not undefined. But how can I catch when it's being current page on active tab is being reloaded? I tried to do it with changeInfo.status, but that's not working, since I'm making changes to page and this event onUpdated event is being fired then too.
has comment: http://stackoverflow.com/comment/46535997
answer count: 0
has title: How to catch an event when tab is being reloaded?
has comment: http://stackoverflow.com/comment/46535955

http://stackoverflow.com/q/29201843
answer count: 1
tagged with: javascript
tagged with: gulp
favorite count: 0
has title: How to debug gulpfile.js
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 6
has body: What is the proper way to execute node-inspector in order to be able to debug gulpfile.js? I've tried following (code in my gulpfile requires harmony and harmony-arrow-functions switches): node-debug --nodejs --harmony --nodejs --harmony-arrow-functions /home/user/.npm-packages/bin/gulp default Node inspector was properly loaded however it was not possible to set breakpoint in gulpfile neither before nor after the file was loaded. It was also not possible to set breakpoints in gulp/index.js and orchestrator/index.js files. And it was not possible to "step into" following statement (whole source): gulpInst.start.apply(gulpInst, toRun); Environment: Fedora 21 x64 Node Inspector v0.9.2 node v0.12.0 gulp CLI version 3.8.11 Local version 3.8.11
type: Question
tagged with: debugging
tagged with: node-inspector
upvote count: 6
has answer: http://stackoverflow.com/a/30689591
accepted answer: http://stackoverflow.com/a/30689591

http://stackoverflow.com/comment/47889919
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29212119
type: Comment
has text: I tried it with xpaths, but somehow they don't work in extendscript. name(//element/@*[1]) works in any xpath evaluater but in extendscript it returns nothing

http://stackoverflow.com/q/29079348
accepted answer: http://stackoverflow.com/a/29080717
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29079790
has body: Below I have an an angular bootstrap accordion and I am trying to figure out how to properly scope an array to each accordion panel. For example, below I have an accordion and inside each panel, I print out an array called 'item'. The add item button adds a new item to the array and updates every panel. My question is, how would I only update the array in the panel where I clicked on the config button and not update the arrays in the other panels? Do I need to create an instance of the items array for each panel? <accordion> {{product}} Add item {{items}} $scope.items = ['Item 1', 'Item 2', 'Item 3']; $scope.addItem = function() { var newItemNo = $scope.items.length + 1; $scope.items.push('Item ' + newItemNo); };
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29080717
score: 0
has title: Update an array in an angular accordion panel
answer count: 3
tagged with: arrays
possible better answer: http://stackoverflow.com/a/29079922
has answer: http://stackoverflow.com/a/29079922
tagged with: angularjs

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/29158337
tags question: http://stackoverflow.com/q/29199439
tags question: http://stackoverflow.com/q/29211146
tags question: http://stackoverflow.com/q/29112472
tags question: http://stackoverflow.com/q/29070030
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/29125015
tags question: http://stackoverflow.com/q/29123765
tags question: http://stackoverflow.com/q/29150516
type: Tag
tags question: http://stackoverflow.com/q/29125415
tags question: http://stackoverflow.com/q/29088177
tags question: http://stackoverflow.com/q/29087304
tags question: http://stackoverflow.com/q/29110117
tags question: http://stackoverflow.com/q/29107653
tags question: http://stackoverflow.com/q/29066242
tags question: http://stackoverflow.com/q/29082358
tags question: http://stackoverflow.com/q/29156767

http://stackoverflow.com/a/29196518
type: Answer
has body: The function returned from the .doSomething() function is invoked without any context, so the value of this will be the global context. Depending on what you want, you can provide a context in different ways. For example, you could have doSomething() always return a function that's bound to the object involved in its invocation: doSomething:function(){ return function(){ return this.name; }.bind(this); } You could also explicitly provide the context when you call it: console.log(object2.doSomething().call(object2));
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29196468
downvote count: 0

http://stackoverflow.com/q/29186351
tagged with: arrays
tagged with: javascript
score: 0
has body: This is not a question, but more of a public help... I was given an assignment to find the Armstrong Numbers within 100 (there are only 0 and 1) as an assignment. I searched the internet to find such a program, but none. Methods for arrays and some other stuff were only available and I didn't have time for asking help and getting the script done... So, here I give you the JavaScript program for finding Armstrong Numbers... I know that the method is redundant, and if you have a better idea in mind, please share... Thank you. var a = []; var b = new Array(); for (var ii = 0; ii &lt; 3; ii++) { b[ii] = new Array(1001); for (var j = 0; j &lt; 1001; j++) { a[j] = 0; b[ii][j] = 0; } } for(var i = 0; i &lt; 1001; i++) { a[i] = i; b[0][i] = a[i] % 10; b[1][i] = Math.floor(i / 10); b[1][i] = b[1][i] % 10; b[2][i] = Math.floor(i / 100); b[2][i] = b[2][i] % 10; if (i === Math.pow(b[0][i], 3) + Math.pow(b[1][i], 3) + Math.pow(b[2][i], 3)) { console.log(i + " is an armstrong number."); } }
answer count: 1
has comment: http://stackoverflow.com/comment/46588104
type: UnansweredQuestion
has title: Armstrong Numbers using JavaScript
has answer: http://stackoverflow.com/a/79513754
has comment: http://stackoverflow.com/comment/46587886
type: Question

http://stackoverflow.com/q/29068134
has answer: http://stackoverflow.com/a/29071574
tagged with: javascript
tagged with: phonegap-plugins
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29071574
tagged with: cordova-plugins
tagged with: cordova
has title: Cordova PhoneGap Android Callback with data
has body: I cant figure out how to get data back from JAVA to javascript so I can update the UI using Cordova on Android. here are two buttons, as they are pressed they increment the position counter which I want to return to the UI and update the screen but cannot figure out how its returned. I thought I could just add the switchPos to the callback but cant seem to pick it up anywhere in javascript, I was planning to write the value to the UI with a ".innerHTML =" statement. Here is the plugin javascript. cordova.define(‘myplugin', function (require, exports, module) { module.exports = { switch1: function (success, failure) { cordova.exec(success, failure, “MyPlugin", “switch1”, []); }, switch2: function (success, failure) { cordova.exec(success, failure, “MyPlugin", “switch2”, []); } }; }); Here is the javascript that calls them. var myplugin = cordova.require('myplugin'); var myapp = { appButton1: function(){ myplugin.switch1(); }, appButton2: function(){ myplugin.switch2(); } }; Here is the JAVA code for the plugin. public class MyPlugin extends CordovaPlugin { // actions private static final String SWITCH1 = “switch”1; private static final String SWITCH2 = “switch”2; // callbacks private CallbackContext connectCallback; // Switch Counters public static int switchPos1 = 1; public static int switchPos2 = 1; @Override public boolean execute(String action, CordovaArgs args, CallbackContext callbackContext) throws JSONException { boolean validAction = true; if (action.equals(SWITCH1)) { Log.d("Valid Action = SWITCH1 Pos: “ + switchPos1); switchPos1++; callbackContext.success(switchPos1); } else if (action.equals(SWITCH2)) { Log.d("Valid Action = SWITCH2 Pos: “ + switchPos2); switchPos2++; callbackContext.success(switchPos2); } else { validAction = false; } return validAction; } }
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29068883
tagged with: java
has answer: http://stackoverflow.com/a/29068883
type: Question

http://stackoverflow.com/comment/47191171
type: Comment
type: QuestionComment
has text: Add the solution that worked as answer and accept it
comment on: http://stackoverflow.com/q/29158791
score: 0

http://stackoverflow.com/comment/46364910
has text: `var code = 26; div.setAttribute('title', "\x" + code);` - Now I have a error, how I can fix it?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29064120

http://stackoverflow.com/q/29071523
has answer: http://stackoverflow.com/a/29071579
favorite count: 0
possible better answer: http://stackoverflow.com/a/29071886
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: How to hide the text on textbox focus using Javascript
has answer: http://stackoverflow.com/a/29071886
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29071579
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29072223
has body: I need to hide the text after tag. My html fields are, Loading... Javascript functions are, function disp_hide_image() { $('#layered_ajax_loader').show(); $('layered_ajax_loader').hide(); $('img[src=".loader.gif"]').hide(); $("div p:contains('Loading...')").parent('div').hide(); } I need to hide the text Loading... when the text box is empty . How can I achieve this.
tagged with: javascript
answer count: 3
downvote count: 0

http://stackoverflow.com/q/29149174
tagged with: javascript
has comment: http://stackoverflow.com/comment/48735524
tagged with: jquery
has title: Click events stop working after replacing attribute of <use> element in (Win7/IE11)
score: 13
has comment: http://stackoverflow.com/comment/47301065
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/47286691
has comment: http://stackoverflow.com/comment/46526664
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/46525411
has comment: http://stackoverflow.com/comment/46523815
has comment: http://stackoverflow.com/comment/46525360
has answer: http://stackoverflow.com/a/30871205
has comment: http://stackoverflow.com/comment/46523993
upvote count: 13
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46525783
has comment: http://stackoverflow.com/comment/46522910
type: Question
has comment: http://stackoverflow.com/comment/46526397
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/30871205
downvote count: 0
has body: We are using multiple svg symbols for displaying icons. <rect... /> <circle... /> In some cases we need to replace them later on with another icon (like on a collapse control), therefore I created a little helper function to change the xlink:href to the new symbol name. $.fn.replaceSVGIcon = function(id) { $(this).find('svg') .andSelf() .filter('svg') .find('use') .attr('xlink:href', '#' + id); } This works in every browser except for IE10 + IE11 on Windows 7 (but weirdly enough it works with Windows 8). When you open the snippet below in IE11 and click on the red box everything is fine, but as soon as you start clicking on the element within, it breaks the whole page after the icon is changed for the first time. (function($){ $.fn.replaceSVGIcon = function(id) { $(this).find('svg').andSelf().filter('svg').find('use').attr('xlink:href', '#' + id); } })(jQuery); clickFunction = function() { var $elem = $('#icon'); if ($elem.find('use').attr('xlink:href') == '#rect') { $elem.replaceSVGIcon('circle'); } else { $elem.replaceSVGIcon('rect'); } }; #icon-container { visibility: collapse; display: none; } #icon { height: 40px; width: 40px; fill: #454545; cursor: pointer; } Why is this happening and is this a known Internet Explorer bug? What are my options to work around this issue?

http://stackoverflow.com/comment/46420427
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29073566
type: AnswerComment
has text: Add one error call back block in your ajax code and check for any error in console. For ajax usage detail see the link : http://api.jquery.com/jquery.ajax/ `error: function(data){ console.log(data);}`

http://stackoverflow.com/comment/46406199
type: AnswerComment
type: Comment
has text: Thanks Dayan, I'll Learn about this... I don't solved yet, I'm learning AngularJS... These controllers can be a bit confusing, especially when we do not have a lot of stuff about this in my native language. Soon I will test, must learn first about service.
comment on: http://stackoverflow.com/a/29086367
score: 0

http://stackoverflow.com/q/29155988
linked to: http://stackoverflow.com/q/588004
tagged with: floating-point
type: Question
has comment: http://stackoverflow.com/comment/46532676
answer count: 1
has comment: http://stackoverflow.com/comment/46532773
tagged with: javascript
tagged with: floating-accuracy
has body: If you put this in the browser address bar (firefox/IE8): javascript:alert(40.34+56.87) Why the result comes as 97.2100000000001 when its supposed to be 97.21
score: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/588004
has title: Browser wrong javascript float calculation?
has answer: http://stackoverflow.com/a/29156101

http://stackoverflow.com/q/29213237
has title: Clicking checkbox and showing "news" only with that type of category
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29927172
tagged with: checkbox
tagged with: select
type: Question
has body: So I've made the code that reads news from a website, and then it shows up on my website. Here's what happens: I read the categories and put them on an array, I check if it exists in the array already or not, and if it doesn't, then I add the category with .push on the array. What I need is to click the checkbox (multiple checkbox can be clicked/selected), refresh the page and show the news that have the category selected only. Example: 1 Category: A Text 2 Category: B Text 3 Category: B Text 4 Category: C Text If I click the "B" checkbox, only #2 and #3 should appear. If I click both "B" and "C" checkboxes, #2, #3 and #4 should appear. (As you may notice, I've already tried to getElementById and make it again, but doesn't work, so I deleted showNews function) Any idea of what to do? My actual code: var noticiasTodas; var pagActual = 0; var numNoticiaPag = 5; var noticiasActuais; var categorias; var arrayC = []; var count = 0; $(document).ready(function(){ $.getJSON("http://193.137.65.112/tpsi/noticias.php", function(dados){ noticiasTodas = dados.noticias; categorias = []; setCategoria(); escreveNoticias(); }); }); // ------- works function setCategoria() { noticiasActuais = noticiasTodas; } function showNews(){ var p_body = $("#noticiasDiv"); p_body.empty(); for(var i = 0; i < arrayC.length; i++) { $.each(noticiasActuais, function(index, noticiasActuais){ if(noticiasActuais.categoria == arrayC[i]) { var linha = " "+noticiasActuais.titulo+" "+noticiasActuais.categoria+" "+noticiasActuais.subtitulo+" "+noticiasActuais.artigo+" "+noticiasActuais.data+" "; p_body.append(linha); } }); } } // ------- works function escreveNoticias() { var p_body = $("#noticiasDiv"); p_body.empty(); var c_body = $("#checkboxDiv"); c_body.empty(); $.each(noticiasActuais, function(index, noticiasActuais){ var linha = " "+noticiasActuais.titulo+" "+noticiasActuais.categoria+" "+noticiasActuais.subtitulo+" "+noticiasActuais.artigo+" "+noticiasActuais.data+" "; p_body.append(linha); var test =…
answer count: 1
tagged with: javascript
tagged with: show
score: 0

http://stackoverflow.com/a/29164158
type: Answer
has body: I didn't find a solution using main-bower-files. So I tried another package : bower-files (require('bower-files')();). And the working task look like this : gulp.task('js-libs', function() { gulp.src(lib.ext('js').files) .pipe(concat('libs.js')) .pipe(uglify()) .pipe(gulp.dest('js')); }); It just takes all the files set as dependencies in Bower and returns it. Then I concat / uglify and send it to my JS build folder (and then, the main JS task is watching for changes and add it to the main JS file, concat / uglify it and send it to the dist.
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29142648
answers question: http://stackoverflow.com/q/29142648

http://stackoverflow.com/comment/46444768
score: 0
type: Comment
has text: This is a bit of an odd hack; that line in `.inner-text` was supposed to center the text within its container div (avoiding weird offsets). This removes the skew, but places the player way off center (decrease `tileScale` for a good look). +1'd for odd insight, yet the root of the problem remains unsolved.
comment on: http://stackoverflow.com/a/29107042
type: AnswerComment

http://stackoverflow.com/q/29156492
favorite count: 0
has comment: http://stackoverflow.com/comment/46533706
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
has comment: http://stackoverflow.com/comment/46533675
has comment: http://stackoverflow.com/comment/46533801
has comment: http://stackoverflow.com/comment/46533816
accepted answer: http://stackoverflow.com/a/29156678
has title: How can i return two javascript values to two different HTML text fields
tagged with: php
has body: So what i want to get done is that the user selects two dates from two inputs an the javascript calculates the days and print that to another textfields. Now that part is working but i also want to use the $_POST['pris'] to calculate the total price based on the number of days and print the new price to another textfield here is the form i'm trying to both get data from and post data to with the Javascript above: function leibil(){ $reg = $_POST['reg']; $bruker = $_POST['bruker']; $pris = $_POST['pris']; echo" Fyll ut utleieskjema Lei fra: Lei til: Leveringssted: Alle Oslo Bergen Drammen Trondheim Lillehammer RegNr: BrukerID: Dager: Total Pris: "; } Here is the php file i'm have the function for the form in: <?php session_start(); include_once ("hjelpefunksjoner.php"); ?> Søkeresultat| Oppgave - Database & web Prosjektoppgave - Database og Web Vår 2015 Hjem Medlemmer Beskrivelse SQL-Script <?php echo" Du har valgt: " . $_POST['makeAndModel'] . " "; status(); ?> <?php leibil(); ?> <?php VisLeieBil(); ?>
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29156678
score: -1
tagged with: forms
type: Question
answer count: 1
downvote count: 1
tagged with: javascript

http://stackoverflow.com/q/29073065
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46380332
has comment: http://stackoverflow.com/comment/46509372
tagged with: angularjs
has body: I am having a view script var app = angular.module('section', []); app.controller('ParentController', ['$scope', function($scope){ // }]); app.controller('ChildController', ['$scope', function($scope){ // }]); app.directive('myDirective', function(){ return { template : function(ele, args){ return ' '; }, restrict : 'E' } }); Upon render i get, 'ChildController' is not a function, got undefined' why is that so?
type: AnsweredQuestion
has title: nested views in angularjs with each having separate controllers
has answer: http://stackoverflow.com/a/29073220
accepted answer: http://stackoverflow.com/a/29073220
type: Question
answer count: 1

http://stackoverflow.com/q/29166747
has title: How to load a page faster even multiple js files are specified in single page
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46552438
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46552037
favorite count: 0
has body: I have more then 20 script files in my page. The page is not loading until all script files and css files completely loaded when ever request made for this page. please let me know any suggestions for loading this page very fast.
has comment: http://stackoverflow.com/comment/46552056
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46552032
has answer: http://stackoverflow.com/a/29166849

http://stackoverflow.com/comment/46557889
has text: can you remove the quotes on YTParam
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29169764

http://stackoverflow.com/comment/46463099
has text: Well, I chose this above anonymous functions, because I reuse the same callbacks multiple times.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29117804

http://stackoverflow.com/comment/46472265
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29122580
has text: Did you not deny geolocation?
type: Comment

http://stackoverflow.com/comment/46384663
comment on: http://stackoverflow.com/a/29075043
has text: @VilasGalave: Read the linked documentation.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46413224
comment on: http://stackoverflow.com/q/29090420
score: 0
type: Comment
type: QuestionComment
has text: i want to print "result.length_valid" in between html tag..!!

http://stackoverflow.com/comment/46403571
comment on: http://stackoverflow.com/a/29085081
score: 0
type: Comment
has text: Dude, really? This is code that works and it's only meant to be starting point. Will you do it inline, or define var x = document.getElementByWhateverIsBestForYou; x.addEventListener....... this is not a production code, only answer on question that is focused on logic, not implementation. Main idea is "use onkeypress, not onfocusout", else is too easy to be debated....
type: AnswerComment

http://stackoverflow.com/comment/46585286
type: Comment
type: QuestionComment
has text: @AlexanderSolonik After all that talk, I totally forgot to reopen the question. Not that it matter much since you got your answer, but still. Have a good day.
comment on: http://stackoverflow.com/q/29175617
score: 0

http://stackoverflow.com/comment/46539021
type: QuestionComment
comment on: http://stackoverflow.com/q/29156566
has text: Maybe i was not clear about the problem, this code deletes the row of the table, the user is able to delete as many rows as desired, the problem is that when the user submits the form, all rows, even the deleted rows are submitted to the server.
score: 0
type: Comment

http://stackoverflow.com/q/29174754
downvote count: 0
tagged with: javascript
tagged with: end-to-end
has answer: http://stackoverflow.com/a/29174833
has title: Protractor - How to get actual values from the Repeater, not the Elements?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I am creating a Protractor script to test my quiz game that puts up random questions and answers, so I need my script to be able to figure out which answer is correct, so I can click it. I can't figure out how to get the values directly from the model, instead of elements, since correct/incorrect is not exposed as an element on the page. The model provides the answers in Choice in Question.Choices, and I need to find the Choice where Choice.IsCorrect is true. How do I get access to this value? I wouldn't use the element() function, right? element(by.repeater('Choice in Question.Choices').row(0).column('Choice.IsCorrect'))
upvote count: 1
tagged with: testing
tagged with: protractor
score: 1
type: Question
answer count: 1

http://stackoverflow.com/a/29307313
upvote count: 1
answers question: http://stackoverflow.com/q/29182991
downvote count: 0
has body: As @jeroen mentioned, currently you are attempting to post the form on page load. Let's try an approach where you submit the form when a user clicks the submit button. $(document).ready(function () { // let's attach an event handler to the form's submission $('#contact-form').submit(function(e) { e.preventDefault(); // prevent the form from submitting normally, this allows us to interject your client side validation // perform your validation // if valid, post // else show errors, etc } }); Also, keep in mind that it's best practice to perform validation both on the server AND the client. At the very least, ALWAYS on the server.
type: Answer
score: 1

http://stackoverflow.com/q/29094664
type: Question
has comment: http://stackoverflow.com/comment/46420589
tagged with: javascript
score: 0
has title: Selenium: Unable to enter text into iframe
has comment: http://stackoverflow.com/comment/46420679
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/46420809
has body: I'm using the following Java function to enter text into an iframe: public boolean EnterTextIntoFrame() { String text=this.data; // String to be entered boolean result=true; try{ if(keyType.equals("xpath")) { Thread.sleep(2000); WebElement ifr=driver.findElement(By.xpath(OR.getProperty(keyValue))); driver.switchTo().defaultContent(); driver.switchTo().frame(ifr); // Author: Ruchir Sharma; 17/3/2015 if(driver instanceof FirefoxDriver) { WebElement ckeContent = driver.findElement(By.tagName("body")); ckeContent.clear(); ckeContent.sendKeys(text); } // Author: Ruchir Sharma; 17/3/2015 if(driver instanceof ChromeDriver) { WebElement ckeContent = driver.findElement(By.tagName("body")); ckeContent.clear(); ckeContent.sendKeys(text); } else ((JavascriptExecutor) driver).executeScript("document.getElementsByTagName('body')[0].innerHTML=arguments[0];",text,""); driver.switchTo().defaultContent(); } }catch(Exception e){ result=false; } return result; } When I run the above code, instead of entering the string 'text' into the iframe, my code enters the string "undefined".Please help.
has comment: http://stackoverflow.com/comment/46457479
answer count: 0
has comment: http://stackoverflow.com/comment/46431125
tagged with: java
tagged with: selenium
has comment: http://stackoverflow.com/comment/46420716

http://stackoverflow.com/comment/46580172
has text: Right, but jQuery would only operate client side, which means HTML. Hence, I asked for the generated HTML!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29181812
score: 0

http://stackoverflow.com/comment/46467426
type: Comment
type: QuestionComment
has text: I have to admit that i can't follow you. would that be a possible solution or just a way to work around that which works sometimes? I'm not using that object directly, it has a complete functionality in itself.
comment on: http://stackoverflow.com/q/29116593
score: 0

http://stackoverflow.com/q/29183494
has answer: http://stackoverflow.com/a/29183612
answer count: 2
has answer: http://stackoverflow.com/a/29183625
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
downvote count: 1
has body: So I've got a lot of these on a few webpages: &lt;td&gt; &lt;a href="http://www.colincooke.com/coin_images/colincookecol/1587.jpg" target="_blank" class="coinpic"&gt;&lt;img src="../site_images/image.png" alt="image" /&gt;&lt;/a&gt; &lt;/td&gt; And I'd like to use jQuery to set (change) all the src values for the img tag to the same as the href value on the containing a tag (on page load). I've searched and so far hashed this together from what I've found which (probably obviously) doesn't work (set within $(document).ready(function() braces): $('td').children('img') .each(function(){ url = $('img').attr('href'); $('img').attr('src',url); }); What's the best way to do this or fix the above?
possible better answer: http://stackoverflow.com/a/29183625
has title: Set *all* IMG src values from containing A href values using JQuery
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29183612
has comment: http://stackoverflow.com/comment/46583050

http://stackoverflow.com/comment/46496713
type: QuestionComment
has text: Nope, jQuery definitely doesn't.
comment on: http://stackoverflow.com/q/29134963
score: 0
type: Comment

http://stackoverflow.com/comment/46572801
score: 0
comment on: http://stackoverflow.com/q/29176539
has text: Use `event.stopPropagation()`. `event.preventDefault()` doesn't stop propagation; what it seems to be is that your modal is being triggered by the click in a containing element to the X button. Another option would be to use the element's click event instead of the inline attribute `data-modal` and check if the event has been stopped with [`event.isPropationStopped()`](https://api.jquery.com/event.isPropagationStopped/)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29128393
score: -1
answer count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29128595
accepted answer: http://stackoverflow.com/a/29128595
tagged with: node.js
type: AnsweredQuestion
upvote count: 0
has body: I'm trying to start charging for my website using paypal. I know the very basics of making a paypal button, but I would like my button to allow you to pay and then take you back to a page on my website that generates a password. How can I do this?
tagged with: paypal
has title: Paypal button callback?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46507582
type: Comment
comment on: http://stackoverflow.com/q/29142034
score: 0
has text: try `mouseenter` instead.
type: QuestionComment

http://stackoverflow.com/q/29200211
type: AnsweredQuestion
tagged with: knex.js
type: Question
accepted answer: http://stackoverflow.com/a/29202407
score: 0
has answer: http://stackoverflow.com/a/29202407
answer count: 1
tagged with: javascript
tagged with: postgresql
has body: I'm trying to get started with Knex.js and I cant seem to get any migrations to work. When I run the command knex migrate:latest the database only has the knex_migrations table. Am I doing something wrong? Knexfile module.exports = { development: { client: 'postgresql', //Also tried just 'pg' connection: { host: process.env.SERVER_HOST, user: process.env.SERVER_USER, password: process.env.SERVER_PASSWORD, database: 'mika_personal' } } } Migration 'use strict' exports.up = function(knex, Promise) { knex.schema.createTable('blog_posts', function(table) { table.increments('id').primary() table.string('name', 75) .index() .unique() .notNullable() table.text('content') table.integer('views') table.timestamps() }) } exports.down = function(knex, Promise) { knex.schema.dropTable('blog_posts') }
tagged with: node.js
has title: Knex migrations don't create anything

http://stackoverflow.com/comment/46613186
type: QuestionComment
comment on: http://stackoverflow.com/q/29197990
score: 0
has text: I see. Maybe I'm misreading then. If you get the chance to toss up a plunker, I could take a look at the HTMl maybe.
type: Comment

http://stackoverflow.com/a/29079187
has body: I did it like this in the end and it seems to all be working. Simple enough i just couldn't figure it out as i'm a JS newbie! &lt;script&gt; $().ready(function () { $('a').click(function () { var value = $(this).text(); $('#merchantList').html(value + ' &lt;span class="caret"&gt;&lt;/span&gt;'); alert(value); }); }); &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/29077966
score: 0

http://stackoverflow.com/q/29122580
has comment: http://stackoverflow.com/comment/46472361
has comment: http://stackoverflow.com/comment/46476860
has comment: http://stackoverflow.com/comment/46472244
answer count: 1
tagged with: jquery-mobile
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/46472265
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29135546
tagged with: geolocation
has title: Geo-location Google Maps API not functioning on mobile devices
has body: I am trying to implement Geo-location within my application however whilst it works on desktop whenever it load the application onto the mobile it does not work. I have the following code which is taken from the google documentation: // Try HTML5 geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var infowindow = new google.maps.InfoWindow({ map: map, position: pos, content: 'Current Location' }); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); ///Place fallback loop } Is there any reason as to why this potentially does not function on a mobile?
type: Question

http://stackoverflow.com/comment/46537107
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29157609
has text: It depends on how you want to set up the nav and carousel, but you might not need to use your data-slide-to attribute. Those numbers are the same as the index of the parent li elements of your links, so you could just use that. Here is a demo I made for another question on stack overflow and it might be useful to you as far as understanding how to put something like this together. http://jsfiddle.net/troythompson/57b49y20/

http://stackoverflow.com/comment/46472912
type: Comment
comment on: http://stackoverflow.com/a/29119674
score: 0
type: AnswerComment
has text: OK Got it based on your answer. Good job! Many thanks!

http://stackoverflow.com/comment/46553871
score: 0
type: Comment
has text: At no point did I suggest that this is "the proper and only way". I explicitly stated that if top-level try/catch was the intent, then this is the parallel approach with promises
comment on: http://stackoverflow.com/a/29162684
type: AnswerComment

http://stackoverflow.com/a/29185586
type: Answer
answers question: http://stackoverflow.com/q/29185187
upvote count: 1
downvote count: 1
score: 0
has body: I guess you should fill the arguments in the proper order , which is : window.open( "URL" , "window name" , "menubar,resizable,width,height,top,left") ; note that the third argument should be a comma-separated string that specify some properties

http://stackoverflow.com/comment/123577078
score: 1
type: AnswerComment
type: Comment
has text: I'm lacking `.clear()` in my code for it to works! Thanks!
comment on: http://stackoverflow.com/a/42088677

http://stackoverflow.com/comment/46439069
type: QuestionComment
comment on: http://stackoverflow.com/q/29103972
score: 0
has text: related: [Is there an easy way to return a success call to $q.all without having to create a $q.defer() variable?](http://stackoverflow.com/q/23780918/1048572) (in angular)
type: Comment

http://stackoverflow.com/q/29110425
has title: Attach an Image from a Jquery Mobile Phonegap app using a form?
tagged with: jquery-mobile
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46493388
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: phonegap-build
tagged with: php
has body: In my app (JQM + Phonegap) I have created a form where the user can take an image using the camera and want to submit the form via php email with image attached. I am getting the form fields, but no the image. I had found this example of a file upload and tried to use some of the php. Name: Phone: Phone: Click to find Location Address... Location Address: Number of Birds? One(1) Two(2) Three(3) Four+(4+) Description: Attach Photo Submit Form Javascript function capturePhoto(){ navigator.camera.getPicture(onSuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, correctOrientation:true}); } // end function capturePhoto() function onSuccess(imageURI) { var image = document.getElementById('photoPreview'); image.src = imageURI; //$('#photoPreview').attr("src",imageURI); var formElem = document.getElementById("photoURI"); formElem.value = imageURI; } function onFail(errorMessage) { showAlert('Photo Attchment Failed: ' + errorMessage,'Error!'); } Here is my PHP. <?php // VARS $BCMC_email="me@myemail.com"; $email_subject="Bird Report - BCMC Mobile App"; $FullName=$_POST["f2_fullName"]; $FromEmail=$_POST["f2_email"]; $Phone=$_POST["f2_phone"]; $LocationAddress=$_POST["f2_locationAddress"]; $GPSLocation=$_POST["f2_GPSLocation"]; $NumberOfBirds=$_POST["f2_numBirds"]; $AdditionalDetails=$_POST["f2_additionalDetails"]; // get photo attachment $attachment = $field_file = $_POST['f2_photoURI']; $tmpName = $_FILES['f2_photoURI']['tmp_name']; $fileType = $_FILES['f2_photoURI']['type']; $fileName = $_FILES['f2_photoURI']['name']; // setup email header //$Headers = "From:" .$FromEmail; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } // email to BCMC $email_message .= "You have recieved a Bird Report through the BCMC Mobile App\n"; $email_message .= "\n\n"; $email_message .= "Name: ".$FullName."\n"; $email_message .= "Address: ".$LocationAddress."\n"; $email_message .= "GPS Locati…
answer count: 0
upvote count: 1
type: Question

http://stackoverflow.com/q/29073665
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46381460
has answer: http://stackoverflow.com/a/29075859
accepted answer: http://stackoverflow.com/a/29075859
possible better answer: http://stackoverflow.com/a/29073777
type: Question
has answer: http://stackoverflow.com/a/29073777
has comment: http://stackoverflow.com/comment/46381465
has title: Success function is not getting invoked in ajax GET method
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46381555
tagged with: ajax
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46381415
tagged with: asp.net-ajax
has body: In this code I am facing a problem in the success function. I tried a lot but it is going to the error function. The #action-button calls the JavaScript Method. Click me to load info! Demo created by Twitter $('#action-button').click(function() { $.ajax({ url: 'sampleurl', data: { format: 'json' }, error: function() { $('#info').html(' An error has occurred '); }, dataType: 'jsonp', success: function(data) { $('#info').html(' Successd '); }, type: 'GET' }); });
has answer: http://stackoverflow.com/a/29073791

http://stackoverflow.com/comment/46477502
comment on: http://stackoverflow.com/q/29125092
score: 0
type: QuestionComment
type: Comment
has text: Never mind... Hate it when something doesn't work, somebody just looks at it and magically works after just looking at it lol

http://stackoverflow.com/comment/46445020
has text: 99% of packages don't need to be installed; you can unzip them, copy into your project folder, and require them with "./" in front of the normal require call. you can also get a vps for $15/year, so i don't quite buy the affordable characterization, unless it refers to a specific companies offering, but even then, a vps is a vps and competition is fierce. all that said, using http to talk to php from node.js might just be the path of least resistance.
comment on: http://stackoverflow.com/q/29067450
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46525674
type: Comment
comment on: http://stackoverflow.com/a/29110153
has text: These are really good solutions. I especially like #2 where you just disable the selected options. I ended up going with the Knockout solution from David Sherret because my `select` options are already being served from Knockout and so it blended nicely. However, I really like this. Thanks.
type: AnswerComment
score: 0

http://stackoverflow.com/a/41700401
has body: I required this method with support for Internet Explorer. It turned out the back ticks aren't supported by even IE11. Also; using eval or it's equivalent Function doesn't feel right. For the one that notice; I also use backticks, but these ones are removed by compilers like babel. The methods suggested by other ones, depend on them on run-time. As said before; this is an issue in IE11 and lower. So this is what I came up with: function get(path, obj, fb = `$\{${path}}`) { return path.split('.').reduce((res, key) =&gt; res[key] || fb, obj); } function parseTpl(template, map, fallback) { return template.replace(/\$\{.+?}/g, (match) =&gt; { const path = match.substr(2, match.length - 3).trim(); return get(path, map, fallback); }); } Example output: const data = { person: { name: 'John', age: 18 } }; parseTpl('Hi ${person.name} (${person.age})', data); // output: Hi John (18) parseTpl('Hello ${person.name} from ${person.city}', data); // output: Hello John from ${person.city} parseTpl('Hello ${person.name} from ${person.city}', data, '-'); // output: Hello John from -
has comment: http://stackoverflow.com/comment/71883061
has comment: http://stackoverflow.com/comment/71934030
score: 4
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/29182244
type: Answer
has comment: http://stackoverflow.com/comment/71880160

http://stackoverflow.com/q/29129727
tagged with: javascript
has comment: http://stackoverflow.com/comment/46489606
tagged with: google-maps-api-3
score: 0
has body: am working on an android app that uses street panorama, I tried to query for availability of street view from a location before loading the street view but it doesn't work. If I type a valid street view location, it will load, but when I type an invalid location it will fail to show the alert message telling the user that street is not available. Here is the code below. function codeAddress() { var address = document.getElementById('autocomplete').value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var streetViewService = new google.maps.StreetViewService(); var STREETVIEW_MAX_DISTANCE = 100; streetViewService.getPanoramaByLocation(results[0].geometry.location, STREETVIEW_MAX_DISTANCE, function (streetViewPanoramaData, status) { if (status === google.maps.StreetViewStatus.OK) { panorama.setPosition(results[0].geometry.location); } else { alert("Street view not available in your location"); } }); } else { alert('Geocode was not successful for the following reason: ' + status); } }); }
tagged with: android
has comment: http://stackoverflow.com/comment/46490606
has title: My street view alert box has failed to show
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46489244
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/46488998

http://stackoverflow.com/q/29212837
answer count: 1
has comment: http://stackoverflow.com/comment/46635246
accepted answer: http://stackoverflow.com/a/29212992
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46635325
type: AnsweredQuestion
score: 0
has title: AngularJS set select option from db
has body: I have been able to get the default value selected using the below. However, I am not sure how to set the value to the one previously selcted by the user for the object they are reviewing. If the default value matches their selection, then great it is fine. However, if the default is different how can I make sure the select is showing the item that that they picked? For example, they have selected item [2] in the drop down not the default [0] &lt;div class="container-fluid"&gt; select ng-init="part.PartType = partTypes[0]" class="form-control" data-ng-model="part.PartType" data-ng-options="p for p in partTypes" required&gt;&lt;/select&gt; &lt;/div&gt; I wouldn't doubt there was something obvious I am missing. I am just not sure what to set in order to display the previously selected value that is being returned from the db. Any suggestions would be greatly appreciated. Thanks, S.
type: Question
has comment: http://stackoverflow.com/comment/46635365
has answer: http://stackoverflow.com/a/29212992
tagged with: javascript

http://stackoverflow.com/comment/46469608
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29111521
type: QuestionComment
has text: create a plunkr or codepen and we'll help debug

http://stackoverflow.com/q/29178034
downvote count: 0
tagged with: angular-ui
favorite count: 0
has body: I have a functioning bootstrap navbar through use of ui.bootstrap of Angular-UI. For the mobile navbar, I want the navbar to collapse when a link is clicked. The toggle button functions as expected, but I can't get the ng-click="isCollapsed = !isCollapsed" to work on the nav links. Toggle navigation App {{item.title}} In my controller, the applicable code is: $scope.isCollapsed = true;
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Angular UI & Bootstrap: Collapse Mobile Navbar on Link Click
score: 2
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/29178323
tagged with: javascript
tagged with: angular-ui-bootstrap
answer count: 1

http://stackoverflow.com/q/29142863
answer count: 1
has body: Using the "loading remote data" example from the ngInfiniteScroll website I have tried to implement infinite scrolling. My issue; The function nextPage() gets called continuously until there are no more records left to load (controlled by an offset value in the SQL query). I'd appreciate any input on this as I'm rather lost. Thanks in advance. HTML {{visit.details.name}} {{visit.created_at}} Javascript - AngularJs Factory angular.module('app').factory('Visits', function(VisitResource) { // new visits object var Visits = function () { this.items = []; this.busy = false; this.offset = 0; }; Visits.prototype.nextPage = function () { // busy - stop if (this.busy == true) { // DEBUG console.log('busy test 1.1: ' + this.busy); return; } else { // DEBUG console.log('busy test 1.2: ' + this.busy); } // busy now this.busy = true; VisitResource.getVisitations({ limit: 500, offset: this.offset }, function (response) { // stop loading if no data returned if(response.data.length == 0) { // DEBUG console.log('busy test 2: ' + this.busy); return; } else { // DEBUG console.log('Payload: ' + response.data.length); } var _this = this; angular.forEach(response.data, function (a_visit) { _this.items.push(a_visit); }); // set the last acquired record value this.offset = this.items[this.items.length - 1].id; // not busy this.busy = false; }.bind(this)); }; return Visits; });
tagged with: angularjs
tagged with: nginfinitescroll
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/21674266
type: Question
has title: ngInfiniteScroll "load next page" function being called repeatedly
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29143824
accepted answer: http://stackoverflow.com/a/29143824

http://stackoverflow.com/q/29169581
has answer: http://stackoverflow.com/a/29170841
favorite count: 0
tagged with: tinymce
has answer: http://stackoverflow.com/a/29176607
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46562189
tagged with: css
has comment: http://stackoverflow.com/comment/46558996
has body: I have cms block in magento where one div element have style property with backgroud-image and value is magento style URL &lt;div class="contain-wide" style="background-image: url('{{media url="wysiwyg/spare-parts.jpg"}}')"&gt; problem is when I turn on wysiwyg editor this line gets edited to &lt;div class="contain-wide" wysiwyg="" spare-parts="" jpg=""&gt; and no longer is valid inline css. things I tried are adding these settings to /js/mage/adminhtml/wysiwyg/tiny_mce/setup.js cleanup_on_startup: false, trim_span_elements: false, verify_html: false, cleanup: false, valid_elements: '*[*]', unfortunately that only disables html verification, css is still edited auto by tinyMCE.
has comment: http://stackoverflow.com/comment/46558053
downvote count: 0
score: 1
has title: tinyMCE deletes background-image:"" content with magento like urls
type: Question
tagged with: magento
has comment: http://stackoverflow.com/comment/46558180
tagged with: javascript
answer count: 2
upvote count: 1

http://stackoverflow.com/q/29185301
tagged with: parameters
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29193624
has body: We are using Worklight 6.2 developing an Hybrid application. Currently we need to pass custom body parameters from the client to the worklight server when we invoke an adapter. Is it possible to add custom body parameters (next to the defaults: adapter, procedure and parameters) in the invocation of an adapter from from an Hybrid client (Javascript API)? Thank you in advance for your help
has answer: http://stackoverflow.com/a/29193624
has answer: http://stackoverflow.com/a/29192033
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46597609
score: 0
accepted answer: http://stackoverflow.com/a/29192033
tagged with: worklight-adapters
tagged with: ibm-mobilefirst
has title: Worklight Client invoke procedure with custom BODY parameters

http://stackoverflow.com/comment/46616688
has text: What do you mean by provide the right points? The points I have are the one I have in the example, nothing else, nothing more.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29202303

http://stackoverflow.com/a/29103988
downvote count: 0
has comment: http://stackoverflow.com/comment/46440131
score: 1
has body: &lt;select name='variant' class='variantsselect' onchange="javascript:valueselect(this)"&gt; function valueselect(sel) { var value = sel.options[sel.selectedIndex].value; alert(value) } EDIT: &lt;select name='variant' id='variant' class='variantsselect' onchange="javascript:displayResult()"&gt; function displayResult() { var x = document.getElementById("variant"); var i; var txt = "Text: "; for (i = 0; i &lt; x.length; i++) { txt = txt + "\n" + x.options[i].text; } alert(txt); }
answers question: http://stackoverflow.com/q/29103931
upvote count: 1
has comment: http://stackoverflow.com/comment/46438087
type: Answer

http://stackoverflow.com/a/29144954
accepted answer of: http://stackoverflow.com/q/29143898
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29143898
has body: You can do: Or better create a computed observable: this.ComputedName = ko.computed(function (){ return this.Name() + ' ' + this.Description(); }); and use it like this: You might also consider options binding instead.

http://stackoverflow.com/a/29380949
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29155893
answers question: http://stackoverflow.com/q/29155893
type: Answer
has body: In the end, I gave up on this and just did some fallbacks like this: Try to get the city, etc with a Geolocator script (https://github.com/onury/geolocator); if it worked, great. If it returns an error that's NOT part of the HTML5 spec, try again using pure HTML5 Geolocation (diveintohtml5.info/geolocation.html); If it worked, now I have at least the Latitude/Longitude coords. If it returns an error then most likely there's no GPS on the device.
score: 0

http://stackoverflow.com/a/29200391
score: 0
answers question: http://stackoverflow.com/q/29200336
type: Answer
has body: use ../js to go up one level and into the js directory or start your paths with a / which will place you at root.

http://stackoverflow.com/comment/46551003
type: QuestionComment
score: 1
has text: You don't want to use any client side framework then where you want to create a function and store its value, in mind or in cloud ? :)
comment on: http://stackoverflow.com/q/29166194
type: Comment

http://stackoverflow.com/a/29227380
downvote count: 0
score: 3
upvote count: 3
type: AcceptedAnswer
has body: The onYouTubeIframeAPIReady function must be located in the global scope so it has be to defined on the window object. So in your case with browserify you need to define it on the global object: global.onYouTubeIframeAPIReady = function() { player = new YT.Player('player', { videoId: 'M7lc1UVf-VE', playerVars: { 'controls': 1, 'rel': 1, }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); }
accepted answer of: http://stackoverflow.com/q/29183142
type: Answer
answers question: http://stackoverflow.com/q/29183142

http://stackoverflow.com/a/29188534
has comment: http://stackoverflow.com/comment/46591942
type: AcceptedAnswer
has body: Apart from the missing quote, your or part of the if condition was missing [0]. See below. //For demo purposes only var check = ["http", "other-part-of-the-url"]; var username = "user"; var data = "data"; // --;-- if(check[0] == 'http' || check[0] == 'https') { $('#conversation').append(' ' + username + ': ' + data + ' '); } else { $('#conversation').append(' ' + username + ':' + data + ' '); } Demo@fiddle
has comment: http://stackoverflow.com/comment/46592237
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29188341
has comment: http://stackoverflow.com/comment/46592161
accepted answer of: http://stackoverflow.com/q/29188341
type: Answer
score: 1

http://stackoverflow.com/comment/82340398
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29162699
has text: Note that, as an alternative to a standalone server, you can just create a Chrome extension. Chrome extensions can access arbitrary online resources if the correct permissions are set.

http://stackoverflow.com/q/29066417
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/49030005
has comment: http://stackoverflow.com/comment/51171395
has comment: http://stackoverflow.com/comment/46368622
downvote count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46368598
tagged with: jsf
has body: Well, i have a modal dialog in bootstrap that works with &lt;h:commandButton&gt;. I'm trying to avoid close dialog when validation failed but didn't work. This is my button to call modal: &lt;h:commandButton styleClass="btn btn-default" type="button" value="Criar Página" actionListener="#{cursoMB.novaPaginaConteudo()}"&gt; &lt;f:passThroughAttribute name="data-toggle" value="modal" /&gt; &lt;f:passThroughAttribute name="data-target" value="#modalDialogPagina" /&gt; &lt;f:ajax execute="@this" render="modalPagina" onevent="function(data) {if(data.status==='success') initSummerNote(); }"/&gt; &lt;/h:commandButton&gt; And this is my button on modal: &lt;h:commandButton styleClass="btn btn-default" actionListener="#{cursoMB.salvarPagina()}" value="Salvar"&gt; &lt;f:ajax execute="modalPagina" render="tabPaginas" onevent="function(data){if(data.status!='success') data.preventDefault();}"/&gt; &lt;f:passThroughAttribute name="data-dismiss" value="modal" /&gt; &lt;/h:commandButton&gt; If data.status != 'sucess', I would like avoiding close but nothing happens. How can I do it?
score: 1
has title: Avoid close modal dialog bootstrap and jsf
tagged with: jsf-2

http://stackoverflow.com/q/29084060
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46402531
has answer: http://stackoverflow.com/a/29084816
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29084790
favorite count: 0
has answer: http://stackoverflow.com/a/29084790
type: Question
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/29084816
has title: append text on search input on click
has body: I have few anchor elements containing some text, something like "Cat", "Cow", "Dog". When I click on "Cat" for example I want to append the text on the search input. I've tried this: jQuery(' .link ').on('click', function(event) { jQuery('input[name="search"]').val(jQuery('.link').text().trim()); jQuery('input[name="search"]').keyup(); }); But I need a way to listen for each anchor element and update the search input accordingly, right now it works just once. Any suggestions?

http://stackoverflow.com/comment/46419530
comment on: http://stackoverflow.com/a/29093791
score: 0
type: Comment
has text: If I click on li element it is not putting it in textfield. Please see.
type: AnswerComment

http://stackoverflow.com/comment/46512855
comment on: http://stackoverflow.com/q/29142909
has text: do you append the div before you initialise the flowplayer?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46531438
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29153858
has text: in phpinfo.php `allow_url_fopen` is set to `on`.

http://stackoverflow.com/comment/46542380
has text: Damn it, I missed one caret in the longer line. If you were copying it from that one, that should explain why it did what it did.
comment on: http://stackoverflow.com/a/29156238
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46548001
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29164020
has text: What about making a fiddle or showing us working demo??? Want to css also

http://stackoverflow.com/comment/46661437
type: Comment
comment on: http://stackoverflow.com/a/29114885
has text: I am not sure as I do not use it. I just read a while ago that it could be done.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29206663
downvote count: 2
type: Answer
has body: As Nit recommend, Moment.js provides a simple solution to your problem. function convert(input) { return moment(input, 'HH:mm:ss').format('h:mm:ss A'); } console.log(convert('20:00:00')); console.log(convert('08:00:00')); console.log(convert('16:30:00'));
answers question: http://stackoverflow.com/q/29206453
has comment: http://stackoverflow.com/comment/72401432
upvote count: 14
score: 12

http://stackoverflow.com/q/29135706
has body: For over an hour now, I have been trying to debug my code but no dice. I realize that the asynchronous call of ajax means I have to make use of the callback function with the onreadystatechange event. The thing is, I keep getting the "Uncaught TypeError: undefined is not a function xmlhttp.onreadystatechange" message in my console. What is wrong with my code? I am following the template on http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_suggest_php and I see no difference. window.onload = function() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var obj = JSON.parse(xmlhttp.responseText); document.getElementbyId("table").innerHTML = "Test"; } } xmlhttp.open("GET", "bookstore.php?filename=bookstore.json", true); xmlhttp.send(); }
answer count: 1
has title: onreadystatechange undefined error
has answer: http://stackoverflow.com/a/29135759
accepted answer: http://stackoverflow.com/a/29135759
tagged with: ajax
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46616566
score: 0
has text: @CBroe My bad. I hadn't read it (or really, bothered to read it). I assumed it was built-in functionality, which was missing. Really, any hash monitor will work, from the stupidest/simplest one that I quickly drafted to more advanced ones like BBQ. I'd never heard of BBQ before (and it seems dead, having not been updated in 5 years), though I've used others and rolled my own full stacks before -- this isn't a particularly hard problem to solve.
comment on: http://stackoverflow.com/q/29202129
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46470899
comment on: http://stackoverflow.com/q/29122129
type: Comment
score: 0
has text: Not really, guess it should be like that? :)
type: QuestionComment

http://stackoverflow.com/comment/46519427
score: 0
comment on: http://stackoverflow.com/q/29147510
type: Comment
type: QuestionComment
has text: All the jqueryui widgets that rely on positioning seem to have a strong dislike for `transform`s so this shouldn't come as a surprise. Could you make [a reproducible example](http://stackoverflow.com/help/mcve)?

http://stackoverflow.com/q/29136972
score: 1
accepted answer: http://stackoverflow.com/a/29137072
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29137072
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
tagged with: nvd3.js
tagged with: d3.js
has title: NVD3 example chart not showing
upvote count: 1
has body: I must be missing something basic... I have copied the exact code for an nvd3 example and even though I'm not getting any error messages, i'm getting a blank page. Both nvd3 and d3 libraries are showing up when I type in "nv" or "d3" in the console, so I don't think I've called them incorrectly.
type: AnsweredQuestion

http://stackoverflow.com/comment/46394313
score: 0
comment on: http://stackoverflow.com/a/29080463
type: Comment
has text: I know this method, but what if i have more childrens? Is There not simpler method than that? var div = document.createElement("div"); div.id='_fooo'; var parent = this.parentNode; parent.insertBefore(div, this); div.appendChild(this); document.getElementById('_fooo').innerHTML
type: AnswerComment

http://stackoverflow.com/comment/46494408
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29134414
score: 1
has text: You can try this: http://pastebin.com/raw.php?i=10UX0xpP but `columns: StatusCols()` is fine.

http://stackoverflow.com/q/29109608
has title: Implementation of jQuery 'animate' with Meteor
linked to: http://stackoverflow.com/q/1575141
has comment: http://stackoverflow.com/comment/46450532
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29110874
tagged with: javascript
has answer: http://stackoverflow.com/a/29110874
has comment: http://stackoverflow.com/comment/46450587
accepted answer: http://stackoverflow.com/a/29116051
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/5284814
tagged with: jquery
tagged with: meteor
has answer: http://stackoverflow.com/a/29116051
has body: I'm currently learning to use Meteor, and am having trouble implementing the jQuery 'animate' function in one of my templates. I'm using this great boilerplate https://github.com/matteodem/meteor-boilerplate as an example, and am trying to get the following working: home.html {{#each feature}} {{text}} {{/each}} About Explore Blog Press/Contact home.js Template.home.helpers({ 'feature' : function () { return [ { 'text' : 'About', 'glyphicon' : 'glyphicon-sunglasses', 'color' : 'hover-yellow', 'path' : '#about' }, { 'text' : 'Explore', 'glyphicon' : 'glyphicon-road', 'color' : 'hover-red', 'path' : '#explore' }, { 'text' : 'Blog', 'glyphicon' : 'glyphicon-pencil', 'color' : 'hover-blue', 'path' : '#blog' }, { 'text' : 'Press/Contact', 'glyphicon' : 'glyphicon-envelope', 'color' : 'hover-green', 'path' : '#press-contact' } ]; }, }); Template.home.events ({ }); Template.home.rendered = function () { // @see: http://stackoverflow.com/questions/5284814/jquery-scroll-to-div $('a[href*=#]:not([href=#])').click(function (event) { alert("Content has been clicked"); if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); console.log(target); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { event.preventDefault(); console.log(target.offset().top); $('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } } return true; }); }; home.less @import 'base'; #main { .image-links-home-page.glyphicon { font-size: @font-size-giant; } .hover-yellow:hover { color: yellow; } .hover-green:hover { color: green; } .hover-red:hover { color: red; } .hover-blue:hover { color: blue; } #front-page { height: 100%; width: 100%; background-image: url('images/mt-cook.jpg'); background-size: cover; background-position: center center; background-repeat: no-repeat; background-position: fixed; position: relative; } .page-bottom-nav { bottom: 0; positi…

http://stackoverflow.com/q/29210868
has body: I created this object: var keys = {A: 'a', B: 'b' }; Later I tried create this other object: var values = {keys.A: 1, keys.B: 2}; However I got this in Firefox console: SyntaxError: missing : after property id Even when I tried: var vals = {keys['A']: 1, keys['B']: 2} I got the same error. The only way to get a success is if I type this: var vals= {}; vals[keys.A] = 1; vals[keys.B] = 2; So, my question is if there is a more elegant way (similar to the first try) to create an anonymous object using as keys the values from a pre-existent object. Thanks, Rafael Afonso
has title: Javascript: Using a pre-existent object values as keys os a new one
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29211215
has comment: http://stackoverflow.com/comment/46631686
tagged with: prototype-programming
type: Question
possible better answer: http://stackoverflow.com/a/29211148
has answer: http://stackoverflow.com/a/29211148
tagged with: javascript
has answer: http://stackoverflow.com/a/29211858
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29211215

http://stackoverflow.com/comment/46739627
score: 0
type: Comment
has text: Why did this get down voted? Is the same as the accepted answer.
comment on: http://stackoverflow.com/a/29090970
type: AnswerComment

http://stackoverflow.com/q/29193085
answer count: 0
type: UnansweredQuestion
has body: I'm using XMLHttpRequest's send method to upload the data that are saved in a local sqlite database, to my own website. On my website I'm running phpMyAdmin. The issue that I'm having is that the data gets transmitted to the server twice, even though the local sqlite database stores the data only once. I was wondering if anyone could help me to identify the issue. I also made sure to use XMLHttpRequest asynchronously, I still don't understand why is this happening. Any help would be greatly appreciated. Thank you. postData: function(count) { var surveyURL = "https://example.com/data/logging/answer.php"; var file = FileUtils.getFile("ProfD", ["ext.sqlite"]); var dbConn = Services.storage.openDatabase(file); var query = dbConn.createStatement("SELECT * FROM responses"); var i = 0; while (query.step()) { let data = { 'rowid' : query.row.rowid, 'timestamp' : query.row.timestamp, 'uid' : query.row.uid, 'warning' : query.row.warning, 'ignored' : query.row.ignored, 'domain' : query.row.domain, 'qid' : query.row.qid, 'response' : query.row.response }; let xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); xmlhttp.open("POST", surveyURL, true); xmlhttp.timeout = 5000; xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { if (/^0: Survey \d+ added/.test(xmlhttp.responseText)) { //data was added successfully, delete the row id from local database let matches = xmlhttp.responseText.match(/^0: Survey \d+ added \((\d+)\)/); let rowid = matches[1]; ext.Debug.dump("Deleting row " + rowid); try { //commented this line out, because at first I thought this was the issue but itsn't?! //dbConn.executeSimpleSQL("DELETE FROM responses WHERE rowid=" + rowid); } catch(e) { ext.Debug.dump("Error deleting row: " + e); } } else { ext.Debug.dump("Remote error: " + xmlhttp.responseText); } } } try { xmlhttp.send(ext.js.toString(data));…
upvote count: 1
score: 1
type: Question
tagged with: firefox
downvote count: 0
tagged with: javascript
tagged with: firefox-addon
favorite count: 0
has title: XMLHttpRequest sends local data twice

http://stackoverflow.com/q/29158735
tagged with: javascript
has comment: http://stackoverflow.com/comment/46537700
accepted answer: http://stackoverflow.com/a/29158849
has comment: http://stackoverflow.com/comment/46537998
type: AnsweredQuestion
type: Question
has title: How can you add the variable of an iterator in a for loop to reference a numeric property in an object in javascript?
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29158849
answer count: 1
has body: I have a Json from a JsonResult in Asp MVC that looks like this: {"Nombres":["Daniel Aguilar Delgado","Francisco Javier Aguilera Candelas"],"Materias":{"0":["Herramientas Legales contra la Delincuencia Organizada","Derechos humanos, debido proceso y función policial","Perfiles delictivos"],"1":["Criminalística y tecnologías","Cultura de la legalidad","Perspectiva de género","La función de seguridad pública en el marco de la reforma constitucional al sistema procesal penal","Prevención social de la violencia y la delincuencia","Actualización jurisprudencial en materia penal","Valores éticos y jurídicos"]},"NumMaterias":2,"NumPreguntas":10} Now as you can see the two properties inside the object "Materias" are simply numeric properties, but I can't do something like: var datapoints = []; var data = []; for (i = 0; i &lt; response.Nombres.length; i++) { for (j = 0; j &lt; response.Materias.i.length; j++) { datapoints.push({ y: 1, label: response.Nombres[i] }); } } for (i = 0; i &lt; response.Materias.length; i++) { for (j = 0; j &lt; response.Materias.i.length; i++) { data.push({ type: "stackedColumn", legendText: response.Materias.i[j], name: response.Materias.i[j], showInLegend: true, dataPoints: datapoints }) } } (I'm trying, as you may have noticed, to format the json response to use it with CanvasJs, but without luck). How can you access a numeric property using a for loop like that, is it even possible? I've tried to google it but most references say you should use a for in loop, however when I do that CanvasJs throws an error saying replace is not a function, i. e. I've done: for (var property in response.Materias) { data.push({ type: "stackedColumn", legendText: response.Materias[property], name: response.Materias[property], But that didn't work either. I'll appreciate any help because I'm in kind of a hurry with this.

http://stackoverflow.com/q/29144602
tagged with: ajax
has body: I' working on a PHP-Jquery-Ajax submit info form and I would like to use the addclass and removeclass jquery methods but I can't make it work as I want, so my question is: How do I have to fix the code below in order to add a css depending on the user input? The addclass and removeclass are in the function verificaForm where I validate the input fields, in this case I only show you two fields validations but there are more... I also know that out there is a library(validate.js) that helps to validate the inputs from users but in this specific case I must have to sitck to this code. here is my js code and thanks in advance: $(document).ready(function () { $('#ID_formulario').on('submit', function (e) { e.preventDefault(); var nombre = $('input#ID_nombre').val().trim(); var email = $('input#ID_email').val().trim(); if (validaForm(nombre, email)) { $('#result').html("resolviendo peticion..."); var url = $(this).attr('action'); var data = $(this).serializeArray(); var type = $(this).attr('method'); //...more code goes here ... it works fine ... } }); }); function validaForm(nombre, email) { if ((nombre == '') || nombre.replace(/s+/, '') == '') { alert("Favor especificar nombre"); nombre.addClass('hightlight'); return false; } else { else nombre.removeClass('hightlight'); } if (nombre.length < 4) { alert('El valor del campo es muy corto'); return false; } if ((email == '') || email.replace(/s+/, '') == '') { alert("Favor especificar correo"); return false; } return true; }
has answer: http://stackoverflow.com/a/29144814
tagged with: php
has comment: http://stackoverflow.com/comment/46512051
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46512100
has answer: http://stackoverflow.com/a/29145020
type: Question
tagged with: javascript
has title: using jquery addclass and removeclass in PHP
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29144814
possible better answer: http://stackoverflow.com/a/29145020
upvote count: 1
downvote count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/29115209
tagged with: forms
has comment: http://stackoverflow.com/comment/46458861
has body: Update I just learnt that is not possible to use cookie and session as both mobile App and website on totally different servers using different platforms I'm trying to submit the following form (using Ajax): <form action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>" method="post"> <?php foreach ($this->form->getFieldset('credentials') as $field): ?> <?php if (!$field->hidden): ?> <?php echo $field->label; ?> <?php echo $field->input; ?> <?php endif; ?> <?php endforeach; ?> <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?> <?php echo JText::_('JGLOBAL_REMEMBER_ME') ?> <input id="remember" type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" /> <?php endif; ?> <?php echo JText::_('JLOGIN'); ?> <input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" /> <?php echo JHtml::_('form.token'); ?> From different domain. The following is working for me: $.ajax( { type:"POST", url:"https://192.168.12.103/components/com_users/views/login/tmpl/default_login.php?callback=?", data:$('form').serialize(), success: function(data){ alert("successful"); } } ); The problem is I do not want the form to work in its current logic. That is the current form (login to website form), retrieve credentials from website login page and validate ... etc. What I need to amend is to pass the credentials to the form using my Ajax request and make the form use those credentials. Is that possible without changing the form itself? If no, how to create similar form with this minor tweak? My eventual objective, is to allow login from Mobile App to the website behind the scene (without going through website login page).
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46458927
has comment: http://stackoverflow.com/comment/46459279
score: 0
has comment: http://stackoverflow.com/comment/46459097
has comment: http://stackoverflow.com/comment/46458881
answer count: 0
has comment: http://stackoverflow.com/comment/46458949
type: UnansweredQuestion
tagged with: php
has title: Amend form content on Ajax request
type: Question
has comment: http://stackoverflow.com/comment/46459247
has comment: http://stackoverflow.com/comment/46458883
has comment: http://stackoverflow.com/comment/46458772
has comment: http://stackoverflow.com/comment/46458782
has comment: http://stackoverflow.com/comment/46458689

http://stackoverflow.com/comment/46538821
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29158941
has text: It's too long to explain, I need what I asked in my question.
type: AnswerComment

http://stackoverflow.com/q/29180062
has answer: http://stackoverflow.com/a/29180543
has comment: http://stackoverflow.com/comment/46576760
linked to: http://stackoverflow.com/q/8567114
tagged with: javascript
tagged with: jquery
has title: How to stay on same position after submitting an html form?
score: 0
has answer: http://stackoverflow.com/a/29180112
has comment: http://stackoverflow.com/comment/46576758
answer count: 3
has answer: http://stackoverflow.com/a/29180141
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: forms
has body: I have a simple html form: &lt;form action="addToCart" method="post"&gt;&lt;br&gt;&lt;br&gt; &lt;input name="productId" value="${product.id}" type="hidden"&gt; &lt;input class="submit" onclick="addedCart()" value="&lt;fmt:message key='AddToCart'/&gt;" type="submit"&gt; &lt;/form&gt; Every time I click on "submit", it brings me straight back to top which creates a poor user experience because the user would have to scroll back down where he was browsing the products... Can I do this without using a script?
linked to: http://stackoverflow.com/q/15019360
type: Question

http://stackoverflow.com/comment/46903015
comment on: http://stackoverflow.com/a/29202524
type: AnswerComment
score: 0
type: Comment
has text: This works - but is there any way to trigger it without a page refresh? The video will show if I refresh the page at the set time but not if I'm on the page before the set time.

http://stackoverflow.com/a/29084615
answers question: http://stackoverflow.com/q/29084332
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46402615
accepted answer of: http://stackoverflow.com/q/29084332
has body: Your code seems to be working the only thing is that you were not adding the text to the second text area correctly: DEMO: http://jsfiddle.net/nkLvwtLa/ $('#email-extractor').keyup(function (index) { var emails = extractEmails($(this).val()); console.log(emails); if (!emails) { $('#email-extracted').text('** No emails in comment'); } else if (emails.length &lt; 3) { var text = ''; for (var i = 0; i &lt; emails.length; i++) { text += emails[i] + ','; } $('#email-extracted').text(text); } else { $('#email-extracted').text('** Ignoring comment, too many email addresses (' + emails.length + ').'); } });

http://stackoverflow.com/a/29161114
type: Answer
upvote count: 3
type: AcceptedAnswer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29118736
has body: As you have now clarified in the comments in @squiroid's answer, your canvasDesign function looks like this: canvasDesign = function() { var canvas1 = document.getElementById("canvas1"); if(canvas1 != null) context1 = canvas1.getContext('2d'); } That function is creating an implicit global variable (because it's not using var on context1). That is a bad practice, which is forbidden in ES5 strict mode, and the correct thing to do is to fix the code to stop using antipractices. If that is not an option, your best bet is to continue to use typeof context1 === 'undefined'. As this question clarifies, it's impossible to create a general function to check for the existence of a variable. Two other options: Use angular.isDefined(window.context1). This will allow you to check for a global variable without throwing an error, but this approach will break if at some point the variable is made non-global. Put var context1; at the top of your file, outside any functions. This will ensure that the variable is at least declared, and allow you to call angular.isDefined(context1) safely.
answers question: http://stackoverflow.com/q/29118736

firefox
tags question: http://stackoverflow.com/q/29193085
tags question: http://stackoverflow.com/q/29173813
tags question: http://stackoverflow.com/q/29103115
tags question: http://stackoverflow.com/q/29205567
tags question: http://stackoverflow.com/q/29167196
tags question: http://stackoverflow.com/q/29200677
tags question: http://stackoverflow.com/q/29149700
tags question: http://stackoverflow.com/q/29142490
tag name: firefox
tags question: http://stackoverflow.com/q/29197029
tags question: http://stackoverflow.com/q/29158853
tags question: http://stackoverflow.com/q/29193578
tags question: http://stackoverflow.com/q/29153533
tags question: http://stackoverflow.com/q/29089145
tags question: http://stackoverflow.com/q/29164402
tags question: http://stackoverflow.com/q/29130814
type: Tag
tags question: http://stackoverflow.com/q/29210882
tags question: http://stackoverflow.com/q/29104906
tags question: http://stackoverflow.com/q/29109924
tags question: http://stackoverflow.com/q/29186164
tags question: http://stackoverflow.com/q/29112492
tags question: http://stackoverflow.com/q/29183636
tags question: http://stackoverflow.com/q/29141416
tags question: http://stackoverflow.com/q/29112068
tags question: http://stackoverflow.com/q/29123083
tags question: http://stackoverflow.com/q/29106237
tags question: http://stackoverflow.com/q/29128499
tags question: http://stackoverflow.com/q/29172687
tags question: http://stackoverflow.com/q/29092701
tags question: http://stackoverflow.com/q/29194024
tags question: http://stackoverflow.com/q/29189347

http://stackoverflow.com/q/29094820
type: Question
score: 0
has answer: http://stackoverflow.com/a/29094859
answer count: 1
accepted answer: http://stackoverflow.com/a/29094859
has title: how to open ms office outlook in html
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: outlook
has comment: http://stackoverflow.com/comment/46420966
linked to: http://stackoverflow.com/q/4782068
has body: I use Html, jQuery for web designing. In my page, I have an email id as hyperlink on click of which, Microsoft office outlook should get opened with the email id in To: field and a static text as subject line. Can any one please tell me how to do it. Thanks.

http://stackoverflow.com/comment/46415643
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29090869
type: QuestionComment
has text: Though these days I'd recommend using async.js instead of rolling up your own control-flow code. Not least because it's easier to google for solutions and code samples because lots of people use it.

http://stackoverflow.com/comment/46459163
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29099998
has text: I am totally new to web services handling. Can you suggest then what should I do in this case where I want to send a soap request with input to web service and get the response so that I can display it?

http://stackoverflow.com/comment/46432167
score: 1
comment on: http://stackoverflow.com/a/29091187
type: AnswerComment
has text: Thank you so much for being bored! I really appreciate. I'm trying to understand something though, and I probably did not explain my situation good enough. Assumption: This implementation assumes the file is stored somewhere on the server? The numerous strings I am passing in to the original controller method are just unique file ids that I go and get, and then archive mulitple files into a zip...So I assume I need to store the zip somewhere temporarily?
type: Comment

http://stackoverflow.com/a/29115609
answers question: http://stackoverflow.com/q/29115053
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46459579
has comment: http://stackoverflow.com/comment/79827190
score: 1
has body: You're looking for the key found here. Specifically: "-W086": true, //allow fall-through
upvote count: 1

http://stackoverflow.com/q/29155697
downvote count: 0
tagged with: javascript
has body: I'm trying to use the blueimp/jQuery-File-Upload plugin to store images in a server via a PHP uploads handler. I've been following this posts in order to make it work: https://github.com/blueimp/jQuery-File-Upload/wiki/API https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Input-Fields-in-One-Form Sending multiple file input fields programmatically in one form BlueImp Plugin jQuery File Upload : How to use the fileInput option so that fileupload() can bind new dynamically added inputs? The file upload form I'm using, has multiple dynamically added file input fields. As an example, after adding 3 fields: ... ... ... ... ... ... Save I can successfully upload files from this fields using the following JS code: var imageUpload = { init: function (selector, context, options) { selector = selector || '.file-upload'; context = context || $('.entry'); var filesList = []; var url = site_url + '/doUpload'; $(selector).fileupload(options || { url: url, type: 'POST', dataType: 'json', autoUpload: false, singleFileUploads: false, formData: {}, add: function (e, data) { for (var i = 0; i < data.files.length; i++) { filesList.push(data.files[i]); } return false; } }).on('change', function () { $(this).fileupload('add', { fileInput: $(selector) }); }); $('#save_btn').click(function (e) { e.preventDefault(); $(selector).fileupload('send', {files: filesList}); }); } }; As you can see in the 'add:' event callback and the 'send' method near the end, I'm sending all files in one POST to the server, this is the intended functionality. My problem is that the $_FILES server side variable is reaching the server in the following way: $_FILES array[1] [files0] array[1] [name] array[1] [0] string "Collapse.png" [1] string "Expand.png" [2] string "Map.jpg" In this way, I can't relate which image was added to which input. So, what I'd need to get to the server is something like this: $_FILES array[3] [files0] array[1] [name] array[1] [0] string "Collapse.png" [files1] array[1] [na…
tagged with: jquery
has answer: http://stackoverflow.com/a/29156076
accepted answer: http://stackoverflow.com/a/29353492
possible better answer: http://stackoverflow.com/a/29156076
tagged with: file-upload
favorite count: 0
linked to: http://stackoverflow.com/q/14896468
has title: Uploading multiple files from multiple input fields programatically - blueimp jquery fileupload
upvote count: 2
tagged with: php
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29353492
linked to: http://stackoverflow.com/q/25897989
tagged with: forms
linked to: http://stackoverflow.com/q/19807361
type: Question
answer count: 2

http://stackoverflow.com/q/29195444
has title: Pagination with Search
has comment: http://stackoverflow.com/comment/46604891
tagged with: mysqli
tagged with: php
has comment: http://stackoverflow.com/comment/46605105
has comment: http://stackoverflow.com/comment/46636596
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46608218
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/29213829
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29213829
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46605024
has comment: http://stackoverflow.com/comment/46608601
tagged with: ajax
has comment: http://stackoverflow.com/comment/46605101
has body: My question is based on this very well written tutorial: http://www.sanwebe.com/2013/03/loading-more-results-from-database Demo: http://www.sanwebe.com/downloads/43-load-more-results Essentially I am trying to achieve this + search. In the sense that the results would be populated based on the search query of the user. Let me elaborate in code: This is the main page <?php include("includes/db.php"); $results = mysqli_query($con,"SELECT COUNT(*) FROM courses"); $get_total_rows = mysqli_fetch_array($results); //total records //break total records into pages $item_per_page = 10; $total_pages = ceil($get_total_rows[0]/$item_per_page); ?> load More Loading... and this is the fetch_page.php, essentially where the content is being populated from: <?php include("includes/db.php"); //sanitize post value $page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); //throw HTTP error if page number is not valid if(!is_numeric($page_number)){ header('HTTP/1.1 500 Invalid page number!'); exit(); } $item_per_page = 10; //get current starting point of records $position = ($page_number * $item_per_page); //Limit our results within a specified range. $results = mysqli_query($con,"SELECT course_title, course_date1, course_provider,course_sdesc FROM courses ORDER BY course_date1 DESC LIMIT $position, $item_per_page"); //output results from database echo ' '; while($row = mysqli_fetch_array($results)) { echo ' '.$row["course_date1"].') '.$row["course_provider"].''.$row["course_sdesc"].' '; } echo ' '; ?> Now to dive into the details: Below is the form that allow the search to happen (in the content of the index page): What I was thinking of doing, which I haven't been so successful at is the following: In the heading of the main page (in the page code that calculates the pagination): I was thinking of making the following changes: if(isset($_GET['user_query'])) { $search_query = $_GET['user_query']; $results = mysqli_query($con,"SELECT COUNT(*) FROM co…
has comment: http://stackoverflow.com/comment/46607525

http://stackoverflow.com/comment/46416570
comment on: http://stackoverflow.com/q/29092180
score: 1
has text: Consider React (http://facebook.github.io/react/) for your frontend. It's bleeding edge simple library for building UI's.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46621702
comment on: http://stackoverflow.com/a/29205296
type: Comment
has text: Thanks for the comment. I've updated the post to include a link discussing the inability of JavaScript to set or read the system volume.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29182283
has title: javascript onclick get image name without path
has answer: http://stackoverflow.com/a/29182314
has comment: http://stackoverflow.com/comment/118324199
has answer: http://stackoverflow.com/a/29182327
accepted answer: http://stackoverflow.com/a/29182327
type: AnsweredQuestion
tagged with: image
type: Question
score: 12
has answer: http://stackoverflow.com/a/29183235
upvote count: 12
downvote count: 0
tagged with: javascript
has body: I need to copy the name of the image (name + extension) from SRC attribute without path.. HTML: &lt;input type="text" id="result" /&gt;&lt;br /&gt;&lt;br /&gt; &lt;img src="../some_folder/some_folder/photo_name.jpg" onclick="getName()" id="img1" /&gt; JS: function getName() { document.getElementById("result").value = document.getElementById("img1").src; } This code clones full path of the image.. Path is not static, so I can not just cut rest of "SRC".. Thanks in advance
possible better answer: http://stackoverflow.com/a/29182314
has comment: http://stackoverflow.com/comment/77885761
answer count: 3
linked to: http://stackoverflow.com/q/1302306
favorite count: 0

http://stackoverflow.com/comment/46627918
comment on: http://stackoverflow.com/q/29208952
has text: Its a problem with your path, please add the folder structure of your app. Where are these files present?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46431321
score: 0
comment on: http://stackoverflow.com/q/29100426
type: Comment
type: QuestionComment
has text: @Tom Oh, you're right. Fixed the typo.

http://stackoverflow.com/q/29188009
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/6170925
tagged with: javascript
has answer: http://stackoverflow.com/a/31651844
answer count: 2
score: 5
linked to: http://stackoverflow.com/q/24696269
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/31651127
has comment: http://stackoverflow.com/comment/46591841
type: UnansweredQuestion
has title: How to prevent links in iframe from opening in new tab
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
has body: I made a little web-based web browser for a web-based OS I made. I noticed that in some sites, they have links that like to open in new tabs. Is there a way that this can be prevented and have the links open in the iframe instead? Here's my code for the whole browser just in case: Address:
tagged with: iframe

http://stackoverflow.com/comment/46416691
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29092193
has text: Based on your screen shot, it's throwing an exception before it gets to your `for` loop. This question is pretty screwed up. First, you've completely changed it. Second, you're not disclosing enough of the relevant code for anyone to have any idea what's going on. Third, now you're claiming lines of code after the exception are working fine which doesn't make any sense.

http://stackoverflow.com/comment/46416903
comment on: http://stackoverflow.com/q/29091607
score: 0
type: QuestionComment
type: Comment
has text: Try to reproduce your issue use this [fiddle](http://jsfiddle.net/s9umfvh9/)

http://stackoverflow.com/q/29085461
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46403771
tagged with: gps
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29085583
has body: Good evening everyone. Right now I'm developing a gps localisation web server, I'm getting the coordinates from a GPS card to a port sniffer in the server, it writes the coordinates in a SQL database. The issue I'm experiencing is that I'm constantly refreshing the webpage to fetch new data but if the user zooms in or zooms out, or moves the center at the time of refreshing all this changes get lost. this is the JS fragment: &lt;script&gt; // functions below //Make an array with the coordinates from the db function initialize() { var posicion= []; for (var i=0; i&lt; lat.length; i++){ posicion.push(new google.maps.LatLng(lat[i], long[i])); // Add the coordinates } var mapOptions = { zoom: 16, center: posicion[lat.length-1], mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // Render our map within the empty div var linea = new google.maps.Polyline({ path: posicion, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); linea.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;
type: Question
has title: Keep zoom when refreshing webpage
tagged with: google-maps
tagged with: javascript
has comment: http://stackoverflow.com/comment/46403807
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/46608531
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29197892
type: Comment
has text: So everythin should be filled in or checked?

http://stackoverflow.com/comment/46405470
has text: If you are using html5 mode, there is some setup that you need on your server as well. Otherwise going directly to that route /accounts, will not work. https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode
type: Comment
comment on: http://stackoverflow.com/q/29086299
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46376192
score: 0
type: Comment
type: AnswerComment
has text: finally got it correct thanks kaushal khamar.How to display only date in it @kaushal khamar
comment on: http://stackoverflow.com/a/29070510

http://stackoverflow.com/comment/46433873
type: Comment
comment on: http://stackoverflow.com/q/29101088
score: 0
type: QuestionComment
has text: how about `mouseup` and `mousedown`? get the starting position when down and ending when up?

http://stackoverflow.com/comment/46507399
type: AnswerComment
type: Comment
has text: there is only package content and thats already set to "none"
comment on: http://stackoverflow.com/a/29141847
score: 0

http://stackoverflow.com/a/29162190
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46545308
score: 8
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/46545889
has body: Seems like you are opening the modal using plain jQuery approach. This is not going to work in Angular, because opened modal is not connected to Angular application, so it doesn't know that modal has to be handled, HTML parsed, etc. Instead you should use directives properly, or in case of modal dialog you can simply use existent ones, like Angular UI project, which brings ready Bootstrap directives for Angular. In your case you need $modal service. The usage then would be very simple: // remember to add ui.bootstrap module dependency angular.module('myModule', ['ui.bootstrap']); angular.module('myModule').controller('myController', ["$rootScope", "$scope", "$filter", "$modal", "dataService", function ($rootScope, $scope, $filter, $modal, dataService) { $scope.checkItem = ""; $scope.loadEditForm = function () { $scope.checkItem = "yes"; $modal.open({ templateUrl: 'modal.html', controller: 'modalController', scope: $scope }); }; }]); Demo: http://plnkr.co/edit/kQz0fiaXLv7T37N8fzJU?p=preview
accepted answer of: http://stackoverflow.com/q/29161946
answers question: http://stackoverflow.com/q/29161946
has comment: http://stackoverflow.com/comment/46543841
has comment: http://stackoverflow.com/comment/46544092

http://stackoverflow.com/comment/46406611
type: QuestionComment
has text: Javascript is doing the thing to do something onclick.
score: 0
comment on: http://stackoverflow.com/q/29086585
type: Comment

http://stackoverflow.com/comment/46535444
comment on: http://stackoverflow.com/a/29156621
has text: What if an expression is used, like so: `ng-click="foo = 4"`? This solution falls flat
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29146671
has body: I figured it out this morning. First of all, in response to @Paulie_D I considered the fact that it may not be valid HTML to stick a td in a div - even if it did work. Then I realized instead of trying to grab them element, give it an ID and then do something to it, I could simply grab the element and do to it what I want without changing it's attributes. So I changed my initial code to not grab the td, but rather grab its parent table and I wrapped it in a div and right after put that div I created in the dialog and it worked like a charm. if($('#idCustomDIV').length){ $("#idCustomDIV").parent().parent().parent().parent().wrap('&lt;div id="repeating-popup"&gt;&lt;/div&gt;') $('#repeating-popup').dialog();
answers question: http://stackoverflow.com/q/29125820
type: Answer
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29125820

http://stackoverflow.com/comment/46532356
type: AnswerComment
comment on: http://stackoverflow.com/a/29155822
score: 0
type: Comment
has text: Thanks, that was the problem, like I said, I'm very new to JS.

http://stackoverflow.com/comment/46549464
type: QuestionComment
has text: Could you replicate your example as live demo, meantime you can check how use the multiple axis in [this example](http://www.highcharts.com/demo/combo-multi-axes)
comment on: http://stackoverflow.com/q/29164139
score: 0
type: Comment

http://stackoverflow.com/a/33545732
type: Answer
upvote count: 3
score: 3
has body: I would also recommend you go with option 2: Let Google handle setting of cid parameter. Since the parameter is already set in the _ga cookie on your domain, it is passed to your app server with every HTTP request. All that you need to do is on the server side : Extract the CID from the _ga cookie Link it to the current user (your app probably uses its own session cookies to identify the user) For example, this answer provides the Rails code: def save_google_analytics_client_id if current_user &amp;&amp; cookies["_ga"] client_id = cookies["_ga"].split(".").last(2).join(".") if current_user.google_analytics_client_id != client_id current_user.google_analytics_client_id = client_id current_user.save end end end
accepted answer of: http://stackoverflow.com/q/29203622
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29203622

http://stackoverflow.com/comment/46549735
has text: You have to describe `not working` in question itself
score: 0
comment on: http://stackoverflow.com/q/29165529
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29173256
answers question: http://stackoverflow.com/q/29172783
score: 0
accepted answer of: http://stackoverflow.com/q/29172783
type: AcceptedAnswer
type: Answer
has body: So I ended up using the ng-click directive on my dom, then called in the click function, which worked great. Here is updated code: app.controller('portfolioController', function($scope, $route, $http) { $scope.classes = 'basic about'; $scope.contents = null; $http.get("js/json/portfolio.json").success(function(data) { $scope.contents = data; }); $scope.showDetails = function() { alert('do stuff after everything is loaded'); } }); &lt;ul class="projects basic" &gt; &lt;li ng-repeat="content in contents"&gt; &lt;img ng-src="img/projects/{{ content.image }} " &gt; &lt;a ng-click="showDetails()" class="hover" &gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;

http://stackoverflow.com/comment/46605556
type: Comment
type: QuestionComment
has text: What I have to do to make con array and push value in it
score: 0
comment on: http://stackoverflow.com/q/29196339

http://stackoverflow.com/comment/46502920
score: 0
type: Comment
type: QuestionComment
has text: Can include `html` `data` array at OP ?
comment on: http://stackoverflow.com/q/29139316

http://stackoverflow.com/q/29123765
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29124013
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
linked to: http://stackoverflow.com/q/14248194
downvote count: 0
score: 1
tagged with: navbar
type: Question
tagged with: javascript
has body: I tried to use this solution (Hide Twitter Bootstrap nav collapse on click) to hide nav collapse automatically when clicking. It's working correctly when nav is collapsed but when I'm using site on desktops (exactly when nav is not collapsed) nav is blinking. Code: $('.nav a').on('click', function() { $(".btn-navbar").click(); //bootstrap 2.x $(".navbar-toggle").click() //bootstrap 3.x by Richard }); .block { padding: 70px 0; } #section-white { background-color: #fff; height: 100px; } #section-1 { margin-top: 51px; /* height of header-navbar */ } #section-1, #section-2, #section-3 { height: 600px; background-color: #555; color: #fff; } Toggle navigation Brand About Services Contact Hello World Hello World Hello World You can try it here - Desktop results and this is source code - source code Earlier I used this solution in Bootstrap 2.3.2 and haven't got any problem.
linked to: http://stackoverflow.com/q/16680543
has title: How to fix blinking navbar after click
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29124013

http://stackoverflow.com/comment/46609586
has text: @Bergi practically there should be no problem it just simply isn't being done for strict mode either - most of the web isn't using strict mode anyway
comment on: http://stackoverflow.com/a/29198520
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/70368600
type: AnswerComment
score: 4
type: Comment
has text: Well it works when using `require` while not `import`
comment on: http://stackoverflow.com/a/39762132

http://stackoverflow.com/comment/46409229
comment on: http://stackoverflow.com/a/29088110
type: AnswerComment
score: 0
has text: Edited my expression. It's not as elegant but... :)
type: Comment

http://stackoverflow.com/a/29128637
has body: Static code in modules isn't supposed to be evaluated more than once, just like a script loaded through a normal &lt;script&gt; tag won't be run more than once during the page load. Imagine if a module contained code like: define('my-module', function () { var foo = foo || 0; var bar = ++foo; }); You should expect bar and foo to both === 1, but if the module was run repeatedly and a global foo existed, that may not be the case. Admittedly, this is a very contrived example, but evaluating a module repeatedly could cause serious problems.
answers question: http://stackoverflow.com/q/29128523
type: Answer
score: 0

http://stackoverflow.com/q/29122811
answer count: 3
has answer: http://stackoverflow.com/a/29124254
has answer: http://stackoverflow.com/a/29123103
downvote count: 0
favorite count: 0
has title: Pass array of arguments without altering this
type: UnansweredQuestion
has body: I'm trying to find the best way to pass an array of arguments to a function, but without altering (or addressing) the execution context. I have this: some_args = ["world"]; in.some.namespace.hello.apply(this, some_args); Unfortunately this changes hellos execution context to the global object. What's the slickest way of calling hello with in.some.namespace being the execution context? Writing in.some.namespace.hello.apply(in.some.namespace, some_args] looks verbose and errorprone.
upvote count: 3
has answer: http://stackoverflow.com/a/29122857
type: Question
score: 3
tagged with: javascript

http://stackoverflow.com/q/29116012
has title: HTML JS append random image in DIV
has comment: http://stackoverflow.com/comment/46460198
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29116073
has body: Im trying to make a booster pack opening simulator With this code it displays a random image Would it be possible so when the image (The card) is generated its displayed and then when the button is pushed again it is put into a inventory of all the "Cards" you have opened so you can show other all the cards you have opened and then another card is generated and so on. Thanks
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46460049
score: 1
accepted answer: http://stackoverflow.com/a/29116073
type: Question

http://stackoverflow.com/comment/46544906
type: QuestionComment
comment on: http://stackoverflow.com/q/29162798
score: 0
has text: no, it is not loaded seen from chrome network tab.
type: Comment

http://stackoverflow.com/a/29211377
answers question: http://stackoverflow.com/q/29211352
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29211352
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You should rather use radio button with same name. using checkboxes, you need to use: $("#mytable input").change(function() { $("#mytable input").not(this).prop('checked', false); }); Working Demo

http://stackoverflow.com/a/29069937
has comment: http://stackoverflow.com/comment/46374908
type: Answer
has body: I'm not sure if this will really solve your problem but you can do $stateProvider.state('step', { url: '/orders/:step/:itemId', templateUrl: 'parent.html', http://plnkr.co/edit/sYCino1V0NOw3qlEALNj?p=preview This means the parent state will collect the itemID on the way through.
has comment: http://stackoverflow.com/comment/46374982
answers question: http://stackoverflow.com/q/29069836
score: 0

http://stackoverflow.com/a/29127641
score: 1
has comment: http://stackoverflow.com/comment/46481474
has comment: http://stackoverflow.com/comment/46481348
answers question: http://stackoverflow.com/q/29127509
upvote count: 1
has comment: http://stackoverflow.com/comment/46481239
has comment: http://stackoverflow.com/comment/46481523
type: Answer
has body: Use a jQuery selector that matches all the elements you want to search in, then run your regex query on each of them. Here's some rough pseudocode: $('.myParagraphs').each(function() { var obj = $(this); if (obj.text().matches(myRegexp)) { //code to scroll to that element } });
downvote count: 0

http://stackoverflow.com/q/29125379
has comment: http://stackoverflow.com/comment/46477234
has body: I have a jQuery DataTable with options for inserting new rows. I've set a limit for table rows to 8. If the table already has 8 rows it displays an error message. The problem is that if i have 7 rows it doesen't add the eighth one. How to fix this ? var addImage = function(){ var row_number = $s('.table-slides tbody tr').length; var oTable = $s('#dataT').DataTable(); var max_rows = 8; $s('body').on('click', '#slide-add', function(){ if(row_number &lt; max_rows){ oTable.row.add( [ '&lt;input type="text" name="nume[]" /&gt;', '&lt;input type="file" name="image[]" id="image" /&gt;', '&lt;input type="text" name="link[]" /&gt;', '&lt;a title="Vizualizeaza slide" href="javascript:void(0);"&gt;&lt;i class="fa fa-eye"&gt;&lt;/i&gt;&lt;/a&gt;', '&lt;a href="javascript:void(0);"&gt;&lt;i class="fa fa-times"&lt;/i&gt;&lt;/a&gt;' ] ).draw(); row_number++; }else{ alert('Error max limit exceeded'); } }); };
has answer: http://stackoverflow.com/a/29127077
has comment: http://stackoverflow.com/comment/46478385
type: AnsweredQuestion
has title: jQuery append rows to a table
has comment: http://stackoverflow.com/comment/46479457
type: Question
has comment: http://stackoverflow.com/comment/46477012
accepted answer: http://stackoverflow.com/a/29127077
has comment: http://stackoverflow.com/comment/46479731
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46476987
score: 0
answer count: 1

http://stackoverflow.com/comment/46572840
comment on: http://stackoverflow.com/q/29177655
type: QuestionComment
has text: They use `.indexOf()` instead of `==` because the `.src` will return the fully qualified URL, so you need to see if the image name exists within that string.
type: Comment
score: 1

http://stackoverflow.com/comment/46513258
type: QuestionComment
type: Comment
has text: You cannot change the colour of *parts of a letter*, at least not easily.
score: 0
comment on: http://stackoverflow.com/q/29144887

http://stackoverflow.com/comment/46450628
has text: Do a `console.log(tag)` before `document.write` to see if you have the right value for your `tag` variable. If that is not ok, try the same with `session`, maybe you didn't pass it to the scope.
type: Comment
comment on: http://stackoverflow.com/q/29110431
score: 0
type: QuestionComment

http://stackoverflow.com/q/29166480
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29167724
type: Question
tagged with: javascript
has title: XML Parsing Root Node with JavaScript
score: 0
answer count: 1
has body: I have this XML file. I want to parse it to obtain only Example1 and Example2 of in root node, with Javascript. If I use getElementsByTagName('author'), i have in output all author value. What can i do ? <?xml version='1.0'?> Example1 Example2 Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 XQuery Kick Start James McGovern Per Bothner Kurt Cagle James Linn Vaidyanathan Nagarajan 2003 49.99 Learning XML Erik T. Ray 2003 39.95
tagged with: parsing
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/46551659

http://stackoverflow.com/comment/46717075
type: Comment
has text: really nobody any idea....?
comment on: http://stackoverflow.com/q/29213287
score: 0
type: QuestionComment

http://stackoverflow.com/comment/93002131
comment on: http://stackoverflow.com/a/39832640
score: 0
has text: Not sure if this applies everywhere, but the element of my had some intersection or not depending on whether the had `display: none`. The element and, obviously, everything inside , always had some intersection.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29172258
tagged with: javascript
tagged with: optimization
answer count: 1
downvote count: 0
score: 1
tagged with: meteor
has answer: http://stackoverflow.com/a/29192010
favorite count: 0
has body: I have a table I am trying to add filtering for in meteor by certain fields and tags. Right now there is a field for each row called race and against. There are two select elements above the table (race-select and against-select) you can use to filter out which results on the table you want to see but the code is really clunky and if I want to add more filtering for other tags the code is just going to get messier. Some of the code is just trying to deal with the initial values of the Session. var racelist = ['zerg', 'terran', 'protoss']; Template.buildsList.helpers({ builds : function() { if (typeof(Session.get('race-select')) == 'undefined' || Session.get('race-select') == 'all races'){ Session.set('race-select', racelist); } if (typeof(Session.get('against-select')) == 'undefined' || Session.get('against-select') == 'all races'){ Session.set('against-select', racelist); } return Builds.find({race : {$in : Session.get("race-select")}, against : {$in : Session.get("against-select")}}, { sort: { createdAt: -1 } }); } }); Template.buildsList.events({ "change #race-select" : function(e){ Session.set('race-select', [$(e.target).val().toLowerCase()]) }, "change #against-select" : function(e) { Session.set('against-select', [$(e.target).val().toLowerCase()]) } }) There is a lot of nearly repeated lines but I want to know if there is a better way of implementing this sort of filtering feature.
has title: Better filtering for table in meteor
accepted answer: http://stackoverflow.com/a/29192010
has comment: http://stackoverflow.com/comment/46572106
upvote count: 1
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/46513079
comment on: http://stackoverflow.com/a/29145039
type: Comment
has text: And delete `(function($) {...})(jQuery)`
score: 0
type: AnswerComment

http://stackoverflow.com/q/29203032
has body: I want to display username on Homepage and so on like "Hi," extracting from URL. Login Username: Password:
tagged with: javascript
has comment: http://stackoverflow.com/comment/46617772
downvote count: 5
score: -4
has answer: http://stackoverflow.com/a/29203407
has comment: http://stackoverflow.com/comment/46617799
has comment: http://stackoverflow.com/comment/46617751
answer count: 2
tagged with: url
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46617917
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29203336
has comment: http://stackoverflow.com/comment/46617823
has comment: http://stackoverflow.com/comment/46617900
upvote count: 1
has title: How to display Username on successive pages of login without PHP?
type: Question
has comment: http://stackoverflow.com/comment/46618093

http://stackoverflow.com/comment/46619921
comment on: http://stackoverflow.com/q/29204353
score: 0
has text: Disable it and use a hidden text field with the same value
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29187557
has title: Switching between display:none and display:block with JavaScript?
type: UnansweredQuestion
tagged with: css
has body: So, my goal is to make my first div change the display of div2 when its clicked. To do so, I used this bit of JS ` and it works how I want it to, but now I need it so when I click on div2, it changes back to hidden. How do I do this?
type: Question
has answer: http://stackoverflow.com/a/29187727
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46617619
type: QuestionComment
comment on: http://stackoverflow.com/q/29202449
score: 0
has text: So run that in an `$interval` with delay of `1000`. `new Date()` will always be the current time and presumably, `startTime` doesn't change.
type: Comment

http://stackoverflow.com/q/29120713
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/17863066
has comment: http://stackoverflow.com/comment/46468070
tagged with: javascript
has comment: http://stackoverflow.com/comment/46468092
has title: JavaScript Regular Expression nothing to repeat
answer count: 1
favorite count: 0
has body: I'm using the following JavaScript code to create a regular expression to match a UK mobile number: new RegExp("(\+44|0)7\d{9}", 'g'); However, I get an error in the console log saying: Uncaught SyntaxError: Invalid regular expression: /(?:+44|0)7d{9}/: Nothing to repeat Similar questions on StackOverflow point to a missing escaped character, but mine seem to be fine. I have also tried without the global flag. Help would be greatly appreciated.
has comment: http://stackoverflow.com/comment/46468132
has answer: http://stackoverflow.com/a/29121138
has comment: http://stackoverflow.com/comment/46469769
tagged with: regex
upvote count: 2
type: UnansweredQuestion
score: 1
linked to: http://stackoverflow.com/q/17863066

http://stackoverflow.com/comment/46706626
has text: I tried again letter example, and it work fine. I can't reproduce the problem. I'm very sorry. Thank you very much @JJuutila .
type: Comment
comment on: http://stackoverflow.com/q/29090514
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46439748
has text: Ah well, I think that's an answer not an edit…
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29103979

http://stackoverflow.com/comment/46616438
has text: See the edit above, if you don't know how to concatenate strings in JavaScript (a basic concept) I recommend that you look up the basics as these fundamentals are used heavily when coding. I recommend trying out a codecademy course to help show you the ropes: http://www.codecademy.com/en/tracks/javascript
score: 0
comment on: http://stackoverflow.com/a/29200408
type: Comment
type: AnswerComment

http://stackoverflow.com/a/29174901
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29174463
has body: The problem is you have some css setting the content opacity to 0 .use-motion .post { opacity: 0; } use need to change it so the opacity is 1 .use-motion .post { opacity: 1; } so maybe try (function() { (function($) { return $(document).pjax('a', '#pjax', { fragment: '#pjax', timeout: 10000 }).on('pjax:send', function() { topbar.show(); $('body').velocity({paddingRight: 0}); }).on('pjax:complete', function() { topbar.hide(); $(".use-motion .post").css("opacity","1"); }); })(jQuery); }).call(this); So as you pointed out there is still hidden content. This is because more elements have opacity 0. I am not going to search out all these occurrences. As you mentioned the archive page is missing some content I noticed this .use-motion .motion-element { opacity:0; } again the same as above so change that line I gave you to include targeting for those classes like so: $(".use-motion .post, .use-motion .motion-element").css("opacity","1"); You can see how you just add a comma then more selectors to target multiple instances. Now given this find the rest of the opacity 0 elements and add it to that jquery statement.
has comment: http://stackoverflow.com/comment/46573064
has comment: http://stackoverflow.com/comment/46568734
has comment: http://stackoverflow.com/comment/46568752

http://stackoverflow.com/comment/46512854
score: 0
comment on: http://stackoverflow.com/a/29143431
has text: That's a Jquery example, have you included it? ` `
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46435563
has text: I think there might be a PHP server already running, if that makes things easier. If I use it to execute Python code, how do I pass input into the Python code and output back?
score: 0
comment on: http://stackoverflow.com/a/29102703
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46653577
score: 0
type: Comment
has text: Yes you are right, sorry :( but i didn't understand where to insert event.addlistener (mouseover and out), i didn't understand why in new.google.maps.InfoWindow there {} , and now i didn't understand why "title"... Sorry Jordi :( thanks for all
comment on: http://stackoverflow.com/a/29209436
type: AnswerComment

http://stackoverflow.com/q/29086494
has comment: http://stackoverflow.com/comment/46406252
tagged with: javascript
score: 1
favorite count: 0
type: Question
has body: I'm trying to create a webpage where a user asked their name(textbox) and gender(radio buttons) on the front page. This will then link to a new page will be dependent on whether they chose if they are male or female, it will also need to display their name as entered in the text box. So far I have the name part working using javascript this is on the front page with the form action directed to a new page: // Called on form's `onsubmit` function tosubmit() { // Getting the value of your text input var mytext = document.getElementById("mytext").value; // Storing the value above into localStorage localStorage.setItem("mytext", mytext); return true; } and this is on the other page: // Called on body's `onload` event function init() { // Retrieving the text input's value which was stored into localStorage var mytext = localStorage.getItem("mytext"); // Writing the value in the document document.getElementById("name").innerHTML = mytext; } The main problem here is that this always directs to the same page. Can anyone tell me how I could solve this problem and add in the option for a user to choose their gender and the next page would be dependant on this choice? edit: This is my form &lt;form class="enter-name" name="myform" onsubmit="tosubmit();" action="page1.html"&gt; &lt;input id="mytext" type="text" name="data" placeholder="Enter name" maxlength="12"&gt; Male: &lt;input type="radio" name="gender" value="male" /&gt;&lt;br /&gt; Female: &lt;input type="radio" name="gender" value="female" /&gt;&lt;br /&gt; &lt;input id="name-submit" type="submit" value=""&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/46405982
has comment: http://stackoverflow.com/comment/46406051
upvote count: 2
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46406137
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46405987
has title: Choosing page depending on users choices
has answer: http://stackoverflow.com/a/29087589
has comment: http://stackoverflow.com/comment/46406134
has comment: http://stackoverflow.com/comment/46406180
has comment: http://stackoverflow.com/comment/46406205
has comment: http://stackoverflow.com/comment/46406504
has comment: http://stackoverflow.com/comment/46406011

p2p
tags question: http://stackoverflow.com/q/29174883
type: Tag
tag name: p2p

http://stackoverflow.com/q/29086530
tagged with: google-maps
has answer: http://stackoverflow.com/a/29087292
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
favorite count: 0
has body: On this page I need the "Get Directions," button to highlight one of three points/map markers already on the map. So far, I have the following wrapped around the button/img.... Though that code is not working. Any idea, where I went wrong with that code or know a better way?
has title: Click button to highlight a Map Marker (Gmaps) - how?
has comment: http://stackoverflow.com/comment/46410029
accepted answer: http://stackoverflow.com/a/29087292
type: AnsweredQuestion
downvote count: 1
type: Question

draggable
tags question: http://stackoverflow.com/q/29113787
tags question: http://stackoverflow.com/q/29134172
tags question: http://stackoverflow.com/q/29116164
tags question: http://stackoverflow.com/q/29110324
type: Tag
tag name: draggable

http://stackoverflow.com/comment/46395362
type: Comment
score: 1
has text: Thank you! Definitely better rendering with the edit.
comment on: http://stackoverflow.com/a/29080853
type: AnswerComment

http://stackoverflow.com/comment/46672621
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29215354
has text: No. That one is a different story. It's not zooming at all. I need to add a demo o the question so I can get some help with it. Thanks for asking.

http://stackoverflow.com/comment/46476890
type: Comment
type: QuestionComment
has text: @Pinki. It is stuck.
comment on: http://stackoverflow.com/q/29125166
score: 0

http://stackoverflow.com/q/29111363
tagged with: javascript
tagged with: resize
tagged with: jquery
score: 0
tagged with: sticky
has answer: http://stackoverflow.com/a/29112278
has body: I've been dealing with this problem since days now and I hope somebody here can help me. I'm trying to make a sticky navigation and a 100% height header (body and html are set to 100% height too). Basically the problem I have is that the sticky navigation only works well after the page is (re)loaded. However scrolling after having resized the browser's window makes the navigation either jump to early or to late to the fixed position at the very top. I'd need to implement a resize event I guess, so that the calculation of the variable "navOffset" fires everytime the window is resized, right? I tried many ways of inserting this into my code which are also explained in the link below, but I falied everytime. I hope somebody can disclose this secret to me as I'm getting insane about this. Thanks a lot and have a great week! Sascha Example of the effect I want to achieve: http://html5-webdesign.berlin/ Tutorials, which didn't help me: https://stackoverflow.com/…/jquery-combine-document-ready-an… jQuery(document).ready(function() { var navOffset = jQuery("nav").offset().top; jQuery("nav").wrap('&lt;div class="nav-placeholder"&gt;&lt;/div&gt;'); jQuery(".nav-placeholder").height(jQuery("nav").outerHeight()); jQuery(window).scroll(function() { var scrollPos = jQuery(window).scrollTop(); if (scrollPos &gt;= navOffset) { jQuery("nav").addClass("fixed"); } else { jQuery("nav").removeClass("fixed"); } }); });
type: UnansweredQuestion
type: Question
has title: Browser Resize event for sticky navigation
tagged with: window
answer count: 1

http://stackoverflow.com/comment/46562053
type: Comment
has text: You have to subscribe client on those channels.
comment on: http://stackoverflow.com/q/29171725
score: 0
type: QuestionComment

http://stackoverflow.com/q/29085373
possible better answer: http://stackoverflow.com/a/29085577
favorite count: 0
accepted answer: http://stackoverflow.com/a/29085459
answer count: 2
has comment: http://stackoverflow.com/comment/46403659
has comment: http://stackoverflow.com/comment/46403497
has body: How can I using JavaScript tell if the integer is one or two digit number? I'm creating time filter in Angular and I need to add 0 in front of a number every time its only one digit. For example instead of 1:2:3 to have 01:01:03.
downvote count: 3
has comment: http://stackoverflow.com/comment/46403491
upvote count: 0
has answer: http://stackoverflow.com/a/29085459
tagged with: javascript
score: -3
has title: How can I tell is integer one or two digit number?
has answer: http://stackoverflow.com/a/29085577
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46403523

http://stackoverflow.com/a/29098457
has comment: http://stackoverflow.com/comment/46429180
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46449428
has body: var obj = []; obj[0] = {Guest:"Ramkumar", City: "Madurai", Mobile: "9578606320", Email: "bsrsms@gmail.com", Address:"first street" }; obj[1] = {Guest:"Sathish", City: "Madurai", Mobile: "9578606320", Email: "bsrsms@gmail.com", Address:"first street" }; obj[2] = {Guest:"Suresh", City: "Madurai", Mobile: "9578606320", Email: "bsrsms@gmail.com", Address:"first street" }; obj[3] = {Guest:"Ganesh", City: "Madurai", Mobile: "9578606320", Email: "bsrsms@gmail.com", Address:"first street" }; var x = JSON.stringify(obj); window.location = "view.html?Object=" + JSON.stingify(obj); Contains an error. window.location = "view.html?Object=" + JSON.stingify(obj); should be window.location = "view.html?Object=" + JSON.stringify(obj); JSON.stringify, not JSON.stingify Your server side is probably not expecting the faulty output of your code. EDIT As mentioned in the comments, you have already stringified your object into the variable x, so there's no need to stringify it again. Therefore you could also use window.location = "view.html?Object=" + x;
type: Answer
answers question: http://stackoverflow.com/q/29098367
upvote count: 1

http://stackoverflow.com/comment/46529015
type: Comment
has text: Great answer. How would i connect 'test' to the variable 'metro' ?.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29153752

http://stackoverflow.com/a/29217754
accepted answer of: http://stackoverflow.com/q/29217697
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46644554
has comment: http://stackoverflow.com/comment/46644519
type: Answer
has body: Just it: $('#selectstate').on('change', function(){ $("[name='update']:submit").trigger("click"); }); If you can, use an id to your submit button
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46644643
answers question: http://stackoverflow.com/q/29217697

http://stackoverflow.com/a/29202570
accepted answer of: http://stackoverflow.com/q/29202498
upvote count: 3
has comment: http://stackoverflow.com/comment/46617124
has body: Regardless of how you obtain the data, just think about what data you need to display - your ViewModel - and assign values to them, if and when you obtain the data. In this case, create a scope-exposed property $scope.totalColorQty, and assign its value when you receive the data: djangoAuth.fetch_from_server().then(function(data){ $scope.model = data; $scope.totalColorQty = computeColorQuantity(data.all_colors); }); function computeColorQuantity(colorsArray){ // do whatever you need to calculate the quantity } Then, simply display it in the UI: Total Color Quantity: Loading... {{totalColorQty}} Few additional notes: 1) You could expose computeColorQuantity on the scope and bind to that. But, I strongly recommend against that - since this operation is "heavy" and will be performed on every digest cycle, making your entire app slower. DON'T DO THIS: Total Color Quantity: {{computeColorQuantity(model.all_colors)}} 2) If you don't need to recalculate this value, then you could bind-once to reduce the number of $watchers: 3) If you do intend to allow users to update the data, then I suggest to recalculate it on every user-initiated changed, for example, via ng-change, instead of via deep $watch
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29202498
score: 3
has comment: http://stackoverflow.com/comment/46617146

http://stackoverflow.com/a/29215349
score: 0
has comment: http://stackoverflow.com/comment/46640628
has comment: http://stackoverflow.com/comment/46640297
type: Answer
has body: Alternative solution using Array.prototype.fill() ARRAY = ["A","B","C","D","E"]; var mlength = ARRAY.length, DATES = []; DATES.length = mlength; DATES.fill([]); //DATES is now -&gt; [ [], [], [], [], [], ]
answers question: http://stackoverflow.com/q/29214824
has comment: http://stackoverflow.com/comment/46640391
has comment: http://stackoverflow.com/comment/46640488

http://stackoverflow.com/a/29109384
has body: You insert your styles into the app/assets/stylesheets folder and JavaScript into app/assets/javascript folder. You can either add the files, or paste the code into application.css and application.js. Then require them at the top kinda like so: //= require jquery //= require jquery_ujs //= require bootstrap.min //= require turbolinks //= require_tree .
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/46449009
has comment: http://stackoverflow.com/comment/46449220
answers question: http://stackoverflow.com/q/29109316
has comment: http://stackoverflow.com/comment/46449210

http://stackoverflow.com/comment/46529927
type: QuestionComment
comment on: http://stackoverflow.com/q/29151389
has text: Do you know about plugin for this?
score: 0
type: Comment

http://stackoverflow.com/comment/46436545
comment on: http://stackoverflow.com/a/29096035
type: Comment
has text: Thanks for your answer. It works!! But why? Why `['', function(){` will not work? Isn't that the standard way to write in Angular especially if your script is going to be compressed?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46373891
score: 0
has text: So first thigns first, onclick is case sensitive?
comment on: http://stackoverflow.com/q/29069282
type: Comment
type: QuestionComment

http://stackoverflow.com/a/31958383
score: 2
downvote count: 0
has body: If its not too late, you may try this: https://jsfiddle.net/rradik/kuqdwuyd/ &lt;canvas id="canvas" width="200" height="200" /&gt; var canvas; var ctx; var lastend = 0; var pieColor = ["#ECD078","#D95B43","#C02942","#542437","#53777A"]; var pieData = [10,30,20,60,40]; var pieTotal = 10 + 30 + 20 + 60 + 40; // done manually for demo canvas = document.getElementById("canvas"); ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); var hwidth = ctx.canvas.width/2; var hheight = ctx.canvas.height/2; for (var i = 0; i &lt; pieData.length; i++) { ctx.fillStyle = pieColor[i]; ctx.beginPath(); ctx.moveTo(hwidth,hheight); ctx.arc(hwidth,hheight,hheight,lastend,lastend+ (Math.PI*2*(pieData[i]/pieTotal)),false); ctx.lineTo(hwidth,hheight); ctx.fill(); //Labels on pie slices (fully transparent circle within outer pie circle, to get middle of pie slice) //ctx.fillStyle = "rgba(255, 255, 255, 0.5)"; //uncomment for debugging // ctx.beginPath(); // ctx.moveTo(hwidth,hheight); // ctx.arc(hwidth,hheight,hheight/1.25,lastend,lastend+ // (Math.PI*(pieData[i]/pieTotal)),false); //uncomment for debugging var radius = hheight/1.5; //use suitable radius var endAngle = lastend + (Math.PI*(pieData[i]/pieTotal)); var setX = hwidth + Math.cos(endAngle) * radius; var setY = hheight + Math.sin(endAngle) * radius; ctx.fillStyle = "#ffffff"; ctx.font = '14px Calibri'; ctx.fillText(pieData[i],setX,setY); // ctx.lineTo(hwidth,hheight); //ctx.fill(); //uncomment for debugging lastend += Math.PI*2*(pieData[i]/pieTotal); } May not be perfect and very efficient one, but does the job nevertheless
answers question: http://stackoverflow.com/q/29178994
upvote count: 2
type: Answer

http://stackoverflow.com/comment/46527753
score: 1
has text: So... Why not use ` ` instead?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29153168

http://stackoverflow.com/comment/46517452
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29147068
has text: Thank you niese! My stupid mistake was on `var url = "/images/" + {{imageName}};`
score: 0

http://stackoverflow.com/q/29092584
tagged with: jquery
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has body: How to hide source code from public view in php, asp.net and with javascript. I have seen many CMS and other website that source is hidden from public view, like wordpress config.php, whmcs configuration.php, and more files are hidden, but inside it have code but when we check in browser view source it display none. How to do like this in php and asp.net or with javascript.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: How to hide source code from public view
upvote count: 1
has answer: http://stackoverflow.com/a/29092743
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29092690
score: 0
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/29111199
score: -3
has comment: http://stackoverflow.com/comment/46451785
type: Question
has comment: http://stackoverflow.com/comment/46451607
has comment: http://stackoverflow.com/comment/46451822
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46451806
has comment: http://stackoverflow.com/comment/46451801
has title: json array disply in using angular js
has comment: http://stackoverflow.com/comment/46451852
answer count: 1
has comment: http://stackoverflow.com/comment/46493411
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29111370
tagged with: angularjs
downvote count: 3
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46451701
has body: JSON array I am getting after get API call, I am getting following json response. { "reactions":[{ "severity":{ "label":"Severe" }, "label":"Skin Rash" }], "audit":{ "source":"medicare", "createDate":"2015-03-02T18:39:23Z", "update‌​Date":"2015-03-02T18:39:23Z", "version":"1" }, "label":"Other - IODINE", "ended":"2007-10-28T00:00:00-04:00", "started":"1993-01-01T00:00:00-05:00‌​", "date":"2015-03-02T18:37:42Z" }". And I need to just display only ":[{"severity":{"label":"Severe"},"label":"Skin Rash"}]" in li tag. How can I do that ? I need to populate this json array in &lt;li&gt; in html5. How can I do it? I am using restangular.: Angular JS file: Restangular.one('APIName', Parameter_to_api).get().then(function (result) { $scope.datalist= result; } HTML file &lt;ul class="links"&gt; &lt;li ng-repeat="data in datalist"&gt;&lt;/li&gt; &lt;/ul&gt;
tagged with: restangular
upvote count: 0
has comment: http://stackoverflow.com/comment/46489650

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/29214345
tags question: http://stackoverflow.com/q/29160183
tags question: http://stackoverflow.com/q/29211204
tags question: http://stackoverflow.com/q/29131445
type: Tag
tags question: http://stackoverflow.com/q/29156839

http://stackoverflow.com/q/29135725
type: Question
has answer: http://stackoverflow.com/a/29147373
tagged with: dynamically-generated
score: 0
accepted answer: http://stackoverflow.com/a/29147373
answer count: 1
tagged with: forms
has body: I can load Twitter typeahead just fine on a static form. However, in this situation, I would like to apply it to a dynamically-generated field. Even though my duplication script adds the required ".typeahead" class to the new input, it never seems to work. Indeed, the static form is surrounded by several additional classes, which are not generated for the dynamic fields. I feel like there is something more I need to do in order for the dynamic fields to function like the static field, but I am not sure. The Javascript: var firstnames = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 5, prefetch: { url: './datasets/firstnames.json', filter: function(list) { return $.map(list, function(firstname) { return { name: firstname }; }); } } }); firstnames.initialize(); $('.typeahead').typeahead(null, { name: 'firstnames', displayKey: 'name', source: firstnames.ttAdapter() }); var count=2; $("#add").click(function(){ var html=" Remove "; $("#additionalnames").append(html); count++; }); function remover(which){ $("#div"+which).remove(); } The HTML: Standard field works fine (type a letter from a to g): Dynamic field does not: Add Another I don't think JSFiddle can handle my json file, so a live implementation is here: http://drjoeseriani.com/firstnames A downloadable version of this resides here: http://drjoeseriani.com/firstnames.zip Thanks for any help.
tagged with: typeahead.js
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has title: How do I add typeahead.js (Bloodhound) to jQuery dynamically-created fields?

http://stackoverflow.com/a/57943816
type: Answer
has body: I had the same error on my Angular6 project. none of those solutions seemed to work out for me. turned out that the problem was due to an element which was specified as dropdown but it didn't have dropdown options in it. take a look at code below: notifications Some Actions You have 5 new tasks You're now friend with Andrew Another Notification Another One removing the code data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" solved the problem. I myself think that by each click on the first span element, the scope expected to set style for dropdown children which did not existed in the parent span, so it threw error.
answers question: http://stackoverflow.com/q/29196991
score: 0

http://stackoverflow.com/comment/46627363
has text: id' try to get it working on ie10 first as it might reverse fix ce 6.0. Try [this](http://stackoverflow.com/questions/18535505/can-anyone-explain-why-focus-is-not-working-always-on-ie-10) and [this](http://www.mkyong.com/javascript/focus-is-not-working-in-ie-solution/) to see if they fix the issue
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29208574
score: 1

http://stackoverflow.com/a/29173892
has body: Code would be like below var firstFilter = $filter('filter')($scope.lobs, $scope.showRow) var secondFilter = $filter('filter')(firstFilter , $scope.searchString) var finalFilter = $filter('orderBy')(secondFilter , 'name', true) Don't forget to add $filter dependency on controller
upvote count: 1
answers question: http://stackoverflow.com/q/29173805
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/29129514
has comment: http://stackoverflow.com/comment/46488529
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/28066429
has body: Assume this scenario: Promise.all( [p1, p2] ) .then( v =&gt; { //v[0] contains results of p1? }); Assuming that both p1 and p2 are resolved, is it safe to assume that v[0] will contain the result for p1 and v[1]will contain the result for p2? Or can I only assume that v will contain 2 values for each promise and cannot assume where each value is?
answer count: 0
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/46485033
has comment: http://stackoverflow.com/comment/46488591
type: Question
has comment: http://stackoverflow.com/comment/46484841
tagged with: es6-promise
tagged with: javascript
tagged with: ecmascript-harmony
has comment: http://stackoverflow.com/comment/46484976
has comment: http://stackoverflow.com/comment/46484846
favorite count: 0
has title: Is the order of Promise.all.then results guaranteed?
tagged with: promise
linked to: http://stackoverflow.com/q/28066429

http://stackoverflow.com/comment/46662505
has text: (me too!) looking at it this morning, but new in both js/angularjs/ionic so takes a bit of time ..
comment on: http://stackoverflow.com/a/29217418
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29124807
answer count: 1
linked to: http://stackoverflow.com/q/14771810
has answer: http://stackoverflow.com/a/31497763
tagged with: angularjs
type: UnansweredQuestion
has body: I have a provider that gets items set in it with a contructor, then returns a $get with a few functions for use. The issue is the $get functions all use an object that is set with the constructor I have, And I would like to be able to set the constructor for testing (or maybe a different approach?). Here is what I have. The provider (as built for requirejs) function URLprovider(angular, URLfactory, underscore) { var metadata = { componentName: 'URLprovider', moduleName: 'test.URLprovider' }; $moduleObjectProvider.$inject = []; function $moduleObjectProvider() { var currentModules = {}; function modulePush(currentModule, name) { var tempMod = {}; tempMod[name] = currentModule; _.extend(currentModules, tempMod); } //constructor this.moduleConstructor = function(name, cb) { if (!currentModules[name]) { this.states = []; this.callback = cb; modulePush(this, name); } }; this.$get = $get; $get.$inject = ['URLfactory', '$log', '$location']; function $get(URLfactory, $log, $location) { return { go: function(name, stateName, options) { }, prep: function(name, stateName, options) { }, modules: function() { return currentModules; } }; } } angular.module(metadata.moduleName, []).provider(metadata.componentName, $moduleObjectProvider); So - the functions I want to test are in the $get. If I console.log URLprovider in the test I ONLY get back the functions in the get. Each of those get functions uses the currentModules variable that is set with the constructor. So, in a normal scenario I would just set it in a config, something like - .config(function(URLproviderProvider) { var callback = function(name, obj) { console.log(name, obj); } var mod = new URLproviderProvider.moduleConstructor("module1,", callback) .addState("calender", ["day", "week", "month"]); }) So that would push that object into currentModules. I need to do this for testing essentially, as all the functions in the $get will not run correctly without something inside the currentModules. So what I'm wondering is - I…
tagged with: unit-testing
type: Question
tagged with: javascript
has title: Angular, testing custom provider and config
score: 0

http://stackoverflow.com/a/29102350
score: 1
answers question: http://stackoverflow.com/q/29094923
type: AcceptedAnswer
has body: I found a solution to my problem. I removed the event handler for input, added a custom source function and manipulate the query variable for the typeahead to change letters to uppercase. $(document).ready(function(){ var suggestionsArray = ["audi", "porsche", "pagani", "mercedes benz", "bmw" , "bugatti"]; var descs = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, local: $.map(suggestionsArray, function(desc) { return { value: desc }; }) }); var quicksearchInput = $("#in"); // kicks off the loading/processing of `local` and `prefetch` descs.initialize(); quicksearchInput.typeahead({ hint: true, highlight: true, minLength: 0 }, { name: "noname", displayKey: "value", source: function (query, cb) { query = query.toUpperCase(); $("#in").typeahead('val', query); descs.get(query, function (suggestions) { cb(suggestions.slice(0, 5)); }); }, templates: { empty: [ '&lt;div class="empty-message"&gt;', 'No matching results found', '&lt;/div&gt;' ].join('\n') } }); }); Solution is here jsfiddle
upvote count: 1
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29094923

http://stackoverflow.com/comment/46526936
score: 0
has text: Yup, CSS is capable of a lot of things: http://tympanus.net/Development/SidebarTransitions/
comment on: http://stackoverflow.com/q/29152756
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29082315
answers question: http://stackoverflow.com/q/29082181
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29082181
has body: You can have a click handler which can select the li based on its data-value attribute like $('#click').click(function(){ $('.selectMultiList li[data-value="517"]').click() })

http://stackoverflow.com/q/29149410
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/38734795
has body: How can i fire a JQuery event when the user is gone on idle from the website for a specified time, and reset the timer on mouse move, scroll or on a key press.
has answer: http://stackoverflow.com/a/38734795
tagged with: javascript
has answer: http://stackoverflow.com/a/29149411
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29149411
has title: How can i fire an event when the user is Idle

http://stackoverflow.com/comment/46570806
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29176467
type: Comment
has text: @m59 I do not defend anything. I'm asking the technical reason why you don't recommend using `!-` here. Any problems with it in *this particular case*? "it is "ok" just because it can't cause a problem in this case" --- it is OK for developer to make thoughtful decisions, not just follow dogmas (that don't have (or do they?) a valid technical reason)

http://stackoverflow.com/a/29169713
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29169646
type: Answer
score: 1
upvote count: 1
has body: You could use the selectedIndex property: var firstSelect = document.querySelector('.first-select'), secondSelect = document.querySelector('.second-select') ; function changeHandler() { secondSelect.disabled = firstSelect.selectedIndex === 0; } firstSelect.addEventListener('change', changeHandler); changeHandler(); // execute the handler once on DOM ready Or if you are using jQuery: $('.first-select').on('change', function() { $('.second-select').prop('disabled', this.selectedIndex === 0); }).change(); // trigger the event once on DOM ready
answers question: http://stackoverflow.com/q/29169646

http://stackoverflow.com/a/29172435
has comment: http://stackoverflow.com/comment/67267491
type: Answer
has comment: http://stackoverflow.com/comment/46563420
has comment: http://stackoverflow.com/comment/68264652
has comment: http://stackoverflow.com/comment/94649573
accepted answer of: http://stackoverflow.com/q/29170799
has body: Type $.fn.jquery in your console and tell us what numbers it says. You probably have a second version running somewhere.
answers question: http://stackoverflow.com/q/29170799
has comment: http://stackoverflow.com/comment/116010012
has comment: http://stackoverflow.com/comment/50591311
upvote count: 100
downvote count: 4
has comment: http://stackoverflow.com/comment/46631891
has comment: http://stackoverflow.com/comment/46563131
type: AcceptedAnswer
score: 96

http://stackoverflow.com/a/29173057
answers question: http://stackoverflow.com/q/29171868
has comment: http://stackoverflow.com/comment/46643110
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/46579481
has body: You can use message passing to get it done by content scripts to detect the switch on a supported page, then notify the background page in order to display a browser action icon for that page. Your content script should send a message using chrome.runtime.sendMessage, and the background page should listen using chrome.runtime.onMessage.addListener: I created the sample code and tested it works with me: Content script: if(onSupportedPageNeedChangeIcon) { // send message to background script chrome.runtime.sendMessage({ "newIconPath" : "newicon.png" }); } Background page: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { // read `newIconPath` from request and read `tab.id` from sender //alert("good"); chrome.browserAction.setIcon({ path: request.newIconPath, tabId: sender.tab.id }); }); Also keep in mind to register your content script's code in manifest like: "content_scripts": [ { "matches": ["http://www.supportedwebsiteone.com/*", "http://www.supportedwebsitetwo.com/*"], "js": ["myscript.js"] } ]
downvote count: 0
upvote count: 3

http://stackoverflow.com/q/29143023
has body: What is the use of className in declare(className,superclass,props) in DOJO. In the following example I am trying to use className when using in-heritage. http://jsfiddle.net/mosnpm27/ When passing className I have receive an error. declare(className,superclass,props); className Optional The optional name of the constructor (loosely, a "class") stored in the "declaredClass" property in the created prototype. It will be used as a global name for a created constructor. require(["dojo/_base/declare"], function(declare) { var Mammal = declare('Mammal',null, { constructor: function(name) { this.name = name; }, sayName: function() { console.log(this.name); } }); var Dog = declare('Dog', Mammal, { makeNoise: function() { console.log("Waf waf"); } }); var myDog = new Dog("Pluto"); myDog.sayName(); myDog.makeNoise(); console.log("Dog: " + myDog.isInstanceOf(Dog)); console.log("Mammal: " + myDog.isInstanceOf(Mammal)); });
tagged with: javascript
has title: What is the use of optional className parameter in DOJO declare?
accepted answer: http://stackoverflow.com/a/29143621
answer count: 1
has comment: http://stackoverflow.com/comment/46542680
tagged with: dojo
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29143621
type: Question

http://stackoverflow.com/q/29080680
has comment: http://stackoverflow.com/comment/46394595
has body: Assuming I have users on a page of my site. I update this page on my server but users will not notice the difference until reloading the page. How can a JavaScript function detect the difference and start reloading the page ? A solution could be using a timer which reloads the page every second but this causes a lot of traffic?
score: 1
has comment: http://stackoverflow.com/comment/46394545
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46395175
tagged with: javascript
linked to: http://stackoverflow.com/q/5746598
has title: how to detect if webpage has changed?
has comment: http://stackoverflow.com/comment/46395655
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46394572
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29080858

http://stackoverflow.com/comment/46459247
type: QuestionComment
has text: @MurtazaHussain Thanks, I had a look. So I assume that I need to create session at the mobile App, and when navigate to the website, the session variables will be retrieved at the beginning of login page. How to use the variables (username/password) to login automatically to the website?
comment on: http://stackoverflow.com/q/29115209
score: 0
type: Comment

http://stackoverflow.com/comment/46517097
comment on: http://stackoverflow.com/a/29147131
score: 0
type: AnswerComment
type: Comment
has text: Thanks. I noticed that `$("#dialog").dialog("option").height` gives the outer height of the dialog (340 px), while `$("#dialog").height())` gives the available height inside the dialog (272 px). See https://jsfiddle.net/4bajLxw3/1/. My application to add a `div` with autoscroll inside the dialog, and must make it less than `272 px`.

http://stackoverflow.com/q/29117793
tagged with: google-maps
possible better answer: http://stackoverflow.com/a/29118231
has answer: http://stackoverflow.com/a/29118913
tagged with: javascript
has answer: http://stackoverflow.com/a/29118231
tagged with: google-maps-api-3
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Google Maps Hidden Div Overflows half map
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29118913
type: AnsweredQuestion
has body: I'm using Google maps, with Drawning Manager var latlng = new google.maps.LatLng(41.7318187, 44.8627138); var mapOptions = { zoom: 8, center: latlng, disableDoubleClickZoom: true } bounds = new google.maps.LatLngBounds(); map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); //Define a symbol using SVG path notation, with an opacity of 1. var lineSymbol = { path: 'M 0,-1 0,1', strokeOpacity: 1, scale: 4 }; drawingManager = new google.maps.drawing.DrawingManager({ drawingControl: true, drawingControlOptions: { position: google.maps.ControlPosition.TOP_CENTER, drawingModes: [ google.maps.drawing.OverlayType.MARKER, google.maps.drawing.OverlayType.POLYLINE ] }, markerOptions: { icon: $imgFolderFullPath + '/' + $('#TourObjectType').val() + '.png', draggable: true }, polylineOptions: { strokeColor: $("#LineType").val() } }); drawingManager.setMap(map); The problem is when map renders some element that has visibility hidden and z-index 107 which overflows half of the map and i cant insert, edit, move, poly lines and markers in that part DOM structure of the problematic part looks like this : &lt;div style="transform: translateZ(0px); position: absolute; left: 0px; top: 0px; z-index: 107; width: 100%;"&gt; &lt;div style="cursor: default; width: 53px; height: 191px; visibility: hidden;"&gt;...&lt;/div&gt; &lt;/div&gt; and also when i comment visibility hidden in the code snippet above, there is something like white comment box with star shown on the map i what to know what causes the problem
score: 1
upvote count: 1
tagged with: dom
type: Question

http://stackoverflow.com/q/29064831
has comment: http://stackoverflow.com/comment/46366231
has comment: http://stackoverflow.com/comment/46366178
type: Question
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/29065961
has comment: http://stackoverflow.com/comment/46365647
has comment: http://stackoverflow.com/comment/46365556
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to add table item dynamically .Now i have problem that when i select new dynamically created select item from drop-down its corresponding drop-down list does not get its value.And i get "Uncaught TypeError: Cannot read property 'options' of null".I think the problem is with the parameter passing to the function which is called if select is change but cannot find any way to resolve it .I am adding code snippet Honours General Bank Transaction Details See MP Sub1 Sub2 Bank Transaction id Bank Transaction date Physics Cemistry Math Add And the scripts $(document).ready(function(){var x=0;var y ='ddl';var z='ddl2'; $(".addCF").click(function(){ $("#customFields").append(' Physics Cemistry Math \ \ \ \ \ \ Remove ');x++; }); $("#customFields").on('click','.remCF',function(){ $(this).parent().parent().remove(); }); }); function configureDropDownLists(ddl1,ddl2) { var physics = new Array('Morning','Day','Night'); var chemistry = new Array('Day', 'Evening'); var math = new Array('Morning', 'Day'); switch (ddl1.value) { case 'Physics': ddl2.options.length = 0; for (i = 0; i < physics.length; i++) { createOption(ddl2, physics[i], physics[i]); } break; case 'Chemistry': ddl2.options.length = 0; for (i = 0; i < chemistry.length; i++) { createOption(ddl2, chemistry[i], physics[i]); } break; case 'Math': ddl2.options.length = 0; for (i = 0; i < math.length; i++) { createOption(ddl2, math[i], math[i]); } break; default: ddl2.options.length = 0; break; } } function createOption(ddl, text, value) { var opt = document.createElement('option'); opt.value = value; opt.text = text; ddl.options.add(opt); } How do i add multiple row in table and populate select list accordingly. for example : if i select Physics in first then second list option should be morning,day ,evening this is not happning for dynamically created rows;
has title: Dynamic dropdown list option is not populating afer adding multiple column
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29065961

http://stackoverflow.com/comment/46582880
has text: Where would I input this option? Did a [google](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=casperjs+--web-security%3Dfalse) search and nothing came up relevant to this option.
comment on: http://stackoverflow.com/a/29136187
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29157414
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29157285
answers question: http://stackoverflow.com/q/29157285
score: 1
upvote count: 1
has body: Your variable string is a local variable inside of the function get...() and is ONLY available inside of that scope. Local variables are only available within the function they are declared in, which in this case is your get...() function If you want it available in a broader scope so that printStr() can use it, then you have to declare it at a higher scope. You could solve this by using an anonymous function declared in the same scope: function Foo(elem) { elem.on('mousedown', getBotheredByBrendanEich); function getBotheredByBrendanEich() { var str = 'its just werks!'; elem.on('mouseup', function() { console.log(str); }); } } var test = new Foo($('#test')); Or, you could pass the argument to the event handler with .bind(): function Foo(elem) { elem.on('mousedown', getBotheredByBrendanEich); function getBotheredByBrendanEich() { var string = 'its just werks!'; elem.on('mouseup', printStr.bind(this, string)); } function printStr(arg) { console.log(arg); } } var test = new Foo($('#test')); Or, you could move the variable to a higher scope so it can be shared: function Foo(elem) { elem.on('mousedown', getBotheredByBrendanEich); var str = 'its just werks!'; function getBotheredByBrendanEich() { elem.on('mouseup', printStr); } function printStr() { console.log(str); } } var test = new Foo($('#test')); In all cases though, this structure is troublesome because you've adding a new mouseup event handler everytime the mousedown event occurs. This means you will get multiple mouseup handlers after only a couple clicks. This is rarely ever what you really want to do. I would suggest this which will not suffer from that problem: function Foo(elem) { var str = 'its just werks!'; elem.on('mousedown', function() { // whatever code you want here }); elem.on('mouseup', function() { console.log(str); }); } var test = new Foo($('#test')); One more comment. Your code doesn't show any reason to actually use a constructor here. It appears like you could just implement a normal function c…

http://stackoverflow.com/comment/46380455
has text: http://jsfiddle.net/dkk2nqyg/8/ as you can see, drag all the cards in the box, some will load, some won't load at all;)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29072653

http://stackoverflow.com/a/29078710
has comment: http://stackoverflow.com/comment/46407031
has comment: http://stackoverflow.com/comment/46410371
has comment: http://stackoverflow.com/comment/46407015
score: 0
has comment: http://stackoverflow.com/comment/46544363
has comment: http://stackoverflow.com/comment/46402432
has comment: http://stackoverflow.com/comment/46427288
type: Answer
has body: You must understand that PHP is server-side and Javascript is client-side. Your browser runs on client-side, which theoretically is running on computer A, while the PHP code, which is server-side code runs on computer B. As a result, it should not matter whether you are opening n tabs on the same browser to run the page or you are opening n different browsers. PHP should run without problems, two tabs should not really affect scalability. I believe you have one or more bugs in your code which leads to this problem.
has comment: http://stackoverflow.com/comment/46493486
has comment: http://stackoverflow.com/comment/46391776
has comment: http://stackoverflow.com/comment/46461358
has comment: http://stackoverflow.com/comment/46531605
has comment: http://stackoverflow.com/comment/46507409
has comment: http://stackoverflow.com/comment/46428930
has comment: http://stackoverflow.com/comment/46435695
has comment: http://stackoverflow.com/comment/46404426
accepted answer of: http://stackoverflow.com/q/29078285
has comment: http://stackoverflow.com/comment/46399739
answers question: http://stackoverflow.com/q/29078285
has comment: http://stackoverflow.com/comment/46401497
type: AcceptedAnswer

http://stackoverflow.com/comment/46396567
has text: that's why i used `$1` in the replacement part. `$1` refers to chars which are present inside the group index 1.
type: Comment
comment on: http://stackoverflow.com/a/29080919
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46400037
type: QuestionComment
type: Comment
has text: @FelixKling how can I make size global and also recalculate it when the window is resized?
comment on: http://stackoverflow.com/q/29083318
score: 0

http://stackoverflow.com/comment/46398775
comment on: http://stackoverflow.com/a/29082690
score: 0
type: AnswerComment
has text: Thanks a lot !! you're awesome. Code is perfect right away. :) Thanks for all the explanation !! \m/ :D
type: Comment

http://stackoverflow.com/comment/46374545
comment on: http://stackoverflow.com/q/29069704
score: 0
type: QuestionComment
type: Comment
has text: please post your HTML

http://stackoverflow.com/comment/46491628
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29132902
type: QuestionComment
has text: So you want to evaluate that?

http://stackoverflow.com/comment/46565550
type: Comment
comment on: http://stackoverflow.com/a/29148268
has text: I see what you are trying to do now. Here: document.getElementById("myDiv").name ="Bob"; document.getElementById("myDiv").age ="32"; document.getElementById("myDiv").pet ="cat"; You can now simply refer to each "property" of this element like so: alert(document.getElementById("myDiv").name);
type: AnswerComment
score: 0

cocos2d-js
tags question: http://stackoverflow.com/q/29072152
tags question: http://stackoverflow.com/q/29207553
tags question: http://stackoverflow.com/q/29120459
type: Tag
tag name: cocos2d-js

http://stackoverflow.com/comment/46607121
score: 0
type: Comment
has text: works fine for me , see here a demo http://plnkr.co/edit/3K1Ut9NPQcT2RQZeVtvc?p=preview
type: QuestionComment
comment on: http://stackoverflow.com/q/29197033

http://stackoverflow.com/comment/46439313
type: Comment
has text: You can't as there is no other event than overlaycomplete / circlecomplete.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29103143

http://stackoverflow.com/q/29153533
has body: I have run into what is, to me, some serious weirdness with string behavior in Firefox when using the .normalize() Unicode normalization function. Here is a demo, view the console in Firefox to see the problem. Suppose I have a button with an id of "NFKC": NFKC Get a reference to that, easy enough: document.querySelector('#NFKC') // Now, since this button has an id of NFKC, which we can get at that string as follows: document.body.querySelector('#NFKC').id // "NFKC" Stick that string in a variable: var s1 = document.body.querySelector('#NFKC').id By way of comparison, assign the very same string to a variable directly: var s2 = 'NFKC' So of course: s1 === s2 // true And: s1 == s2 // true Now’s the part where my head explodes. To normalize a string, you pass one of NFC, NFD, NFKC, or NFKD to .normalize(), like this: 'á'.normalize('NFKC') // "á" Of course, depending on the normalization form you choose, you get different codepoints, but whatever. 'á'.normalize('NFC').length == 1 // true 'á'.normalize('NFD').length == 2 // true But whatever. The point is, pass one of four strings corresponding to normalization forms to .normalize(), and you'll get a normalized string back. Since we know that s1 (the string we retrieved from the DOM) and s2 are THE SAME STRING (s1 === s2 is true), then obviously we can use either to normalize a string: 'á'.normalize(s2) "á" // well yeah, because s2 IS 'NFKC'. Naturally, s1 will behave exactly the same way, right? 'á'.normalize(s1) // RangeError: form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD' Nope. So the question is: why does it appear that s1 is not equal to s2 as far as .normalize() is concerned, when s1 === s2 is true? This doesn’t happen in Chrome, the only other browser I’ve tested so far. UPDATE This was a bug in Firefox and has been fixed.
has comment: http://stackoverflow.com/comment/46529233
upvote count: 19
has answer: http://stackoverflow.com/a/29154139
has comment: http://stackoverflow.com/comment/46528701
has comment: http://stackoverflow.com/comment/46720536
has comment: http://stackoverflow.com/comment/46529785
downvote count: 1
has comment: http://stackoverflow.com/comment/46528307
type: Question
has comment: http://stackoverflow.com/comment/46528354
has comment: http://stackoverflow.com/comment/46721862
tagged with: firefox
has comment: http://stackoverflow.com/comment/46528265
tagged with: javascript
has comment: http://stackoverflow.com/comment/46529253
has title: When a string is not a string? Unicode normalization weirdness in Javascript
answer count: 1
has comment: http://stackoverflow.com/comment/46528801
tagged with: string
tagged with: unicode
favorite count: 0
has comment: http://stackoverflow.com/comment/46700228
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/51711523
tagged with: unicode-normalization
has comment: http://stackoverflow.com/comment/46528333
score: 18

http://stackoverflow.com/a/29075440
upvote count: 1
answers question: http://stackoverflow.com/q/29072999
has body: use Middleware Middleware: &lt;?php namespace App\Http\Middleware; class OldMiddleware { /** * Run the request filter. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if(!**condition to check login**) { // if session is expired return response()-&gt;json(['message' =&gt; 'Forbidden!'],403); } return $next($request); } } Route: Route::group(['middleware' =&gt; '\App\Http\Middleware\OldMiddleware'], function(){ //put the routes which needs authentication to complete }); View: $.ajax({ type: 'post', url: {{route('someroute')}} //etc etc }).done(function(data){ //do if request succeeds }).fail(function(x,y,z){ //show error message or redirect since it is failed. });
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/29204584
has body: this error comes up when using the following : field otherinfo has id=idOtherInfo and is declared in a .xml file under Models, Forms in joomla. The field has a default value in the declaration to prevent the null (shows the default value in the browser) and using the onchange="dosomething()" I am running a javascript file, which runs ok as it shows an alert and then it halts on the command var first1 = document.getElementById("idOtherInfo").value; The javascript file is loaded by JHtml::script(JURI::root() . 'media/com_hr/js/validateFields.js', true); also can be loaded by $document = JFactory::getDocument(); $document-&gt;addScript(JURI::root().'media/com_hr/js/validateFields.js'); Can you please help? Thanks
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29207687
has title: Uncaught TypeError: Cannot read property 'value' of null using joomla
has comment: http://stackoverflow.com/comment/46626924
has answer: http://stackoverflow.com/a/29208455
accepted answer: http://stackoverflow.com/a/29208455
type: Question
has comment: http://stackoverflow.com/comment/46623268
tagged with: javascript
score: 0
answer count: 2
tagged with: joomla
has comment: http://stackoverflow.com/comment/46626538
possible better answer: http://stackoverflow.com/a/29207687

http://stackoverflow.com/a/29209611
answers question: http://stackoverflow.com/q/29209514
has body: Consider this following addition: $('body').on("change", "#state", function () { ^^^^^^^^
score: 0
type: Answer

http://stackoverflow.com/a/29201233
type: Answer
has comment: http://stackoverflow.com/comment/46646599
has comment: http://stackoverflow.com/comment/46646314
downvote count: 0
has comment: http://stackoverflow.com/comment/46646440
score: 1
has comment: http://stackoverflow.com/comment/47277414
has comment: http://stackoverflow.com/comment/47277546
has comment: http://stackoverflow.com/comment/47277686
has comment: http://stackoverflow.com/comment/46645494
has comment: http://stackoverflow.com/comment/47280176
has comment: http://stackoverflow.com/comment/47276741
accepted answer of: http://stackoverflow.com/q/29200876
upvote count: 1
answers question: http://stackoverflow.com/q/29200876
has body: Starting with the JQuery UI Split Button Widget you linked to, here's a few tweaks to have a button that when clicked gives options to select from and when an option is clicked those clicks (the button and the list item) are sent to the server by way of a form POST. HTML: Close Deal Not Submitted Price Too High Other JavaScript: $(function() { $( "#close_deal" ) .click(function(evtCD) { var menu = $( this ).parent().next().show().position({ my: "left top", at: "left bottom", of: this }); $("#deal_form input[name='submit_action']").val(evtCD.target.innerHTML); $( document ).one( "click", function(evtDOC) { menu.hide(); if ( 'LI' === evtDOC.target.tagName ) { $("#deal_form input[name='submit_type']").val(evtDOC.target.innerHTML); $("#deal_form").submit(); } }); return false; }) .parent() .buttonset() .next() .hide() .menu(); }); Of course you can add more inputs to the form that can be filled out before the button and list item are clicked, and those values get sent with the form submission. JSFiddle with it here.
type: AcceptedAnswer

http://stackoverflow.com/comment/46476970
comment on: http://stackoverflow.com/q/29125434
score: 1
has text: Latter one is called [**Event Delegation**](http://learn.jquery.com/events/event-delegation/), and use for dynamically created elements.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46550006
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29147395
has text: with respect to the following question and answer, the problematic part is probably setting f:selectItem value to #{null}. http://stackoverflow.com/questions/17052503/using-a-please-select-fselectitem-with-null-empty-value-inside-a-pselectonem
score: 0

http://stackoverflow.com/comment/46618489
has text: you need to change `doSomeBigWork` to accept a callback which will gte called once the async work is completed... then call `response.success();` in the callback
score: 0
comment on: http://stackoverflow.com/q/29203547
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29097177
has answer: http://stackoverflow.com/a/29101191
has title: Adding a hidden form field to a dynamically generated Squarespace newsletter block using JS
has answer: http://stackoverflow.com/a/29127371
downvote count: 0
has body: I'm trying to add a hidden field to my homepage newsletter signup at http://greig.cc/ so that I can track the signup source in Mailchimp. This is the code that I'm injecting into the page, but it throws an 'Uncaught TypeError: undefined is not a function' error and I can't work out why. Is it something to do with the fact that the rest of the form is rendered after the page is loaded? (this is why I'm using the class name to target the form). &lt;script type="text/javascript"&gt; var formcontainer = document.getElementsByClassName('newsletter-form'); var input = document.createElement('input'); input.type = 'hidden'; input.name = 'SOURCE'; input.id = 'SOURCE'; input.value = 'homepage'; formcontainer.appendChild(input); &lt;/script&gt; Thanks for reading :)
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: squarespace
accepted answer: http://stackoverflow.com/a/29127371
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29100857
type: Question
type: AnsweredQuestion
tagged with: mailchimp
possible better answer: http://stackoverflow.com/a/29100857

http://stackoverflow.com/a/29137508
score: 1
has comment: http://stackoverflow.com/comment/46500372
accepted answer of: http://stackoverflow.com/q/29136742
answers question: http://stackoverflow.com/q/29136742
has comment: http://stackoverflow.com/comment/46500171
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: I decided to make this an answer because sometimes future readers don't read the comments. 1) You can modify res and its members to your heart's content. You are operating on an instance of response, not its prototype. There is no "global" resource, but it does have a prototype. 2) Reading the documentation will pay off here. res.send operates identically to res.json if it is passed an object or array. Which is to say that the rest of your code will, in the typical case, run no differently than if you didn't monkey with res.send() but will confuse the heck out of someone (maybe you) several months or years later.
downvote count: 0
has comment: http://stackoverflow.com/comment/46499561

http://stackoverflow.com/comment/46535007
type: Comment
score: 0
has text: I found a bug with this issue reported in January https://code.google.com/p/gmaps-api-issues/issues/detail?id=7504&q=language&sort=-id&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal
type: AnswerComment
comment on: http://stackoverflow.com/a/29134448

http://stackoverflow.com/q/29079225
has title: Clickevent triggering before viewModel can grab radio button values
answer count: 0
score: 1
type: Question
has body: I have a backbone view for some radio buttons that is essentially handling how to collect the data from the page the radio button is on and what to do if the radio button is clicked. My problem is on certain pages (where the user deems it necessary to go to the next page when clicking the radio button, stupid I know, but is a requirement) the click event is being triggered before the viewmodel can gather the information on the radio button. Is there a way to trigger the view model to gather that info before the click event is triggered? At the top I have my event extendEvents: { 'click .btn': 'getClickEventAction' }, then I am creating my viewModel createViewModel: function() { var viewModel = kb.viewModel(this.model, { exclude: ['Options'] }); viewModel.value = WorkflowLayout.controlValue(viewModel); //function where I am finding the values and doing other fun stuff to them to make the rest of the app work. }, and then my clickeventaction getClickEventAction: function(event) { var $el = $(event.currentTarget); var action = $el.data('clickeventaction'); var code = $el.data('clickeventcode'); if (action &amp;&amp; this[action]) this[action](code); },
downvote count: 0
tagged with: javascript
upvote count: 1
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion

http://stackoverflow.com/q/29131561
answer count: 2
downvote count: 0
tagged with: javascript
upvote count: 28
has answer: http://stackoverflow.com/a/29131816
tagged with: lodash
has title: Lodash Debounce not debouncing
favorite count: 0
score: 28
has comment: http://stackoverflow.com/comment/91121630
tagged with: angularjs
has body: I'm trying to debounce a function using Lodash, and while it's invoking the function, it doesn't seem to debounce it at all. My issue doesn't seem to be the same mistake as what I've seen elsewhere on SO or Google (generally, that they're not invoking the function that _.debounce returns). My currently super-simple implementation is as follows (in Angular with CoffeeScript): s.search = -&gt; _.debounce( s._makeSearchRequest, 1000 )() s._makeSearchRequest = -&gt; console.log("making search request") In JS, I believe that's: s.search = function() { _.debounce( s._makeSearchRequest, 1000 )() } s._makeSearchRequest = function() { console.log("making search request") } I run s.search() by typing into an input box, and if I type gibberish very quickly, the console prints out "making search request" on every key press, so many times per second -- indicating that it hasn't been debounced at all. Any ideas what's I'm doing wrong?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29131816
possible better answer: http://stackoverflow.com/a/29131738
tagged with: underscore.js
linked to: http://stackoverflow.com/q/24306290
has answer: http://stackoverflow.com/a/29131738
tagged with: coffeescript
type: Question

http://stackoverflow.com/comment/46450801
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109880
has text: I know this isn't a direct answer to your question, but are you aware that this API will no longer be available as of May 12th, 2015? https://developer.linkedin.com/blog/posts/2015/developer-program-changes
score: 0

http://stackoverflow.com/comment/63424459
has text: Thanks for describing how to access directive controller when having additional required controller.
comment on: http://stackoverflow.com/a/29195873
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29164550
linked to: http://stackoverflow.com/q/1732348
score: 0
has comment: http://stackoverflow.com/comment/46790391
has comment: http://stackoverflow.com/comment/46789821
has body: I have an html page with multiple but I need to remove only the ones that have an opening {, zero or more characters and then a closing } like in the example below: { some text } For example if I have something like this: { some text } then the entire and it's children should be removed but if I have this: something here { or something here some text } or something here then nothing should be touched. How do I do this ? should I write a regex ?
type: UnansweredQuestion
tagged with: regex
has comment: http://stackoverflow.com/comment/46548360
answer count: 0
has title: how to remove dom elements
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/46789664
tagged with: javascript

http://stackoverflow.com/q/29077413
tagged with: javascript
has comment: http://stackoverflow.com/comment/46388250
favorite count: 0
has body: fiddle here http://jsfiddle.net/prantikv/dJty6/36/ I have data from json like so $scope.info={ "company1":"this", "company2":"is", "company3":"sparta" } I am using ng-repeat to print all the data and I want to monotor for changes on the fields. &lt;input type="text" ng-repeat="item in info" value="{{item}}" monitor-change&gt; I have a monitorChange directive like this: .directive('monitorChange', function() { return { restrict: 'A', scope: {changedFlag: '='}, link: function(scope, element, attrs) { var $el = angular.element(element); $el.on('keyup', function() {//bind to element scope.$apply( function() { scope.changedFlag =true;//on key press value is changed }); }); } }; }); When trying to change the data, I receive the error Error: [$compile:nonassign] Expression 'undefined' used with directive 'monitorChange' is non-assignable! I am printing the data in my view with: {{changedFlag }} What is wrong with the code?
upvote count: 6
has answer: http://stackoverflow.com/a/29077621
tagged with: angularjs
score: 6
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46388471
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/29077621
has title: Error: Expression 'undefined' used with directive is non-assignable
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29089239
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29089118
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29089118
has body: The X axis should be d3.time.scale and since your date property are strings you will have to convert it to proper Date objects by doing new Date();

http://stackoverflow.com/a/29161015
type: Answer
answers question: http://stackoverflow.com/q/29160687
has body: Try jQuery dotdotdot plugin. URL: http://dotdotdot.frebsite.nl/ I have made a sample of the code in jsFiddle Link Here's the code: $(document).ready(function() { $(".myText").dotdotdot(); }); p { margin:0; padding:0; font:12px/15px Verdana, Geneva, Tahoma, Arial, Helvetica, sans-serif; } .myText { height:75px; /* this needs to be the height of 5 lines of text. Here it is 15px (line-height of one line) * 5 = 75px */ } some text some text some text some text some text some text some text Hope this helps.
score: 0

http://stackoverflow.com/q/29086029
score: 0
has body: I am following an tutorial on Pluralsight to build a web app and I am getting an error connecting team.html and team-detail.html. What does "ui-sref = "app.game({id: game.gameId}" on Line 4 of team-detail.html do? Is it correct? My error says: TypeError: Cannot read property 'name' of undefined at new TeamDetailCtrl (team-detail-ctrl.js:18) at Object.invoke (ionic.bundle.js:11994) at extend.instance (ionic.bundle.js:16247) at ionic.bundle.js:15502 at forEach (ionic.bundle.js:8155) at nodeLinkFn (ionic.bundle.js:15501) at compositeLinkFn (ionic.bundle.js:14887) at publicLinkFn (ionic.bundle.js:14766) at self.appendViewElement (ionic.bundle.js:47324) at Object.switcher.render (ionic.bundle.js:45864)ionic.bundle.js:19387 (anonymous function) Here's a link to the code I have halfway through the tutorial: https://github.com/bhaskar2khaneja/EliteScheduleApp/tree/master/www Also, I do not understand what &lt;.. href = "#/app/teams/{{team.id}}"&gt; is doing in the standings.html file. It's not producing the output I am expecting on clicking different items in the file. Here's the data the app is using: http://elite-schedule.net/api/leaguedata/2009
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46405171
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46405316
has comment: http://stackoverflow.com/comment/46405026
tagged with: angular-ui-router
has title: I am having trouble linking two pages in Ionic Framework
tagged with: ionic-framework
has comment: http://stackoverflow.com/comment/46405427
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46405336
has comment: http://stackoverflow.com/comment/46405256

http://stackoverflow.com/q/29141827
tagged with: angular-ui
tagged with: variables
has comment: http://stackoverflow.com/comment/46508344
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30222216
tagged with: responsive-design
score: 1
upvote count: 1
has body: The goal is to make an Angular scope variable dependent on the screen resolution. I found that the EnquireJS library does just that. The final working result should be that the menu collapses when screen is 480px, based on an isCollapsed variable. (I'm using Angular-ui from bootstrap) Note: I must use Angular. I can attach the Angular scope variable (isCollapsed) to the Javascript $window and address the $window in EnquireJS, this is what I have. Create module + controller and attach scope + window angular.module('PremiumMeat', ['ui.bootstrap']); angular.module('PremiumMeat').controller('CollapseCtrl', function ($scope, $window) { $scope.isCollapsed = false; $window.collapsed = false; }); Enquire setup, initialize variable on false // Enquire configuration var enquireQuery= "screen and (max-width:480px)"; var enquireQueryHandler = { setup: function () { $scope.isCollapsed = false; $window.collapsed = false; angular.element(document.querySelector('[ng-controller="CollapseCtrl"]')).scope().isCollapsed=false; }, The isCollapsed variable should be initialized on false and become true when screen size reaches 480px; I'm trying to address the variable through the $window and both the document object, but none work. match: function () { $scope.isCollapsed = true; $window.collapsed = true; angular.element(document.querySelector('[ng-controller="CollapseCtrl"]')).scope().isCollapsed=true; }, unmatch: function () { $scope.isCollapsed = false; $window.collapsed = false; angular.element(document.querySelector('[ng-controller="CollapseCtrl"]')).scope().isCollapsed=false; } }; Now the question is where to initialize the enquireJS to make it all work. enquire.register(enquireQuery, enquireQueryHandler, true); When I put it in the controller it stops working and outside it, it doesn't overrule. Final working result should be that the menu collapses when screen is 480px. Note: I must use Angular (angular-ui bootstrap)
type: Question
tagged with: javascript
has title: How to make an AngularJS scope variable dependent on media query with EnquireJS?
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/46538577
comment on: http://stackoverflow.com/a/29159191
has text: actually its a javascript object property, `alert($(".day.selected.default")[0].innerText);` will also work
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/47379516
score: 0
has text: A quickfix specifically for my qs was [link](http://stackoverflow.com/questions/2627813/how-to-get-an-array-with-jquery-multiple-input-with-the-same-name).
comment on: http://stackoverflow.com/q/29135132
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46645089
type: Comment
comment on: http://stackoverflow.com/a/29195663
score: 0
has text: @TonyBabb - show us more of your HTML - maybe that's where problem lies.
type: AnswerComment

http://stackoverflow.com/q/29203312
has answer: http://stackoverflow.com/a/70086321
type: Question
tagged with: browser
score: 37
answer count: 8
has comment: http://stackoverflow.com/comment/46618369
has answer: http://stackoverflow.com/a/46461016
has answer: http://stackoverflow.com/a/65752120
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29203427
accepted answer: http://stackoverflow.com/a/29203427
possible better answer: http://stackoverflow.com/a/46461016
has answer: http://stackoverflow.com/a/53960747
linked to: http://stackoverflow.com/q/2009029
has answer: http://stackoverflow.com/a/29203491
has answer: http://stackoverflow.com/a/34634154
has comment: http://stackoverflow.com/comment/46618291
tagged with: http://stackoverflow.com/tag/html
has body: I have a long list of links inside a big scrollable div. Each time when a user click on a link then click the back button, it starts at the very top of the div. It is not user friendly to our users. Any ways to let the browser scroll to the previous position when pressing the back button? Thank you very much!
favorite count: 0
upvote count: 37
downvote count: 0
has answer: http://stackoverflow.com/a/66015331
has title: How can I retain the scroll position of a scrollable area when pressing back button?
tagged with: google-chrome
type: AnsweredQuestion

http://stackoverflow.com/comment/46637099
has text: The issue is that your event listener only fires once, so as far as your function is concerned, `currentTime` is always equal to `0`.
comment on: http://stackoverflow.com/q/29213216
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29082253
upvote count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29082736
tagged with: reactjs
tagged with: syntax-error
has body: This is really silly but i got a problem with Chrome (works fine in Firefox) with this syntax borrowed from an example in react-dnd component (link: https://github.com/gaearon/react-dnd/blob/master/examples/_dustbin-simple/Dustbin.js). const itemDropTarget = { acceptDrop(component, item) { component.setItem(item); } }; It trigger this error: Uncaught SyntaxError: Unexpected token ( Chrome doesn't like this either: const DustbinSimple = React.createClass({ render() { It must be: const DustbinSimple = React.createClass({ render: function() { What am i missing? Must be something really basic i don't understand. Thanks in advance.
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/57053321
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29082317
has title: JSX/JavaScript syntax in Chrome
answer count: 3

http://stackoverflow.com/a/29106196
type: Answer
answers question: http://stackoverflow.com/q/29105883
upvote count: 1
has body: Javascript is single threaded so you don't want to hold the thread, therefor a possible way to handle your issue is using a promise. I would have write the code in the following way: function stopAllSelectedSounds() { var deferred = $q.defer(); //Perform logic //if logic performed successfuly deferred.resolve(); //if logic failed deferred.reject('reason is blah'); return deferred.promise; } $scope.stopAllSelectedSounds().then(function() { alert('Success'); $scope.setPlaylistToView(playListData); }, function(reason) { alert('Failed ' + reason); }); This way only when stopAllSelectedSounds is successfully executed you will execute setPlaylistToView without halting the entire app. see - Angular's Q documentation A service that helps you run functions asynchronously, and use their return values (or exceptions) when they are done processing.
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29105883

http://stackoverflow.com/q/29144311
answer count: 0
type: UnansweredQuestion
tagged with: encryption
tagged with: model-view-controller
tagged with: c#
has comment: http://stackoverflow.com/comment/46522555
has comment: http://stackoverflow.com/comment/46523795
has comment: http://stackoverflow.com/comment/46512211
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46516365
has body: I have a requirement to post form data to an external third party. The client has suggested the data to be secured using SHA-256. They want us to hash the value so they can verify the integrity and authentication of the data. We are using .net MVC. The data will be sent over https. Given the example form in the view: &lt;form id="form" method="post" action="@Model.ExternalUrl"&gt; &lt;input type="hidden" name="title" value="@Model.Title" /&gt; &lt;input type="hidden" name="firstName" value="@Model.FirstName" /&gt; &lt;input type="hidden" name="surname" value="@Model.LastName" /&gt; &lt;button type="submit"&gt; Submit &lt;/button&gt; &lt;/form&gt; Assuming that javascript code calls the submit of the button for an automatic redirect, what is the best way to hash the data? At the moment i'm contemplating calling the server, get the hashed data from the .net HMACSHA256 class, returning the data to the client and then posting this data to the external url? Interested in hearing some constructive opinion on this, ultimately we want to avoid creating latency for the user. N.B. Open to other security suggestions with the main objective being to verify data integrity and authentication from a client side post, i did, however, want to avoid making the question too open. Thanks.
tagged with: javascript
has title: Posting sensitive data to an external url
has comment: http://stackoverflow.com/comment/46520339
has comment: http://stackoverflow.com/comment/46520757
tagged with: sha256

http://stackoverflow.com/comment/46545670
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29161851
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73407/discussion-between-n-imp-and-mohamedrias).
type: AnswerComment

http://stackoverflow.com/comment/46632391
type: AnswerComment
has text: @NewDev I agree. Being a Java developer I understand to flaws of keeping objects in a global scope rather than a confined modular scope where data is more safe and application more reliable & maintainable
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29211251

http://stackoverflow.com/comment/46446366
has text: Does the server receive the call?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29086235

http://stackoverflow.com/comment/46563131
comment on: http://stackoverflow.com/a/29172435
type: AnswerComment
type: Comment
has text: I love how someone downvoted this after you were asked to add it as an answer.
score: 7

http://stackoverflow.com/a/29186669
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/46590760
downvote count: 0
has body: You are seeing that error because typeahead prefetch uses localStorage to store the data. Firstly, storing 1MB of data on the client side is not really good in term of user experience. Given that, you can still solve the problem with multiple-datasets. This is just a workaround and may not be the most elegant solution but it works perfectly. The sample data I tested with was >1MB and looks like this You can view the sample here (It takes a while to open) Procedure: First download the entire data using $.getJSON Then split the data into chunks of 10,000 (just a magical number that worked for me across browsers. Find yours) Created sets of bloodhounds for each chunk and store everything in an array. Then initialize typeahead with that array Code: $.getJSON('data.json').done(function(data) { // download the entire data var dataSources = []; var data = data['friends']; var i, j, data, chunkSize = 10000; // break the data into chunks of 10,000 for (i = 0, j = data.length; i &lt; j; i += chunkSize) { tempArray = data.slice(i, i + chunkSize); var d = $.map(tempArray, function(item) { return { item: item }; }); dataSources.push(getDataSources(d)); // push each bloodhound to dataSources array } initTypeahead(dataSources); // initialize typeahead }); function getDataSources(data) { var dataset = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('item'), queryTokenizer: Bloodhound.tokenizers.whitespace, local: data, limit: 1 // limited each dataset to 1 because with 76,000 items I have 8 chunks and each chunk gives me 1. So overall suggestion length was 8 }); dataset.initialize(); var src = { displayKey: 'item', source: dataset.ttAdapter(), } return src; } function initTypeahead(data) { $('.typeahead').typeahead({ highlight: true }, data); // here is where you use the array of bloodhounds } I created a demo here with 20 items and chunkSize of 2 just to show how multiple-datasets would generally work. (Search for Sean or Benjamin) Hope this helps.
upvote count: 8
accepted answer of: http://stackoverflow.com/q/29182418
answers question: http://stackoverflow.com/q/29182418
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46590985

http://stackoverflow.com/comment/46425345
comment on: http://stackoverflow.com/q/29096973
score: 0
has text: Plunkr available here: http://plnkr.co/edit/Z3uMrUXLCWjEU4h6XH7W?p=preview
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29200139
has answer: http://stackoverflow.com/a/29200164
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has body: I am trying to prepare a JSON object in my controller. So that I can send that object to my REST service to insert. The thing is my JSON object is kind of tricky and has different levels. { "ilstbusError": [], "icdoQuestion": { "idoQuestion": { "questionId": 1, "createdBy": 1, "createdDate": "2015-03-21", "isValid": 0, "modifiedBy": 1, "modifiedDate": "2015-03-21", "questionHtml": "Is there good explanation of what dark matter could be in space?", "questionTitle": "What is dark matter?", "threadId": 1, "updateSeq": 0 } } } It looks like above. So to fill this object i am trying to write below code. $scope.ibusQuestion.icdoQuestion.iQuestion.questionTitle = "questionTitle"; $scope.ibusQuestion.icdoQuestion.iQuestion.questionHtml = "questionHtml"; $scope.ibusQuestion.icdoQuestion.iQuestion.threadId = 1; $scope.ibusQuestion.icdoQuestion.iQuestion.isValid = 0; But it is giving me below error TypeError: Cannot read property 'icdoQuestion' of undefined Anybody how can I achieve this? Thanks Fahad Mullaji
tagged with: javascript
score: 0
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
downvote count: 1
has title: Filling up object in Angular JS for Insert

http://stackoverflow.com/a/29132905
answers question: http://stackoverflow.com/q/29132680
score: 0
has body: window.location.hash = "This"; should do the trick.
type: Answer

http://stackoverflow.com/a/29149411
downvote count: 0
score: 3
has body: This works by using a setTimeout function to fire at the end of the specified seconds. If basically anything happens during that time (the mouse moves, the page is scrolled, or a key is pressed) the timeout period is reset. Set the idle period on the third line. idleTimer = null; idleState = false; idleWait = 2000; (function ($) { $(document).ready(function () { $('*').bind('mousemove keydown scroll', function () { clearTimeout(idleTimer); if (idleState == true) { // Reactivated event $("body").append(" Welcome Back. "); } idleState = false; idleTimer = setTimeout(function () { // Idle Event $("body").append(" You've been idle for " + idleWait/1000 + " seconds. "); idleState = true; }, idleWait); }); $("body").trigger("mousemove"); }); }) (jQuery)
answers question: http://stackoverflow.com/q/29149410
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29149410
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/29146613
has comment: http://stackoverflow.com/comment/46516333
type: Answer
has comment: http://stackoverflow.com/comment/46518060
has comment: http://stackoverflow.com/comment/46519170
accepted answer of: http://stackoverflow.com/q/29146459
has body: You can use the following style: .modal + .modal-backdrop + .modal + .modal-backdrop {display:none} Example or initiate the extra modals without a backdrop: modal.modal({ show:true, backdrop: false }); Example The css version seems to be best though as it allows you to click opn the backdrop to close the modal where as the js version doesn't EDIT If you close the modal and open a new one, the above css fails. This one should work instead .modal + .modal-backdrop ~ .modal-backdrop {display:none} Example
upvote count: 5
answers question: http://stackoverflow.com/q/29146459
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46516159

http://stackoverflow.com/comment/46561486
comment on: http://stackoverflow.com/q/29169764
score: 0
has text: @yamidemichaos Quotes makes no difference at all. Without it, JS knows the first occurence in an object couple is the key, and quotes it automatically.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46421501
type: QuestionComment
type: Comment
has text: Seems that you are uploading files, and if that is true it is not as straight forward and cannot be done directly with AJAX. But this should be what you need: http://stackoverflow.com/questions/2320069/jquery-ajax-file-upload
comment on: http://stackoverflow.com/q/29094297
score: 0

http://stackoverflow.com/q/29134784
has comment: http://stackoverflow.com/comment/46495478
type: UnansweredQuestion
upvote count: 0
type: Question
tagged with: object
tagged with: javascript
score: -1
has title: Build HTML link to email address
downvote count: 1
answer count: 1
has body: If I have this object literal: {"name":"James","email":"123@yahoo.com"} ... how do I print out an HTML link to that email address? The output should be something like this: James
has answer: http://stackoverflow.com/a/29135096
favorite count: 0

http://stackoverflow.com/q/29067255
upvote count: 1
linked to: http://stackoverflow.com/q/22295113
type: Question
has body: I made reccuring payments with braintree, everything is working well. My code looks like: app.post("/create_customer", function (req, res) { var customerRequest = { firstName: req.body.first_name, lastName: req.body.last_name, creditCard: { number: req.body.number, cvv: req.body.cvv, expirationMonth: req.body.month, expirationYear: req.body.year, billingAddress: { postalCode: req.body.postal_code } } }; gateway.customer.create(customerRequest, function (err, result) { console.log(result); if (result.success) { res.send( " Customer created with name: " + result.customer.firstName + " " + result.customer.lastName + " " + "Click here to sign this Customer up for a recurring payment" ); } else { res.send(" Error: " + result.message + " "); } }); }); app.get("/subscriptions", function (req, res) { var customerId = req.query.id; gateway.customer.find(customerId, function (err, customer) { if (err) { res.send(" No customer found for id: " + req.query.id + " "); } else { var subscriptionRequest = { paymentMethodToken: customer.creditCards[0].token, planId: "reccuringtest" }; gateway.subscription.create(subscriptionRequest, function (err, result) { res.send(" Subscription Status " + result.subscription.status + " "); }); } }); }); app.post("/create_transaction", function (req, res) { var saleRequest = { amount: "1000.00", creditCard: { number: req.body.number, cvv: req.body.cvv, expirationMonth: req.body.month, expirationYear: req.body.year }, options: { submitForSettlement: true } }; gateway.transaction.sale(saleRequest, function (err, result) { console.log(err, result); if (result.success) { res.send(" Success! Transaction ID: " + result.transaction.id + " "); } else { res.send(" Error: " + result.message + " "); } }); }); I'm able to make customer and payments then I add webhooks: app.get("/webhooks", function (req, res) { res.send(gateway.webhookNotification.verify(req.query.bt_challenge)); }); app.post("/webhooks", function (req, res) { gateway.webhookNotification.parse…
tagged with: csrf
tagged with: javascript
has title: Braintree webhooks with csrf not working
tagged with: express
tagged with: braintree
answer count: 1
downvote count: 0
favorite count: 0
tagged with: node.js
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29082177

http://stackoverflow.com/comment/46456884
score: 3
comment on: http://stackoverflow.com/q/29114131
type: Comment
type: QuestionComment
has text: how can it be a `&&` , it's not possible ?

http://stackoverflow.com/comment/46481348
type: AnswerComment
has text: Ah sorry, forgot .text(). Fixed it
type: Comment
comment on: http://stackoverflow.com/a/29127641
score: 0

http://stackoverflow.com/q/29164759
has title: Bug fix abandoned Firefox add-on, Wikilook?
has comment: http://stackoverflow.com/comment/46563643
upvote count: 1
downvote count: 1
type: Question
has body: This is just a hopeful appeal really. I know next to nothing about javascript or Firefox add-ons, so I wouldn't know where to even begin, but perhaps someone here can help. The wonderful Wikipedia based add-on Wikilook was sadly abandoned long ago by its creator. It stopped working altogether around FF#20, but I found this fix which got it working again and I've been happily using it ever since. However, one of its main features – popping up when hovering over Wikipedia links – doesn't work if they're https, which of course most of them are nowadays. So what, if anything, can be done to fix this problem?
has comment: http://stackoverflow.com/comment/46552039
has answer: http://stackoverflow.com/a/29169728
has comment: http://stackoverflow.com/comment/46563989
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
tagged with: firefox-addon
has comment: http://stackoverflow.com/comment/46561321
accepted answer: http://stackoverflow.com/a/29169728
type: AnsweredQuestion

http://stackoverflow.com/comment/46586079
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29184660
has text: This is awesome and correct. But your starting it from JAN. instead can you show it starting from the currentmonth-12 to current month. I will tell you more clearly suppose this month is MAR can I show the data starting from APR 2014 to MAR 2015(i.e last 12 months based on currentdate) or from MAR 2015 to APR 2014. Because that is the requirement. I must show previous values based on current month
type: Comment

http://stackoverflow.com/q/29176296
tagged with: transform
answer count: 2
has title: Maintaining the aspect ratio of a scalable image
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29176344
has body: I am using the css property transform: translateY to vertically center an image on a page. The width of the image is a percentage of that of the page so that it is scaled if the user enlarges or reduces the browser window. Here is the markup: &lt;div class="item"&gt; &lt;img src="..." width="50%"&gt; &lt;/div&gt; Here is the css: .item { width: 100%; height: 100%; text-align: center; } div.item &gt; img { max-height: 100%; max-width: 100%; position: relative; top: 50%; transform: translateY(-50%); } This works very well unless the browser window is much shorter than it is wide in which case the height of the image is trimmed or, by setting the maximum height of the image to 100%, is squished. You can see the problem by drastically reducing the height of your browser window while viewing this demo: https://jsfiddle.net/0zh4qvLm/. How can I maintain the aspect ratio of the image in this instance?
score: 0
has answer: http://stackoverflow.com/a/29176336
tagged with: css
possible better answer: http://stackoverflow.com/a/29176336
type: Question
has answer: http://stackoverflow.com/a/29176344
type: AnsweredQuestion
tagged with: responsive-design

http://stackoverflow.com/comment/46418669
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29093352
type: Comment
has text: Very well Explained.. Thanks.. but my curiosity is in understanding that We have overridden B.prototype with some object which extends A.prototype. So now calling the B constructor (directly or for creating a new instance) should look for the constructor property on its prototype which actually is A's prototype constructor. And hence the A's constructor body should actually be getting executed. But it is not happening so... why :|

http://stackoverflow.com/a/29219947
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/46687450
downvote count: 1
has comment: http://stackoverflow.com/comment/46679301
has comment: http://stackoverflow.com/comment/46850479
has comment: http://stackoverflow.com/comment/46679459
has comment: http://stackoverflow.com/comment/46804239
has body: EDIT: ProllyGeek is right, the zoom_changed event fires after the drag has already happened. You can detect if the touch event was near the center of the map (over your marker) and re-center the map after zooming: google.maps.event.addListener(map, 'dragend', function() { if (center &amp;&amp; center != map.getCenter()) { map.setCenter(center); center = null; } }); //we should recenter the map if the click/mousedown was within the centerRadius of the center of the map google.maps.event.addListener(map, 'mousedown', function(clickMouseEvent) { var mapDiv = document.getElementById('map'); if (pointInCircle(clickMouseEvent.pixel.x, clickMouseEvent.pixel.y, mapDiv.offsetWidth/2, mapDiv.offsetHeight/2, centerRadius)) { //map.setOptions({draggable: false}); //disables zoom and dragging center = map.getCenter(); //save the current center point so we can recenter later. } }); //handy function to see if a x,y coordinate is within z radius of another x,y coordinate //from https://stackoverflow.com/a/16819053/1861459 function pointInCircle(x, y, cx, cy, radius) { var distancesquared = (x - cx) * (x - cx) + (y - cy) * (y - cy); return distancesquared &lt;= radius * radius; } http://jsfiddle.net/bxfn499f/11/ Original Answer: Did you try setting draggable to false on the map when the zoom event is fired? google.maps.event.addListener(map, 'zoom_changed', function() { map.setOptions({draggable: false}); //heavy handed re-enabling of draggable //setTimeout(function() { map.setOptions({draggable: true}); }, 5000); //cant drag for five seconds }); You can programmatically re-enable dragging with the mouseup event (which should fire in lieu of the touchend event) or whatever makes sense in your use case (map.setOptions({draggable: true});). For example: google.maps.event.addListener(map, 'mouseup', function() { map.setOptions({draggable: true}); }); http://jsfiddle.net/bxfn499f/6/ I tested from a desktop, so I tweaked the fiddle slightly as the map wasn't loading for me - assuming thi…
has comment: http://stackoverflow.com/comment/46687774
has comment: http://stackoverflow.com/comment/46795152
type: Answer
has comment: http://stackoverflow.com/comment/46678915
has comment: http://stackoverflow.com/comment/124636785
answers question: http://stackoverflow.com/q/29131250

http://stackoverflow.com/q/29155472
accepted answer: http://stackoverflow.com/a/29156460
linked to: http://stackoverflow.com/q/12610265
answer count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29156460
linked to: http://stackoverflow.com/q/25609927
upvote count: 4
type: AnsweredQuestion
has body: foo; // ReferenceError: foo is not defined typeof(foo); // undefined How does typeof circumvent the ReferenceError when supplied an undeclared variable identifier? Is this just JavaScript interpreter "magic" or can it be explained in terms of user-land concepts?
score: 3
type: Question
tagged with: javascript
has title: How does typeof circumvent the ReferenceError when supplied an undeclared variable identifier?

http://stackoverflow.com/a/29102899
answers question: http://stackoverflow.com/q/29102708
type: Answer
has body: So this test should pass. Yes, and it does. Did jasmine change the behavior of this It doesn't look like it. did i get something wrong You have syntax errors and typos in your code (e.g. except -> expect). Also, toEqual doesn't test the identity of an object, so even expect(this).toEqual({}); would pass. toBe is a better method here.
score: 0

http://stackoverflow.com/comment/46496339
score: 0
type: AnswerComment
type: Comment
has text: Perhaps I'm missing something, but your solution won't close the popup window with escape key, which is what I'm after. How do I adapt your answer to also close the pop-up form if user presses 'esc'. Thank you
comment on: http://stackoverflow.com/a/29135560

http://stackoverflow.com/comment/46401257
score: 0
comment on: http://stackoverflow.com/a/29084094
type: Comment
has text: Okay, this is not exactly what I needed, but you set me on the right track. Thanks a lot!
type: AnswerComment

http://stackoverflow.com/comment/46385961
comment on: http://stackoverflow.com/a/29075110
score: 0
type: AnswerComment
type: Comment
has text: This does not fully address the problem of trying to parse a single number - see the added examples in the question.

http://stackoverflow.com/a/29218105
answers question: http://stackoverflow.com/q/29217788
accepted answer of: http://stackoverflow.com/q/29217788
score: 1
upvote count: 1
has body: If I understand the situation correctly, you are in need of a single function which handles click events from multiple elements. I would not use IDs for the elements, but instead use a class to decorate the ones that need the functionality. Then using 'this', I can further modify the item that was clicked... $('.myClickable').click(function(){ $(this).someFunc(); });
has comment: http://stackoverflow.com/comment/46645820
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46676418
type: Answer

http://stackoverflow.com/q/29130394
has answer: http://stackoverflow.com/a/29131511
linked to: http://stackoverflow.com/q/11688171
answer count: 1
has comment: http://stackoverflow.com/comment/78167333
tagged with: javascript
duplicate of: http://stackoverflow.com/q/11688171
favorite count: 0
has title: Chrome Extension: runtime.lastError while running tabs.get/tabs.remove: No tab with id:0
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/29131511
linked to: http://stackoverflow.com/q/23667086
linked to: http://stackoverflow.com/q/26517988
type: AnsweredQuestion
tagged with: tabs
duplicate of: http://stackoverflow.com/q/23667086
upvote count: 2
tagged with: google-chrome
downvote count: 1
has body: I've tried to find a solution, but the only thing I found was if a random TabId doesn't exist. But this doesn't solve my problem: I'm always getting these errors: Unchecked runtime.lastError while running tabs.get: No tab with id:0 Unchecked runtime.lastError while running tabs.remove: No tab with id:0 My code: var tabnumber = 0; //the number of tabs in the current window var tabID = 0; //id of the active tab function closeBundle(){ getTabnumber(); for(i=0;i&lt;tabnumber;i++){ getTabID(); chrome.tabs.get(tabID , function(tab){ //here is the first problem insert[i] = tab; //for saving all Tabs in an array }); chrome.tabs.remove(tabID); //here the second one } chache[active] = insert; //I save the insert array in another array } function getTabnumber(){ chrome.tabs.query({'currentWindow': true}, function(tabarray){ tabnumber = tabarray.length; }); } function getTabID(){ chrome.tabs.query({'currentWindow': true, 'active': true}, function(tabArray){ tabID = tabArray[0].id; }); } I don't get it why there is no Tab with this specific id because I used the TabId of the active Tab (with getTabId), doesn't I?? How can I get the right Id of the current Tab or is there another way to store all Tabs of the current window in an array and then close all tabs? I hope somebody could help me ;)
type: Question
score: 1

http://stackoverflow.com/comment/46529759
comment on: http://stackoverflow.com/q/29154202
has text: errors might be a reserved variable.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29156141
has comment: http://stackoverflow.com/comment/46533313
has comment: http://stackoverflow.com/comment/46533588
has comment: http://stackoverflow.com/comment/46534077
score: -1
has comment: http://stackoverflow.com/comment/46533391
upvote count: 0
has comment: http://stackoverflow.com/comment/46534756
has comment: http://stackoverflow.com/comment/46573921
has comment: http://stackoverflow.com/comment/46533888
type: Answer
has comment: http://stackoverflow.com/comment/46533258
has body: Adding data-role="button" to your responsive-menu-button should do the job.
has comment: http://stackoverflow.com/comment/46534310
has comment: http://stackoverflow.com/comment/46540919
answers question: http://stackoverflow.com/q/29156037
has comment: http://stackoverflow.com/comment/46533496
downvote count: 1

http://stackoverflow.com/comment/46456639
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29113729
has text: The function you use is written in JavaScript, not Java. And your current Ajax.php code is vulnerable to SQL-Injections. I'd recommend setting smaller goals.

http://stackoverflow.com/q/29114783
accepted answer: http://stackoverflow.com/a/29223465
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: tabs
has answer: http://stackoverflow.com/a/42998858
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29223465
linked to: http://stackoverflow.com/q/7862233
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I have looked at many different threads on here about this issue, but none exactly answered my question. I have a form, on tab 2. Once I submit that form, the page reloads and I'm back at tab 1. I need it to go back to tab 2 after the form submits. This jsfiddle shows how you can use a link to jump from tab to tab on the same page, but how would I implement it into a form? http://jsfiddle.net/technotarek/3hJ46/ It uses this function: $("a[data-tab-destination]").on('click', function() { var tab = $(this).attr('data-tab-destination'); $("#"+tab).click(); }); Another popular link: Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink But the solutions from that link are only if your going to another page, and do not work on the same page. And I still wouldn't know how to implement that into a form. I tried &lt;form action"javascript:function()"&gt;...&lt;/form&gt; and had a function that accomplished what I needed, but javascript doesn't work in the action attribute all that well. How can I achieve this? EDIT: After going through the bootstrap documentation, I still have not found a solution to my problem. To restate, I need to go to a tab that is not the primary or active tab after you submit a form.
tagged with: forms
type: Question
upvote count: 2
has title: Bootstrap tabs go to specific tab on same page after form submit
has answer: http://stackoverflow.com/a/29114862
possible better answer: http://stackoverflow.com/a/42998858
tagged with: javascript
answer count: 3

http://stackoverflow.com/comment/46402791
type: AnswerComment
score: 0
type: Comment
has text: what if the string the entered never met that threshold?
comment on: http://stackoverflow.com/a/29084879

http://stackoverflow.com/a/29065047
answers question: http://stackoverflow.com/q/29064962
type: Answer
has body: Power in javasript is made with Math.pow(x, y) function, not typing ˆ in between. http://www.w3schools.com/jsref/jsref_pow.asp
score: 0

http://stackoverflow.com/q/29104819
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 0
tagged with: forms
type: Question
tagged with: javascript
has body: I have a PHP form. The form elements are created based off the user's selection which is in a dropdown menu. What I am trying to accomplish is loop through that form and validate the values of two elements with the id's of "action" and "amt". Now, I should mention the form which I am trying to validate can have x amount of elements because it needs to be based on the users needs. When I call my validate function it does check the id's and alerts the value, however, it alerts the value of the first input element with the id "amt" three/multiple times. This is bad as because I need to perform some computation and the duplicate entries would cause an error in the the computation. Here is my script Here Is the php code that which displays the form <?php if (isset($_POST['add'])) { if (isset($_POST['acctN'])) { echo " "; echo " "; echo " "; echo " Account Name "; echo " Action "; echo " Amount "; echo " "; echo " "; foreach ($_POST['acctN'] as $name) { $query = "SELECT * FROM ChartOfAccounts WHERE AccountName = '$name'"; $results = mysqli_query($cxn, $query) or die(mysqli_error($cxn)); $row = mysqli_fetch_assoc($results); echo " "; echo " "; echo " " . $row['AccountName'] . " "; echo " Debit Credit "; echo " "; echo " $ "; echo " Remove "; echo " "; } echo " "; echo " "; } echo " Documentation "; echo " "; echo " "; echo " Source "; echo " "; echo " "; echo " "; } ?> Thank you all that help and provide input.
score: 0
has comment: http://stackoverflow.com/comment/46440520
has title: Validating a form created via php with javascript
tagged with: validation
has comment: http://stackoverflow.com/comment/46440912

http://stackoverflow.com/comment/46465131
comment on: http://stackoverflow.com/q/29118982
has text: Oh darn I had to make a CSS selector its all fixed. thanks
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29146370
has body: You can do following with your code: Plot Select any station: Select DELHI MUMBAI or you can follow: http://www.formget.com/form-submission-using-ajax-php-and-javascript/ Thanks.
score: 3
accepted answer of: http://stackoverflow.com/q/29143955
answers question: http://stackoverflow.com/q/29143955
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46544090
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/46546528

http://stackoverflow.com/a/29202833
answers question: http://stackoverflow.com/q/29202799
score: 0
type: Answer
has body: The carFactory instance and the car instance don't have a parent-child relationship. They're defined together, but there's no class inheritance there. You could expose the wheelsPerCar property to the inner car instance in 2 ways: Pass an instance of carFactory to the car constructor function. Set a var wheelsPerCar = this.wheelsPerCar variable in the car scope so it can access it without the this.

http://stackoverflow.com/q/29077946
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29078312
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46416174
favorite count: 0
tagged with: angularjs
type: Question
has title: Onsen UI show a datepicker on ng-click
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46413190
upvote count: 1
has answer: http://stackoverflow.com/a/29078312
answer count: 1
has body: I'm wondering if there is a way to show DatePicker by clicking on some div tag? &lt;input type="date" ...&gt; shows a native datepicker.
tagged with: javascript
tagged with: onsen-ui

http://stackoverflow.com/q/29114451
has title: How to check and uncheck all checkboxes inside a div
has body: I want to uncheck all checkboxex inside the 'test' div without those checkboxes whose attributes are disabled. &lt;div id="test"&gt; &lt;input type="checkbox" id="check1" name="check1"&gt; &lt;input type="checkbox" id="check01" name="check01" disabled="disabled"&gt; &lt;input type="checkbox" id="check2" name="check2" disabled="disabled"&gt; &lt;input type="checkbox" id="check3" name="check3"&gt; &lt;input type="checkbox" id="check4" name="check4"&gt; &lt;input type="checkbox" id="check50" name="check50"&gt; &lt;input type="checkbox" id="check6" name="check6"&gt; &lt;/div&gt; &lt;input type="button" id="uncheckAll" onclick="uncheckAll('test')"&gt; &lt;script language="javascript"&gt; function uncheckAll() { $('#' + divid + ' :checkbox').attr('checked', false); /* This function uncheck all of the checkboxes, which i don't want, i want to uncheck only checkboxes whose attributes are not disabled. /* }*/ &lt;/script&gt;
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/29114670
upvote count: 3
has answer: http://stackoverflow.com/a/29114670
type: Question
accepted answer: http://stackoverflow.com/a/29114493
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/78027375
has answer: http://stackoverflow.com/a/29114692
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/57680716
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/29114493

http://stackoverflow.com/comment/46516216
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29146893
type: QuestionComment
has text: The "$" character is just a character that can be used in an identifier - there's nothing special about it.

http://stackoverflow.com/q/29071390
has answer: http://stackoverflow.com/a/29071427
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29071465
has title: Is it possible to insert your attribute in the HTML-tag?
answer count: 9
has comment: http://stackoverflow.com/comment/46377287
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29071436
has answer: http://stackoverflow.com/a/29071462
has body: Is it possible to insert your attribute in the HTML-tag, and then refer to it? For example, add an attribute group: first &lt;input type="radio" id="qwerty1" group="1" onClick="myclick();"&gt;&lt;br&gt; second &lt;input type="radio" id="qwerty2" group="2" onClick="myclick();"&gt;&lt;br&gt; third &lt;input type="radio" id="qwerty3" group="3" onClick="myclick();"&gt;&lt;br&gt; &lt;script&gt; function myclick() { alert(this.group); } &lt;/script&gt;
score: 2
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29071474
has answer: http://stackoverflow.com/a/29071719
tagged with: javascript
has answer: http://stackoverflow.com/a/29071467
type: Question
has answer: http://stackoverflow.com/a/29071536
has answer: http://stackoverflow.com/a/29071435

http://stackoverflow.com/comment/46642339
has text: will you please provide the link to your code. I cannot understand what exactly happens
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29200954

http://stackoverflow.com/comment/46481533
has text: Otherwise you'll have to use regular expressions or some other means to find `Weight: ` and key of that and the trailing break tag.
comment on: http://stackoverflow.com/q/29127744
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29084352
score: 0
has comment: http://stackoverflow.com/comment/46401828
type: Answer
has comment: http://stackoverflow.com/comment/46411058
has body: The active tab needs the class="active" class
answers question: http://stackoverflow.com/q/29084072
has comment: http://stackoverflow.com/comment/46410618

http://stackoverflow.com/a/29079301
has comment: http://stackoverflow.com/comment/46392518
has body: { _id: 5504a5e7ff67ac473dd7655c, code: 'GB', name: 'United Kingdom', slug: 'uk', place: 'the UK', regions: [ 'London', 'Hampshire' ] } you con't loop on object &lt;%countries.forEach (function(country, index) {%&gt; &lt;li&gt;&lt;%= country.name %&gt;&lt;/li&gt; // Outputs 'United Kingdom' &lt;% }) %&gt; inside ejs view you are trying loop tour inside of controller you have to pass to view like this [{ _id: 5504a5e7ff67ac473dd7655c, code: 'GB', name: 'United Kingdom', slug: 'uk', place: 'the UK', regions: [ 'London', 'Hampshire' ] }] forEach works on Arrays in javascript
score: 0
has comment: http://stackoverflow.com/comment/46392128
answers question: http://stackoverflow.com/q/29064840
type: Answer
has comment: http://stackoverflow.com/comment/46392186

http://stackoverflow.com/comment/46567880
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29174669
has text: thank you- but i think this would affect the visibility of the icon: .hover but not the .text distinctively?
score: 0

http://stackoverflow.com/comment/46409134
score: 0
type: AnswerComment
has text: Yes that is correct. Sorry for not specifying earlier. I have 3 tables which I need to populate first, then make responsive
comment on: http://stackoverflow.com/a/29088023
type: Comment

http://stackoverflow.com/a/57722236
type: Answer
has body: Autosize creates a custom event, that can be triggered manually like this: $("thextarea").trigger("autosize");
answers question: http://stackoverflow.com/q/29156724
score: 0

http://stackoverflow.com/q/29085125
favorite count: 0
has answer: http://stackoverflow.com/a/29087988
upvote count: 8
has body: Seriously, I can't figure this out. The documentation gives us: stub.callsArg(index) - Causes the stub to call the argument at the provided index as a callback function. stub.callsArg(0); causes the stub to call the first argument as a callback. However, I've got no idea where this list of arguments to be indexed into is. Maybe I just don't understand what a stub is...
tagged with: sinon
accepted answer: http://stackoverflow.com/a/29087988
score: 8
tagged with: unit-testing
type: AnsweredQuestion
tagged with: javascript
has title: What does stub.callsArg(index) from Sinon.JS do?
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29153230
upvote count: 1
has comment: http://stackoverflow.com/comment/46527931
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29147789
answers question: http://stackoverflow.com/q/29147789
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46528228
has comment: http://stackoverflow.com/comment/46527954
has body: For you problem I'd like to resolve this issue by create a factory which will be sharable in all controllers app.service('sharableService',[ function(){ this.sharableData = {}; //getter this.getData = function(){ return this.sharableData; } //setter this.setData = function(value){ this.sharableData = value; } }]); OR Factory app.factory('sharableService',[ function(){ var sharableData = {}; //getter var getData = function(){ return sharableData; } //setter var setData = function(value){ sharableData = value; } //method are exposed. return { getData: getData, setData: setData } }]); This sharable service can be use full to share data between controllers.
has comment: http://stackoverflow.com/comment/46527991
score: 1
has comment: http://stackoverflow.com/comment/46527854

http://stackoverflow.com/q/29149759
tagged with: easeljs
tagged with: createjs
has answer: http://stackoverflow.com/a/29242400
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/29251665
tagged with: css
accepted answer: http://stackoverflow.com/a/29242400
has body: I have a stage and a container on a single Canvas. Inside the the stage I add a Container which contains two rectangle shapes. I bind a function to the stagemousedown event of the stage which returns the shape under the coordinates where the event took place through getObjectUnderPoint function. HTML: zoom it Function which initialize the stage, container and the two rectangles: function init() { stage = new createjs.Stage("canvas"); container = new createjs.Container(); var rect1 = new createjs.Shape(); rect1.graphics.beginFill("#ff0000").drawRect(10, 10, 100, 100); container.addChild(rect1); var rect2 = new createjs.Shape(); rect2.graphics.beginFill("#00ff00").drawRect(120, 10, 100, 100); container.addChild(rect2); stage.on('stagemousedown', onClick); stage.addChild( container ); stage.update(); } The function that returns the item under the stagemousedown event: function onClick(e) { alert(stage.getObjectUnderPoint(e.stageX, e.stageY)); } This works smoothly until I put zoom: 2 CSS to body through the zoom function. Once I click on the edge of the rectangle, I am not getting the object. function zoom(){ document.body.style.zoom = 2; container.scaleX = container.scaleY = 2; } I read, that EaselJS doesn't work with zoomed canvases. So I put this: container.scaleX = container.scaleY = 2; Which works partially, because there are part of the area which is still not clickable: Everything outside the black rectangle area is not triggering the stagemousedown event. How can I be able to make this work? NOTE: I need to use the stage.on method and not container.addEventListener http://jsfiddle.net/vqq8dxw7/1/ EDIT: Thanks, but the zoom is something I need, because the purpose of the whole thing is to have the whole application zoomed for responsive purposes (without zooming every single html element). So, I zoom the body, and everything is zoomed like this: http://jsfiddle.net/vqq8dxw7/5/
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29251665
linked to: http://stackoverflow.com/q/13666688
has title: EaselJS getObjectUnderPoint and zoom CSS issue
linked to: http://stackoverflow.com/q/20268962
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46524330
has text: Could you explain more clear *what you want* to implement? You current code contains a mix between inline editing (see `vmiEditParam`, `vmiAddParam` for) and form editing. *How* you want to start editing? You use `onSelectRow` with `formProps` options and `navGrid` without the options. Your code contains some syntax problems like `creditRestock + + creditFreight` or usage of `creditTotal` without corresponding definition by `var`. **What exactly problem you have currently?** You don't posted any pictures, any test data or any working demo. Can you reproduce the problem with 1-2 columns?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29149381

http://stackoverflow.com/comment/46803096
comment on: http://stackoverflow.com/a/29190228
type: Comment
has text: Yes, that's what the callback is for. It's fired only after `load()` completes. In some instances, you should pass parameters into the callback and check the response to ensure it's a valid response/expected data.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29187431
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46590366
has body: I think it is a little inefficient to manually make divs. It is better to loop through your imdb ids and create the divs dynamically filled with the correct data. Here is a sample script I've just created. jsfiddle demo var ids = ["tt0068646","tt0111161","tt0108052"]; getMoviesByimdbID(ids); function getMoviesByimdbID(ar){ var mymovies=$('#moviecontainer'); for(i = 0; i&lt;ar.length; i++){ $.ajax({ url: 'http://www.myapifilms.com/imdb?format=JSONP&amp;idIMDB='+ar[i], type: 'GET', dataType: 'JSONP' }) .done(function(data) { console.log(data); var title= '&lt;p class="title"&gt;'+data.title+'&lt;/p&gt;'; var year= '&lt;p class="year"&gt;'+data.year+'&lt;/p&gt;'; var runtime= '&lt;p class="runtime"&gt;'+data.runtime+'&lt;/p&gt;'; var urlPoster = '&lt;img src="'+data.urlPoster+'"&gt;'; mymovies.append('&lt;div class="movie"&gt;'+title + year + runtime+urlPoster+'&lt;/div&gt;'); }) .fail(function() { console.log("error"); }) .always(function() { console.log("complete"); }); } }
has comment: http://stackoverflow.com/comment/46590174
answers question: http://stackoverflow.com/q/29187004
type: Answer
has comment: http://stackoverflow.com/comment/46590603
accepted answer of: http://stackoverflow.com/q/29187004

http://stackoverflow.com/comment/46478943
type: Comment
comment on: http://stackoverflow.com/a/29125819
has text: Is it fine to use id selector as second parameter with on method like below $("#parent").on("click", "#addedLater", function(e){ // code });
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46651590
score: 0
has text: sure i'd love to share the code, but its got a lot of dependencies. The reason i've got to do this via a cron is because i wrote the entire logic using js. Now my requirement is to be able to have a history of all the computed data, and this data has to be sent over at the end of each day back to the server. Hence, the cron. I just need to be able to execute javascript code without using a browser from a CRON job. If i can get phantom to do this, doing the cron shouldnt be difficult.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29213450

http://stackoverflow.com/a/29104824
has comment: http://stackoverflow.com/comment/46447830
upvote count: 1
has body: You need encode the url for send it as a parameter. Check it encodeURIComponent() http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/29103936

http://stackoverflow.com/a/30689591
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29201843
answers question: http://stackoverflow.com/q/29201843
upvote count: 5
type: Answer
downvote count: 0
has body: It looks like you're missing pointing to your actual gulpfile.js. Try something like this: node-debug /path/to/your/gulp/install/gulp.js --harmony --harmony-arrow-functions --gulpfile /path/to/your/gulpfile/gulpfile.js default I use this and it works.

http://stackoverflow.com/q/29202132
score: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46616181
tagged with: javascript
answer count: 1
tagged with: jquery
has body: You can do like if($('.div').find('.someelem').length == 0 .. to check whether .someelem is available inside the div, but what if I want to check for any element? I don't know what is the class within. &lt;div&gt; &lt;/div&gt; ^ Check above div contain something or not.
has title: check element has some element inside using jquery
has answer: http://stackoverflow.com/a/29202166
favorite count: 0
has comment: http://stackoverflow.com/comment/46616208
accepted answer: http://stackoverflow.com/a/29202166
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/648004

http://stackoverflow.com/comment/46637469
type: Comment
comment on: http://stackoverflow.com/a/29213880
has text: Actually I tested, you're right it won't work with the wrong attr https://jsfiddle.net/jno7wrh7/
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46449210
has text: in application.css and application.js at the top
score: 0
comment on: http://stackoverflow.com/a/29109384
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29145461
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29147623
score: 0
has body: I'm using Highcharts to trigger an event when the background is clicked: $("#my-chart").highcharts({ chart: { type: "pie", events: { click: function() { console.log("I'm working!"); // This is the event I want to trigger }; } } }); var myChart = $("#my-chart").highcharts(); I would like to trigger this event when clicking on something outside of the chart. For example: Trigger the Highcharts Event! How can I trigger the event programmatically? I've tried several things to get more information. Looking at arguments.callee.caller.name, the value is "" (empty string). arguments.callee.caller gives me the following: function (a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}} Ain't nobody got time to decipher that! A bit more useful information is the event.target, which is rect.highcharts-background. Triggering a click on that does nothing. Absolutely nothing. I've made a few other attempts, all within the comments in the $('button').click() function above.
has title: Highcharts trigger background click event
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29147623
type: Question
tagged with: highcharts
answer count: 1

http://stackoverflow.com/comment/46601838
comment on: http://stackoverflow.com/q/29193665
score: 3
has text: I found that ionic framework views are cached to improve performance In the latest ionic release (v1.0.0-beta.14) they introduced view caching. See IonView docs for more infos on that. You could deactivate caching in for your route like this http://ionicframework.com/docs/nightly/api/directive/ionNavView/
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29072630
downvote count: 0
has answer: http://stackoverflow.com/a/29072678
tagged with: javascript
has comment: http://stackoverflow.com/comment/46379596
has answer: http://stackoverflow.com/a/29072754
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has body: I am having the following table. cat dog hen cat dog hen cat dog hen cat dog hen I need to remove the rows based on tag 'ID' from the above table. Is there any best way tp do so using JavaScript.
has title: Removing a row from table based on the id using for loop
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29072650
has comment: http://stackoverflow.com/comment/46379513

http://stackoverflow.com/a/29158593
accepted answer of: http://stackoverflow.com/q/29150632
has comment: http://stackoverflow.com/comment/46543671
answers question: http://stackoverflow.com/q/29150632
type: Answer
has comment: http://stackoverflow.com/comment/46549443
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Here's how I would do it: function ImportDataRange() { var activeSs = SpreadsheetApp.getActiveSpreadsheet(), sheet = activeSs.getSheetByName("PRODUCT dashboard"), rangeSheet = sheet.getRange(10, 1, 265), // 3rd number is the number of rows to get into the range, as described in documentation valsSheet = rangeSheet.getValues(); //Get all values in a double array, this is to keep any previous values in the sheet, also it already gets the array just as it is needed to use in setValues() ssOrigin = SpreadsheetApp.openById("1gF-IsnPdnjAaoUSwOOaBfWTmK1eVzxDG87XPzjjsWxA"), valsOrigin = ssOrigin.getRange(7, 1, 15).getValues(), // Same as the other getRange, gets 15 lines, starting in line 7 sheetOrigin = ssOrigin.getSheetByName("INITIAL_BUDGETS"); for ( origins in valsOrigin ) { // For each value in the valsOrigin array, do something -&gt; in each loop origins will be the next index, Eg. 0, then 1, then 2... for (var i = 10; i &lt; 275; i += 6) { i = (+i) + (+origins); // Add the origins so it don't begin in the same line, altough it will start to overwrite after 6 loops, you should look into this logic - also, the '+' converts it to number, as they can be strings valsSheet[i][0] = valsOrigin[origins][0]; // Puts the current value of origins in the target array } } rangeSheet.setValues( valsSheet ); // Inserts all values at once in the range } Minimized SpreadsheetApp calls, those are the costly one in time, which is limited in GAS, also makes for a cleaner code.

http://stackoverflow.com/q/29063171
has title: Google Apps Script throwing e-mail failure notification for getLastRow, what am I doing wrong?
score: 1
has body: I have the following Google Apps Script: function myFunction() { /// VARIABLE DEFINITION // Get Spreadsheets var sursa = SpreadsheetApp.openByUrl("*"); // *=Using one of my DOCS URL here var destinatie = SpreadsheetApp.openByUrl("*"); // *=Using one of my DOCS URL here // Set Sheets var foaie_calcul_sursa = sursa.getSheetByName("*"); // *=Using a valid sheet name here var foaie_calcul_destinatie = destinatie.getSheetByName("*"); // *=Using a valid sheet name here var foaie_calcul_email = destinatie.getSheetByName("*"); // *=Using a valid sheet name here var eroare = "!!!EROARE"; // Get target last row var ultimul_rand_destinatie = foaie_calcul_destinatie.getLastRow(); Logger.log('Ultimul rand destinatie este %s', ultimul_rand_destinatie); //// STOP VARIABLE DEFINITION The script continues after that with the operations I am doing on the sheets. The script is working fine however I have scheduled it to run daily using a trigger. The problem is that each day no matter if it is a day when it should run or not I am getting the following Google Apps Script Failure notification TypeError: Cannot call method "getLastRow" of null. (line 16, file "X") Maybe I am not calling the getLastRow method as I should, maybe it is a bug considering that the script works fine. Can someone give me some ideas on why this is happening, or maybe some alternatives I could use to stop this annoying e-mail I get every day? Thank you,
type: Question
tagged with: google-apps-script
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29063843

http://stackoverflow.com/q/29157362
tagged with: css
has comment: http://stackoverflow.com/comment/46535245
has comment: http://stackoverflow.com/comment/46535567
has title: Html, css, and jQuery. Something isnt working in my code
downvote count: 3
has comment: http://stackoverflow.com/comment/46535555
type: Question
has answer: http://stackoverflow.com/a/29157625
has answer: http://stackoverflow.com/a/29157506
upvote count: 0
has comment: http://stackoverflow.com/comment/46535414
tagged with: javascript
tagged with: jquery
has body: I'm new to jQuery and watching a tutorial for a sticky nav bar and something went wrong and idk what to do! In my Script file I have it so it runs this code on load [http://pastebin.com/XYWR5tKJ][1] and I have a class in css to use with the nav Placeholder wrap. Well the margin property doesn't seem to be working, if you run the site and scroll the whole way down the nav bar sticks to the side, its supposed to be centered(the margins job). I have no idea why its not doing it, its probably something stupid but please help!` HERES THE CODE__ Script.js: http://pastebin.com/XYWR5tKJ Css: http://pastebin.com/Y51rYJVE HTML: http://pastebin.com/tTftEJKh __ THANKS! [1]: http://pastebin.com/tTftEJKh
answer count: 3
has answer: http://stackoverflow.com/a/29158353
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46535367
score: -3

http://stackoverflow.com/comment/46631069
type: Comment
has text: Your factory returns nothing, and pollerFunct is just a local var (It can not be addressed even from angular). Have you tried smth like in Poller: var factory ={}; factory.pollerFunct = function() {...} return factory.
score: 0
comment on: http://stackoverflow.com/q/29210349
type: QuestionComment

http://stackoverflow.com/a/29096080
has comment: http://stackoverflow.com/comment/46423074
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46423092
has comment: http://stackoverflow.com/comment/46423297
has comment: http://stackoverflow.com/comment/52041731
has body: Possibly you are using version 2. Version 2 of EJS makes some breaking changes with this version (notably, removal of the filters feature). Source EDIT: You can either switch to a version before version2, or create your own object for filter, which then can be extended to contain your own defined filters
accepted answer of: http://stackoverflow.com/q/29095973
score: 5
answers question: http://stackoverflow.com/q/29095973
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46423051
has comment: http://stackoverflow.com/comment/46423186
upvote count: 5
has comment: http://stackoverflow.com/comment/52067845

http://stackoverflow.com/q/29162771
score: 0
type: UnansweredQuestion
has title: Chrome devtools crashes on breakpoint in EventListener
has body: I have a very weird issue in Chrome, when I put a debugger statement in a prototype.js eventlistener, it crashes. Is this a bug in Chrome? var input = document.getElementById("input"); input.observe("change", function (event) { // This line crashes Chrome! debugger; }); I'm using Chrome 42.0.2311.50 beta-m (64-bit)
answer count: 0
has comment: http://stackoverflow.com/comment/46545135
tagged with: google-chrome
type: Question
tagged with: debugging
tagged with: crash
has comment: http://stackoverflow.com/comment/46545267
tagged with: javascript
has comment: http://stackoverflow.com/comment/46545069

http://stackoverflow.com/comment/46638376
comment on: http://stackoverflow.com/a/29200890
type: Comment
score: 0
has text: It's working just one last thing.. Now when I click on some menu item ( which is another page.php ) is loading new page but like I'm clicked on home button and I must click again on menu item to show me that page.. Is there and option when I click on menu item to load me that page not the Home part first.?
type: AnswerComment

http://stackoverflow.com/comment/46490598
type: AnswerComment
has text: I tried using json_encode but it doesn't seem to work
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29132213

http://stackoverflow.com/q/29151409
tagged with: ajax
score: 0
has title: How to properly pass a second variable to an ajax call
has body: Trying to create a year/make/model multi change select, and while I do in fact have the scripts working, what seems to be missing is the ability to pass a year variable along with a make variable to get the final model results. Here's my present ajax functions: $(document).ready(function(){ $(".year").change(function(){ var year=$(this).val(); var dataString = 'year='+ year; $.ajax({ type: "GET", url: "ajax2.php", data: dataString, cache: false, success: function(html){ $(".make").html(html); } }); }); $(".make").change(function(){ var make=$(this).val(); var dataString = 'make='+ make; $.ajax({ type: "GET", url: "ajax2.php", data: dataString, cache: false, success: function(html){ $(".model").html(html); } }); }); }); My question is, how could I successfully pass the year variable as well as the make variable on the second ajax call so I can properly retrieve the model for that year and make?
possible better answer: http://stackoverflow.com/a/29151921
has answer: http://stackoverflow.com/a/29151921
duplicate of: http://stackoverflow.com/q/9328743
accepted answer: http://stackoverflow.com/a/29151707
tagged with: php
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/9328743
has answer: http://stackoverflow.com/a/29151707

http://stackoverflow.com/a/29142425
score: 3
downvote count: 0
has body: The first dropdown selects the whole country object. The options of the second dropdown are the cities of the selected country : Choose country Choose city Fiddle
answers question: http://stackoverflow.com/q/29141855
type: Answer
upvote count: 3

http://stackoverflow.com/q/29155997
linked to: http://stackoverflow.com/q/22578084
upvote count: 1
tagged with: auto-close
has answer: http://stackoverflow.com/a/29212078
answer count: 1
accepted answer: http://stackoverflow.com/a/29212078
has title: Close the Chrome Extension automatically
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/46633328
has comment: http://stackoverflow.com/comment/46633670
downvote count: 0
score: 1
favorite count: 0
has body: I am trying to close the extension automatically after saving my data. Here is the code which is used to save the data: $(function(){ function displayMessage(string){ alert(string); } var submit = $('#submit'); $('#create').submit(function(){ $('#loading_image').html('&lt;img src="images/wait.gif"&gt;'); var user_email = localStorage.getItem('email'); var api = localStorage.getItem("user_api_key"); var auth = "apikey" +' ' +(user_email+":"+api); var favicon_key = localStorage.getItem("favicon_image_key"); var peoples = []; var tags_peoples = $("#s2id_people .select2-choices .select2-search-choice"); for (i=0; i&lt;tags_peoples.length; i++) { peoples.push({"label": tags_peoples[i].childNodes[1].textContent}) } var subjects = []; var tags_subjects = $("#s2id_subjects .select2-choices .select2-search-choice"); for (i=0; i&lt;tags_subjects.length;i++) { subjects.push({"label": tags_subjects[i].childNodes[1].textContent}) } var places = []; var tags_places = $("#s2id_places .select2-choices .select2-search-choice"); for (i=0; i&lt;tags_places.length; i++) { places.push({"label": tags_places[i].childNodes[1].textContent}) } var begin = $(".daterangepicker_start_input")[0].childNodes[1].value; var end = $(".daterangepicker_end_input")[0].childNodes[1].value; var data = { 'content': $('#title').val(), 'people': peoples, 'subjects': subjects, 'begin_date': begin, 'end_date': end, 'places': places } $.ajax({ type: "POST", beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", auth); xhr.setRequestHeader("Content-Type","application/json"); xhr.setRequestHeader("Accept","application/json"); }, url: "https://my_site_url/api/v3/data/", dataType: "json", data: JSON.stringify(data), contentType: "application/json", success: function(data) { $('#loading_image').hide(); window.location.href = 'saved.html'; setTimeout(function(){ window.close(); }, 2000); }, error: function(data) { $('#div1').text("Error on saving the data"); $('#loading_image').hide(); }, complete: functio…
type: Question
has comment: http://stackoverflow.com/comment/46532764

http://stackoverflow.com/q/29113252
has answer: http://stackoverflow.com/a/29113455
has comment: http://stackoverflow.com/comment/46455558
type: AnsweredQuestion
has title: Remove dynamically generated string from tag value jquery
has comment: http://stackoverflow.com/comment/46456510
accepted answer: http://stackoverflow.com/a/29114017
tagged with: dynamic
tagged with: dom
type: Question
has body: I have a code that looks like the below where I want to remove string that is dynamically created on page load: Dynamically generated text here Item 1 Item 2 ... The question is how I can remove this string "Dynamically generated text here" (which was generated dynamically by script on page load) from the tag text value? I am thinking of using this code but it did not do the trick: var str = "dynamic text"; var $holder = $('#navtop'); var value = $holder.text(); if(value == str){ $holder:contains(str).remove(); $( "value:contains('dynamic text')" ).remove(); any assistance is greatly appreciated.
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46455589
has answer: http://stackoverflow.com/a/29114017
tagged with: jquery
has comment: http://stackoverflow.com/comment/46455790
possible better answer: http://stackoverflow.com/a/29113455
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29169002
has body: It seems your resource configuration is not complete. You need to add the paramDefaults to your $resource definition: app.factory('Users', function($resource) { return $resource('/api/users/:userID', {userID: '@id'}); }); Then in your destroy function you can use: Users.remove({userID:id}); Alternatively, when you use the query function in the $resource service, each of the objects in the returned array will be have instance methods allowing you to run restful operations on the individual objects. So you can pass the full user object through to your destroy function. You should be able to do: $scope.destroy = function(user){ user.$remove(); }
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29159469
accepted answer of: http://stackoverflow.com/q/29159469
score: 0

http://stackoverflow.com/comment/46496562
type: Comment
has text: can you change it back to a click event for a bit - just in order to see how it was working before - plus the menu can't be used in its current state.
type: QuestionComment
comment on: http://stackoverflow.com/q/29135576
score: 0

http://stackoverflow.com/a/29218288
type: Answer
has body: You can assign a class to anything and then give each element a different id: neither nor js: $(".foo").click(function() { var bar = $(this).attr('id'); alert(bar); });
answers question: http://stackoverflow.com/q/29218093
score: 0

http://stackoverflow.com/comment/46397971
comment on: http://stackoverflow.com/a/29082052
score: 0
type: Comment
has text: @Seth provide your javascript, then make a reasonable attempt at solving the problem, showing/explaining your process, then if you still have problems and need help...let us know.
type: AnswerComment

http://stackoverflow.com/comment/46589817
type: QuestionComment
has text: sorry about the two part question, however the question in the link you posted is not the same as the one i asked, that question is in regard to the placing of the parentheses while mine was about the why there is a need for the parentheses in the first place.
score: 0
comment on: http://stackoverflow.com/q/29187294
type: Comment

http://stackoverflow.com/q/29107177
accepted answer: http://stackoverflow.com/a/29125579
tagged with: angularjs
tagged with: socket.io
possible better answer: http://stackoverflow.com/a/31345416
tagged with: node.js
has comment: http://stackoverflow.com/comment/46467274
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46454806
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29125579
has title: socket io client net::ERR_CONNECTION_REFUSED
tagged with: javascript
score: 0
has body: I am currently building a todo application with real time notifications. CONTEXT I build the backend with PHP (Laravel 4) and the front-end with AngularJS (yeoman:generator-angular). These two applications are not on the same domain (backend.herokuapp.com and frontend.herokuapp.com). The client talks to the server through a public API. I want to add real time notification to the Angular application, when a user create a new todo, I want the UI to be updated on all connected browsers. SERVER I am using https://github.com/Wisembly/elephant.io for the PHP and the server of the "emitter example". When a hit a url of my API, the PHP client emit an event on the nodejs server. This is currently working, but ONLY if the server is in the same domain than the PHP server. here is the configuration of the Laravel application + app + controllers - AlertsController.php + push - server.js AlertsController.php class AlertsController extends ApiController { public function index($userId = null) { $client = new Client(new Version1X('http://localhost:1337')); $client-&gt;initialize(); $client-&gt;emit('broadcast', ['foo' =&gt; 'bar']); $client-&gt;close(); } } server.js var server = require('http').createServer(), io = require('socket.io')(server), logger = require('winston'), port = 1337; // Logger config logger.remove(logger.transports.Console); logger.add(logger.transports.Console, {colorize : true, timestamp : true}); logger.info('SocketIO &gt; listening on port ' + port); io.on('connection', function (socket) { var nb = 0; logger.info('SocketIO &gt; Connected socket ' + socket.id); socket.on('broadcast', function (message) { ++nb; console.log("broadcast !"); logger.info('ElephantIO broadcast &gt; ' + JSON.stringify(message)); io.emit('alert.created', JSON.stringify(message)); }); socket.on('disconnect', function () { logger.info('SocketIO : Received ' + nb + ' messages'); logger.info('SocketIO &gt; Disconnected socket ' + socket.id); }); }); server.listen(port); I launch my serve…
has comment: http://stackoverflow.com/comment/46444705
has answer: http://stackoverflow.com/a/31345416

http://stackoverflow.com/a/29099972
accepted answer of: http://stackoverflow.com/q/29099860
has body: There's more than one way to do what you want: Using $cookies(https://docs.angularjs.org/api/ngCookies/service/$cookies); Using localstorage( I use this module, it's very good - https://github.com/gsklee/ngStorage); using $cacheFactory(https://docs.angularjs.org/api/ng/service/$cacheFactory), but with this option you will lose the data if user leaves the session; In all cases, the idea is to save the filters and selection on the desired location and retrieve i when necessary. hope it helps
answers question: http://stackoverflow.com/q/29099860
has comment: http://stackoverflow.com/comment/46431411
upvote count: 3
has comment: http://stackoverflow.com/comment/46430631
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46430574
has comment: http://stackoverflow.com/comment/46430776
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46430305
downvote count: 1

http://stackoverflow.com/q/29212899
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/88014840
has answer: http://stackoverflow.com/a/29214601
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/46635438
upvote count: 2
has title: Dragging SVG element over another SVG element
type: Question
possible better answer: http://stackoverflow.com/a/29214069
accepted answer: http://stackoverflow.com/a/29214601
has body: Is there any way i can drag an SVG element over another SVG element? I tried but like in this tutorial i can only drag the one i placed the second over the first one. There is no way i can drag first one over the second without problems. Does anyone know how to solve this? Here is the whole tutorial: http://www.petercollingridge.co.uk/book/export/html/437
has answer: http://stackoverflow.com/a/29214069
answer count: 2
has comment: http://stackoverflow.com/comment/46637623

http://stackoverflow.com/a/29079790
type: Answer
score: 0
has body: No you don't have to create multiple array you can use them though panels just define it over the panels' scope and initiate them so they wont initiate their own array when they cant find one
answers question: http://stackoverflow.com/q/29079348

http://stackoverflow.com/a/29133292
has comment: http://stackoverflow.com/comment/46492628
answers question: http://stackoverflow.com/q/29133140
score: 0
has body: This test should be passing. A test will only fail if you either assert or expect something in the test which is not true, or if the subject under test throws an uncaught error. You are not asserting anything in your test, and the only error your subject will throw is if you pass less than 2 arguments, which is not the case in your test. The ffmpeg method also seems to be asynchronous, which is not compatible with the way you have structured your test. There are many examples available on setting up async tests, including: How Mocha Makes Testing Asynchronous JavaScript Processes Fun Asynchronous Unit Tests With Mocha, Promises, And WinJS Testing Asynchronous JavaScript You've gone some way to doing this by referencing the done argument. When this is specified, Mocha will wait until it is called before considering the test finished.
type: Answer

http://stackoverflow.com/q/29131869
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46489854
has comment: http://stackoverflow.com/comment/46490770
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46490882
tagged with: javascript
tagged with: jquery
has title: Passing attribute value to array of "this" element when checkbox is selected
has comment: http://stackoverflow.com/comment/46489721
score: 0
has comment: http://stackoverflow.com/comment/46490927
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46490982
has comment: http://stackoverflow.com/comment/46490401
has body: What is the easiest way to push element attribute value to an array from the following function, I am pushing the values if all elements are checked from the tree, also from a closest ul list, but can not get the last children ul, basically i have a 3 levels nested ul, and I need to get the attr value of last ul li when you check any of the elements from that list. I have the a jsfiddle http://jsfiddle.net/0g1hk7mt/3/ and this is how the js looks like: var arr = []; function checkboxGroup() { $('#sidebarNav input[type="checkbox"]').on('change', function(){ arr = []; var checkboxes = $(this).parent().next('ul').find('input[type="checkbox"]'); //console.log(checkboxes); //[10101, 191919, 19191, 119191] if ($(this)[0].checked == true) { checkboxes.each(function(){ arr.push($(this).attr("id")); $(this).prop('checked', true).attr('checked', 'checked'); }); } else { checkboxes.each(function(){ $(this).prop('checked', false).removeAttr('checked'); //console.log(this); }); }; alert(arr); }); } checkboxGroup()
has comment: http://stackoverflow.com/comment/46490669
answer count: 0

http://stackoverflow.com/comment/46644554
type: Comment
comment on: http://stackoverflow.com/a/29217754
type: AnswerComment
has text: @NewToJS I don't think so, as jquery was tagged.
score: 0

http://stackoverflow.com/comment/46609463
has text: Thanks for the reply veksen I appreciate it! I am not sure if I implemented your suggestion properly?.. but I just tried 'echo "$(window).load( )";' and had the same result as before.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29198319
score: 0

http://stackoverflow.com/comment/46384095
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29074956
score: 2
has text: I removed your curve and graphics tag because they won't help much, added the Leaflet tag. Mapbox is an extended version of Leaflet with a bunch of extras. So you might want your adjust your search endeavours also

http://stackoverflow.com/a/44666529
has body: Installing chai properly solved the issue for me: $ npm i -D chai +-- chai@4.0.2 | +-- check-error@1.0.2 | +-- deep-eql@2.0.2 | | `-- type-detect@3.0.0 | +-- get-func-name@2.0.0 | +-- pathval@1.1.0 | `-- type-detect@4.0.3 `-- nock@9.0.13 `-- chai@3.5.0 +-- deep-eql@0.1.3 | `-- type-detect@0.1.1 `-- type-detect@1.0.0 In order to try chai out with httprequests, I installed only chai-http. And not chai itself. But were using both of them: 'use strict'; const chaiHttp = require('chai-http'); const chai = require('chai'); const expect = chai.expect; chai.use(chaiHttp); So I've tried to installed chai explicitly and apparently it solved the issue. I can use expect and the error isn't thrown any more.
score: 0
answers question: http://stackoverflow.com/q/29105947
type: Answer

http://stackoverflow.com/comment/46464597
score: 0
type: Comment
type: QuestionComment
has text: angular.module('testApp').factory('EssayRsc', function ($resource) { return $resource('../../essay/:id', {}, {update: {method: 'put'}}); })
comment on: http://stackoverflow.com/q/29118570

http://stackoverflow.com/q/29129218
tagged with: javascript
has comment: http://stackoverflow.com/comment/46485217
has comment: http://stackoverflow.com/comment/46485726
score: 0
has comment: http://stackoverflow.com/comment/46485090
has comment: http://stackoverflow.com/comment/46484651
tagged with: jquery
has comment: http://stackoverflow.com/comment/46484573
has title: jquery code is returning a value of true even though the target text is not visible on the webpage
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46484529
answer count: 0
has body: I have a form which I made the with google forms editor and then whose html code I copied and pasted into the goole apps script. I modified some code in the pasted html code and added some javascript code to handle what happens after the user clicks the submit button. When they click the submit button, I want to check to see if there are any errors in the form, if not then process the form. The javascript validation has already been done for me. If the user leaves a field blank when they click the submit button. The browser will dynamically display the message "This is a required question" below each of the fields that are blank. Remember, this message does not appear on the webpage when they initially load the page, only when fields are blank when they click the submit button. When they click on the submit button, I have jquery code that is supposed see if the message "This is a required question" was output onto the webpage using the following code, but it still displays the alert box with the error message "Found errors in the form, please correct them!" when no fields are blank: I also tried this but still getting the alert box: What is wrong with my code? Or maybe I should ask this question: If you have a div element in your code that has innerHTML and which is not currently visible on the webpage (remember, in my html code this div element is only dynamically displayed on the webpage and is invisible until its displayed by a trigger like leaving a filed blank), then how can you determine if it is visible on the webpage? HTML Page Code: . . . First name * Please enter only text This is a required question Last name * Please enter only text This is a required question PSU ID # * This is a required question Street address * This is a required question City * This is a required question State * This is a required question Zipcode * Please enter a valid zipcode This is a required question Phone number * ***-***-**** Please enter phone number in the correct format T…
has comment: http://stackoverflow.com/comment/46484420
type: Question
has comment: http://stackoverflow.com/comment/46484820

http://stackoverflow.com/q/29208201
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46627302
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29208543
linked to: http://stackoverflow.com/q/19505011
score: 0
upvote count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/901712
type: AnsweredQuestion
has title: Unsaved changes on page refresh, using JavaScript
has answer: http://stackoverflow.com/a/29208543
type: Question
has body: I want to do this : - When I click the checkbox "div=true" or "div=flase", will be shown or hidden - Status of checkbox to be saved and with this, even the last method called to be saved Problem - Status of checkbox is saved at refresh of page, but the last method called is not saved. I do not understand where is my mistake. Here is the code: Show/Hide Weekends Hide weekend Show weekend function SaveLastCheck() { var getStstus = localStorage.getItem("LineOp"); if (getStstus === "true") $("#LineOp").prop("checked", true); $("#LineOp").click(function(){ localStorage.setItem('LineOp', $(this).prop("checked")); }); } $(document).ready(function() { SaveLastCheck(); }); $(document).ready(function show_weekends () { var checkbox = $('#LineOp'); var dependent = $('#true'); if (checkbox.attr('checked') !== undefined){ dependent.show(); } else { dependent.hide(); } checkbox.change(function(e){ dependent.toggle(); }); }); $(document).ready(function hide_weekends () { var checkbox = $('#LineOp'); var dependent = $('#false'); if (checkbox.attr('checked') == undefined){ dependent.show(); } else { dependent.hide(); } checkbox.change(function(e){ dependent.toggle(); }); }); HERE IS MY EXAMPLE http://jsfiddle.net/b3g6arbd/4/
answer count: 1

http://stackoverflow.com/q/29089308
has body: I have a list/array of sports which by default all of them are with checked = true, in the function below you can see this line intersectedSports = _.intersection(sportIds, sportChecked.sport); where sportIds is the full list of sports ids and sportChecked.sport are the sports with checked = false which are the sports that the user unchecked. Remember: All the sports are checked = true by default. This is an array of 30 items, every item has an unique id, as I mentioned all the sports are checked = true, but I need the id: 10 to be checked = false by default. Behind all this code you see, there is already a construction to save in a DB the items that the user checked = false, that's why you see here this line sport.checked = !_.includes(intersectedSports, sport.id);. So, in order to do what I want, MY GUESS: I need to put the id: 10 with checked=false in the var = intersectedSports which I mentioned above, unless you have a better suggestion for me... so, what do you recommend my friends ? var sportIds = _.pluck(sports, 'id'), intersectedSports = _.intersection(sportIds, sportChecked.sport); if (sports.length) { sports = _.map(sports, function(sport) { sport.checked = !_.includes(intersectedSports, sport.id); return sport; }); } Just in case: I am using Lodash and Angular
upvote count: 2
accepted answer: http://stackoverflow.com/a/29110446
tagged with: lodash
type: AnsweredQuestion
score: 2
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/46411740
has title: remove specific id from array of checked items
has comment: http://stackoverflow.com/comment/46437714
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46443781
has answer: http://stackoverflow.com/a/29110446
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46448437
favorite count: 0

http://stackoverflow.com/comment/46375277
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29070134
has text: having you tried the debugging mode of IE. Just press F12 when you start your application IE. Same key can be used all browsers. A fiddler tool can also be used. http://www.telerik.com/fiddler

http://stackoverflow.com/a/29095832
has body: Your strings are expressions that are true values. if ("show_selected") { /* ... */ } … would run the code in the block. You are using strings on the RHS of each of your OR statements, so the RHS of each is true. Given: myFunction("init"); Then: button=="init" Is: true So: button=="init" || "show_selected" true || "show_selected" true If you were to pass in any other value button=="init" || "show_selected" false || "show_selected" "show_selected"
type: Answer
answers question: http://stackoverflow.com/q/29095751
score: 0

http://stackoverflow.com/comment/46428092
score: 0
has text: I had already tried something like this and now tried it again but it's still not even getting to the if statement on the controller ...
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29098864

http://stackoverflow.com/q/29131818
tagged with: javascript
type: AnsweredQuestion
has body: i'm using the Gridster.js in a web page and i'm trying to remove a widget with a button that appears on hover of the image.To do i use the function gridster.remove_widget() that i found in the documentation in the web site of the plugin here http://gridster.net/ to remove my widget but it didnt work here is my HTML : So i've set 2 little icons on my photos one to modifie, and the other to delete the widget / image but the delete button doesn't work. here is my JS file : var gridster = ""; $(document).ready(function () { $(".gridster ul").gridster({ widget_margins: [1, 1], widget_base_dimensions: [140, 140], shift_larger_widgets_down: false }); $(".gs_w").hover(function (){ var id = $(this).attr("data-id"); //show close button on hover $("ul").find("[data-close='" + id + "']").show(); //show modifie button on hover $("."+id).show(); }); $(".gs_w").mouseleave(function (){ var id = $(this).attr("data-id"); //hide close button on hover $("ul").find("[data-close='" + id + "']").hide(); //hide close button on hover $("."+id).hide(); }); $(".close").click(function(){ var id=$(this).attr("data-close"); console.log(id); //$("ul").find("[data-id='" + id + "']").remove(); gridster.remove_widget($("ul").find("[data-id='" + id + "']")); }); }); Sorry for my rusty english...
tagged with: jquery
type: Question
score: 0
has answer: http://stackoverflow.com/a/29132003
answer count: 1
has title: Gridster.js removing a widget
tagged with: gridster
accepted answer: http://stackoverflow.com/a/29132003

http://stackoverflow.com/q/29206770
downvote count: 0
answer count: 1
score: 1
favorite count: 0
has title: Typeof variable returns 'object', How do I get the object's name/type?
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29206819
upvote count: 1
type: AnsweredQuestion
type: Question
tagged with: object
has body: I have a Javascript object from my Angular JS app stored in the variable 'hymn' below: I want to print out the type of variable hymn.body, I tried typeof hymn.body but I got back 'object' but how do I get 'TrustedValueHolderType'?
tagged with: javascript
has answer: http://stackoverflow.com/a/29206819
linked to: http://stackoverflow.com/q/332422
linked to: http://stackoverflow.com/q/9381926

http://stackoverflow.com/comment/46602836
type: QuestionComment
score: 0
has text: Because I'm still trying to understand all the differences here and forgot the java tag was irrelevant. I don't have the know-how of every single thing regarding programming so I'm still getting the hang of the basic differences. I wouldn't even post this question if I could find an answer somewhere.
comment on: http://stackoverflow.com/q/29194823
type: Comment

http://stackoverflow.com/comment/46590540
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29187196
has text: It depends highly on his response to the question I posed in the OP comments. If the string end in `Z` or `UTC` or `+00:00`, then your code will work. If not, he should probably parse it using `moment.utc(thestring)` instead of `moment(thestring).utc()`.
type: Comment

http://stackoverflow.com/q/29114794
has answer: http://stackoverflow.com/a/29337891
downvote count: 0
tagged with: javascript
has title: Chrome extension - saving PDF file
has comment: http://stackoverflow.com/comment/46532421
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/pdf
linked to: http://stackoverflow.com/q/4921175
has comment: http://stackoverflow.com/comment/46528854
favorite count: 0
type: UnansweredQuestion
score: 6
tagged with: google-chrome
linked to: http://stackoverflow.com/q/17438354
upvote count: 6
has answer: http://stackoverflow.com/a/29338361
linked to: http://stackoverflow.com/q/19493020
type: Question
has body: I'm developing a Chrome extension that will save files to the downloads folder (that's not all it's doing, but that's the part I have trouble with). Right now I'm focusing on PDF files. Basically, when a PDF is opened in Chrome, the user can manually save it using Menu -&gt; Save File As ..., I'm just trying to automate this functionality using the extension, but I haven't found a good way to do it. Let's say I can detect if the current tab has a PDF file in it (based on answers from this question). The best thing I have figured out so far is to initiate a download: chrome.downloads.download({ url: tabs[0].url, saveAs: false, filename: "my file", /* This will be some unique autogenerated identifier */ conflictAction: "overwrite" }); This works but has 2 drawbacks: The file has to be re-downloaded, which is a pain if it's large. Besides, the file has been downloaded already so I should be able to use it. For some reason this doesn't work with files opened locally ("file://..."). It throws a NETWORK_INVALID_REQUEST and doesn't download. Is there a better way to save the file?
answer count: 2

http://stackoverflow.com/q/29186815
tagged with: scroll
upvote count: 1
tagged with: opacity
tagged with: fade
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/15597167
has answer: http://stackoverflow.com/a/29186942
linked to: http://stackoverflow.com/q/2293910
has body: I am looking for a way to apply an opacity/rgba color to all content of my page as it reaches a certain distance from the top and bottom of the page. This is what I want to achieve: http://www.piccante.co/images/fadeout.png In the above example, an absolute-positioned gradient is above the text at the bottom, giving the illusion that the text is fading out. However, this is not an option for me as I am using a background image on my page. So for this project, I need to use jQuery to fade out content within a specific div as it gets closer to the top of the page, and also to fade from the bottom. I also need to make sure that the entire div isn't fading out when reaching a certain point, it needs to just be the content at the top as it passes the viewport either up or down. Is this possible? thanks for the help EDIT: Further details - I have a fixed header and footer, and want to get the main body content to fade out/in as it comes up into the viewport from the bottom and leaves at the top. The header/footer have clear backgrounds so the content of the main body doesn't hide behind them. http://jsfiddle.net/3k7013q4/ Header Lorem ipsum dolor Footer
favorite count: 0
has title: Fade text out at top and bottom of page while scrolling (with jQuery)
type: UnansweredQuestion

http://stackoverflow.com/q/29157807
score: 1
upvote count: 1
has title: Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket':
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29158163
answer count: 1
tagged with: websocket
downvote count: 0
has body: I'm trying to run this code: function smConnect() { ws = new WebSocket('ws://127.0.0.1:1805/'); delete ws.URL; ws.onopen = function(response) {}; ws.onmessage = function(response) {}; ws.onclose = function(response) {}; ws.onerror = function(error) {}; } smConnect(); ws.send('message', 'hi'); But it returns me this error: Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state. What could be the problem?
has comment: http://stackoverflow.com/comment/46536120
favorite count: 0
has answer: http://stackoverflow.com/a/29158163
has comment: http://stackoverflow.com/comment/46536138
has comment: http://stackoverflow.com/comment/46536393
type: AnsweredQuestion

http://stackoverflow.com/comment/46406497
score: 0
type: Comment
type: QuestionComment
has text: @blex yes I am still using that XML file although it is more populated now.
comment on: http://stackoverflow.com/q/29085911

http://stackoverflow.com/q/29086090
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/29087599
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29087599
tagged with: javascript
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46408416
has title: Sticky Header Logo Hover
tagged with: web
has body: I found this website today http://www.mcdonalds.de/. Does anyone know how to make a sticky header like this? Only logo scroll down the navigation hide and logo hover show the navigation. if any on can can help me out with coding or any resource that helps me to create the same. Your reply would be of great help to me.
has comment: http://stackoverflow.com/comment/46407949
accepted answer: http://stackoverflow.com/a/29088271
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29088271
downvote count: 0

http://stackoverflow.com/a/29178444
downvote count: 0
answers question: http://stackoverflow.com/q/29178340
has body: A simple directive like this would do it: &lt;div bindy="myHTML"&gt;&lt;/div&gt; .directive('bindy', function($compile) { return { link: function($scope, $element, $attrs) { var html = $scope.$eval($attrs.bindy); $element.html(html); $compile($element.contents())($scope); } }; });
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/29100133
has body: Attempting to make an existing fine uploader v4.2.2 instance work with IE8, however it's returning "No valid message received from loaded iframe". Read through the 3.3 and 3.7 CORS support blog posts - modified my .net MVC handler to detect non-XHR requests and react accordingly. On the client side already had the CORS property "expected" set to true, but tried setting combinations of "sendCredentials" and "allowXdr" to true with no obvious effects. Used Fiddler to confirm I'm returning the correct content type (text/html) and the usual JSON response is followed by a script block pointing at a valid URL for "iframe.xss.response.js" - tried hosting on both the primary URL and the uploader handler sub-domain. Everything still works perfectly well in current browsers, just feels like I'm missing something obvious with my attempts at IE8 support. This is my sanitized JS; var fupParams = { userId: 12345, userKey: 67890 }; var fupInstance = $("#fine-uploader") .fineUploader({ template: "qq-template", thumbnails: { placeholders: { waitingPath: "/placeholders/waitingPath.gif", notAvailablePath: "/placeholders/notAvailablePath.gif" } }, session: { endpoint: "//upload.example.com/Upload/List", params: fupParams }, request: { endpoint: "//upload.example.com/Upload/Upload", params: fupParams }, failedUploadTextDisplay: { mode: "custom" }, deleteFile: { customHeaders: {}, enabled: true, endpoint: "//upload.example.com/Upload/Delete", method: "DELETE", forceConfirm: true, params: fupParams }, validation: { allowedExtensions: Array("jpg","png") }, cors: { expected: true, sendCredentials: false }, autoUpload: true, editFilename: { enabled: true }, classes: { success: "alert alert-success", fail: "alert alert-error" }, showMessage: function (message) { // Simple event handler } }) .on("submit", function (event, id, name) { // Use qq.Promise() to modify fupParams prior to upload }) .on("submitDelete", function (event, id, name) { // Use qq.Promise() to modify fupParams prior to delet…
favorite count: 0
accepted answer: http://stackoverflow.com/a/29101849
type: Question
upvote count: 1
answer count: 1
tagged with: internet-explorer-8
tagged with: fine-uploader
has answer: http://stackoverflow.com/a/29101849
tagged with: javascript
has title: Fine Uploader - No valid message received from loaded iframe
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/a/58352542
type: Answer
answers question: http://stackoverflow.com/q/29105163
score: 0
has body: You can translate to modern Javascript syntax, but with some care, using conditional chain and all in human-readable format: bp_axis.selectAll("text") .style('fill', d =&gt; (bonus_penalties[d].key &lt; 0)? 'red' : bonus_penalties[d].key? 'green' : 'black' ) .attr('font-size',"10px") .style("text-anchor", "middle");

http://stackoverflow.com/a/29136111
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29136052
has body: Convert all the strings (items as well as the mask) to a number using parseInt(string, 2). If mask is 0, just take all the items. If not: Then use the &amp; operator to see the common 1 bits: var common = item &amp; mask; Then test common: If you want any of the mask bits, then common should just not be 0. If you want all of the mask bits, then common should equal mask. EDIT: markers[m].setMap( ((markers[m].props &amp; props) &gt;&gt;&gt; 0 === props) ? ((props) ? map : null) : null ); markers[m].props &amp; props looks for common 1 bits, as I explain above; &gt;&gt;&gt; 0 makes sure the number is positive. The result is tested against props, making sure the common bits are all the bits in props (as in my second option above). If all the props bits are set, and if props is not zero, then markers[m] is setMap-ped to map; otherwise, to null.
downvote count: 0
has comment: http://stackoverflow.com/comment/46497588
type: Answer

http://stackoverflow.com/comment/46503776
score: 0
type: Comment
type: AnswerComment
has text: Yeah, don't sweat it. You helped me more than enough and I appreciate it.
comment on: http://stackoverflow.com/a/29139732

http://stackoverflow.com/comment/46619765
comment on: http://stackoverflow.com/a/29203762
has text: :( its not working out. some links bending towards right and some on left.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46515685
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29146300
has text: @RobertRozas Thanks for the JSFIDDLE demo.
score: 0

http://stackoverflow.com/q/29067778
downvote count: 0
possible better answer: http://stackoverflow.com/a/35981598
favorite count: 0
has answer: http://stackoverflow.com/a/29067847
answer count: 5
tagged with: node.js
type: AnsweredQuestion
has title: TypeError: Cannot read property 'body' of undefined after POST (MEAN)
accepted answer: http://stackoverflow.com/a/29067847
type: Question
has answer: http://stackoverflow.com/a/52171578
has body: I am trying to send POST data from AngularJS to Express. What I am doing at the moment is trying to send some POST stuff via curl. I already tried sending the data. It gets send, I get 200 as a response. But whenever I try to access the data via body-parser through req.body I will get a 500 and the error that I posted at the very bottom. I did a lot of research on that matter (past 4-5 hours...) and I think I checked the following common issues: I use some sort of request parser: body-parser I put my app.use(...) with body-parser middleware before requiring for routes I explicitly tell what Content-Type the POST uses I tried both application/json and application/x-www-form-urlencoded I surrender. StackOverflowers. Help me, please. curl: curl -X POST -H "Content-Type: application/json" -d '{"username": "gala", "email": "ga@ga.g", "password": "123"}' localhost:3000/users express.js // glowny plik przygotowujacy aplikacje express // wczytanie zaleznosci var express = require('express') var stylus = require('stylus') var parser = require('body-parser') var morgan = require('morgan') var compress = require('compression') var methodOverride = require('method-override') // przygotowanie aplikacji, obsluga middleware i na koncu zwrocenie obiektu aplikacji module.exports = function() { var app = express() if (process.env.NODE_ENV === 'development') { app.use(morgan('dev')) } else if (process.env.NODE_ENV === 'production') { app.use(compress()) } app.use(parser.urlencoded({ extended: true })) app.use(parser.json()) app.use(methodOverride()) // uzycie jade jako silnika szablonow dla html app.set('views', __dirroot + '/app/views') app.set('view engine', 'jade') require(__dirroot + '/app/routes/index.server.route.js')(app) require(__dirroot + '/app/routes/users.server.route.js')(app) // mozliwosci uzywania statycznych plikow z folderu /public app.use(express.static(__dirroot + '/public')) return app } users.server.route.js: var users = require(__dirroot + '/app/controllers/users…
has answer: http://stackoverflow.com/a/69296583
upvote count: 5
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/62368315
has answer: http://stackoverflow.com/a/35981598
score: 5

http://stackoverflow.com/comment/46366887
comment on: http://stackoverflow.com/a/29065407
type: Comment
score: 0
type: AnswerComment
has text: yeah it works now thanks But it doesnt work with internet explorer it just shows the front and back image as the same image but the back should be blue

http://stackoverflow.com/a/29154294
type: Answer
answers question: http://stackoverflow.com/q/29133257
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29133257
has body: Solved! CODE FOR PAGE A: LINK TO PAGE B CODE FOR PAGE B JS REDIRECT
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29198950
has answer: http://stackoverflow.com/a/29198986
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29198986
answer count: 1
tagged with: javascript
score: 0
has title: Colored Variables Not Working
has body: Please help. I have been coding my Website. And I have tried to make the text for my website red, but only a certain part using Javascript. document.getElementById("derping").innerHTML = "You have: " + derp + " Derple Points"; I want to make "derp" Red. I tried: document.getElementById("derping").innerHTML = "You have: " + derp.fontcolor("red") + " Derple Points"; But that doesn't seem to work. Can anyone help? Thanks, Jackson.

http://stackoverflow.com/q/29105858
tagged with: scope
has title: Why are these two pieces of code returning different values?
has body: I'm learning Javascript through the online book "Eloquent JavaScript" - Which is an awesome resource by the way. I came across this function in the Data Structures chapter: function tableFor(event,journal){ var table = [0,0,0,0]; for (var i = 0; i &lt; journal.length; i++){ var entry = journal[i], index = 0; if (hasEvent(event,entry)) index += 1; if (entry.squirrel) index += 2; table[index] += 1; } return table; } As you can see it iterates across an array, and outputs another array depending on how many times the first object had the argument:event. I rewrote this slightly different like this... function tableFor(event,journal){ var table = [0,0,0,0]; for (var i = 0; i &lt; journal.length; i++){ var entry = journal[i], index = 0; if (hasEvent(event,entry)){ index += 1; } if (entry.squirrel){ index += 2; table[index] += 1; } } return table; } The only change is the brackets around the if statements, which I thought was best practice. However, it outputs a different value from the first piece of code. Why is this happening? Is there some scope problem that I don't understand?? If you don't know what I'm talking about, here is a link to the chapter in the book: Eloquent JavaScript and a link to the object JOURNAL:JavaScript Object Thanks for any help!
has comment: http://stackoverflow.com/comment/46448510
has comment: http://stackoverflow.com/comment/46441703
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29105979
upvote count: 1
has comment: http://stackoverflow.com/comment/46441657
answer count: 4
tagged with: if-statement
score: 1
type: Question
has answer: http://stackoverflow.com/a/29105982
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29106065
has answer: http://stackoverflow.com/a/29105952
favorite count: 0
has comment: http://stackoverflow.com/comment/46447597

http://stackoverflow.com/comment/46470398
has text: Some relevant code snippets would be nice here.
score: 1
comment on: http://stackoverflow.com/q/29121975
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29085856
upvote count: 4
has comment: http://stackoverflow.com/comment/46405528
has comment: http://stackoverflow.com/comment/46405461
downvote count: 0
has comment: http://stackoverflow.com/comment/46405128
answers question: http://stackoverflow.com/q/29085784
score: 4
accepted answer of: http://stackoverflow.com/q/29085784
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46405297
has comment: http://stackoverflow.com/comment/46405355
has comment: http://stackoverflow.com/comment/46405424
has body: Your i loop variable is global, so both functions share the same values for i. Initialize and declare it with var, like this: for (var i = 0; i &lt;= initFactorsLen; ++i) An alternative to declaring it within the loop statement is to declare it with your other variables. Note that you can declare all your variables in a comma-separated list, like this: var factors = [], primeFactors = [], currIndex = 0, initFactorsLen, currCompose, i; Also note that you don't need to explicitly check for truthness. This: var primeTest = isPrime(currCompose); if (primeTest == true) { primeFactors.push(currCompose); } &hellip; is equivalent to this: var primeTest = isPrime(currCompose); if (primeTest) { primeFactors.push(currCompose); } &hellip; or more simply: if (isPrime(currCompose)) { primeFactors.push(currCompose); }
type: Answer

http://stackoverflow.com/q/29181468
has answer: http://stackoverflow.com/a/29181512
score: 0
answer count: 2
has body: I have got some elements with event "onclick", but i need to update this elements with ajax, unfortunately the onclick event is already bound. My question is, how to refresh the event trigger? Is there way to do it?
has comment: http://stackoverflow.com/comment/46579317
upvote count: 1
has title: Event doesnt work for elements putted via Ajax
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46579380
has comment: http://stackoverflow.com/comment/46579273
has comment: http://stackoverflow.com/comment/46579319
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46579415
has comment: http://stackoverflow.com/comment/46579277
type: Question
has answer: http://stackoverflow.com/a/29181893
accepted answer: http://stackoverflow.com/a/29181893
possible better answer: http://stackoverflow.com/a/29181512
tagged with: javascript

http://stackoverflow.com/a/29085767
score: 1
answers question: http://stackoverflow.com/q/29085636
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29085636
has body: append will always move the element to the last position in the parent element $('#container').append($('#content1')); or even just move the first element to the last position $('#container').append(function() { return $(this).children().first(); });
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29178478
accepted answer of: http://stackoverflow.com/q/29178423
answers question: http://stackoverflow.com/q/29178423
score: 1
has body: fetch only takes one argument (see http://backbonejs.org/#Collection-fetch). Instead, you should probably alter your backend to specify the team id in the resource's URL. For example: lineupCollection.url = function(){ return '/api/lineups?team_id=' + this.team_id; }; lineupCollection.team_id = $("#team_id").attr("value"); lineupCollection.fetch({ success: ..., error: ...});
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46575847
type: Answer
upvote count: 1

http://stackoverflow.com/q/29091599
favorite count: 0
tagged with: joomla
upvote count: 2
accepted answer: http://stackoverflow.com/a/29091738
tagged with: php
type: AnsweredQuestion
score: 2
has body: I need to submit the form below (components/com_users/views/login/tmpl/default_login.php. ) using Ajax. &lt;form action="&lt;?php echo JRoute::_('index.php?option=com_users&amp;task=user.login'); ?&gt;" method="post"&gt; &lt;fieldset&gt; &lt;?php foreach ($this-&gt;form-&gt;getFieldset('credentials') as $field): ?&gt; &lt;?php if (!$field-&gt;hidden): ?&gt; &lt;div class="login-fields"&gt;&lt;?php echo $field-&gt;label; ?&gt; &lt;?php echo $field-&gt;input; ?&gt;&lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php endforeach; ?&gt; ...... &lt;/form&gt; My Ajax request will come from external mobile App (on click, I run javaScript with Ajax to submit the form). Is that possible? If yes, what parameters should I pass to the Ajax request (based on the example here : "Form submit with AJAX passing form data to PHP without page refresh" I need to pass url, data and success). If that is possible, I'm also able to pass username and password (which the form fetch them from fieldset), I can provide them in plain text (no security concerns about that).
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29091738
tagged with: ajax
linked to: http://stackoverflow.com/q/16616250
has title: How to submit a form using Ajax from a mobile application
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29115117
has answer: http://stackoverflow.com/a/29115188
has comment: http://stackoverflow.com/comment/46458973
has title: Select multiple var in ajax
score: -1
has answer: http://stackoverflow.com/a/29122779
type: Question
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/46458856
linked to: http://stackoverflow.com/q/2627813
has comment: http://stackoverflow.com/comment/46458658
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29122779
tagged with: jquery
tagged with: ajax
upvote count: 1
has comment: http://stackoverflow.com/comment/46458558
has comment: http://stackoverflow.com/comment/46459038
favorite count: 0
has comment: http://stackoverflow.com/comment/46458665
accepted answer: http://stackoverflow.com/a/29115188
tagged with: loops
tagged with: php
type: AnsweredQuestion
has body: I want to send multiple attributes of HTML element generated by php while loop by Ajax call. For example: &lt;div id="chart" &gt; $i=1; while($i&lt;10){ &lt;input type="text" calss="item" id="$i" &gt; $i++; } &lt;/div&gt; Above code represent the part of the information which I want to send through ajax code as below. The input ids differ from pages representing different item. My question is how to select those ids to get val() inside input &amp; declare them as variables at the same time so that i can pass these values through AJAX call. ` var main = function() { $('.btn').click(function(){ var item1=$('#1').val(); var item2=$('#2').val(); var item3=$('#3').val(); var item4=$('#4').val(); var item5=$('#5').val(); var item6=$('#6').val(); var item7=$('#7').val(); var item8=$('#8').val(); var item9=$('#9').val(); $.ajax({ type:"POST", url: "something.php", cache:0, data:({ "item1":item1, "item2":item2, "item3":item3, "item4":item4, "item5":item5, "item6":item6, "item7":item7, "item8":item8, "item9":item9, }), success:function(result){ $('#chart').html(result); }, complete:function(){ alert('good!!'); } }); }); } $(document).ready(main);`

http://stackoverflow.com/q/29142490
tagged with: firefox
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29142601
has answer: http://stackoverflow.com/a/29145336
tagged with: firefox-addon
possible better answer: http://stackoverflow.com/a/29142601
has comment: http://stackoverflow.com/comment/46596653
tagged with: firefox-addon-sdk
favorite count: 0
has title: adding jquery to firefox extension
upvote count: 1
has body: I have created a simple firefox addon consisting mainly from the main.js file but I need to use jquery for ajax. but I have no clue on how can I add script to my project so it could be accessible. Please help! I found this example but still says that $ is undefined var data = require("sdk/self").data; contentScriptFile: data.url("jquery-1.11.2.min.js")
accepted answer: http://stackoverflow.com/a/29145336
type: AnsweredQuestion
score: 1
type: Question
answer count: 2

http://stackoverflow.com/comment/46373017
comment on: http://stackoverflow.com/a/29067853
has text: @J82 Yes, likely. That makes sense.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29070571
accepted answer: http://stackoverflow.com/a/29070635
answer count: 1
has body: i'm new on javascript and jquery , i create some function on this fiddle and it only run once, how to loop this function ?? $(document).ready(function() // function { $('.box').css({visibility:'hidden'}); setTimeout( function(){ $('.box-1').css({visibility:'visible'}); },300); setTimeout( function(){ $('.box-2').css({visibility:'visible'}); },600); setTimeout( function(){ $('.box-3').css({visibility:'visible'}); },900); setTimeout( function(){ $('.box').fadeOut('slow'); },1300); }) fiddle link https://jsfiddle.net/dzh5dgcf/
favorite count: 0
upvote count: 2
downvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29070635
type: Question
has title: how to loop setTimeOut function
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29157588
type: Answer
has comment: http://stackoverflow.com/comment/46623225
answers question: http://stackoverflow.com/q/29151923
score: 0
has comment: http://stackoverflow.com/comment/46624258
has body: In the telephony broadcast receive, check if the number is one of the blocked number? If condition is satisfied then use following code to end it: telephonyService.endCall();

http://stackoverflow.com/comment/46573624
score: 0
type: Comment
type: QuestionComment
has text: that looks confusing the alternative placeholder= enter link. how would i get the placeholder attribute to bypass in xhtml strict 1.0 with the alternative?
comment on: http://stackoverflow.com/q/29178002

http://stackoverflow.com/a/29070559
type: Answer
accepted answer of: http://stackoverflow.com/q/29070448
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29070448
has body: Create your custom filter which will internally use currency when value is present, otherwise it will return text which you want to show instead. Markup Filter .filter('customFormat', function($filter) { return function(value, format, text) { if (angular.isDefined(value) &amp;&amp; value != null) return $filter('currency')(value, format); else return text; } }); Working Plunkr
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46550956
has text: In the `select` callback there is no`event` variable passed so what you did was trying to access a non existing variable and thus the conversion to DATETIME was done on current date instead of the actual calendar selected date. `event` variable is passed to other Fullcalendar callbacks but not to the `select`.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29152570

http://stackoverflow.com/q/29125741
has comment: http://stackoverflow.com/comment/46478258
has comment: http://stackoverflow.com/comment/46478112
has comment: http://stackoverflow.com/comment/46478443
has comment: http://stackoverflow.com/comment/46479043
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46477874
has comment: http://stackoverflow.com/comment/46480954
tagged with: php
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/46477721
upvote count: 2
has comment: http://stackoverflow.com/comment/46478370
has comment: http://stackoverflow.com/comment/46478334
type: Question
has answer: http://stackoverflow.com/a/29126134
accepted answer: http://stackoverflow.com/a/29126134
has comment: http://stackoverflow.com/comment/46478007
has body: Ok so I have one page, called albums.php, with the following code: <?php require_once('./config.php'); $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $album = $mysqli->query("SELECT * FROM Albums"); print(' '); print(' '); while ($row = $album->fetch_assoc()) { $cover = $row['Album_Cover']; $name = $row['Album_Name']; $id = $row['Album_ID']; print (' '); print(' '); print(" "); print(" "); print(' '); print ("$name"); print (' '); } print(' '); print(' '); print(' '); print(' '); print(' '); print(' '); $mysqli->close(); ?> DB_HOST, DB_USER, DB_PASSWORD, and DB_NAME come from config.php. albums.php (again, the code above) is linked to the script button.js, the code for which is below: $("#image").click(function(e) { e.preventDefault(); var id = $(this).attr('class'); var dataString = 'id='+id; $.ajax({ type: "POST", data: dataString, url: "./pictures.php", success: function(data) { alert(data); } }); }); My goal is to pass the id of the clicked image to pictures.php using ajax. My code for pictures.php is as follows: <?php require_once('./config.php'); require_once('./albums.php'); $id = $_POST['id']; $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $pictures = $mysqli->query("SELECT * FROM Pictures WHERE Album_ID = $id"); print(' '); print(' '); while ($row = $pictures->fetch_assoc()) { $picture = $row['Picture']; print(" "); } print(' '); print(' '); $mysqli->close(); ?> Do I also have to link the button.js script in pictures.php? Other than that, I can't think of a possible issue with this code. By the way, all three of these files are stored in the same folder on my server, so I believe I am accessing them correctly. Any help would be much appreciated!
has comment: http://stackoverflow.com/comment/46478461
has title: Pass data from one PHP page to another using ajax
tagged with: javascript
has comment: http://stackoverflow.com/comment/46478153

http://stackoverflow.com/comment/46452653
type: QuestionComment
has text: I don't understand why you are asking this instead of just trying to do it...
score: 1
comment on: http://stackoverflow.com/q/29111264
type: Comment

http://stackoverflow.com/comment/46395837
type: QuestionComment
comment on: http://stackoverflow.com/q/29078523
score: 0
has text: As I mentioned, the data is retrieved from the database. The hyperlink is actually coming from the database which needs to be modified. It is not a hyperlink control. I am trying to prefix the href with an id so that it looks something like "/2/admin.aspx".
type: Comment

http://stackoverflow.com/comment/46473439
type: Comment
type: QuestionComment
has text: The problem is that Javascript cannot read your mind. Each and every rule has to be stated and cannot be implied. Take @Zeratops's advice and start with paper and pencil to write up these different rules. To answer your question if this can all be done in regex, the answer is most likely not. Your regex would look much more ugly than 10 `if`/`else` blocks from what I can tell.
comment on: http://stackoverflow.com/q/29123136
score: 4

http://stackoverflow.com/a/29086930
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29066026
has body: In javascript objects are passed by reference. So when you are copying the object in a different variable the reference remains the same hence any changes to any one will apply to both the object. To create a copy with a different reference you can use // Shallow copy var newObject = jQuery.extend({}, oldObject); // Deep copy var newObject = jQuery.extend(true, {}, oldObject); Or by using loadash or underscore like _.extend({},oldObj)
has comment: http://stackoverflow.com/comment/46406795
accepted answer of: http://stackoverflow.com/q/29066026

http://stackoverflow.com/comment/46488919
comment on: http://stackoverflow.com/q/29131373
type: Comment
type: QuestionComment
has text: Well, as told, I do have a basic knowledge about jQuery so it isn't perfect. I know. Any advice on how to do it correct is greatly appreciated.
score: 0

http://stackoverflow.com/a/68856228
answers question: http://stackoverflow.com/q/29196991
score: 0
has body: const el = document.getElementsByClassName('content-right')[0] if (!el) return const i = window.getComputedStyle(el).width it is a way fix the error,but I can't figure it out why cant find the element,it should not be null!
has comment: http://stackoverflow.com/comment/121689547
type: Answer

http://stackoverflow.com/a/29137072
score: 2
accepted answer of: http://stackoverflow.com/q/29136972
downvote count: 0
answers question: http://stackoverflow.com/q/29136972
has body: You haven't got a DOM element to append the chart to. You select '#chart svg', but there is no element in your HTML that will match, thus the chart will never get displayed, since it's not getting inserted into the DOM. This will work... The only difference is the addition of before your script elements.
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46629596
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29209558
has text: Thanks for the reply, I've tried set an expiration date like this `"expirationDate" : (new Date().getTime()/1000) + 3600` but PHP is still unable to see it as being set.
score: 0

http://stackoverflow.com/comment/46578103
type: Comment
comment on: http://stackoverflow.com/a/29176645
score: 0
type: AnswerComment
has text: Regarding your first point, I have updated the question and the fiddle to include the mapping. This was just another mistake when creating the fiddle.

http://stackoverflow.com/a/29176250
has body: Apart from what was said above, ng-repeat will not render anything if it's empty, a solution around it is to have an empty p paragraph that's only visible when members is empty {{member.dod}} Good luck.
score: 0
answers question: http://stackoverflow.com/q/29175756
type: Answer

http://stackoverflow.com/q/29201426
has body: How can I parse? '2015年 Oct月10日 (Sat)' with moment js? I've been trying moment('2015年 Oct月10日 (Sat)', ['DD-MM','DD-MMM','YYYY MMMM DD']); to no avail..
answer count: 4
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/29227090
has title: Parse japanese datestring with moment.js
tagged with: momentjs
type: AnsweredQuestion
score: 1
downvote count: 1
type: Question
tagged with: locale
tagged with: javascript
has answer: http://stackoverflow.com/a/29227090
has answer: http://stackoverflow.com/a/52712354
tagged with: date
possible better answer: http://stackoverflow.com/a/29201586
has answer: http://stackoverflow.com/a/29211617
has answer: http://stackoverflow.com/a/29201586

http://stackoverflow.com/comment/46524606
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29148411
has text: Because you are creating JavaScript source code via JavaScript. You literally want to create the character sequence `\x3c`. However, if you simply put that in a string literal, it will convert to `<` (just type `"\x3c"` in the console). Hence you have to escape the \. `'"\x3cspan"'` results in `"<span"` and `'"\\x3cspan"'` results in `"\x3cspan"`.
type: Comment

http://stackoverflow.com/comment/46407818
type: QuestionComment
comment on: http://stackoverflow.com/q/29086113
type: Comment
score: 0
has text: Then call `$("#schematic_holder").off("click")`, when drawing. If you have more click handlers on that element, define function under name, so that you can call something like `.off(handlerFunction)`.

http://stackoverflow.com/q/29083290
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/29084841
tagged with: javascript
has answer: http://stackoverflow.com/a/29084354
answer count: 3
upvote count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/28934788
tagged with: asp.net
has body: i want to get select values of jquery select2 plugin in asp.net code behind. Here is my source Client Side: &lt;select id="ddlcountry" runat="server" class="select" style="width: 100%;"&gt; &lt;/select&gt; Code Behind: var query1 = from pcountry in CTX.Countries orderby pcountry.Country1 ascending select new { pcountry.CountryId, pcountry.CountryName }; if (query1 != null) { ddlcountry.DataSource = query1.ToList(); ddlcountry.DataValueField = "CountryId"; ddlcountry.DataTextField = "CountryName"; ddlcountry.DataBind(); ddlcountry.Multiple = true; } protected void btnSave_Click(object sender, EventArgs e) { Now i want to get all the selected country values here ? } Please help me,i will be very thankful.
has comment: http://stackoverflow.com/comment/46400064
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29083646
has title: how to get values of jquery select2 tags list using asp.net?

http://stackoverflow.com/comment/46545808
type: Comment
type: QuestionComment
has text: yes , normal css work fine, but I have to assigne the red color to border of info-window , but it not work properly
comment on: http://stackoverflow.com/q/29162275
score: 0

http://stackoverflow.com/comment/46385794
score: 0
has text: May I ask what the final "return str" does?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29076138

http://stackoverflow.com/comment/46427759
score: 0
type: AnswerComment
has text: Do you have the same CSV like : `date,name,value 01/01/1991,12,xyz,14.4 01/01/1992,20,abc,20.5 01/02/1980,78,xy,60.8`
comment on: http://stackoverflow.com/a/29075184
type: Comment

http://stackoverflow.com/q/29078110
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/12828044
has comment: http://stackoverflow.com/comment/46389722
score: -1
favorite count: 0
has body: I want to pass the address of a google draggable map marker into a field and then submit it into a column in mysql database. I found the code below which is exactly what i want but i want to put the "Closest matching address" result inside an input field. How can i do that ? Marker status: Click and drag the marker. Current position: Closest matching address:
accepted answer: http://stackoverflow.com/a/29078292
type: AnsweredQuestion
downvote count: 1
type: Question
tagged with: google-maps
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29078292
has title: How can i pass the address of a draggable google map marker into an input field?

http://stackoverflow.com/comment/46402687
score: 0
has text: Maybe you could use `keyup` and then if a certain number of characters was entered, display the next field?
type: Comment
comment on: http://stackoverflow.com/a/29084879
type: AnswerComment

http://stackoverflow.com/comment/46547196
type: QuestionComment
type: Comment
has text: I made this fiddle http://jsfiddle.net/2r3n6w6e/ and it's working
comment on: http://stackoverflow.com/q/29163852
score: 0

http://stackoverflow.com/comment/46486114
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29127157
score: 0
has text: Offhand, check the References in the VS project. There should be a reference there to Windows Library for JavaScript 1.0. This is what pulls the WinJS files into the project properly, because they're drawn from a shared source and don't exist directly in the project itself. If that reference is bad, or the files didn't get restored with your new HD, then they wouldn't get loaded. Right click a file and select Properties to see the assumed location. You might try deleting that reference and re-adding it through Add Reference > Windows > Extensions where it should be listed.

http://stackoverflow.com/comment/46508309
type: QuestionComment
comment on: http://stackoverflow.com/q/29142396
has text: There's no built in way to select elements based on partial attribute names, you have to iterate and filter
score: 0
type: Comment

http://stackoverflow.com/q/29217385
tagged with: css
has body: I have a form with a print function. Inside the function I open a window, build the document, add the head with style sheets, add the form HTML and make the call to print the last part of the body. The problem is the initial print preview/print doesn't reflect the style. If I cancel the print and attempt to print manually, the style shows up. I've tried quite a few ways of doing this with no luck. It seems like a timing issue. Any ideas? Browser is Chrome. Below is the JS function. (This is injected with a faces context). function printForm(windowTitle, path){ var printWindow = window.open(); var printDocument = printWindow.document; var headHtml = "&lt;link href='" + path + "/css/style.css' rel='stylesheet' type='text/css'/&gt;"; printDocument.getElementsByTagName('head')[0].innerHTML = headHtml; var printDiv = printDocument.createElement("DIV"); var formDiv = document.getElementById("formDiv"); printDiv.innerHTML = formDiv.innerHTML // Styling here is the issue printDocument.body.appendChild(printDiv); var scriptTag = printDocument.createElement("script"); var script = printDocument.createTextNode("print();"); scriptTag.appendChild(script); printDocument.body.appendChild(scriptTag); }
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29217514
possible better answer: http://stackoverflow.com/a/41430597
has title: Call to window.print firing before documents style is applied
type: Question
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/41430597
upvote count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29217514
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29160613
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46540982
has title: use java variable inside ajax call
has comment: http://stackoverflow.com/comment/46540882
has body: I have a periodically calling Ajax call. I use this ajax call to invoke an endpoint. Below I have mentioned my jsp file(polling.jsp). The service has hosted in tomcat server. Expected output from the variable title is "Metallica". But I get below error in firebug without getting the alert. ReferenceError: Metallica is not defined alert(Metallica); I need to check weather the web service is calling time to time as I defined. If I did not put the alert , alert(&lt;%=name%&gt;); then I can see ajax call is working properly in firebug. But I need to put the alert their to get the response form the web service. polling.jsp &lt;script&gt; &lt;% Client client = Client.create(); %&gt; var set_delay = 5000, callout = function () { $.ajax({ }) .done(function (response) { &lt;% WebResource webResource = client .resource("http://localhost:8080/RESTfulExample/rest/json/metallica/get"); ClientResponse response1 = webResource.accept("application/json") .get(ClientResponse.class); if (response1.getStatus() != 200) { throw new RuntimeException("Failed : HTTP error code : " + response1.getStatus()); } String output = response1.getEntity(String.class); Gson gson = new Gson(); Track track=gson.fromJson(output,Track.class); String name=track.getName().toString(); %&gt; alert(&lt;%=name%&gt;); }) .always(function () { setTimeout(callout, set_delay); }); }; callout(); &lt;/script&gt; Any help is greatly appreciated. Thanks.
type: AnsweredQuestion
tagged with: java
has answer: http://stackoverflow.com/a/29160650
accepted answer: http://stackoverflow.com/a/29160650
type: Question
tagged with: jsp
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/q/29212452
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29212538
has answer: http://stackoverflow.com/a/29212581
has title: javascript calculator with click to calculate
score: 0
has answer: http://stackoverflow.com/a/29212537
tagged with: function
tagged with: getelementbyid
tagged with: calculator
has body: I have a working calculator on my website that is used for business expense savings estimation. currently the calculator auto-calculates in real time as the user inputs numbers. i would like the user to have to click a calculate button in order to see any results. could someone please help as i am having a hard time adjusting the code myself. here is the current code: function calc() { var cost = document.getElementById('phone').value * (.30) + document.getElementById('energy').value * (.05) + document.getElementById('cell').value * (.30) + document.getElementById('office').value * (.15) + document.getElementById('card').value * (.35) + document.getElementById('waste').value * (.5) + document.getElementById('payroll').value * (.5); document.getElementById('cost').value = (cost * 12).toFixed(2); } &lt;form name="form1" method="post" action=""&gt; &lt;table width="33%" align="center"&gt; &lt;tr&gt; &lt;td valign="top" style="text-align: center"&gt;&lt;strong&gt; Category&lt;/strong&gt; &lt;/td&gt; &lt;td style="text-align: center"&gt;&lt;strong&gt;Monthly Expenses&lt;/strong&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="47%" valign="top"&gt;Telephone &amp;amp; Internet&lt;/td&gt; &lt;td width="53%"&gt; &lt;input name="phone" id="phone" type="text" onchange="calc ()" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;Energy&lt;/td&gt; &lt;td&gt; &lt;input name="energy" id="energy" type="text" onchange="calc()" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;Cell Phone&lt;/td&gt; &lt;td&gt; &lt;input name="cell" id="cell" type="text" onchange="calc()" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;Office Supplies&lt;/td&gt; &lt;td&gt; &lt;input name="office" id="office" type="text" onchange="calc()" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;Merchant Card Fees&lt;/td&gt; &lt;td&gt; &lt;input name="c…
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/29212754

http://stackoverflow.com/q/29185078
answer count: 1
tagged with: javascript
has body: var shots = Math.ceil(Math.random(0,1)*5); var snd = new Audio("test.wav"); for (var i = 0; i &lt; shots; i++){ snd.play(); } Now, depending on how many "shots" are fired, i want to play the test.wav the same number of times with a randomized, very short delay in between and possible even "overlapping" sound effect in regards to each other. How would i best go about doing this ? - thanks
score: 0
type: UnansweredQuestion
has title: audio.play() and more than one effect playback?
tagged with: audio
has answer: http://stackoverflow.com/a/29202115
type: Question

http://stackoverflow.com/comment/46600038
score: 0
type: QuestionComment
type: Comment
has text: yes, yes, yes...you have my idea....how do i implement that? @nicael
comment on: http://stackoverflow.com/q/29193123

http://stackoverflow.com/q/29152732
tagged with: python
has comment: http://stackoverflow.com/comment/56647587
type: UnansweredQuestion
upvote count: 1
has title: jQuery File Upload crashing browser
type: Question
score: 1
has body: I'm using jquery-filedrop and python/flask to upload files to an uploads folder on my server. However whenever I select a large file (~80MB+) the browser tab (chrome) instantly crashes. Looking into the code and from the readme it seems to use HTML5 FileReader() to handle the file upload. If I take a small chunk of the file by changing these lines: reader.onloadend = !opts.beforeSend ? send : function (e) { opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); }); }; reader.readAsDataURL(files[fileIndex]); to reader.onloadend = !opts.beforeSend ? send : function (e) { opts.beforeSend(files[fileIndex].slice(0, 1048576), fileIndex, function () { send(e); }); }; reader.readAsDataURL(files[fileIndex].slice(0, 1048576)); Then I can get it to run without an error by only uploading 1MB from each file, so I'm guessing it's a memory issue when the full file is read in. How could I set it up to loop through small chunks of the file and upload them separately? Or, are there any better workarounds?
tagged with: jquery-plugins
answer count: 2
has answer: http://stackoverflow.com/a/34453088
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29153083
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46521899
type: QuestionComment
score: 2
has text: *"This site is not for reviewing code"* So, you think your update is not asking for code review? That surprises me. Either way, that's all beside the point. Yes, of course the update is related because it's about the same code. But the update is a about a different *problem* and you should avoid changing your question in such way.
comment on: http://stackoverflow.com/q/29148791
type: Comment

http://stackoverflow.com/q/29201906
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29202002
tagged with: css
upvote count: 0
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has title: Refresh div content to check status of button
answer count: 1
downvote count: 1
has body: I have a page and inside it i have a button &lt;a href...&gt;. My problem is that when this button is clicked, it changes the text in the button. Until here, all is working. Now my problem. This page is multi user page, so I need to refresh &lt;div&gt; content every period of time to show other users if this button already clicked or not. I tried many javascript and jquery codes but I can´t update the button. I can update div to write some text using $("#divid").text('Random msg'); but this do not change the button. The button is inside &lt;div&gt; tag but nothing happens.
favorite count: 0

http://stackoverflow.com/q/29105899
has comment: http://stackoverflow.com/comment/46453863
has answer: http://stackoverflow.com/a/29106865
tagged with: php
has body: I have created a custom signup form to be included in the header of my Magento template which posts to extension I'm building. I've used Magento form validation on the form, but when I click submit - the form does nothing. I can see that the "validation-passed" class has been applied to all elements but nothing happens. Email Title Mrs Miss Ms Mr Dr Lady Other Other First Name Surname Sign up
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29118066
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46441787
tagged with: magento
tagged with: javascript
tagged with: forms
has title: Magento form validation, form does not submit with valid fields
answer count: 2
accepted answer: http://stackoverflow.com/a/29118066
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46462723
possible better answer: http://stackoverflow.com/a/29106865
has comment: http://stackoverflow.com/comment/46457407

http://stackoverflow.com/comment/46631157
score: 0
type: QuestionComment
type: Comment
has text: You could check out [Jasmine](http://jasmine.github.io/). A quick look through their source code didn't turn up in references to `eval` in their `SpyStrategy` and `SpyRegistry` classes, which is used to implement mocks and spies in Jasmine.
comment on: http://stackoverflow.com/q/29202966

http://stackoverflow.com/a/29208426
type: Answer
has body: You could just write a Cookie to the Response of the user. If the Cookie is set, you could render a hidden field to your page and check if the field is set or not.
answers question: http://stackoverflow.com/q/29208312
score: 0

titanium
type: Tag
tags question: http://stackoverflow.com/q/29076571
tag name: titanium
tags question: http://stackoverflow.com/q/29074806
tags question: http://stackoverflow.com/q/29078952
tags question: http://stackoverflow.com/q/29202246

http://stackoverflow.com/comment/46439088
comment on: http://stackoverflow.com/a/29104373
type: AnswerComment
score: 0
type: Comment
has text: Why do you make us all waste our time by providing no realistic information at all about the problem at hand? _The thing here is_ => Why wasn't this _thing_ in your question?

http://stackoverflow.com/q/29185740
tagged with: javascript
tagged with: fullcalendar
upvote count: 2
has body: I'm using fullcalendar to build up a calendar application for students. I use 4 different views: day, week, month and semester. The semester view is a customized one and it would work fine if it wasn't that by default it has the layout based on the week view and not on the month one that would be much better. Right now the only thing I do is to specify the extra view in the parameter "view" of the fullcalendar constructor: views: { agendaSixMonth: { type: 'agenda', duration: { months: 6 }, buttonText: 'Semestre', start: $.fullCalendar.moment(startSemester), end: $.fullCalendar.moment(endSemester), intervalStart: $.fullCalendar.moment(startSemester), intervalEnd: $.fullCalendar.moment(endSemester), } } I can't find in the documentation how to set the layout of custom views and I was wondering if someone knows if it's possible eventually by setting a parameter in "views" or if I have to code everything from scratch. Thank you!
answer count: 1
favorite count: 0
has title: Fullcalendar custom view based on month view
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/29185845

http://stackoverflow.com/comment/46376779
score: 0
comment on: http://stackoverflow.com/q/29070942
type: QuestionComment
type: Comment
has text: Yes, so whenever you login again then also you would be having the most selected values.

http://stackoverflow.com/q/29100700
tagged with: time
has answer: http://stackoverflow.com/a/29116744
has answer: http://stackoverflow.com/a/29106626
tagged with: nouislider
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29106626
upvote count: 1
type: Question
has title: noUiSlider custom formatting time with libLink
accepted answer: http://stackoverflow.com/a/29116744
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has body: Custom formatting plus libLink of a time value in noUiSlider does not work for me as expected. I want to use the slider to output a time in 24 hours format (like 17:32). I also want to enter a valid time and have the slider updated via libLink. When I move the slider, the time in the input is correctly updated. But it does not work the other way around: entering a new time in the input and then unfocusing resets the input to the previous value. If you uncomment the console.log in function HHMMtoMinutes() you can see it firing twice. What is happening here? $(document).ready(function() { $(".slider").noUiSlider({ start: ["07:30"], range: { 'min': 0, 'max': 24 * 60 }, format: { to: minutesToHHMM, from: HHMMtoMinutes } }); $(".slider").Link("lower").to($("#time")); }); function minutesToHHMM(value) { value = Math.round(value); var hour = Math.floor(value / 60); var min = value - hour * 60; //console.log("value:" + value + "\thour: " + hour + "\tmin: " + min) return ("0" + hour).slice(-2) + ":" + ("0" + min).slice(-2); } function HHMMtoMinutes(value) { var split = value.toString().split(":"); var hour = parseInt(split[0]) * 60; var min = parseInt(split[1]); //console.log("value: " + value + "\thour: " + hour + "\tmin " + min); return hour + min; } time Here is also a JSFiddle: https://jsfiddle.net/g42e6saf/2/

http://stackoverflow.com/comment/46489438
comment on: http://stackoverflow.com/q/29130731
score: 0
type: QuestionComment
has text: Sorry, it's `query` not `$query` [link] (https://docs.angularjs.org/api/ngResource/service/$resource)
type: Comment

http://stackoverflow.com/q/29210349
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15527832
tagged with: factory
upvote count: 1
has answer: http://stackoverflow.com/a/29212649
type: Question
has body: Firstly this is very similar to several questions here but none of the answers have worked for me. I have an Cordova/AngularJS/Ionic app which every 10 mins polls a remote server and pulls down some JSON - this works fine. I also have push notifications with the PhoneGap Build plugin, again working fine. What I want to do is connect the two such that when a notifications comes in it fires my poller thus getting the latest content in between the poll times. Existing functioning code: var schoolApp = angular.module('schoolApp', ['ionic', 'schoolApp.controllers', 'schoolApp.services']) schoolApp.run(function(Poller) {}); .factory('Poller', function($http, $interval,updateContentLocalStorage) { var pollerFunct = function() { // fetch and process some JSON from remote server } // END pollerFunct() // run on app startup, then every pollTimeout duration // delay by 10sec so that checkConnectionIsOn() has time to settle on browser platform - seems not needed in actual devices but no harm to delay there too setTimeout(function(){ pollerFunct(); }, 10000); //pollerFunct(); // run on app startup, then every pollTimeout duration $interval(pollerFunct, pollTimeout); }) // END factory Poller Push notification processing, outside of Angular // handle GCM notifications for Android function AndroidOnNotification(e) { // working: call angular service from outside angular: http://stackoverflow.com/questions/15527832/how-can-i-test-an-an-angularjs-service-from-the-console var $http = angular.element(document.body).injector().get('$http'); var $state = angular.element(document.body).injector().get('$state'); // not working : http://stackoverflow.com/questions/26161638/how-to-call-an-angularjs-factory-function-from-outside angular.element(document.body).injector().get('Poller').pollerFunct(); } I want to call the pollerFunct() from AndroidOnNotification(e) but getting "processMessage failed: Error: TypeError: undefined is not a function " and similar errors.
has comment: http://stackoverflow.com/comment/46631069
tagged with: javascript
linked to: http://stackoverflow.com/q/26161638
downvote count: 0
answer count: 1
score: 1
favorite count: 0
has title: run a function contained within a factory from outside angularjs

http://stackoverflow.com/comment/46370728
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29067559
has text: Wait. Something wrog with it ... in the declaration of in_interval t and interval list are required, but you are calling it passing just the t. However I need to know the min_t and max_t without guessing an initial t. if I pass a t that is not in all the intervals I got False,t,t that is useless to me.
score: 0

http://stackoverflow.com/q/29090325
answer count: 1
has answer: http://stackoverflow.com/a/29093679
tagged with: ember.js
has body: Basically the objective is render the account page if user is logged in, otherwise redirect to a login page. I have the following routes: App.Router.map(function() { this.resource('account', { path: '/'}); this.route('login', { path: '/login' }); }) My current code tries to access a loggedIn attribute in the account controller in the route: App.AccountRoute = Ember.Route.extend({ renderTemplate: function(controller) { var loggedIn = controller.get('loggedIn'); // ERROR: controller undefined if (!loggedIn) { this.transitionTo('login'); } } }); Should I implement this logic in the router? Why is the controller undefined in my route? Thanks!
type: AnsweredQuestion
has title: Ember.js: redirect in router if certain condition is satisfied in controller?
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29093679
has comment: http://stackoverflow.com/comment/46416259
score: 0
has comment: http://stackoverflow.com/comment/46414778

http://stackoverflow.com/q/29106130
answer count: 2
has body: I'm adding a photo gallery to my website and I have it all working, but I'm curious as to what's going on in some of the JS (function($){ $.fn.extend({ simpleGal: function (options) { var defaults = { mainImage: ".placeholder" }; options = $.extend(defaults, options); return this.each(function () { var thumbnail = $(this).find("a"), mainImage = $(this).siblings().find(options.mainImage); thumbnail.on("click", function (e) { e.preventDefault(); var galleryImage = $(this).attr("href"); mainImage.attr("src", galleryImage); }); }); } }); })(jQuery); What's going on with the $.fn.extend? and defaults? I get everything after var thumbnail, but I'm slightly confused as to what's going on in the first half.
has comment: http://stackoverflow.com/comment/46442150
score: -1
downvote count: 2
upvote count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29106292
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29106230
type: Question
has title: What's going on with jQuery extend function?

http://stackoverflow.com/q/29158547
has answer: http://stackoverflow.com/a/29158653
type: Question
has body: I have an input form where the user can choose a date from a calendar, however I also wanted them to be able to type in the date manually the function validateDate() is called when the user clicks out of the input box //Make sure valid date is entered into the field, otherwise throw back an error function validateDate(date) { var dateObj = new Date(date); console.log(dateObj.getDate()); if (dateObj == "Invalid Date") { dateWrongFormat(false); return false; } return dateTimeToString(dateObj, true); } problem is: say if the user types in something by accident like "55/02/2014" it converts to "02 Jul 2018" instead of displaying that it is an invalid date (note: this is 4 years past the year they entered). Is there are simple way to check if the days or month is invalid this or do I have to create my own date-checking system? EDIT: so it seems like no matter what I type in, it believes it a valid date - even formatting with moment.js. Thanks for the help guys but I have to write my own for this one!
has title: javascript Date creates strange date when days are greater than what is in the month
tagged with: javascript
tagged with: date
score: 0
accepted answer: http://stackoverflow.com/a/29158623
answer count: 3
has comment: http://stackoverflow.com/comment/46537485
has answer: http://stackoverflow.com/a/29158683
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29158653
has answer: http://stackoverflow.com/a/29158623

http://stackoverflow.com/comment/46642947
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29216370
has text: How can I check if I do?
score: 0

tabs
tags question: http://stackoverflow.com/q/29130394
type: Tag
tags question: http://stackoverflow.com/q/29205887
tags question: http://stackoverflow.com/q/29114783
tags question: http://stackoverflow.com/q/29098280
tags question: http://stackoverflow.com/q/29153623
tags question: http://stackoverflow.com/q/29095899
tags question: http://stackoverflow.com/q/29125511
tag name: tabs
tags question: http://stackoverflow.com/q/29144996
tags question: http://stackoverflow.com/q/29173276
tags question: http://stackoverflow.com/q/29187920

http://stackoverflow.com/q/29206089
answer count: 4
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29206313
has title: Issue on Adding Comma After Second Append and so on
has answer: http://stackoverflow.com/a/29206161
has body: can you please take a look at this demo and let me know how I can add comma not for the first append. What I have is an HTML like this option 1 option 2 option 3 option 4 option 5 option 6 option 7 option 8 option 9 In Js what I have is: $(".sel").on("change", function(){ var selected = $(this).val(); $("#output").append(", " + selected); }); But as you can see the append is applying comma before all selections even the first one!
type: Question
accepted answer: http://stackoverflow.com/a/29206160
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29206161
tagged with: jquery
has comment: http://stackoverflow.com/comment/46623003
has answer: http://stackoverflow.com/a/29206160
has answer: http://stackoverflow.com/a/29206191

http://stackoverflow.com/comment/46489553
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29131386
has text: Sorry. The button in your form needed the `type` attribute set to `submit` instead of `button`. Try it now.

http://stackoverflow.com/comment/46560316
comment on: http://stackoverflow.com/a/29169535
score: 0
type: Comment
type: AnswerComment
has text: My initial recipe was wrong. Relative paths are used with CSS styling. So simplest way for you is to use absolute hard-coded path. Add the `/` slash before the `static` (look at updated answer).

http://stackoverflow.com/comment/46516214
comment on: http://stackoverflow.com/a/29131614
type: AnswerComment
score: 0
type: Comment
has text: Sure - I'm working with a test site right now - the URL for that is http://nisolo-test-store.myshopify.com/products/andrea-loafer-steel (pw: feubri). The test site doesn't exactly replicate the live site, but it's close enough to work on some coding issues. I've learnt lessons from making changes to a live site! :)

http://stackoverflow.com/comment/46456948
score: 0
type: Comment
type: QuestionComment
has text: @Ramsharan My grails version is 2.4.4 and I have not changed the default plugins so yes there is `asset-pipeline:1.9.9`
comment on: http://stackoverflow.com/q/29099319

http://stackoverflow.com/comment/46610904
comment on: http://stackoverflow.com/a/29198875
type: AnswerComment
score: 0
type: Comment
has text: If I use webGl, I guess React is out of the room? React to my understanding is leveraging the DOM (with its virtual DOM). Are there any frameworks/structured patterns to connect my backend data (Rails or Go) to WebGL? I liked the opiniated/organized structure I would have had with the View in React and the M(model) and C (controlle)r on Rails.

http://stackoverflow.com/a/41430597
answers question: http://stackoverflow.com/q/29217385
type: Answer
score: 2
upvote count: 2
has body: Instead of trying to guessing with a timer, it might be more precise to use the load event on the &lt;link ...&gt; to know exactly when it has completed loading. Below is a function I use which illustrates this technique. It uses an off-screen &lt;iframe&gt; to print a portion of a page. It's jQuery based, but the principles are the same in vanilla JS. Note the setting of the &lt;link&gt;'s onload function with an anonymous function which invokes print() on the &lt;iframe&gt;'s window object. /* * expects: * &lt;tag id="whatever"&gt;...goop...&lt;/tag&gt; * &lt;input type="button" class="printit" data-target="whatever" value="Print"&gt; */ $(function() { $( '.printit' ).click(function() { var goop = $( '#' + this.dataset.target ).prop('outerHTML'); var ifr = $('&lt;iframe&gt;'); var bas = $('&lt;base href="' + document.baseURI + '"&gt;'); var lnk = $('&lt;link rel="stylesheet" href="/css/print.css"&gt;'); lnk.on('load', function() { /* CSS is ready! */ ifr[0].contentWindow.print(); }); ifr.css( { position: 'absolute', top: '-10000px' } ) .appendTo('body') .contents().find('body').append(goop); ifr.contents().find('head').append(bas).append(lnk); return false; }); });
downvote count: 0

http://stackoverflow.com/a/29192689
answers question: http://stackoverflow.com/q/29192564
downvote count: 0
has body: You're missing the second parameter for the ok button click, which allows you to invoke a function once you click ok: Custom Alert 2 This will invoke doStuff with the value from the prompt.
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/a/29150390
type: Answer
answers question: http://stackoverflow.com/q/29150323
score: 0
has body: I assume you're referring to event handlers? If so, then depending on how they're added, you may not need to pass this. If they're added in the markup, like so... Click me In this case, you can pass an event which contains a target property that will be your . If they're added via JavaScript, like so... var button = document.getElementById('myButton'); button.onclick = function() { /* ... */ }; In this case, this will already refer to the button within the scope of your function, so you don't need to pass it. Of course, in this example, you can also access the button variable too (since it's within your function's scope).

http://stackoverflow.com/a/29119006
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29118926
has comment: http://stackoverflow.com/comment/46466457
answers question: http://stackoverflow.com/q/29118926
type: Answer
has comment: http://stackoverflow.com/comment/46466527
has comment: http://stackoverflow.com/comment/46466042
downvote count: 0
has body: The problem is likely that you're not defining any height on your child element, forcing the chart to revert to its default values. The Highstock documentation states: height : Number An explicit height for the chart. By default the height is calculated from the offset height of the containing element, or 400 pixels if the containing element's height is 0. Simply add in a height and width of 100%: #overallAlerts { height: 100%; width: 100%; } Or, if you really insist on using inline-styling:
score: 2
has comment: http://stackoverflow.com/comment/46466090
has comment: http://stackoverflow.com/comment/46466439
upvote count: 2

http://stackoverflow.com/a/29186133
upvote count: 1
has body: What you need to consider, is a locking strategy for your data. Using Hibernate, by default you have no locking (a.k.a. Ostrich locking or "last save wins"). Roughly, the other two options are optimistic locking and pessimistic locking. Optimistic locking means that you do not prevent users editing data concurrently, but you will inform a user if his edit failed because the data was saved from elsewhere after it was loaded from the DB. Pessimistic locking means that you prevent multiple users for editing the data concurrently. This is a bit more complicated form of locking and is usually neither practical nor required. More info on implementing a locking strategy can be found from Hibernate documentation. Which strategy you should choose depends a lot on your application and whether many users are expected to frequently edit the same information.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29185892
score: 1

http://stackoverflow.com/comment/46505390
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29140817
has text: can you share the code for submitting the form so that we can know what you are doing ?
score: 0

http://stackoverflow.com/comment/46516543
has text: window.open(link, "MyTab"); is working for my project for all browsers even IE9,10,11, may be in jsfiddle it is because of CORS
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29145222

http://stackoverflow.com/comment/46609269
type: QuestionComment
comment on: http://stackoverflow.com/q/29198278
has text: instead of hard coding in week < 3, if you want to iterate only over the number of weeks entered it should be something like week < week, also change your counter variable to something else so its not confused with the variable you assign to the text input. for(i=1; i < week; i++) {...}
score: 0
type: Comment

http://stackoverflow.com/comment/46614366
type: Comment
comment on: http://stackoverflow.com/a/29200899
has text: dont put document.write in loop this will show you only last result.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46436487
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29102684
score: 0
has text: [Related](http://stackoverflow.com/q/86513/1169519).

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/29162609
type: Tag

http://stackoverflow.com/comment/46476503
score: 0
type: Comment
has text: spacer is just there to trigger the scroll ;) and the other 'edits' are to include jquery and bootstrap. That's it
type: QuestionComment
comment on: http://stackoverflow.com/q/29121876

http://stackoverflow.com/q/29175034
has comment: http://stackoverflow.com/comment/46567819
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46568089
has comment: http://stackoverflow.com/comment/46569252
tagged with: javascript
tagged with: jquery
has title: Jquery scroll, top offset for active class
favorite count: 0
has answer: http://stackoverflow.com/a/29176347
linked to: http://stackoverflow.com/q/14161132
has comment: http://stackoverflow.com/comment/46568986
upvote count: 2
tagged with: scroll
tagged with: offset
tagged with: css
accepted answer: http://stackoverflow.com/a/29176347
score: 2
type: AnsweredQuestion
has body: Can You help me please with a one thing I can't manage? I have used scrolling-nav.js for the top menu on my website - Interior, Exterior etc. http://lukaszradwan.com/www_architect/services.php Now I set the offset using this code $(window).scroll(function() { if ($(".navbar").offset().top &gt; 130) { $(".navbar-fixed-top").addClass("top-nav-collapse"); } else { $(".navbar-fixed-top").removeClass("top-nav-collapse"); } }); $(function() { $('a.page-scroll').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top - 130 }, 1500, 'easeInOutExpo'); event.preventDefault(); }); }); But when you click for example to Exterior, active class is not working exactly at this position. I tried to use method form another topic, but my "js" knowledge is poor. jquery scroll, change navigation active class as the page is scrolling, relative to sections Thanks in advance.
type: Question

http://stackoverflow.com/comment/46438774
score: 1
type: AnswerComment
has text: Try this: http://pastebin.com/9fWaHYzt , does this do what you'd like to see? scroll a bit...
type: Comment
comment on: http://stackoverflow.com/a/29099835

force-layout
tags question: http://stackoverflow.com/q/29160907
tags question: http://stackoverflow.com/q/29122193
tag name: force-layout
type: Tag

http://stackoverflow.com/a/29191983
type: Answer
answers question: http://stackoverflow.com/q/29191852
has comment: http://stackoverflow.com/comment/46597965
upvote count: 1
has body: I'd comment, but I can't. Can you post some samples of your code? What I got is that you are using JavaScript (jQuery) to POST (form data?) over to a PHP file. If you want to use jQuery inside of a .js file, all you have to do is include the jQuery library before you include your .js file, like so: &lt;script src="jquery.js"&gt;&lt;/script&gt; &lt;script src="myExternalScript.js"&gt;&lt;/script&gt; And then, inside of myExternalScript.js, you can use jQuery methods. The external script is aware of your DOM elements, really, just like inline JavaScript would be, so you can still do whatever you want with your form or wherever you are getting the data to POST from. EDIT: (in accordance to what you commented on this answer) EDIT 2: I had forgotten to add the request header for POST If you want to send an AJAX POST request (notice that I set the Content-Type request header, so that the data gets sent correctly): var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST","http://zegita.tk/stargazer/magic.php", true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("n="+user); If you want to send an AJAX GET request: var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET","http://zegita.tk/stargazer/magic.php?n="+user, true); xmlhttp.send(); It is important that you use the correct method, depending on whether you are using $_GET or $_POST in your magic.php file.
has comment: http://stackoverflow.com/comment/46598260
has comment: http://stackoverflow.com/comment/46597869
downvote count: 0
score: 1

http://stackoverflow.com/comment/46565193
type: AnswerComment
type: Comment
has text: Yes, that's correct. After they have selected a "scale" option, they can then adjust the cropper(with locked ratio), and click "Render", when they are done. The current implementation will render the cropped image to the right of the cropper area. It can then be removed if desired. However, I'm trying to be able to `POST` the rendered image to a server as a blob. Does that make more sense?
comment on: http://stackoverflow.com/a/29154834
score: 0

http://stackoverflow.com/q/29131250
score: 4
linked to: http://stackoverflow.com/q/16792841
has answer: http://stackoverflow.com/a/29310720
tagged with: google-maps-api-3
answer count: 3
has body: I'm currently building a Phonegap app along with Google's Map JS API. I have a map that you can drag to select your dropoff location. This is accomplished by collecting the map's center geolocation on the "dragend" event. I then set a pin on top of the map (outside of the JS map) so that you know where the center point is. Everything works fine until you pinch to zoom and the pin is then displaced. This is due to you zooming and dragging the map at the same time when pinching the screen. Is there any way to prevent dragging on zoom in order to hold the map at its center point? Please view the JSfiddle here. var map; google.maps.event.addDomListener(window, 'load', onMapReady); function onMapReady() { var center = new google.maps.LatLng(30.267153, -97.743061); var mapOptions = { center: center, zoom: 13, styles: [{"featureType": "poi", "stylers": [{ "visibility": "off" }]},{"featureType": "transit","stylers": [{ "visibility": "off" }]}], disableDefaultUI: true, }; map = new google.maps.Map(document.getElementById('map'), mapOptions); google.maps.event.addListener(map, 'dragend', function() { center = map.getCenter(); $('#log').html('Lat: ' + center.lat() + ' Lng: ' + center.lng()); }); }
has answer: http://stackoverflow.com/a/29300165
has comment: http://stackoverflow.com/comment/46679084
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11183174
has answer: http://stackoverflow.com/a/29219947
has comment: http://stackoverflow.com/comment/46736911
linked to: http://stackoverflow.com/q/16168369
has comment: http://stackoverflow.com/comment/46681350
has comment: http://stackoverflow.com/comment/46678634
downvote count: 1
has title: Google Maps JS: pinch to zoom Google Maps without moving marker (ie. Uber & Lyft)
linked to: http://stackoverflow.com/q/8509799
type: Question
tagged with: google-maps
upvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/53319135
type: AnswerComment
comment on: http://stackoverflow.com/a/29326440
score: 0
type: Comment
has text: @Sm00rf9000 I am aslo facing same issue, can you kindly guide what you did to solve it.

http://stackoverflow.com/a/29078548
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46714784
answers question: http://stackoverflow.com/q/29078461
accepted answer of: http://stackoverflow.com/q/29078461
type: AcceptedAnswer
downvote count: 0
has body: String script = String.format(" $('.items-container').scrollTo($('li#%s'))",currentId); Run your script with this line add the css or xpath that you need
type: Answer

http://stackoverflow.com/q/29177966
type: Question
has comment: http://stackoverflow.com/comment/46646931
score: 3
tagged with: events
has comment: http://stackoverflow.com/comment/46646854
favorite count: 0
tagged with: google-api
tagged with: google-calendar-api
has title: Google Calendar API - Request URL 404 Not Found
has body: I am trying to get events from my calendar by using the Google API: <?= _("Google Calendar Events"); ?> <?= _("Events"); ?> googleCalendar.js: $(document).ready(function() { var clientId = '{my_client_id}'; var apiKey = '{my_api_key}'; var scopes = 'https://www.googleapis.com/auth/calendar'; $("#authorize-button").click(function(){ handleClientLoad(); }); function handleClientLoad() { gapi.client.setApiKey(apiKey); window.setTimeout(checkAuth,1); checkAuth(); } function checkAuth() { gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: true}, handleAuthResult); } function handleAuthResult(authResult) { var authorizeButton = document.getElementById('authorize-button'); if (authResult) { //authorizeButton.style.visibility = 'hidden'; makeApiCall(); } else { authorizeButton.style.visibility = ''; authorizeButton.onclick = handleAuthClick; } } function handleAuthClick(event) { gapi.auth.authorize( {client_id: clientId, scope: scopes, immediate: false}, handleAuthResult ); return false; } function makeApiCall() { gapi.client.load('calendar', 'v3', function() { var request = gapi.client.calendar.events.list({ 'calendarId': 'primary' }); request.execute(function(resp) { console.log(resp); for (var i = 0; i < resp.items.length; i++) { var li = document.createElement('li'); li.appendChild(document.createTextNode(resp.items[i].summary)); document.getElementById('events').appendChild(li); } }); }); } }); When I click the button in order to get my events I get nothing. Then I inspect my page and I get this: Request URL: https://content.googleapis.com/calendar/v3/calendars/primary/events?key={my_api_key} Status Code: 404 Not found Pasting that URL in my browser I get this: { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } } Why do I get a 404 not found and I don't get the list of events from my calendar?
has comment: http://stackoverflow.com/comment/46596489
upvote count: 3
has comment: http://stackoverflow.com/comment/46616076
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46597020

http://stackoverflow.com/a/29090684
has body: Angular looks for the # symbol to handle routing. Everything after the # symbol is interpreted by the routing function. No # symbol, no angular route. If you can run in Html5 mode, then you can turn this off, but to work with older browsers, it is needed.
answers question: http://stackoverflow.com/q/29088017
type: Answer
score: 0

http://stackoverflow.com/q/29140216
has comment: http://stackoverflow.com/comment/46510972
linked to: http://stackoverflow.com/q/11605917
has body: From Documentation The syntax InvoiceController as invoice tells Angular to instantiate the controller and save it in the variable invoice in the current scope. We also changed all expressions in the page to read and write variables within that controller instance by prefixing them with invoice. AngularJS Plunker Hello {{invoice.name}}! JS var app = angular.module('plunker', []); app.controller('InvoiceController', function() { this.name = 'World'; }); But it is not working as mentioned in the document. I just moved the inline scripts to external file. PLUNKER DEMO Also why it is not working if i pass $scope to the controller function app.controller('InvoiceController', function($scope) { $scope.name = 'World'; });
upvote count: 1
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29140309
downvote count: 0
score: 1
has title: Controller with scope variable not working
favorite count: 0
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/46587072
has text: @FelixKling how do I display code inside of the comments here?
comment on: http://stackoverflow.com/a/29185387
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29147510
has comment: http://stackoverflow.com/comment/46519427
type: Question
has answer: http://stackoverflow.com/a/29272161
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/46671134
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29243430
has comment: http://stackoverflow.com/comment/46629521
has answer: http://stackoverflow.com/a/29337396
score: 0
has body: I am creating slider as below $("#slider1V").slider({orientation : "vertical",min : 0,max : 100}); i am applying css #slider1V { -ms-transform: rotate(90deg); /* IE 9 */ -webkit-transform: rotate(90deg); /* Safari */ transform: rotate(90deg); } after applying css the slider does not slide properly Its very hard to drag the handle The internal dragger does not get transformed how can i make it smooth please anyone can help me out JSFIDDLE link
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46629497
answer count: 4
has title: Rotating jquery UI slider does not work properly
upvote count: 3
has answer: http://stackoverflow.com/a/29210022
downvote count: 3

http://stackoverflow.com/comment/46412853
comment on: http://stackoverflow.com/q/29090146
score: 0
type: Comment
type: QuestionComment
has text: @CBroe I changed it to `fadingFunc = window.setInterval(function(uurID) {fadeBlink(uurID)}, 2000);`, but now it doesn't work at all :(

http://stackoverflow.com/comment/46613040
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29199621
has text: What problems are you having?

http://stackoverflow.com/comment/46594715
type: Comment
has text: Well, a form doesn't have a value. Form control elements (`input`, `textarea`, etc) do. `("#friendadd").val()` should actually return `undefined`.
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29190020

http://stackoverflow.com/q/29199802
type: Question
tagged with: javascript
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: generics
has body: Can somebody explain why the following isn't allowed in Typescript? interface Base&lt;T&gt; { } interface SomeInterface&lt;First, Second extends Base&lt;First&gt;&gt; { } For some reason I do not understand, it is not possible to refer to type First in Base&lt;First&gt;. The error is: Constraint of type parameter cannot reference any type parameter from the same parameter list.
favorite count: 0
type: UnansweredQuestion
has title: typescript - generics - reference to parameter from same parameter list
has comment: http://stackoverflow.com/comment/46642328
has answer: http://stackoverflow.com/a/29199881
tagged with: typescript

http://stackoverflow.com/a/38742940
score: 3
has body: You can write new method to 'Date.prototype', and use it to get date which will be including the local timezone offset. //return the date with depend of Local Time Zone Date.prototype.getUTCLocalDate = function () { var target = new Date(this.valueOf()); var offset = target.getTimezoneOffset(); var Y = target.getUTCFullYear(); var M = target.getUTCMonth(); var D = target.getUTCDate(); var h = target.getUTCHours(); var m = target.getUTCMinutes(); var s = target.getUTCSeconds(); return new Date(Date.UTC(Y, M, D, h, m + offset, s)); };
downvote count: 0
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/29174810

http://stackoverflow.com/comment/46858562
type: Comment
type: AnswerComment
has text: fiddle2 is close but I'm trying to figure out how to prevent the alert with both the yellow wrapper as well as its children links.
score: 0
comment on: http://stackoverflow.com/a/29083195

http://stackoverflow.com/a/29144606
score: 1
answers question: http://stackoverflow.com/q/29144551
downvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46515553
upvote count: 3
has comment: http://stackoverflow.com/comment/46537134
has comment: http://stackoverflow.com/comment/46515514
type: AcceptedAnswer
has body: Javascript equivalent of Ruby to_i parseInt(). Follow this for more details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt Converting following code from Ruby to JavaScript: (Time.now.to_s.split(/:\d{2}/)[0] + ":00:00").to_time.to_i # =&gt; 1426788000 # Time.now # =&gt; 2015-03-19 18:45:22 +0530 JS equivalent: d = new Date(); new Date( d.toString().split(/:\d{2}/)[0] + ":00:00").getTime(); # 1426788000
accepted answer of: http://stackoverflow.com/q/29144551

http://stackoverflow.com/comment/46491842
has text: When I do that the `$result` variable remains undefined.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29132871
type: AnswerComment

http://stackoverflow.com/a/29133207
score: 0
has body: Not an answer, just a long comment: Here are some good posts for getting the basics of AJAX: A simple example More complicated example Populate dropdown 2 based on selection in dropdown 1
answers question: http://stackoverflow.com/q/29132531
type: Answer
has comment: http://stackoverflow.com/comment/46492302

http://stackoverflow.com/a/29087488
type: Answer
accepted answer of: http://stackoverflow.com/q/29087318
has body: Serving files, such as images, CSS, JavaScript and other static files is accomplished with the help of a built-in middleware in Express - express.static. Pass the name of the directory, which is to be marked as the location of static assets, to the express.static middleware to start serving the files directly. For example, if you keep your images, CSS, and JavaScript files in a directory named public, you can do this: app.use(express.static('public')); Now, you will be able to load the files under the public directory: http://localhost:3000/images/kitten.jpg http://localhost:3000/css/style.css http://localhost:3000/js/app.js http://localhost:3000/images/bg.png http://localhost:3000/hello.html More Detail Here Happy Helping!
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29087318

http://stackoverflow.com/q/29098263
accepted answer: http://stackoverflow.com/a/29100871
has comment: http://stackoverflow.com/comment/46426821
tagged with: jquery
has comment: http://stackoverflow.com/comment/46426890
possible better answer: http://stackoverflow.com/a/29098474
has comment: http://stackoverflow.com/comment/46426818
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29098474
score: 0
has body: i am having some serious issue with jquery mobile am build a learning reponse system.Now i want to dynamically populate the question page each time there is a question to be answered. so far i have been able to do all that but currently my radio button are refusing to follow the normal jquery order when i call them dynamically. When i call the dynamically the design disrupts but when i hard code it i get exactly what am expecting. the image below is an example of wat am trying to explain. the upper distorted radio buttons are the dynamic ones the lower 2 are the hard coded ones. this is the code i used: var possibleAnswers=poss_ans.split(",");//poss_ans is string containing all the answer from the database for (var i =0; i < possibleAnswers.length; i++) { var label = sp[i]; $radio = $(' ', { type: "radio" }); var $label = $(' ', { text: label}); var wrapper = $(' '); wrapper.append($label).append($radio);; $('div#poss_ans').append(wrapper); } Please this is my html am sorry but am not realy good with the fiddle thats why i didnt post there. H1 Heading The question 6 4 8 2 Any help or contribution at all would grateful.Thanks
has answer: http://stackoverflow.com/a/29100871
type: Question
has comment: http://stackoverflow.com/comment/46427872
tagged with: jquery-mobile
tagged with: javascript
has title: Add radio buttons dynamically
answer count: 2

http://stackoverflow.com/q/29129481
has answer: http://stackoverflow.com/a/29129575
tagged with: getelementbyid
has body: I am eliminating all jQuery from my JavaScript (this was suggested to maximize speed) and have one final problem. The goal is to run the loadData function on submit. when running my script this works: $('#form-container').submit(loadData); but this doesn't: clickContainer = document.getElementById('form-container'); clickContainer.addEventListener('submit', loadData()); How do I run my loadData function with the submitted info in vanilla JS? Full code @ https://github.com/ChaMbuna/Marvel-Map Thank you!
type: AnsweredQuestion
tagged with: form-submit
type: Question
upvote count: 1
accepted answer: http://stackoverflow.com/a/29129575
has comment: http://stackoverflow.com/comment/46484787
downvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
has title: Why does a form .submit() work when using jQuery but not when using vanilla JS?

http://stackoverflow.com/comment/46619120
score: 0
type: Comment
type: QuestionComment
has text: Updated the jsfiddle using the angular pub/sub mechanism. https://jsfiddle.net/bmun0mkx/1/
comment on: http://stackoverflow.com/q/29200943

http://stackoverflow.com/q/29169111
has body: I have been struggling with this for a couple of days now and though I would ask help from the internet. I would like to create a sub-menu which appears when i hover over the link. This part of it works to a fashion, but when the links appear on the webpage, they are completely unformatted. Any help or advice would I would be extremely grateful for. Here is the Fiddle Thanks in advance. HTML code home venue address venue background instructors wakeboarding background future up-coming events professional amateur prices prices special offers contact us CSS code body nav > ul > li { list-style-type: none; position: intial; top: 110px; //right: -200px; display: inline; } body nav > ul .hidden { opacity: 1; position: relative; } body nav > ul > li:hover >.hidden { visibility: visible; display:block; position:absolute; top:10x; } body nav ul li { display: inline; padding: 80px; font-family: Geneva,Tahoma,Verdana,sans-serif; font-size: 24px; }
tagged with: javascript
has answer: http://stackoverflow.com/a/29169601
score: 0
answer count: 1
has title: Trying to create sub menu using HTML5 and CSS
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29169601
type: Question

http://stackoverflow.com/q/29159478
has answer: http://stackoverflow.com/a/29159507
has comment: http://stackoverflow.com/comment/46539157
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46548250
downvote count: 1
has answer: http://stackoverflow.com/a/29159542
type: Question
has comment: http://stackoverflow.com/comment/46539507
has title: Unable to access JSON arrary
accepted answer: http://stackoverflow.com/a/29159507
tagged with: javascript
score: -1
upvote count: 0
tagged with: arrays
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29159509
has answer: http://stackoverflow.com/a/29159518
has answer: http://stackoverflow.com/a/29159509
has body: I got json array from backend as below.I could not able to access JSON arrary var res = '[100, 200]'; When I try to access by using alert(res[0]); I am getting the first character '['. I suppose to get '100'. Could any one tell what could be the issue? UPDATE :- It is working fine if the array has number. It is giving an error if the array has alpanumric character. var res = '[/csv/8_copy 2.csv, /csv/9_copy 2.csv]'; alert(JSON.parse(res)[0]);

http://stackoverflow.com/q/29147470
answer count: 1
linked to: http://stackoverflow.com/q/8752518
favorite count: 0
linked to: http://stackoverflow.com/q/21929851
has comment: http://stackoverflow.com/comment/68015576
upvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/68018435
linked to: http://stackoverflow.com/q/12417009
downvote count: 0
has body: I've already researched a lot about google pie charts and hidden slice labels but didn't find anything with the labels outside the slices, so I'm hoping there is another solution than already suggested on SO. I generate a lot of different chart types and for better readability I customize pie (doghnut) charts so they show their labels outside the slices, connected with lines. Now as seen in other questions google charts will just hide the slice label if there is no room for it or if the value is too small, which is unacceptable for me and why I wanted to show them outside where there should be enough room. Still google charts dislikes "minor" data values and just doesn't show their label(s), even with sliceVisibilityThreshold set to 0, is there any other solution with the following setup in mind? (You should see that the label "Far" for the violet slice is not rendered) var chartData = { "options": { "legend": { "position": "none" }, "pieHole": 0.5 }, "data": [ [ "Label 1", "Label 2" ], [ "Foo", 33059 ], [ "Bar", 57893 ], [ "Baz", 8135 ], [ "Boo", 12211 ], [ "Far", 3740 ], [ "Faz", 7219 ] ] }, ctx = document.getElementById('canvas'); var onLoadGoogle = function() { var data = new google.visualization.arrayToDataTable(chartData.data); var chart = new google.visualization['PieChart'](ctx); var options = chartData.options; options.legend.position = 'labeled'; options.pieSliceText = 'none'; options.sliceVisibilityThreshold = 0; chart.draw(data, chartData.options); } window.google.load("visualization", "1.1", { packages: ["corechart"], callback: onLoadGoogle, nocss: true }); #canvas { width: 600px; height: 300px; } &lt;div id="canvas"&gt;&lt;/div&gt; &lt;script src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
type: Question
tagged with: charts
score: 5
tagged with: google-visualization
has comment: http://stackoverflow.com/comment/68029445
has answer: http://stackoverflow.com/a/29214010
tagged with: javascript
has title: Google pie chart force rendering of "minor" labels outside the pie

http://stackoverflow.com/q/29068640
score: 0
answer count: 1
tagged with: javascript
has title: Trigger Joomla login process using JavaScript
has body: My understanding to Joomla login is as follows: When the user click login, the following snippet will run (components/com_users/views/login/tmpl/default_login.php): <form action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>"method="post"> <?php foreach ($this->form->getFieldset('credentials') as $field): ?> <?php if (!$field->hidden): ?> <?php echo $field->label; ?> <?php echo $field->input; ?> <?php endif; ?> <?php endforeach; ?> <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?> <?php echo JText::_('JGLOBAL_REMEMBER_ME') ?> <input id="remember" type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" /> <?php endif; ?> <?php echo JText::_('JLOGIN'); ?> <input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" /> <?php echo JHtml::_('form.token'); ?> In which, login() function is called from ( \components\com_users\controllers\user.php) public function login() { JSession::checkToken('post') or jexit(JText::_('JInvalid_Token')); $app = JFactory::getApplication(); // Populate the data array: $data = array(); $data['return'] = base64_decode(JRequest::getVar('return', '', 'POST', 'BASE64')); $data['username'] = JRequest::getVar('username', '', 'method', 'username'); $data['password'] = JRequest::getString('password', '', 'post', JREQUEST_ALLOWRAW); $lang = JRequest::getVar('lang','post'); // Set the return URL if empty. if (empty($data['return'])) { $data['return'] = 'index.php?option=com_users&view=profile'; }else { if($lang){ $lang = mb_substr($lang, 0, 2); $data['return'] .= '&lang='.$lang; } } // Set the return URL in the user state to allow modification by plugins $app->setUserState('users.login.form.return', $data['return']); // Get the log in options. $options = array(); $options['remember'] = JRequest::getBool('remember', false); $options['return'] = $data['return']; // Get the log…
has answer: http://stackoverflow.com/a/32338004
tagged with: php
tagged with: joomla
type: UnansweredQuestion
tagged with: authentication
type: Question

http://stackoverflow.com/comment/49410617
has text: Thank you @robdodson ! I've solved it by saving user id in app-globals. Not so elegantly but it works))
comment on: http://stackoverflow.com/a/29128051
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29108664
type: Answer
has body: As you say: I can't know in advance the sequence of events triggered by the user. So I need to find a way to chain the response handlers "on the fly". The right way to go about this is definitely to use deferred objects / promises and NOT set the async parameter to false, which can cause a lot of unwanted problems. Read the canonical introduction on how to do it here. EDIT: An example of synchronizing parallel tasks with $.when(), taken from here: var promiseOne, promiseTwo, handleSuccess, handleFailure; // Promises promiseOne = $.ajax({ url: '../test.html' }); promiseTwo = $.ajax({ url: '../test.html' }); // Success callbacks // .done() will only run if the promise is successfully resolved promiseOne.done(function () { console.log('PromiseOne Done'); }); promiseTwo.done(function () { console.log('PromiseTwo Done'); }); // $.when() creates a new promise which will be: // resolved if both promises inside are resolved // rejected if one of the promises fails $.when( promiseOne, promiseTwo ) .done(function () { console.log('promiseOne and promiseTwo are done'); }) .fail(function () { console.log('One of our promises failed'); });
answers question: http://stackoverflow.com/q/29108436
score: 0
has comment: http://stackoverflow.com/comment/46447362

http://stackoverflow.com/comment/46513160
type: QuestionComment
type: Comment
has text: In `$scope.list` are you sure you have 2 different item types? `id` and `listId`
score: 0
comment on: http://stackoverflow.com/q/29145080

http://stackoverflow.com/q/29197220
has comment: http://stackoverflow.com/comment/46607160
has comment: http://stackoverflow.com/comment/46607124
upvote count: 1
has answer: http://stackoverflow.com/a/29199355
tagged with: http://stackoverflow.com/tag/html
has body: I'm creating a website, and I have a form that gets created by Django. Once the page is loaded, the user can add text inputs to the form by clicking a button. The problem is that when the submit button is clicked, only the text inputs that were originally created by Django get submitted. In other words, the extra text inputs that were added dynamically don't get submitted. I'm guessing that this is due to the fact that the submit button is only "aware" of form elements that were present when the page was loaded, and not dynamically loaded elements. With that in mind, I'm guessing I need to use some kind of Javascript in order to submit all of the form elements, including the dynamically added ones, but I can't figure out how to do it. I've tried the jQuery submit function, but I don't really know what I'm supposed to do with it. Any tips would be appreciated! EDIT: Here's a code snippet, which shows what the HTML looks like after 2 more text inputs have been added dynamically to the "origin" Origin: // PRESENT AT PAGE LOAD + // USER CLICKS THIS TO APPEND MORE TEXT INPUTS TO THE FORM // DYNAMICALLY ADDED // DYNAMICALLY ADDED Notes:
answer count: 1
has comment: http://stackoverflow.com/comment/46607173
has comment: http://stackoverflow.com/comment/46607252
favorite count: 0
has comment: http://stackoverflow.com/comment/46610291
has comment: http://stackoverflow.com/comment/46609740
has comment: http://stackoverflow.com/comment/46610298
has title: Submitting a dynamically generated form
has comment: http://stackoverflow.com/comment/46610373
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46607166
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46610780
has comment: http://stackoverflow.com/comment/46607393
type: Question
has comment: http://stackoverflow.com/comment/46609777
has comment: http://stackoverflow.com/comment/46610345
has comment: http://stackoverflow.com/comment/46610635
has comment: http://stackoverflow.com/comment/46610678
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46630106
type: QuestionComment
has text: Related Question: http://stackoverflow.com/questions/10269513/date-constructor-numeric-arguments-vs-string-argument-giving-different-dates-i
comment on: http://stackoverflow.com/q/29210048
score: 0
type: Comment

http://stackoverflow.com/comment/46606822
comment on: http://stackoverflow.com/q/29195885
score: 0
type: QuestionComment
has text: @majidarif yes thanks I know but as I'm a rookie and learning, the time I'd need to make structural changes would be high for me. I'd rather ask here which direction to take even if I have after to change it
type: Comment

http://stackoverflow.com/comment/46574243
type: QuestionComment
comment on: http://stackoverflow.com/q/29178474
score: 0
has text: Oh, hypothetically if i were to get another item in the collection how would i do that? I've been trying so many methods but having luck with none :/
type: Comment

http://stackoverflow.com/a/29136215
has comment: http://stackoverflow.com/comment/46497815
upvote count: 1
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29136072
downvote count: 0
has comment: http://stackoverflow.com/comment/46497429
has body: function isValid(str){ return /[a-z]{3}[0-9]{3}/i.test(str) }
accepted answer of: http://stackoverflow.com/q/29136072
type: Answer
has comment: http://stackoverflow.com/comment/46497460

http://stackoverflow.com/a/29114560
has body: Working example based on the other answers. function Interval(fn, speed) { this.fn = fn; this.speed = speed; this.nt = setInterval(fn, speed); this.pause = function () { clearInterval(this.nt); } this.start = function () { this.nt = setInterval(this.fn, this.speed); return this.nt; } this.wait = function (time) { this.pause(); setTimeout(function () { this.start(); }.bind(this), time); } } var i = 0; var nt = new Interval(function () { document.write(' Itineration: ' + i + ' '); i++; nt.wait(2000); }, 500);
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29114403

http://stackoverflow.com/comment/46587480
has text: problem solved with your approach. Thank you so much
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29184480

http://stackoverflow.com/q/29209006
has comment: http://stackoverflow.com/comment/46658489
has answer: http://stackoverflow.com/a/29209921
has answer: http://stackoverflow.com/a/29209883
has comment: http://stackoverflow.com/comment/46629717
upvote count: 2
has title: HTML form entries to Html Page using JavaScript only and Not using PHP?
downvote count: 1
type: Question
score: 1
tagged with: forms
linked to: http://stackoverflow.com/q/979975
answer count: 3
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/46629855
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29209608
type: UnansweredQuestion
has body: Hi i am new to this subject and I have a HTML form and I need to display the form field values in another page after user clicks the submit button. How can I do this using HTML and JavaScript only using "GET" or "POST" methods? I know How to do this using PHP So plz help me to solve the problem without using PHP
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46433948
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29099642
has text: this works when it its just a word or a image but not when I have to use javascript. $('#d300_600_z2_placeholder').prepend(' ')
type: AnswerComment

http://stackoverflow.com/q/29098425
type: AnsweredQuestion
has title: JavaScript rotation is wrong after translating
has comment: http://stackoverflow.com/comment/46427429
type: Question
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/29139672
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has body: I'm using Velocity.js for animation. I'm first translating and rotating an object. After the animation is complete I need to rotate the object by an additional 360 degrees. The problem is that during the second animation the rotation axis is off. Instead of rotating around the center the object rotates around its original point. $.Velocity( obj, "stop" ); $.Velocity( obj, {translateX: pos, rotateZ: rotation + 'deg'}, {duration: 1000, complete: function() { $.Velocity( obj, {rotateZ: "360deg"}, {duration: 1000} ); } }); What may be the problem? UPDATE Codepen that demonstrates the issue: http://codepen.io/anon/pen/MYZaaj
has comment: http://stackoverflow.com/comment/46427395
tagged with: velocity.js
possible better answer: http://stackoverflow.com/a/29109467
has answer: http://stackoverflow.com/a/29139672
has answer: http://stackoverflow.com/a/29109467
has comment: http://stackoverflow.com/comment/46427493

http://stackoverflow.com/q/29172894
has comment: http://stackoverflow.com/comment/46563882
has body: Is there any code to only allow letters in a HTML textbox I have looked everywhere but nothing, I want to only allow LETTERS not 1,2,3,4,5... so on only a,b,c,d,e... you know how it goes, any ideas how to do this? Obviously allow capital letters to, basically just letters that make words, not numbers, and that it also blocks special characters like $%£^£
type: Question
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46564216
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29172971
upvote count: 0
has title: Javascript only allow letters in a input
has comment: http://stackoverflow.com/comment/46564069

http://stackoverflow.com/a/29388019
has comment: http://stackoverflow.com/comment/46968764
has comment: http://stackoverflow.com/comment/46953983
has comment: http://stackoverflow.com/comment/46970904
has comment: http://stackoverflow.com/comment/46953952
downvote count: 0
has body: Here's a fun solution no one has mentioned. Facts: You cannot modify the HTML of the page at all - no problem! You can modify the CSS files, but the developers may modify them again later and remove any changes you made - not a worry. You cannot/do not want to use Javascript and JQuery - fine by me. You can add more files on to the server - Excellent! Let's do some .htacess hacking for fun and profit! Document root .htaccess file: Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*?)css3.css(.*?) $1hackedCSS3.php$2 [L] Result: hackedCSS3.php is silently served instead of css3.css on every request. REF: http://httpd.apache.org/docs/2.2/howto/htaccess.html hackedCSS3.php file: &lt;?php // Send the right header information! header("Content-type: text/css; charset: UTF-8"); // Output the css3.css file echo file_get_contents("css3.css"); ?&gt; // Add your CSS here with any neat !important or override tricks (read: specificity) div { ... } Bonus: You could expand this solution to include all three .css files in this one .php file (but only serve, say, css3.css and send the css1.css and css2.css to a black hole with .htaccess), and use clever regular expressions to remove/modify those developer's CSS without touching any of their files. The possibilities are tantalizing. Addendum: Can you be a bit more specific on where to include these files? The .htaccess file should be in the document root directory of the website. This is where www.example.com/index.html would load index.html Should the hackedCSS3.php file be in the same directory as the other css files? It can be in any directory you specify in the .htaccess file. The document root is fine. Change RewriteRule ^(.*?)css3.css(.*?) $1hackedCSS3.php$2 [L] to RewriteRule ^(.*?)css3.css(.*?) /folders/you/want/hackedCSS3.php$2 [L] Should our css content (where you specified // Add your CSS here...) should be within html style tags? No. Treat your CSS code in that section as if it were a .css file. You do …
has comment: http://stackoverflow.com/comment/46990044
has comment: http://stackoverflow.com/comment/46960017
has comment: http://stackoverflow.com/comment/46991818
has comment: http://stackoverflow.com/comment/46968234
type: Answer
has comment: http://stackoverflow.com/comment/46966027
has comment: http://stackoverflow.com/comment/47440672
has comment: http://stackoverflow.com/comment/47764802
has comment: http://stackoverflow.com/comment/47023199
upvote count: 7
answers question: http://stackoverflow.com/q/29206832
score: 7

http://stackoverflow.com/q/29124114
type: Question
score: 0
answer count: 2
has title: Testing FileReader with Jasmine and Angular
has answer: http://stackoverflow.com/a/29125548
possible better answer: http://stackoverflow.com/a/44555301
has answer: http://stackoverflow.com/a/44555301
tagged with: javascript
type: AnsweredQuestion
tagged with: jasmine
has body: I've a very simple directive based on the example here: https://veamospues.wordpress.com/2014/01/27/reading-files-with-angularjs/ But I'm struggling with getting the directive tested correctly with Jasmine as I cannot seem to get the events to be triggered as I expected. My directive: var fileReaderModule = angular.module('fileReaderModule', []); fileReaderModule.controller('fileReaderCtrl', [ '$scope', function($scope) { $scope.setContent = function($fileContent) { $scope.content = $fileContent; console.log($fileContent); }; $scope.getContent = function() { console.info("content:", $scope.content); return $scope.content; }; } ]); fileReaderModule.directive('onReadFile', function($parse) { return { restrict : 'A', scope : false, link : function(scope, element, attrs) { var fn = $parse(attrs.onReadFile); element.on('change', function(onChangeEvent) { var reader = new FileReader(); reader.addEventListener("load", function(onLoadEvent) { scope.$apply(function() { fn(scope, { $fileContent : onLoadEvent.target.result }); }); }, false); reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]); }); } }; }); My test spec: describe("Test suite for the fileReaderModule angular module", function() { var scope, rootScope, compile, fileReaderController, element, eventListener, windowMock; beforeEach(function() { module('fileReaderModule'); inject(function($rootScope, $compile, $controller, $window) { rootScope = $rootScope; scope = $rootScope.$new(); compile = $compile; windowMock = $window; $fileReaderController = $controller('fileReaderCtrl', { '$scope' : scope }); }); }); describe("Tests focused on the fileReaderCtrl controller", function() { it("should set the file contents correctly", function() { scope.setContent('1'); expect(scope.content).toEqual('1'); }) it("should get the file contents correctly", function() { scope.content = 'test'; expect(scope.getContent()).toEqual('test'); }) it("should set and then get the file contents correctly", function()…
accepted answer: http://stackoverflow.com/a/29125548
tagged with: angularjs

http://stackoverflow.com/q/29076597
tagged with: javascript
has title: Remove tr in table by ajax call
score: 0
answer count: 1
has body: I have i probléme in removing tr in a table, I Need to fill a table by ajax, i create tr with id and i call a function that call ajax to retrieve tds tags. i have two case when response equal 0 and when response is différente to 0. My script : And this is my loop to fill the table Name Lastname <?php $queryresult = mysql_query("SELECT id,name,lastname FROM tbl"); while ($data = mysql_fetch_object($queryresult)) { $id = $data->id; $name = $data->name; $lastname = $data->lastname; ?> <tr id="<?php echo $id; ?>" > <?php } ?> The probleme is here in script : $(this).closest('tr').remove(); When i want remove the tr with response : 0 it don't work
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46391613
tagged with: php
has comment: http://stackoverflow.com/comment/46387029
has answer: http://stackoverflow.com/a/29076799
has comment: http://stackoverflow.com/comment/46387020
type: Question

http://stackoverflow.com/comment/46612570
type: AnswerComment
comment on: http://stackoverflow.com/a/29192614
score: 0
type: Comment
has text: Java is to Javascript as Car is to Carpet.

http://stackoverflow.com/a/29146946
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46516419
type: Answer
has body: Try $emit-$on(publish-subscribe) mechanism. app.controller('tableCtrl', ['$scope', function (scope) { scope.loadTable = function() { //some code }; $rootScope.$on('load-table', function (event, arg1, arg2) { // now trigger the method. scope.loadTable(); }); }); app.controller('secondCtrl', ['$scope', function (scope) { scope.buttonClick = function() { //call loadTable from tableCtrl //emit the event $rootScope.$emit('load-table', 'arg1', 'arg2'); }; });
upvote count: 3
answers question: http://stackoverflow.com/q/29146877
score: 3
accepted answer of: http://stackoverflow.com/q/29146877

http://stackoverflow.com/a/29102177
score: 1
has body: Because your do var myFunction = function(){} your function is not 'hoisted' to the top. So it is undefined when setting the $inject array. Change it to function myFunction(){} and you should be fine.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29102105
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29102105
type: Answer

http://stackoverflow.com/a/29105520
has comment: http://stackoverflow.com/comment/46441138
score: 1
answers question: http://stackoverflow.com/q/29105469
accepted answer of: http://stackoverflow.com/q/29105469
type: AcceptedAnswer
downvote count: 0
has body: You just need to nest your method calls: $(document).ready(function() { var element1 = ' A div within a div '; $("#div1").append( $(element1).append( $(element1).append(element1) ) ); }); div { border: 1px solid black; margin: 1px; } For deep nesting, take advantage of functions: function nestDeep(count) { var el = $(' A div within a div '); return count > 0 ? el.append(nestDeep(count - 1)) : el; } $(document).ready(function() { $("#div1").append(nestDeep(50)); }); div { margin: 1px; border: 1px black solid; } Of course, if you absolutely must have this method that you are describing, you can always add it yourself: (function ($) { $.fn.appendR = function(toAppend) { var $toAppend = $(toAppend); this.append($toAppend); return $toAppend; }; })(jQuery); $(document).ready(function() { var element1 = ' A div within a div '; var element2 = ' Another div within a div '; $("#div1").appendR(element1).appendR(element2); }); div { margin: 1px; border: 1px solid black; }
has comment: http://stackoverflow.com/comment/46441027
type: Answer
has comment: http://stackoverflow.com/comment/46441229
has comment: http://stackoverflow.com/comment/46441366
upvote count: 1

http://stackoverflow.com/comment/46464553
comment on: http://stackoverflow.com/a/29117847
has text: no, the each callback function gives you the current element, this does not mean, that you can add one. at least not with each() by itself.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29202668
score: -3
has answer: http://stackoverflow.com/a/29202824
tagged with: node.js
has comment: http://stackoverflow.com/comment/46617216
downvote count: 3
has comment: http://stackoverflow.com/comment/46617097
has title: how to pass var inside callback request
has comment: http://stackoverflow.com/comment/46617158
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46617369
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46617133
has body: i need to pass the var "surl", inside the callback request. I trying to do this, but the function start is called many times, and it changes surl value before the request gets done. function start(bd){ if(bd.length &gt; 0){ var zzz = bd.length-1; var sowner = bd[zzz].owner; var surl = bd[zzz].url; request({ url: 'https://myurlapi/'+bd[zzz].owner+bd[zzz].url, followRedirect: false }, function (error, response, body, surl) { console.log(surl); }); } } the surl var must to be passed exactly in the moment that the request is called, not when it is done.
has comment: http://stackoverflow.com/comment/46617115
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46556443
has text: Aha, please tell me more.
comment on: http://stackoverflow.com/a/29149784
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46575606
type: QuestionComment
has text: (Well, it could also be `array[index]`..)
comment on: http://stackoverflow.com/q/29179346
score: 1
type: Comment

http://stackoverflow.com/q/29093582
favorite count: 0
possible better answer: http://stackoverflow.com/a/29094519
has answer: http://stackoverflow.com/a/29094519
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29093591
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
downvote count: 2
has body: I'm trying to get the "formatted_address" value from this JSON file. I'm new to this and found the documentation quite confusing. The code I have now is the following where the variable "location" is the url generated like the one above. $.getJSON(location, function( data ){ stad = data.results.formatted_address; console.log(stad); }); How would I achieve this?
type: Question
accepted answer: http://stackoverflow.com/a/29093591
tagged with: javascript
score: 0
answer count: 2
has title: How to get the value from JSON in JS
tagged with: jquery

http://stackoverflow.com/a/34833377
upvote count: 12
downvote count: 0
has body: you can use it as follows: autosize.update($('textarea'));
type: Answer
answers question: http://stackoverflow.com/q/29156724
score: 12
has comment: http://stackoverflow.com/comment/68789242

http://stackoverflow.com/a/29074005
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46382249
has comment: http://stackoverflow.com/comment/46389319
has body: Use the range properties startContainer, endContainer and commonAncestorContainer to determine the selection containing elements. In the following example select the text "bbb" and press the button "press me". The commonAncestorContainer is span element as expected: $('#pressme').click(function(){ var rng = window.getSelection().getRangeAt(0); alert(rng.commonAncestorContainer.parentNode.tagName); }); #editor { width: 500px; height: 400px; padding: 4px; border: solid 1px gray; margin-bottom: 4px; } aaa bbb ccc Try to select various portions of text and see how it changes the result.
has comment: http://stackoverflow.com/comment/46382498
downvote count: 0
answers question: http://stackoverflow.com/q/29073612
type: Answer

http://stackoverflow.com/a/29118565
answers question: http://stackoverflow.com/q/29102973
has comment: http://stackoverflow.com/comment/46641554
upvote count: 2
type: AcceptedAnswer
has body: Remember that TideSDK uses an old version of webkit. I'm pretty sure you'll have to prefix your CSS3 rules (-webkit-). But also keep in mind that all the CSS3 rules cannot be used, but for now I haven't encounter major CSS3 issues. Just one thing is bothering me, it's the old developper console..
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29102973
downvote count: 0

http://stackoverflow.com/q/29201715
upvote count: 2
downvote count: 1
answer count: 1
favorite count: 0
has body: I have this function in my script: function DoThing (num){ //Do thing }); num refers to each item in a list I created earlier in the script. DoThing(1) will activate for the first item and so on. I'm working with a Jinja2 template for a multi-page website, and I want to put the function with a custom num argument in each template. In the first page, I would have DoThing(1). Second page would be DoThing(2). My goal is to add new items and have the template update as needed based on the length of my list. Is this possible?
type: AnsweredQuestion
has title: Templating a JavaScript function in Jinja
score: 1
tagged with: jinja2
has answer: http://stackoverflow.com/a/29201786
accepted answer: http://stackoverflow.com/a/29201786
type: Question
tagged with: javascript

http://stackoverflow.com/q/29195048
score: 0
has body: I provide a 3rd party JavaScript code, which updates the server with messages relating to events happening on the web page. The messages are queued until I reach a certain buffer size, and than flushed from the queue and sent through AJAX calls. When I detect a page unload I flush the remaining messages in the queue. My problem is that sometimes the server doesn't receive the last batch of messages which was queued on the client. This problem is definitely more common on mobile browsers, seems more common on Safari than on Chrome (not certain), this happens more frequently when unload is a result of a form submit. My guess is that at some arbitrary point the browser stops JavaScript execution regardless of pending queued events, and/or disregarding an executing stack. Since the messages are sent asynchronously, I assume that the sending stack was either never called, or stopped before the AJAX call was reached. This problem seems to be impersistent even when tested on the same machine and web application, which implies that the momentary processor load plays a role. My questions are: When is JavaScript execution stopped by browsers during unload? Is an executing stack guaranteed to run till completion during unload? If the browser indeed cuts execution arbitrarily, is there any way to postpone it? Are there any other means to insure all queued events get executed before the page is unloaded? Is there any way to query the status of the event queue?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29195184
has comment: http://stackoverflow.com/comment/46603246
has title: JavaScript event loop during page unload
tagged with: onunload
type: UnansweredQuestion
tagged with: mobile-browser
type: Question

http://stackoverflow.com/q/29210769
favorite count: 0
has body: I want to use the function push() directly in the array declaration, but its not working properly. In my example, my array return the value 2 : var j = ["b"].push("a"); document.write(j); // return 2 Why my array returns the value 2 instead of ["b", "a"] ?
possible better answer: http://stackoverflow.com/a/29210833
score: 2
type: AnsweredQuestion
has title: Why the push method doesn't work in this case : [].push
downvote count: 0
accepted answer: http://stackoverflow.com/a/29210807
type: Question
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29210807
tagged with: arrays
has answer: http://stackoverflow.com/a/29210833
tagged with: javascript

http://stackoverflow.com/comment/46631218
has text: Tried both with or without / for partials, does not seem to make a difference to the issue.
comment on: http://stackoverflow.com/q/29210454
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29079856
has title: Get data from Json bracket into AngularJS
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46393108
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/46401355
has comment: http://stackoverflow.com/comment/46393077
has answer: http://stackoverflow.com/a/29080033
tagged with: angularjs
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46393185
has body: I'm trying to get some specific data froma JSON object. I am able to get the data from outside the brackets, but can't get anything from inside them. What I'd like to get is get the "summonerName" from below. "gameId": 2016761444, "mapId": 11, "gameMode": "CLASSIC", "gameType": "MATCHED_GAME", "gameQueueConfigId": 4, "participants": [ { "teamId": 100, "spell1Id": 4, "spell2Id": 12, "championId": 57, "profileIconId": 615, "summonerName": "Wolves Weekend", "bot": false, "summonerId": 22951400, ] }, There are 9 more 'participants' objects. And this is how I'm trying to do it currently: div(ng-repeat='data in info.display') p(ng-model='info.IdBox') {{data.id}} p Level: {{data.summonerLevel}} p Champion: {{data.championId}} {{info.matchInfo}} ul div(ng-repeat='participant in info.matchInfo') p Name: {{matchInfo.participants[participant].summonerName}} As said before, simple calls are working fine... Any idea? Thank you~
has comment: http://stackoverflow.com/comment/46393536
accepted answer: http://stackoverflow.com/a/29080033
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/29177508
accepted answer of: http://stackoverflow.com/q/29177286
type: AcceptedAnswer
score: 0
upvote count: 1
downvote count: 1
has body: To access all matches and capture groups you need to iterate over the matches with exec: var message = "message is &lt;Users.username.53a47a469c52c9d83a2d71d9&gt; has published a new Announcement in CommercialTribe. Click &lt;hyperlink&gt; to watch the 1slide annonucement"; var regex = /&lt;(.+?\.?.+?)&gt;|&lt;(.*)&gt;/g; //var regex = /&lt;.*&gt;/g; var myMatch = regex.exec(message); while (myMatch != null){ console.log(myMatch); myMatch = regex.exec(message); } groups will be available on "myMatch[1]" and "myMatch[2]"
answers question: http://stackoverflow.com/q/29177286
type: Answer

http://stackoverflow.com/comment/46622817
comment on: http://stackoverflow.com/q/29205905
has text: this is my first time using MVC sir.. i'm sorry for that. this is my code snippet @Html.LabelFor(m => m.nTotal, new { @id="lblTotal"}). the label is showing the nTotal on the first load of the page.. sorry for being a spoonfeed.. :(
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29159796
tagged with: format
tagged with: javascript
tagged with: filter
answer count: 2
has title: Formatting values using angular number format filter
downvote count: 0
has body: As per the angular number format filter, if I give this $scope.numberExpression =123.45; // returns 123.45 and if it is $scope.numberExpression =123; // returns 123.00 But I dont want the 00 appended there . Is there a way to do this by using number filter .
favorite count: 0
has answer: http://stackoverflow.com/a/29159886
tagged with: angularjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29159896
score: 1
has answer: http://stackoverflow.com/a/29159896
upvote count: 1
accepted answer: http://stackoverflow.com/a/29159886
type: Question

http://stackoverflow.com/q/29113135
has comment: http://stackoverflow.com/comment/46455323
has body: I have been coding my system and I find it difficult in getting the value of the pressed button in my prompts. Here is the code I used in my system: function confirmme(){ var ans; $.prompt("Open your JavaScript console to see the answer.", { title: "Are you Ready?", buttons: { "Yes, I'm Ready": true, "No, Lets Wait": false }, submit: function(e,v,m,f){ // use e.preventDefault() to prevent closing when needed or return false. // e.preventDefault(); ans = v; } }); if(ans){ return true; alert("Value clicked was: "+ v); } else{ return false; alert("Value clicked was: "+ v); } } and here is my html code: and here is my jsfiddle: http://jsfiddle.net/mjanthrax/gov5nw6c/ This is my validation code: var promptText = "The form will be submitted, continue?"; event.preventDefault(); // Prevent default submit var frm = this; var validator = new FormValidator('adding_form', [{ name: 'firstname', display: 'First Name', rules: 'required|min_length[2]|alpha' }, { name: 'midname', display: 'Middle Name', rules: 'required|min_length[2]|alpha' }, { name: 'lastname', display: 'Last Name', rules: 'required|min_length[2]|alpha' }, { name: 'birthmonth', display: 'Birth Month', rules: 'required' }, { name: 'birthday', display: 'Birth Day', rules: 'required' }, { name: 'birthyear', display: 'Birth Year', rules: 'required' }, { name: 'groupcombo', display: 'Choose Group', rules: 'required' }, { name: 'addblock', display: 'Block', rules: 'required|min_length[1]' }, { name: 'addlot', display: 'Lot', rules: 'required|min_length[1]' }, { name: 'addbrgy', display: 'Barangay', rules: 'required|min_length[2]' }, {//surety maker name: 'sfirstname', display: 'Surety-maker\'s First Name', rules: 'required|min_length[2]|alpha' }, { name: 'smidname', display: 'Surety-maker\'s Middle Name', rules: 'required|min_length[2]|alpha' }, { name: 'slastname', display: 'Surety-maker\'s Last Name', rules: 'required|min_length[2]|alpha' }, { name: 'sbirthmonth', display: 'Surety-maker\'s Birth Month', rules: 'requir…
has title: How to get the value of the pressed button in a prompt (impromptu)
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: jquery-events
has answer: http://stackoverflow.com/a/29113632
accepted answer: http://stackoverflow.com/a/29113632
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46455518
answer count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/114911553
type: Comment
comment on: http://stackoverflow.com/a/38326418
score: 0
type: AnswerComment
has text: That one worked for me, my client had a poor script embedded into a PHP file and changing the jQuery to 2.2.4 was the solution, thanks!

http://stackoverflow.com/q/29127468
upvote count: 2
has answer: http://stackoverflow.com/a/29128878
type: Question
tagged with: javascript
has body: I'm wondering how to implement a task (which is very easy in server-side templating) in angular like: {{ if condition }} {{ endif }} {{ if condition }} {{ endif }} I'm of course aware of ng-hide, ng-show and ng-hide... but it think I can't use these directives to implement my task... so what should I do? ps: I can't do the following: because I'm using the module operator (%) in order to wrap "child" nodes into "container" every X element (where X is a dynamic parameter) the final result would be (supposing X is 4): ... and so on (I'm in a ng-repeat)
answer count: 2
has comment: http://stackoverflow.com/comment/46481569
accepted answer: http://stackoverflow.com/a/29128878
downvote count: 0
possible better answer: http://stackoverflow.com/a/29127905
favorite count: 0
has title: Conditional open/close tag display
has answer: http://stackoverflow.com/a/29127905
tagged with: angularjs
tagged with: templates
linked to: http://stackoverflow.com/q/14198017
type: AnsweredQuestion
score: 2

http://stackoverflow.com/a/29189686
answers question: http://stackoverflow.com/q/29189215
has comment: http://stackoverflow.com/comment/46595447
downvote count: 0
has comment: http://stackoverflow.com/comment/46642840
has comment: http://stackoverflow.com/comment/46615557
has body: Edit: had forgotten about the formObject.reset() function var form = document.querySelector('#weddata'); form.addEventListener('submit', function() { form.reset(); } Note that if you plan on supporting older versions of IE, you would have to use the following: var form = document.getElementById('weddata'); if (form.addEventListener) form.addEventListener('submit', callback, false); // modern browsers else if (form.attachEvent) form.attachEvent('onsubmit', callback); // IE function callback() { form.reset(); }
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46602696
score: 1

http://stackoverflow.com/q/29164020
has comment: http://stackoverflow.com/comment/46561879
has title: Scroll to top visibility
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29164386
has comment: http://stackoverflow.com/comment/46547623
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29164386
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/46548001
has body: I'm new to Javascript and using Jquery and I ran into a problem. I made a scroll-to-top button which should be visible when you start scrolling down. I got it to work, when I click it I smoothly scroll to the top and when you're at the top it disappears. Only when I first load the page it's already visible, then when I scroll down it briefly disapears untill I reach the point where the element is located and it pops up again when you scroll down even more. Here is my code: $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() &gt; 100) { $('#backTop a').fadeIn(); } else { $('#backTop a').fadeOut(); } }); $('#backTop a').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; }); });
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/29213450
type: UnansweredQuestion
has title: Phantomjs - Ajax calls on the page doesnt get executed
has comment: http://stackoverflow.com/comment/46649563
score: 2
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/46651590
has comment: http://stackoverflow.com/comment/46651632
answer count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/24219473
has comment: http://stackoverflow.com/comment/46651705
type: Question
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46651343
tagged with: cron
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46651493
has body: I'm using phantomjs to make a get request to a URL with parameters. The problem is the server returns some data and i'm using javascript on that page to do some logic. Once the logic is done, i'm using ajax to post the data back to the server. I now need this URL to be called through a cron job. When i open the URL from chrome, everything works fine. But i cant run it from a CRON. I thought using phantomjs would help resolve this problem but even phantomjs does not execute javascript code on the remote request. Any thoughts on how to accomplish this?

http://stackoverflow.com/comment/46517011
score: 0
type: Comment
type: QuestionComment
has text: Would you consider using a third party library to accomplish this? Also, here is an example of a purely css treeview if you would prefer to not implement it with javascript: http://www.thecssninja.com/css/css-tree-menu
comment on: http://stackoverflow.com/q/29147094

http://stackoverflow.com/q/29162483
type: AnsweredQuestion
has body: I have data as : selected : { id : <string,a task id>, description = <string> }; tasks = [ { id : 'a', value : 'Apple' }, { id : 'b', value : 'Ball' }, // more items; ]; now i want to use select2 such as variable bind to select2 should contain only the id, not the whole object so if i select Ball, the selected should be { id : 'b', description : 'some_desc' } {{ $select.selected.value }} {{type.value}} How do i achieve to have only string as selected value not the whole object. EDIT : here is the example plunker http://plnkr.co/edit/onmP7FKIa7MpXsRnH025?p=preview In which selected.sel is an object not a string. i want selected.sel should be a string always that is the code of conntry
accepted answer: http://stackoverflow.com/a/29162631
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29162631
score: 0
has title: how to use select2 in angularjs to have string value instead of an object
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/29073371
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
has body: must be the usual problem with callbacks inside for loop, try binding the value of i: for (var i = 0; i&lt;list.length - 1; i++) { pc[list[i]] = createPC(list[i]); (function(i){ pc[list[i]].createOffer(function (localDesc) { pc[list[i]].setLocalDescription(localDesc); send(localDesc, list[i]); }, doNothing, constraints); })(i); } Edit: another option might be( i am assuming that the list is list of unique ids): ... for (var i = 0; i&lt;list.length - 1; i++) { var id = list[i]; pc[id] = createPC(id); pc[id].createOffer(onOffer.bind({id:id}), doNothing, constraints); } ... function onOffer(localDesc){ pc[this.id].setLocalDescription(localDesc); send(localDesc, this.id); }
answers question: http://stackoverflow.com/q/29071360
type: Answer
accepted answer of: http://stackoverflow.com/q/29071360

http://stackoverflow.com/comment/46677548
has text: @Mapsism Borja to add color to tail you just have to add a background color to this line: iwBackground.children(':nth-child(3)').find('div').children().css({'box-shadow': 'rgba(72, 181, 233, 0.6) 0px 1px 6px', 'z-index' : '1', 'background-color' : 'blue'}); Please pay atention to what davidkonrad said, you have to track updates to the API to make sure this workaround will be fine in future updates.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29224814

ratchet
type: Tag
tags question: http://stackoverflow.com/q/29091693
tag name: ratchet

http://stackoverflow.com/comment/46523758
comment on: http://stackoverflow.com/q/29150987
type: Comment
type: QuestionComment
score: 1
has text: JSON can represent numbers just fine.

http://stackoverflow.com/comment/46463765
comment on: http://stackoverflow.com/q/29117850
has text: `white-space:pre-wrap` ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29194125
score: 0
has answer: http://stackoverflow.com/a/29194396
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46601621
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
has body: I have made a table with list using ul li. Here is my html code. Sunday Mar 22 6:00 am 6:15 am Monday Mar 23 6:00 am 6:15 am Tuesday Mar 24 6:00 am 6:15 am And here is my css code. .calendar{ margin: 0; padding: 0; /*width: 40px;*/ list-style: none; float:left; } .clendar-wrapper{ /*float: left;*/ /*background-image: url("../img/table_bg.png");*/ background-position: 0 -58px; /*float: left;*/ } .clendar-wrapper{ display: none; display: none; width: 100%; max-height:350px; overflow-x:hidden ; padding-bottom:10px; } .table-responsive { width: 918px; /*border:1px solid red;*/ background-color: #FFFFFF; overflow: visible; } @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) { .clendar-wrapper{ width: 100%; height:auto; } /* your css rules for ipad portrait */ } @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) { .clendar-wrapper{ /*width: 100%;*/ height:auto; } /* your css rules for ipad landscape */ } .calendar-1{ display: block; } .prev-table{ display: none; } .login_register a { color:white; } .calen-title { background-color: #D9E8F4 !important; } .calen-title a{ font-size: 16px; color: #222; font-weight: bold; } .calendar li{ padding: 8px; border: 1px solid #ddd; } .calendar li a { color: #222; font-size: 16px; } .calendar li:nth-child(2n+2) { background-color: #f9f9f9; } .pagi_list .pre_btn, .pagi_list .nex_btn{ margin: 0px; } .last_link, .first_link { font-size: 35px; font-weight: bold; line-height: 0; position: relative; top: 5px; color:#d65c4f; } It is coded on bootstrap. When i open it on small resolution device columns drop down. Here i have created a demo link click here to open. Please sugggest me how can i make this calendar responsive. Thanks in advance.
has title: How to make html table made by list responsive?
tagged with: css
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29194396
tagged with: javascript

http://stackoverflow.com/a/29190898
answers question: http://stackoverflow.com/q/29179583
has body: Ok, we have found the bug together in the comments section. RP is a linux system I think so permission errors can be resolved with chmod. Log in in the shell as the user that owns the apache process and change the permission OR just do it in a simpler way: cd to /www/ directory and run the following command: cd /var/www sudo chmod a+w data.json Note that this will give writing permission to every user in your system.
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29179583

http://stackoverflow.com/q/29070041
has answer: http://stackoverflow.com/a/29074030
has title: Phantomjs does not open web page
linked to: http://stackoverflow.com/q/26609450
has body: I have started testing campus2020 site with casperjs (1.1.0-beta3) + phantomjs (1.9.8). And faced with the problem that site is not opening but instead tests just freeze. I have taken script example from phantomjs site: var page = require('webpage').create(); page.open('http://informatik.uni-leipzig.de/campus2020', function(status) { console.log("Status: " + status); if(status === "success") { page.render('example.png'); } phantom.exit(); }); It worked fine on other sites. I have tested opening the campus2020 site with phantomjs on several environments: win 7, Ubuntu 14.04, with ghostdriver and java selenium webdriver, with phantomjs which is run in selenium grid on RHEL 6.6. All this options failed. I have tried to add userAgent option and setTimeout. Nothing changed. Also I tried to open this site using testing framework based on selenium webdriver which used phantomjs but it worked in the same way - phantomjs initialized and then freezes. Any ideas how could be this issue solved? Update Now my code looks like these: var page = require('webpage').create(); console.log("Page is going to be opened...") page.open('http://informatik.uni-leipzig.de/campus2020/', function(status) { console.log("Status: " + status); if(status === "success") { page.render('example.png'); } phantom.exit(); }); page.onConsoleMessage = function(msg, lineNum, sourceId) { console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); }; page.onError = function (msg, trace) { console.log(msg); trace.forEach(function(item) { console.log(' ', item.file, ':', item.line); }) } page.onResourceError = function(resourceError) { console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')'); console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString); }; page.onResourceTimeout = function(request) { console.log('Response (#' + request.id + '): ' + JSON.stringify(request)); }; And no errors are shown.
tagged with: phantomjs
type: AnsweredQuestion
tagged with: casperjs
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/26517852
accepted answer: http://stackoverflow.com/a/29074030
type: Question
tagged with: testing
has answer: http://stackoverflow.com/a/68929367
tagged with: javascript
possible better answer: http://stackoverflow.com/a/68929367
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/29163274
has comment: http://stackoverflow.com/comment/46545985
type: Answer
score: 2
has body: scope[.](?:\w+[.])*\w+ You can use this.If you want to removescope. the use scope[.]((?:\w+[.])*\w+) And grab the group 1 .See demo. https://regex101.com/r/pT4tM5/24 var re = /scope[.]((?:\w+[.])*\w+)/gm; var str = 'scope.object.object2.string\nscope.object.object2'; var m; while ((m = re.exec(str)) != null) { if (m.index === re.lastIndex) { re.lastIndex++; } // View your result using the m-variable. // eg m[0] etc. }
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29163194
answers question: http://stackoverflow.com/q/29163194
has comment: http://stackoverflow.com/comment/46547604
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46472452
has text: i was thinking that i had the degree for include what you did .. but actually … no :/
type: Comment
comment on: http://stackoverflow.com/a/29110263
score: 0
type: AnswerComment

http://stackoverflow.com/a/29088794
upvote count: 1
has body: Try this: var inputs = document.getElementById('form').querySelectorAll('input[type="text"]'); [].slice.call(inputs).forEach(function(input) { var val = input.name.replace(/_/,' '); input.setAttribute('placeholder', val); input.value = val; }); &lt;form id="form"&gt; &lt;input type="text" name="FIRST_NAME"&gt; &lt;input type="text" name="LAST_NAME"&gt; &lt;/form&gt;
type: Answer
has comment: http://stackoverflow.com/comment/46414310
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29088730

http://stackoverflow.com/comment/46589900
type: QuestionComment
comment on: http://stackoverflow.com/q/29183885
score: 1
has text: I think I got it. this[prop_name] = result; in my function and calls with testArray[0].normalise(333,40,45,'TTT');
type: Comment

http://stackoverflow.com/comment/46643027
score: 0
comment on: http://stackoverflow.com/q/29216928
type: Comment
type: QuestionComment
has text: You can test that by returning false from the callback. If that fixes it, you may need to do `e.returnValue = false`, although I'd have thought IE9+ supported `preventDefault()` to be honest

http://stackoverflow.com/comment/46543646
has text: Would you have any tips on how to then invoke the load event?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29125548
type: AnswerComment

http://stackoverflow.com/comment/46453110
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29111891
type: AnswerComment
has text: This answer will work if all the layers are monochromatic (as opposed to gradients or images). Just reduce all monochromatic layers from RGBA to RGB from the bottommost layer to the topmost layer.

http://stackoverflow.com/comment/46528499
type: AnswerComment
score: 0
type: Comment
has text: Ok I thought that looked a little strange haha. I tried the update as well as the second option and got the same `SyntaxError: Unexpected number` error :(
comment on: http://stackoverflow.com/a/29153390

http://stackoverflow.com/a/29217830
has comment: http://stackoverflow.com/comment/46645518
has body: I don't have the rep to comment so I can't ask for details, but just in case you can use jquery, you can hide and show stuff like this: $(function(){ $("#add").click(function() { var name = $('#name').val(); var domain = $('#domain').val(); var url = $('#url').val(); $('#hidey').show(); $('#nametd').html(name); $('#domtd').html(domain); $('#urltd').html(url); }) }); https://jsfiddle.net/6dxLsnL4/ Or trigger on form submit instead of click if you want, but there, you might want to consider ajax, because then you can make sure the form is processed on the server side before displaying the results.
type: Answer
answers question: http://stackoverflow.com/q/29217051
has comment: http://stackoverflow.com/comment/46645838
score: 0

http://stackoverflow.com/comment/46639830
has text: Sorry I didn't get back to this sooner, thats exactly what I had in mind - looks like you had to do some finagling with the jquery a bit!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29191045
score: 0

http://stackoverflow.com/comment/46538877
has text: You could always make a `HEAD` request, but not all servers implement this.
comment on: http://stackoverflow.com/q/29159314
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29127965
downvote count: 1
has body: You can't do dynamic meta tags (or well, you can, but Google and Facebook won't run your JavaScript so they won't do you any good), but you can follow Google's guide for making AJAX applications crawlable. I don't know if Facebook has a similar guide.
has comment: http://stackoverflow.com/comment/104773139
type: Answer
has comment: http://stackoverflow.com/comment/122968712
score: 2
has comment: http://stackoverflow.com/comment/46571964
upvote count: 3
answers question: http://stackoverflow.com/q/29127891

http://stackoverflow.com/comment/46438941
score: 0
comment on: http://stackoverflow.com/q/29089163
type: Comment
type: QuestionComment
has text: hi Yazaki - thanks for this - my concern about this is compliance. I'm not keep for the card number to hit my server, and as I understand Stripe forms dont normally do that - instead they will process the form through a jquery processor that returns the Token - if i do this as part of my controller then I'm still handling the card data

http://stackoverflow.com/a/29114710
type: Answer
has comment: http://stackoverflow.com/comment/46497055
answers question: http://stackoverflow.com/q/29111096
downvote count: 1
has comment: http://stackoverflow.com/comment/46524678
score: -1
has body: In your index.html => &lt;body ng-app="userApp" so you need add to your mainCtrl.js look like this: angular.module('userApp.mainCtrl', []) You also need do the same way to userCtrl.js, authService.js, userService.js and app.routes.js. Now in your App.js finally may look like this: angular.module('userApp', ['ngAnimate', 'userApp.Routes', 'userApp.authService', 'userApp.mainCtrl', 'userApp.userCtrl', 'userApp.userService']) ]); Edit I try your code in plunker but with commenting &lt;base href="/"&gt; and change $locationProvider.html5Mode({ enabled: true, requireBase: false }); for it work in plunker. Here (http://embed.plnkr.co/BHyE6iWDN5uXqiitaMDU/preview) you can visit it with same error in console log. It's seem due to fail load some depedencies which i left empty at some file. Here (http://embed.plnkr.co/eD4TYgMNq4MDHQZ7p3n0/preview) another plunker that you can see the error has gone, all of depedencies success loaded. Make sure you have correct typo &amp; not missing the depedencies.
upvote count: 0
has comment: http://stackoverflow.com/comment/46488578

http://stackoverflow.com/comment/46486192
type: Comment
comment on: http://stackoverflow.com/a/29129122
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73275/discussion-between-pankajparkar-and-callebe).
score: 0

http://stackoverflow.com/comment/46453097
type: Comment
has text: @Overflow Not really. jQuery, unlike some people like to think, is not the end-all-be-all library of Javascript. Rather often you don't even need a library to begin with, the above question is a good example of which.
score: 3
comment on: http://stackoverflow.com/q/29111942
type: QuestionComment

http://stackoverflow.com/q/29152049
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46525484
has body: var api; (function() { api = new FacePP('api_secret', 'api_key'); api.request('detection/detect', { url:'http://apius.faceplusplus.com' }, function(err, result) { if (err) { alert(err); return; } // TODO use result document.getElementById('response').innerHTML= JSON.stringify(result, null, 2); }); })(); I am calling faceplusplus detection api using javascript.But when I run this code I can see error in browser console Cross-Origin Request Blocked and getting blank "" json response.Please suggest how can I fix it using above code. And also api is sending image downloading error. This code is using facepp-sdk.min.js. please help. Already there are some posts like How do I send a cross-domain POST request via JavaScript? But I am unable to figure out how will I merge my request in ths format.
has comment: http://stackoverflow.com/comment/46525702
linked to: http://stackoverflow.com/q/298745
answer count: 0
score: 1
tagged with: image-processing
upvote count: 1
type: Question
has title: Cross origin request blocked when connecting to faceplusplus detect api using javascript
tagged with: javascript
tagged with: cross-domain
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/29211312
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29211531
has title: How to drag and drop a div inside another div and make that the whole element follow?
tagged with: drag-and-drop
answer count: 3
has body: Trying to use jqueryUI. I have a list with components that i want to drop inside a gridsystem. Like a desiger thing. I have a div that has $( "#Component1" ).draggable(); And I drop the div above in this div: $( "#GridDiv" ).droppable({ accept: "#component1" }); The result I want is, when I drop the component1 div insde the GridDiv &lt;div id="#GridDiv"&gt; &lt;div id="#Component1"&gt;&lt;/div&gt; &lt;/div&gt; Is there a method for this ? i cant find it..
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/43908636
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29211962
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/29211531
type: Question
possible better answer: http://stackoverflow.com/a/29211962

http://stackoverflow.com/q/29101763
favorite count: 0
has title: Javascript, how to match and get similar objects containing in two arrays?
accepted answer: http://stackoverflow.com/a/29102025
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
tagged with: arrays
has answer: http://stackoverflow.com/a/29102025
tagged with: javascript
answer count: 1
has body: I have two array of objects. I want to check the list of objects from array one existing in array two by name. arr1 = [{name: "krishna", age: 27}, {name: "chandan", age 30}] arr2 = [{name: "krishna", age: 27}, {name: "chandan", age 30}, {name: "someone", age: 30}] arr1 intersec arr2 = [{name: "krishna", age: 27}, {name: "chandan", age 30}] First I tried to iterate over the arrays and find the similar objects by name like below var intersec = []; for(var i = 0; i &lt; arr1.length; i++) { for(var j = 0; j &lt; arr2.length; j++) { if(arr1[i].name === arr2[j].name) { intersec.push(arr1[i]); } } } Later I thought this code will become complicated if the data size grows. So I came up with another logic where I stringify arr1 and iterate over arr2 and get the name and use indexOf function on the stringify-ed arr1 to check if it exists. var exp = "name: \""+arr2[i].name+"\""; stringArr1.indexOf(exp); I want to know which one is efficient and are there any other efficient ways to do the same?
downvote count: 0

http://stackoverflow.com/comment/46607682
score: 6
type: Comment
comment on: http://stackoverflow.com/q/29196523
has text: How about Pengines? http://pengines.swi-prolog.org/docs/index.html Not exactly what you are looking for but should be able to do the job...
type: QuestionComment

http://stackoverflow.com/q/29143020
answer count: 0
has comment: http://stackoverflow.com/comment/46513931
has body: I've made a webpage in order to get a table based on both a json and a user entry in a html form. I have the following problem : I write my user entry in the box created by my form. When I click on my "go" button, my box becomes empty and my entry doesn't go in "Filtre_ti". What is really weird is that if I write exactly the same entry, it goes this time in "Filtre-ti" and I get my table without problem. To simplify : I get my table only when I write the same entry two times in a row, but I don't get it the first time. I tried to switch positions of my script, form and table but I don't find the problem... My script : function get_values(){ var json = "http://****/get_json.php?callback=?"; if(document.getElementById('Filtre_ti').value != ""){ json = json + "&nom_TI=" + document.getElementById('Filtre_ti').value; } console.log(json); var titre_colindex = 0; $.getJSON(json ,function(data){ newRow = document.getElementById('mon_tableau').getElementsByTagName('tbody')[0].insertRow(-1); $.each(data[0], function(index, valeur){ //Pour chaque colonne newCell = newRow.insertCell(titre_colindex); newCell.innerHTML = index; titre_colindex+=1; }); $.each(data, function(i,ti){ var newRow; var newCell; newRow = document.getElementById('mon_tableau').getElementsByTagName('tbody')[0].insertRow(-1); newCell = newRow.insertCell(0); newCell.innerHTML = ti.TI; var i_colindex=1; $.each(ti, function(index, valeur){ if(index != "TI"){ newCell = newRow.insertCell(i_colindex); newCell.innerHTML = valeur; i_colindex+=1; } }); }); //End each console.log("End fct"); }); //End getJSON } Quel TI recherchez vous ? Nom du TI GO Do you have any ideas ? Thanks, Corentin.
type: Question
has comment: http://stackoverflow.com/comment/46512038
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: forms
score: 0
has comment: http://stackoverflow.com/comment/46511966
has title: Form / json / js : my input doesn't work
has comment: http://stackoverflow.com/comment/46510555
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46512757
has comment: http://stackoverflow.com/comment/46509192

http://stackoverflow.com/q/29118214
has body: Am getting an error when i run my site in IE (local host) the error is as follows: Unhandled exception at line 1440, column 9 in eval code 0x800a138f - JavaScript runtime error: Unable to get property 'top' of undefined or null reference If there is a handler for this exception, the program may be safely continued. This is the code it goes to: $window.scroll(function () { if ($window.scrollTop() > offset.top) { $sidebar.stop().animate({ marginTop: $window.scrollTop() - offset.top + topPadding }); } else { $sidebar.stop().animate({ marginTop: 0 }); } }); the highlighted code is where it keeps hitting when i scroll on the page. Am not sure why this is happening, has this happened to anyone? Or any ideas why its doing this. Thanks
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29118265
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29118634
accepted answer: http://stackoverflow.com/a/29118634
has answer: http://stackoverflow.com/a/29118265
has title: JavaScript runtime error: in IE only
type: AnsweredQuestion

http://stackoverflow.com/comment/46950147
type: QuestionComment
comment on: http://stackoverflow.com/q/29206832
score: 0
type: Comment
has text: There are several pages affected by the three stylesheets I mentioned. I can add more files on to the server.

http://stackoverflow.com/comment/46604693
score: 1
has text: Please post the associated HTML.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29195923

http://stackoverflow.com/comment/46631195
score: 0
type: AnswerComment
has text: I dont want to create an array mname. I want to create variable mname0, mname1, mname2..... where var mname0 = A, var mname1 = B, var mname2 = C and so on
comment on: http://stackoverflow.com/a/29210724
type: Comment

http://stackoverflow.com/q/29214552
has body: &lt;a on-swipe="onSwipe()" href="#/app/setting/{{book.id}}" ng-repeat="data in savedData"&gt; I got my $scope.savedData from localstorage, how can I get {{book.id}} to know which item the user actually want to delete? $scope.onSwipe = function () { //I need to get {{book.id}} here }; bind it to a new ng-model?
has title: Having issue getting data using ng-model
has answer: http://stackoverflow.com/a/29214590
tagged with: angularjs
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/46638684
score: 0
has text: im not sure those would work. i need the frame to resize itself every time, not just on "onload". i cant create helper sites, and its not on the same domain. i basically just need to do the same youtube does with the comment frame. it resizes every time more comments are loaded. how did they do it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29194898

http://stackoverflow.com/comment/46410081
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29088598
score: 0
has text: Are you getting any errors in the console?

http://stackoverflow.com/comment/46529149
has text: When i use command 'gulp serve:dist' from https://github.com/Swiip/generator-gulp-angular#use-gulp-tasks. All packages create files in public. Ie. plugin 'Rate' create in images in public/images, another use fonts from public/fonts etc. When i change this path: gulp.task('images', function () { return gulp.src(paths.src + '/images/**/*') .pipe(gulp.dest(paths.dist + '/images/')); }); It will change path for all images?
comment on: http://stackoverflow.com/a/29153334
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29157352
has body: Not exactly sure what bot you're basing your code off, however after looking at the steam api for trade offers, there should be an array called "items_to_give" which you could check and see if it is empty before accepting. if (offer.trade_offer_state === 2 &amp;&amp; (!offer.hasOwnProperty("items_to_give") || offer.items_to_give.length === 0)){ So above we check if we do not have the "items_to_give" key, which doesn't exist if you are giving nothing. Then we check to make 100% sure that it has no items in it, just in case Steam decides to include empty keys with their API at a later date. After looking at the steam api again, I believe your code could be improved if you also checked for TradeOfferStateCountered(4), which would let you accept counter offers as well. Here is the code for that if ((offer.trade_offer_state === 2 || offer.trade_offer_state === 4) &amp;&amp; (!offer.hasOwnProperty("items_to_give") || offer.items_to_give.length === 0)){
answers question: http://stackoverflow.com/q/29156962
type: Answer
has comment: http://stackoverflow.com/comment/46536342
score: 2
accepted answer of: http://stackoverflow.com/q/29156962
downvote count: 0
has comment: http://stackoverflow.com/comment/46536513
has comment: http://stackoverflow.com/comment/46535385
has comment: http://stackoverflow.com/comment/46536258
has comment: http://stackoverflow.com/comment/46536444
has comment: http://stackoverflow.com/comment/46536563
upvote count: 2
has comment: http://stackoverflow.com/comment/46535457
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46535682
has comment: http://stackoverflow.com/comment/46535895

http://stackoverflow.com/a/29123103
answers question: http://stackoverflow.com/q/29122811
has body: If you are looking for a way to create a function delegate: function $createDelegate(instance, method) { return function (someArgs) { return method.apply(instance, someArgs); } } Usage: var delegate = $createDelegate(in.some.namespace, in.some.namespace.hello); ... delegate(someArgs); Which, for instance, is a very useful way to pass callbacks to an event Handler without loosing your context.
score: 0
has comment: http://stackoverflow.com/comment/46472541
has comment: http://stackoverflow.com/comment/46473236
has comment: http://stackoverflow.com/comment/46473638
type: Answer
has comment: http://stackoverflow.com/comment/46472611

http://stackoverflow.com/q/29180155
has comment: http://stackoverflow.com/comment/46576967
has comment: http://stackoverflow.com/comment/46576945
has comment: http://stackoverflow.com/comment/46576978
has answer: http://stackoverflow.com/a/29180214
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29180218
favorite count: 0
type: Question
has body: I am using bootstrap 3.3.2. How could I remove the data from modal? I want the modal to appear as fresh as it was loaded the first time. For example a modal like : Characteristics Player number Completed when loaded again has the field filled with the previous data. How could I make sure, that the fields and other items inside the modal are loaded fresh? Here is the fiddle that showing the same data is loaded again, when modal reloads : fiddle I tried the following, but it didn't work : $('#pass').on('hidden.bs.modal', function () { $('#pass').removeData(); })
has title: Unloading data from a modal
upvote count: 2
tagged with: twitter-bootstrap
answer count: 2

http://stackoverflow.com/q/29167227
has answer: http://stackoverflow.com/a/29167702
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29167396
has title: Why is my form submitting when I hit enter on a textbox?
has answer: http://stackoverflow.com/a/29167676
answer count: 4
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29167676
upvote count: 1
type: Question
has body: HTML: &lt;form name="prints" method="post" action=""&gt; &lt;input type="text" name="quantity_914" id="quantity_914" value="1" style="width:20px;" onblur="prints_change_quantity(event, this);" onkeyup="return prints_change_quantity(event, this); return false;" /&gt; &lt;/form&gt; Javascript: function prints_change_quantity(e, element) { var pid = element.id.replace('quantity_'); var code = (e.keyCode ? e.keyCode : e.which); if("blur" == e.type || ("keyup" == e.type &amp;&amp; code == 13)) { e.preventDefault(); console.log(element.value); } return false; }
tagged with: javascript
tagged with: forms
possible better answer: http://stackoverflow.com/a/29167308
has answer: http://stackoverflow.com/a/29167308

http://stackoverflow.com/comment/46634432
score: 0
comment on: http://stackoverflow.com/q/29212359
type: Comment
type: QuestionComment
has text: Its confusing @Cerbrus, because if you try to delete it from an object, it always returns true. http://jsfiddle.net/bL3224wv/

http://stackoverflow.com/a/29140506
upvote count: 3
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29140425
score: 3
has body: Add headerCellFilter: "translate" in columnDefs

http://stackoverflow.com/comment/46469261
has text: You can't use `session_start()` after you've sent output (html) to the browser - which you're doing before the include. Try putting `session_start()` at the top of your main site code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29121224
score: 1

http://stackoverflow.com/a/29128882
has comment: http://stackoverflow.com/comment/46508265
has comment: http://stackoverflow.com/comment/46498947
score: 0
has body: I don't think there's an easy way out for this. I did some translations for an ExtJS app and all I had was a JS class file with all the strings for both languages. Then at application startup I'd call something like customStringsClass.setLocale('en'). This method would set customStringsClass.Labels, for example, to an object containing all the strings for the english language. Then in controllers and views, I'd use customStringsClass.Labels.FirstNameField_Label
type: Answer
answers question: http://stackoverflow.com/q/29125610

http://stackoverflow.com/a/29123687
has comment: http://stackoverflow.com/comment/46473738
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29122009
answers question: http://stackoverflow.com/q/29122009
has comment: http://stackoverflow.com/comment/46475390
has comment: http://stackoverflow.com/comment/46476421
has comment: http://stackoverflow.com/comment/46473987
type: Answer
has comment: http://stackoverflow.com/comment/46473926
has comment: http://stackoverflow.com/comment/46474280
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46490083
has comment: http://stackoverflow.com/comment/46479748
has body: To add an extra row, use the response event. http://api.jqueryui.com/1.10/autocomplete/#event-response http://jsbin.com/wokuma/1/ Testing
has comment: http://stackoverflow.com/comment/46474663

http://stackoverflow.com/q/29083639
tagged with: literals
type: Question
has body: Perhaps this seems like a silly question, but I ask because I just learned about regular expression literals: var foo = /ba+r/s; which is equivalent to var foo = new RegExp('ba+r', 's'); Which got me thinking, what other literals does Javascript support? The documentation at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types mentions string, array, object, and number literals, but it does not mention function or regular expression literals. What is the complete list of Javascript literals?
tagged with: javascript
has answer: http://stackoverflow.com/a/29083733
score: 0
has title: What types of literals does Javascript support?
answer count: 1
accepted answer: http://stackoverflow.com/a/29083733
type: AnsweredQuestion

http://stackoverflow.com/a/29114755
has comment: http://stackoverflow.com/comment/46458212
answers question: http://stackoverflow.com/q/29114334
upvote count: 1
type: AcceptedAnswer
has body: If the element clicked does not have an href, it searches it's parents for an element that has an href. Vanilla JS solution. function findUpTag(el, attr) { while (el.parentNode) { el = el.parentNode; if (el[attr]) { return el; } } return null; } document.body.onclick = function (event) { event.preventDefault(); var href = event.target.href; if (!href) { var closest = findUpTag(event.target, 'href'); if (closest) { href = closest.href; } } document.getElementById('output').innerHTML = 'element clicked: ' + event.target.nodeName + ' closest href: ' + href; }; a, output { display: block; } cats hi bye
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46458125
score: 1
accepted answer of: http://stackoverflow.com/q/29114334

http://stackoverflow.com/a/29161524
type: Answer
answers question: http://stackoverflow.com/q/29160705
has body: I've only done it with 2 regExps, haven't found the way to do it with one: var matches = '[[12]],23,asd'.match(/\[{2}(\d+)\]{2}/ig), intStr = matches[0].match(/\d+/ig); console.log(intStr);
score: 0

http://stackoverflow.com/comment/46626973
score: 1
type: AnswerComment
type: Comment
has text: @CasNouwens I know that you can hide some of the controls, you can see the options in the docs: https://developer.vimeo.com/player/embedding
comment on: http://stackoverflow.com/a/29206786

http://stackoverflow.com/comment/46427936
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29095875
has text: Inside the project !!!! i have to redirect to method "Create" in the controller "Fatturazione"....this controller is inside the main folder of the project...

http://stackoverflow.com/comment/46467322
has text: Yes, I know. You can find the answer in the [API](http://api.highcharts.com/highcharts#xAxis.plotLines). I'm sorry, but there is only 8-options to set, I think you can do it. ;)
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29118064

http://stackoverflow.com/comment/46497844
type: Comment
comment on: http://stackoverflow.com/a/29136433
has text: problem is that $scope.formData is no defined within $scope.saveCustomer and I dont know how to access this variable in there
type: AnswerComment
score: 0

http://stackoverflow.com/a/29154785
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29154704
downvote count: 0
type: Answer
has body: You're close. The property is camel-cased without a hyphen, like: &lt;script&gt; document.getElementById("page-wrapper").style.minHeight = screen.height - 10 + "px" &lt;/script&gt;

http://stackoverflow.com/a/29128001
has comment: http://stackoverflow.com/comment/46484823
has comment: http://stackoverflow.com/comment/46486379
score: 0
answers question: http://stackoverflow.com/q/29126079
has body: When I say manually, I mean something like this... {% for variant in product.variants %} {% if variant.available %} {{variant.title}} {% else %} {{variant.title}} {% endif %} {% endfor %}
type: Answer

http://stackoverflow.com/comment/46583664
type: Comment
type: QuestionComment
has text: you will have to parse the html attributes
comment on: http://stackoverflow.com/q/29183817
score: 0

http://stackoverflow.com/a/77884236
upvote count: 0
has body: Add draggable="false" to a 122/1
type: Answer
score: -2
downvote count: 2
answers question: http://stackoverflow.com/q/29084387

http://stackoverflow.com/q/29201624
tagged with: javascript
tagged with: datetimepicker
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29201725
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: So I have a jQuery DateTimePicker v2.4.1 attached on a text input. I wanted to make it so then when the user clicks and changes the Month or Year of the picker - it would update the date within the form as this doesn't seem to be a default behavior of the plugin. $(timepicker).datetimepicker({ format: "d M Y h:i A", step: 15, validateOnBlur: false, //use ValidateDateTime.js instead of jquery default closeOnInput: true, closeOnDateSelect: true, onClose: function() { var validatedDate = validateDate($(timepicker).val()); if (validatedDate != false) { $(timepicker).val(validatedDate); } }, changeMonth: true, changeYear: true, onChangeMonth: function() { //pop name of month into field and update calendar var d = $(this).datetimepicker('getDate'); console.log(d + this.html()); /* $(timepicker).datetimepicker.trigger("select.xdsoft", [d]); */ } }); A problem that occurs is: var d = $(this).datetimepicker('getDate'); does not actually retrieve the date and just returns the datetimepicker element. How do I get the date in js or more specifically - how could I force an update when the user clicks on a month within the drop down. EDIT: Looking at the documentary http://xdsoft.net/jqplugins/datetimepicker/ &amp; thanks to suish it now looks like this: onChangeMonth: function(date, $el) { //pop name of month into field and update calendar var str = dateTimeToString(date); $($el).datetimepicker({ value: str }); }, Simple!
accepted answer: http://stackoverflow.com/a/29201725
has title: jQuery datetimepicker - how to get date in javascript?

http://stackoverflow.com/q/29197604
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
has title: Node Express Handlebars helper not returning result of function
tagged with: javascript
tagged with: express
upvote count: 2
accepted answer: http://stackoverflow.com/a/29197778
tagged with: helper
answer count: 1
favorite count: 0
has body: I'm baffled on this one. If I use a function within a handlebars helper and return the result of that function, nothing is returned. Here is the template: {{formatid this.id}} And here is the helper: formatid : function(id){ mOrders.formatOrderID(id, function(err, formatted_id){ // err is always null, no need to handle console.log(formatted_id); return formatted_id; }); } Yet despite the correct text being logged to the console, the resultant html is: If, however, I put a return after the end of the formatOrderID() function, it gets returned, so this: formatid : function(id){ mOrders.formatOrderID(id, function(err, formatted_id){ // err is always null, no need to handle console.log(formatted_id); return formatted_id; }); return 'some_text'; } gives me the following html: some_text What am I missing here? It's not the returned formatted string, as even when I return a string within the callback it's ignored.
has answer: http://stackoverflow.com/a/29197778
tagged with: handlebars.js

slideshow
tags question: http://stackoverflow.com/q/29203022
type: Tag
tag name: slideshow
tags question: http://stackoverflow.com/q/29143220

http://stackoverflow.com/a/29147072
has comment: http://stackoverflow.com/comment/46516809
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46516646
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29146951
has body: Yes you judged it correctly. You need to change the dataTable to DataTable Also to state that there is a difference between dataTable and DataTable. The difference between the two is that the first will return a jQuery object, while the second returns a DataTables API instance.
answers question: http://stackoverflow.com/q/29146951

http://stackoverflow.com/q/29203999
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 2
upvote count: 2
has title: Embed posting of social networks with Ionic Framework and AngularJS
tagged with: twitter
has body: I am having a problem when wanting to embed a post from Twitter, Instagram or Vine with Ionic Framework, all social networks using Blockquote to display the content, look bad, do not show all the elements nor display the correct styles... This is the code in Twitter: &lt;blockquote class="twitter-tweet" lang="en"&gt;&lt;p&gt;Web designers life by &lt;a href="https://twitter.com/Monish_bansal"&gt;@Monish_bansal&lt;/a&gt; CC &lt;a href="https://twitter.com/CsharpCorner"&gt;@CsharpCorner&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/webdeveloper?src=hash"&gt;#webdeveloper&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/webdevelopment?src=hash"&gt;#webdevelopment&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/developers?src=hash"&gt;#developers&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/programmers?src=hash"&gt;#programmers&lt;/a&gt; &lt;a href="http://t.co/inTkoRpJ0k"&gt;pic.twitter.com/inTkoRpJ0k&lt;/a&gt;&lt;/p&gt;&amp;mdash; C# Corner (@CsharpCorner) &lt;a href="https://twitter.com/CsharpCorner/status/560759820731445249"&gt;January 29, 2015&lt;/a&gt;&lt;/blockquote&gt; This is in Vine: &lt;iframe src="https://vine.co/v/bjHh0zHdgZT/embed/postcard" width="300" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;script src="https://platform.vine.co/static/scripts/embed.js"&gt;&lt;/script&gt; And this is in Instagram: &lt;blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="4" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"&gt;&lt;div style="padding:8px;"&gt; &lt;div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50% 0; text-align:center; width:100%;"&gt; &lt;div style=" background:url([binary]); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"&gt;&lt;/div&gt;&lt;/div&gt; &lt;p styl…
tagged with: ionic-framework
type: Question
tagged with: javascript
tagged with: instagram
has answer: http://stackoverflow.com/a/47346423

http://stackoverflow.com/comment/46484732
has text: actually Your explanation is very helpful, I didn't recognize the way I wrote the function! Very helpful answer.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29088048

http://stackoverflow.com/a/29287044
answers question: http://stackoverflow.com/q/29165644
accepted answer of: http://stackoverflow.com/q/29165644
has body: From my understanding, the tables you've created a many to many relationship and that when you query for a "Module", you want all the "Competence" associated to it. Though I wasn't able to get .hasMany() working, the error produced was: Trace: [TypeError: Cannot call method 'replace' of undefined] at null.&lt;anonymous&gt; (/Users/sjlu/Development/29165644/app.js:61:13) at tryCatch1 (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/util.js:45:21) at Promise._callHandler (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:571:13) at Promise._settlePromiseFromHandler (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:581:18) at Promise._settlePromiseAt (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:713:18) at Promise._settlePromiseAt (/Users/sjlu/Development/29165644/node_modules/sequelize/lib/promise.js:76:18) at Promise._settlePromises (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:854:14) at Async._consumeFunctionBuffer (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/async.js:85:12) at Async.consumeFunctionBuffer (/Users/sjlu/Development/29165644/node_modules/sequelize/node_modules/bluebird/js/main/async.js:40:14) at process._tickCallback (node.js:442:13) In which this output is almost impossible to debug. However, I was able to create your model bindings and query it correctly with the .belongsToMany() associations Competence.belongsToMany(Module, { through: Module_has_competence, as: 'module', foreignKey: 'module_id' }) Module.belongsToMany(Competence, { through: Module_has_competence, as: 'competence', foreignKey: 'competence_id' }) Which outputs a query that you're looking for SELECT `module`.`id`, `module`.`name`, `module`.`description`, `module`.`category_id`, `module`.`module_type_id`, `modul…
type: Answer
score: 10
upvote count: 10
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46458782
has text: Huh? You want to change the form on the fly? Why not just programatically create it to start with? Regardless, off topic.
score: 0
comment on: http://stackoverflow.com/q/29115209
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46519903
score: 0
comment on: http://stackoverflow.com/q/29144700
type: Comment
type: QuestionComment
has text: Try to return the stream (ie: `return critical.generateInline({ .....`)

http://stackoverflow.com/a/29126919
answers question: http://stackoverflow.com/q/29126342
downvote count: 0
has body: Another way: Firstly, assign a unique ID for each of the delete button. while($row = mysql_fetch_array($result)){ $num = $row['id']; echo " ".$row['id']." "; echo " ".$row['name']." "; echo " ".$row['lastname']." "; echo " ".$row['adress']." "; echo " ".$row['phonenumber']." "; echo " delete "; echo " "; } Then use jQuery: $('button[id^="delete"]').click(function () { var id = $(this).attr('id').substr(6); $.ajax({ type: "POST", url: "delete.php", data: {deleteId: id} }); });
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46453673
comment on: http://stackoverflow.com/q/29112167
type: Comment
type: QuestionComment
score: 1
has text: See http://api.jqueryui.com/selectable/ . Can create stacksnippets http://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/ , jsfiddle http://jsfiddle.net ?

knockout.js
tags question: http://stackoverflow.com/q/29171587
tags question: http://stackoverflow.com/q/29143898
tags question: http://stackoverflow.com/q/29092023
tags question: http://stackoverflow.com/q/29116697
tags question: http://stackoverflow.com/q/29103501
tags question: http://stackoverflow.com/q/29195506
tags question: http://stackoverflow.com/q/29119541
tags question: http://stackoverflow.com/q/29078681
tags question: http://stackoverflow.com/q/29146221
tags question: http://stackoverflow.com/q/29161978
tags question: http://stackoverflow.com/q/29113797
tags question: http://stackoverflow.com/q/29075726
tags question: http://stackoverflow.com/q/29118457
tags question: http://stackoverflow.com/q/29200012
tags question: http://stackoverflow.com/q/29129685
tags question: http://stackoverflow.com/q/29117316
tags question: http://stackoverflow.com/q/29190141
tags question: http://stackoverflow.com/q/29152175
tags question: http://stackoverflow.com/q/29148892
tags question: http://stackoverflow.com/q/29207685
tag name: knockout.js
tags question: http://stackoverflow.com/q/29186098
tags question: http://stackoverflow.com/q/29194707
tags question: http://stackoverflow.com/q/29165612
tags question: http://stackoverflow.com/q/29166119
tags question: http://stackoverflow.com/q/29194528
tags question: http://stackoverflow.com/q/29123250
tags question: http://stackoverflow.com/q/29177699
tags question: http://stackoverflow.com/q/29091193
tags question: http://stackoverflow.com/q/29163230
tags question: http://stackoverflow.com/q/29101928
tags question: http://stackoverflow.com/q/29210013
tags question: http://stackoverflow.com/q/29075623
tags question: http://stackoverflow.com/q/29206290
type: Tag
tags question: http://stackoverflow.com/q/29207329
tags question: http://stackoverflow.com/q/29094822
tags question: http://stackoverflow.com/q/29212355
tags question: http://stackoverflow.com/q/29171745
tags question: http://stackoverflow.com/q/29121383
tags question: http://stackoverflow.com/q/29109771
tags question: http://stackoverflow.com/q/29122458
tags question: http://stackoverflow.com/q/29143652
tags question: http://stackoverflow.com/q/29147834
tags question: http://stackoverflow.com/q/29080255

http://stackoverflow.com/q/29209868
has comment: http://stackoverflow.com/comment/46745644
downvote count: 0
has answer: http://stackoverflow.com/a/35042469
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29226931
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: video
has body: In our teamVideo.html page, we are using HTML5 video tag to show video. Video file is in .mov format( quicktime format) shot using iphone. &lt;video preload="none"&gt; &lt;source src="video/v1.mov"&gt; &lt;/video&gt; if teamVideo.html is opened directly in browser(chorme,IE9), page works properly, video plays properly. After hosting this page to sharepoint site, video is not working. chrome shows just black color video box, nothing happening on play. IE shows, like image not found box. In developer tools, i can see video file is getting requested &amp; downloaded with 200 ok status.If I open video url in new tab, video get downloaded properly. If I specify type="video/quicktime" in video tag, even local video does n't work &lt;video preload="none"&gt; &lt;source src="video/v1.mov" type="video/quicktime"&gt; &lt;/video&gt; If I specify type "video/mp4", even tough file is .mov type, it work on local , but doesn't work when hosted on server. &lt;video preload="none"&gt; &lt;source src="video/v1.mov" type="video/mp4"&gt; &lt;/video&gt; I tried to use .mp4 file instead of .mov file, but this is also not working after hosting. I found that, sharepoint server is issueing mime type "application/octate-stream" for .mp4 file &amp; may be this is causing problem for video tag. Can anyone suggest, what could be issue &amp; how to resolve this.
has title: HTML5 video not working on chrome,IE after hosting on server, video in mov file (quicktime format)
upvote count: 1
type: Question
tagged with: javascript
tagged with: sharepoint
answer count: 2

http://stackoverflow.com/a/29209716
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/29164551
has body: I had checked both plugins you use, and concluded that the problem is with your codes getting reloaded on every navigation. To tackle that problem, try using data-no-instant attribute for scripts which you need to load only once. That may include following: Youtube widget: Youtube API: JQuery library: YT Player plugin: InstantClick plugin: Put Following Codes Too inside: Also destroy your YT Player instance on mouseup and touchend events. $(body).on('mouseup touchend',".player",function(){ $(".player").playerDestroy(); }); And re-init the YT Player on InstantClick event change. InstantClick.on('change',function(){ $(".player").mb_YTPlayer(); }); Should you do that, I think the problem should be resolved.
upvote count: 1
answers question: http://stackoverflow.com/q/29164551
type: AcceptedAnswer
downvote count: 0

kineticjs
tags question: http://stackoverflow.com/q/29142245
type: Tag
tag name: kineticjs
tags question: http://stackoverflow.com/q/29189234

http://stackoverflow.com/q/29216433
tagged with: mongoose
tagged with: javascript
tagged with: express
downvote count: 0
answer count: 1
favorite count: 0
has body: I'm trying to test a post to a mongoose schema that has nested fields, but I'm only able to level 1 and the first field in level 2. For example: I have a network model that can contain multiple ip addresses and multiple subnets. When I place the query in to Postman it allows me to create multiple ip addresses and multiple subnets (great) but I can't define a type field for example? Mongoose Schema: var mongoose = require('mongoose'), Schema = mongoose.Schema, ObjectId = mongoose.Schema.ObjectId; var networkSchema = module.exports = mongoose.model('Network', { network_id:ObjectId, location: String, hostname: String, device: String, model: String, ipAddress: [ipaddressSchema], subnets: [subnetSchema], iosVersion: String, softwareImage: String, serialNumber: String, }); var ipaddressSchema = Schema ({ ipAddress: String, type: String, }); var subnetSchema = Schema ({ range: String, type: String, }); Controller: var Network = require('../models/network'); module.exports.create = function (req, res) { var network = new Network(req.body); network.save(function (err, result) { res.json(result); }); } module.exports.list = function (req, res) { Network.find({}, function (err, results) { res.json(results); }); } Postman Query: Postman Result: I would like: { "__v": 0, "location": "London Office", "hostname": "lon-asa-01", "device": "Switch-MLS", "model": "Cisco 3750", "softwareImage": "1.2", "serialNumber": "123456", "_id": "5510495c1d40ef965d7d1cec", "subnets":[ ["range" : "10.0.100.0/24", "type" : "Client" ], ["range" : "10.0.101.0/24", "type" : "Server" ], ], "ipAddress": [ ["ipAddress" : "10.0.100.1", "type" : "Inside" ], ["ipAddress" : "10.0.101.254", "type" : "Outside" ], ] }
upvote count: 2
has title: Postman only posts to mongoose nested level 1
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/46644599
has answer: http://stackoverflow.com/a/29221695
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46644238

http://stackoverflow.com/comment/46495313
type: QuestionComment
comment on: http://stackoverflow.com/q/29134961
has text: Sounds like homework to me. What have you tried? Where did you get stuck? Can you ask a more specific question about a piece of the solution rather than just ask us to write the code for you?
score: 0
type: Comment

http://stackoverflow.com/comment/46375662
type: QuestionComment
has text: Try providing a fiddle.
score: 1
comment on: http://stackoverflow.com/q/29070316
type: Comment

http://stackoverflow.com/comment/46472229
score: 0
has text: @Azzah if you assign same class to `content1` and `menu1` with `class="c1 hide"`, `content2` and `menu2` `class="c2 hide"` you can find easily which `menuN` element changed and then find all elements with `class="cN"` and do what you want with them easier than reconstructing `id`'s...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29122415

http://stackoverflow.com/q/29067932
type: Question
accepted answer: http://stackoverflow.com/a/29069548
tagged with: javascript
possible better answer: http://stackoverflow.com/a/34358397
answer count: 2
tagged with: mithril.js
has answer: http://stackoverflow.com/a/34358397
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: mithril hello world MVC example not working
tagged with: model-view-controller
type: AnsweredQuestion
score: 1
has body: I am having trouble getting the Mithril hello world MVC example working. Here is my code, as copied from the Mitrhil homepage. Note the only change I made was to swap the m.request({method: "GET", url: "pages.json"}); method call to a manually generated pages object. //namespace var app = {}; //model app.PageList = function() { var pages = []; pages.push({title: 'page 1', url: '/page1.html'}); pages.push({title: 'page 2', url: '/page2.html'}); return pages; }; //controller app.controller = function() { var pages = app.PageList(); return { pages: pages, rotate: function() { pages().push(pages().shift()); } } }; //view app.view = function(ctrl) { return [ ctrl.pages().map(function(page) { return m("a", {href: page.url}, page.title); }), m("button", {onclick: ctrl.rotate}, "Rotate links") ]; }; //initialize m.module(document.getElementById("example"), app); As you can see, my example above in jsFiddle doesn't work, but another Mitrhil example, the todo app jsFiddle works fine. I think it would make sense for the basic MVC Mitrhil example to work simply like the Todo app does, and possibly link to a jsFiddle or CodePen example for users to fork, similar to in React.
has answer: http://stackoverflow.com/a/29069548
upvote count: 1

http://stackoverflow.com/comment/46450571
score: 0
comment on: http://stackoverflow.com/q/29086574
type: Comment
type: QuestionComment
has text: I've updated my question. Any suggestion how to do this in some other, better, way would be great, because I've read that calling setState in componentDidMount is bad practice.

http://stackoverflow.com/q/29123844
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29123994
has body: I have a string like this __data__transition_fadeIn_phase1____transition_fadeOut_phase1__ and I want to capture fadeIn_phase1 and fadeOut_phase1 I had many attempts, including /transition_(\w+)__(?:$|(?:__trans\w*))/g but it only captures fadeIn_phase1____transition_fadeOut_phase1__ Is there a way to capture both? I realise I have to use while loop like... while (matches = pattern.exec(Object.keys(selection).join(""))) { keys.push(matches[1]) }
type: Question
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29123994
has title: How to terminate the capture

http://stackoverflow.com/a/29083489
has comment: http://stackoverflow.com/comment/46400526
accepted answer of: http://stackoverflow.com/q/29082909
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46401809
has comment: http://stackoverflow.com/comment/46400890
answers question: http://stackoverflow.com/q/29082909
has body: you could use a two-step regex find first word of subject by using this simple pattern ^(\w+) use the extracted word from step 1 as your regex pattern e.g. ^subs against the word substitute
has comment: http://stackoverflow.com/comment/46400483
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29104144
favorite count: 0
has answer: http://stackoverflow.com/a/29104190
has answer: http://stackoverflow.com/a/29104202
upvote count: 1
accepted answer: http://stackoverflow.com/a/29104190
answer count: 4
possible better answer: http://stackoverflow.com/a/29104202
type: AnsweredQuestion
tagged with: return-value
has comment: http://stackoverflow.com/comment/46438349
score: 1
has comment: http://stackoverflow.com/comment/46438382
type: Question
has answer: http://stackoverflow.com/a/29104513
tagged with: function
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/29104263
tagged with: javascript
has title: How can I use a Function to determine if a Value exists in a Javascript Array?
has body: I will be using an input field where a person types in a value. I create the variable that they will type in: 'Ben'. I want the function to loop thru the nameArray and return true or false. The script is not working and I know it is rather simple. function validateNames() { var name = "Ben"; var nameArray = ["Bill", "Barry", "Zack", "Will"]; var arrayLength = nameArray.length; for (var i = 0; i &lt; arrayLength; i++) { //Do something if (name != nameArray[i]) { alert((nameArray[i]) + "Name is not valid."); console.log("Name is not found in array."); } else { return true; console.log(nameArray[i]); } } }

http://stackoverflow.com/q/29145511
upvote count: 2
answer count: 1
favorite count: 0
has title: onsubmit still submits form even on return false from ajax verification
tagged with: php
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I am verifying my form using ajax, im just checking if there is a duplicate username, if there is it will return false, else return true. here is my ajax: function checkform(){ var username = $("#username").val(); $.ajax({url:"&lt;?php echo base_url() ?&gt;Delivery/usernamecheck/", data: {username: username}, type:'post', async:false, success: function(data){ if(data &gt; 0){ $("#info").attr("class","form-group has-error"); $("#info1").html("Duplicate Username!"); event.preventDefault(); return false; }else{ return true; } } }); } my html: &lt;form class="form-signin" role="form" action="&lt;?php echo base_url() ?&gt;Delivery/reg/" method = "post" onsubmit=" return checkform();"&gt; &lt;/form&gt; even on return false the form still submits. any idea why? also there are no errors.
tagged with: forms
accepted answer: http://stackoverflow.com/a/29145670
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29145670
tagged with: ajax

http://stackoverflow.com/a/29134308
answers question: http://stackoverflow.com/q/29133928
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29133928
has body: That sort of technique is called "Closure" in Javascript. When an inner function can access the scope of the outer function and preserves the outer scope for particular call. That is actually happening in your code when "go" function is being executed by "setTimeout" - it preserves the outer scope state of "init_page" function per each call. Closures one of the powerful feature in javascript you can take a look at the following examples that you can achieve by using them: Encapsulation - make your function members private (accessible only inside of your function(object) scope). To preserve the outer scope state while working with asyncronous calls inside of the loop. (In your case setTimeout) Here you can find some detailed answer as well: How do JavaScript closures work?
type: Answer

http://stackoverflow.com/comment/46591259
type: AnswerComment
score: 0
type: Comment
has text: i have a qr.js file which puts the information into the textbox (See update)
comment on: http://stackoverflow.com/a/29188122

scroll
tags question: http://stackoverflow.com/q/29064711
tags question: http://stackoverflow.com/q/29203545
tags question: http://stackoverflow.com/q/29151202
tags question: http://stackoverflow.com/q/29174764
tags question: http://stackoverflow.com/q/29156665
tags question: http://stackoverflow.com/q/29135713
tags question: http://stackoverflow.com/q/29186815
tags question: http://stackoverflow.com/q/29069002
type: Tag
tags question: http://stackoverflow.com/q/29195486
tags question: http://stackoverflow.com/q/29179332
tags question: http://stackoverflow.com/q/29170022
tags question: http://stackoverflow.com/q/29080295
tags question: http://stackoverflow.com/q/29084703
tags question: http://stackoverflow.com/q/29175034
tag name: scroll
tags question: http://stackoverflow.com/q/29196450

http://stackoverflow.com/comment/46406439
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29085792
has text: @sebnukem can you tell me how to use it?

http://stackoverflow.com/comment/46571969
score: 2
comment on: http://stackoverflow.com/q/29177039
has text: I'm guessing that saying 'the best way' is another way to phrase 'just give me the code'
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29179864
tagged with: php
has answer: http://stackoverflow.com/a/29179948
score: 2
accepted answer: http://stackoverflow.com/a/29179948
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29180785
type: Question
has answer: http://stackoverflow.com/a/29180098
has body: I research in google and stack overflow for this answer there are lot of answer but i cannot able to get what i want. I have two drop down menus and three text boxes. PHP Code : &lt;select onchange="FirstDropDownClick()"&gt; &lt;/select&gt; script code : &lt;script type="text/javascript"&gt; function FirstDropDownClick() { var selectDwn = document.getElementById("ID_dwn"); var selectedValue = selectDwn.options[selectBox.selectedIndex].value; } In "FirstDropDownClick()" i want the codes for the following : 1.select data from database according to the selected value. 2.Fill the text boxes with that. 3.Fill second drop down according to value of first drop-down menu. I need an example codes. Because am stuck , dont know how to do . Thanks in Advance.
tagged with: javascript
has comment: http://stackoverflow.com/comment/46576584
answer count: 3
possible better answer: http://stackoverflow.com/a/29180785
has title: populate text boxes depend on drop-down selection in php
has comment: http://stackoverflow.com/comment/46576545
downvote count: 0
has comment: http://stackoverflow.com/comment/46576410
tagged with: drop-down-menu
linked to: http://stackoverflow.com/q/29181389
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/46490625
has text: @Quince i don't think it's being overwritten since user var is defined right before the EJS template compile call
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29087536

http://stackoverflow.com/comment/46385352
score: 1
comment on: http://stackoverflow.com/a/29075861
type: AnswerComment
has text: So, what OP is doing is wrong. Are you suggesting this. However i would love to do the recommended one.
type: Comment

http://stackoverflow.com/comment/46367748
score: 1
has text: In Chrome, above your console, you can see a dropdown with "<top frame>" selected. Just select the iframe in that list, and you'll only get the logs from that one. Same goes for IE (Target dropdown). For Firefox, see [this](https://developer.mozilla.org/en-US/docs/Tools/Working_with_iframes).
comment on: http://stackoverflow.com/q/29066008
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29147364
type: AnsweredQuestion
has title: Run Firebug Lite from a JavaScript file?
accepted answer: http://stackoverflow.com/a/29147696
linked to: http://stackoverflow.com/q/5335491
type: Question
tagged with: firebug-lite
tagged with: javascript
has body: I'm trying to debug an iPad mini and don't have access to a Mac. I need to log some events during page-load. Is there some way to activate Firebug Lite from the JavaScript file, so that it's available while initiation JavaScript is running?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29147696

http://stackoverflow.com/comment/46559467
comment on: http://stackoverflow.com/q/29170361
score: 0
has text: -_- sorry guys. JS Objects 101! I'll edit question to make it more readable in case any more noobs show up with the same question. Thanks for your help
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29124053
type: Answer
upvote count: 1
has body: Everytime a user selects a timerange, it creates a kind of placeholder event for visual feedback to the user. This isn't actually an event yet, and it is removed when the user makes another selection. What you need to do, is add an actual event whenever a selection is made. Use the select callback. It's triggered every time the user selects (clicks and drags) a time slot. In it, call addEventSource to add it to the calendar as an actual event. And then call unselect to manually remove the placeholder. select: function (start, end, jsEvent, view) { $("#calendar").fullCalendar('addEventSource', [{ start: start, end: end, }, ]); $("#calendar").fullCalendar("unselect"); } JSFiddle
answers question: http://stackoverflow.com/q/29109482
downvote count: 0
score: 1

http://stackoverflow.com/comment/46568221
comment on: http://stackoverflow.com/a/29175056
type: Comment
score: 0
type: AnswerComment
has text: @tempoc thank you for the information. May be a stupid idea, can you access the iframe content by navigating to the iframe src url directly?..

http://stackoverflow.com/q/29097571
has title: PDFJs print directly witouth showing the PDF
favorite count: 0
tagged with: pdf.js
has comment: http://stackoverflow.com/comment/46446947
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46448741
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46460064
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46447193
tagged with: javascript
has body: I've to print from Silverlight a PDF avoiding to pass via Silverlight printing queue (it generate mega-fat print queue), so I've tought of using PDF.JS to show/print the pdf directly I've managed to show a PDF correctly with the toolbar and the print button, when I click it I perform the PDFJS.getDocument(THEFILEPATH).then(function (pdf) { window.print(); }) and this opens the printdialog correctly, but it calls the browser's print so if I don't specify the content it doesn't print Can I pass the PDF content to window print somehow? Thanks
tagged with: http://stackoverflow.com/tag/pdf
downvote count: 0

http://stackoverflow.com/comment/46530609
type: Comment
type: QuestionComment
has text: The below is how it looks on first run http://postimg.org/image/abz98exc9/ and when i refresh it looks like this http://postimg.org/image/5tf4xxde5/93ee1c8f/
score: 0
comment on: http://stackoverflow.com/q/29154661

http://stackoverflow.com/q/29152422
has title: Javascript forloop change to lodash
has answer: http://stackoverflow.com/a/29152973
has body: Need to change javascript code to lodash var templates = { "category": { "findByName": { "method": "generic", "settings": { "baseURL": "some2" } } }, "product": { "findByPartNumber": { "method": "generic", "settings": { "baseURL": "some1" } }, "findByUniqueId": { "method": "generic", "settings": { "baseURL": "some1" } } } }; for ( var index in templates) { var module = templates[index]; for ( var fileIndex in module) { if (module[fileIndex].method) { var dsSettings = module[fileIndex].settings; console.log(dsSettings) } } } result : { baseURL: 'some2' } { baseURL: 'some1' } { baseURL: 'some1' } Lodash code: _.forEach(templates, function(n, key) { var v = _.pluck(_.filter(n), 'settings'); console.log(v); }); result: [ { baseURL: 'some2' } ] [ { baseURL: 'some1' }, { baseURL: 'some1' } ] I am looking for object result in lodash code as given above. Please suggest
tagged with: lodash
has answer: http://stackoverflow.com/a/29152696
answer count: 4
has answer: http://stackoverflow.com/a/29152862
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29152538
type: Question
has answer: http://stackoverflow.com/a/29152538
accepted answer: http://stackoverflow.com/a/29152973
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46526607
has comment: http://stackoverflow.com/comment/46526347

http://stackoverflow.com/a/29195575
has comment: http://stackoverflow.com/comment/46604310
has comment: http://stackoverflow.com/comment/46604428
score: 3
type: AcceptedAnswer
downvote count: 0
has body: Your ajax request does xhr.open("GET", "http://localhost:3000/getData", true); your route listens for app.post('/getData', routes.getData); notice how you send a GET request and listen for a POST request, it's not the same thing, so you end up in the 404 route instead. You either have to change the ajax request, and send a POST request, or the route and listen for a GET request.
accepted answer of: http://stackoverflow.com/q/29195532
type: Answer
answers question: http://stackoverflow.com/q/29195532
has comment: http://stackoverflow.com/comment/46604840
upvote count: 3
has comment: http://stackoverflow.com/comment/46604350

http://stackoverflow.com/a/29068122
score: 0
type: Answer
has body: i have the solution , i just import model in my view and this is the code : App::import('Model', 'Location'); $this->Location = new Location(); if ($this->Location->field('status')=='0'): echo ' ';
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29065824
answers question: http://stackoverflow.com/q/29065824

http://stackoverflow.com/comment/46558352
comment on: http://stackoverflow.com/q/29169872
has text: Best guess: [Chrome updates the array after the console.log call](http://stackoverflow.com/questions/4057440/is-chromes-javascript-console-lazy-about-evaluating-arrays).
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46363795
type: QuestionComment
comment on: http://stackoverflow.com/q/29063897
score: 1
has text: You should not run in to any technical issues trying to implement this kind of complex logic. What have you tried?
type: Comment

http://stackoverflow.com/comment/46582194
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29182835
score: 0
has text: Can you provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve) that demonstrates the issue?

http://stackoverflow.com/a/29149162
answers question: http://stackoverflow.com/q/29148892
upvote count: 6
score: 6
has body: In your example, groupedResults is a list of arrays. Instead of this, try making a ViewModel for a group. This ViewModel can then be used for working out the totals. For example... function GroupViewModel(division) { var self = this; self.Division = division; self.Items = ko.observableArray(); self.Count = ko.computed(function() { var count = 0; ko.utils.arrayForEach(self.Items(), function(r) { count += r.totalCalls; }); return count; }); self.ChargeableCount = ko.computed(function() { var count = 0; ko.utils.arrayForEach(self.Items(), function(r) { count += r.chargeableCalls; }); return count; }); } You can simplify your main Viewmodel too, and push the items into the GroupViewModel instead: function GroupedReportingViewModel() { var self = this; self.results = ko.observableArray(); self.groupedResults = ko.computed(function() { var groups = []; ko.utils.arrayForEach(self.Results(), function(r) { var g = ko.utils.arrayFirst(groups, function(g) { return g.Division === r.division; }); if (!g) { g = new GroupViewModel(r.division); groups.push(g); } g.Items.push(r); }); return groups; }); self.TotalCount = ko.computed(function() { var count = 0; ko.utils.arrayForEach(self.results(), function(r) { count += r.totalCalls; }); return count; }); self.TotalChargeableCount = ko.computed(function() { var count = 0; ko.utils.arrayForEach(self.results(), function(r) { count += r.chargeableCalls; }); return count; }); } Finally in your view, iterate through the groups, and then the items: Total Calls Total Chargeable: Total Calls All Total Chargeable All
has comment: http://stackoverflow.com/comment/46522603
has comment: http://stackoverflow.com/comment/46522294
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46558902
accepted answer of: http://stackoverflow.com/q/29148892
has comment: http://stackoverflow.com/comment/46551911
has comment: http://stackoverflow.com/comment/46551881
type: Answer

http://stackoverflow.com/comment/46398675
type: QuestionComment
has text: Thank you @Sergio i have figured it out just now and here is my solution, i put it here on jsfiddle. https://jsfiddle.net/meily/m4ms8La9/
comment on: http://stackoverflow.com/q/29062636
score: 0
type: Comment

http://stackoverflow.com/comment/46568243
score: 0
type: Comment
type: QuestionComment
has text: You may need to add `Access-Control-Allow-Headers: Authorization` per the error.
comment on: http://stackoverflow.com/q/29175006

http://stackoverflow.com/a/29177071
has comment: http://stackoverflow.com/comment/46572440
has comment: http://stackoverflow.com/comment/46572141
downvote count: 0
answers question: http://stackoverflow.com/q/29176393
type: Answer
score: 3
has body: I guess you're mising ng-model inside HTML: //add ng-model. Because your directive requires ng-model. See here, it works well: http://plnkr.co/edit/g0qtbFJb1V4OxcXNRTVf?p=preview Using a div instead of input tag: http://plnkr.co/edit/UiosU1WvyUvhgLBlzX6r?p=preview
upvote count: 3

http://stackoverflow.com/q/29082918
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29085529
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46399197
has body: I have some web-based software a user interacts with (made in PHP, HTML, JavaScript). The software records a user's interaction (e.g., web session), and after users complete a task, I would like them to complete a survey. Rather than coding the survey in PHP or Javascript (which can be buggy), I'd like to use Qualtrics. I would like to link their survey output with their interaction data with a userID I define in my software, but it doesn't seem obvious how. I would like to do the following approach: Submit a form to a qualtrics survey with a userID POST variable. Save this POST variable as output in Qualtrics. Is there any way to do this, and if so, how? If there's another way to link the Qualtrics survey data without using POST variables, I'm open to that as well (as long as it isn't GET).
score: 0
tagged with: qualtrics
answer count: 1
accepted answer: http://stackoverflow.com/a/29085529
has title: How do you add and save a POST variable to Qualtrics?
tagged with: php

http://stackoverflow.com/comment/46461557
has text: see http://jsfiddle.net/arunpjohny/ckqp76kv/1/
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29113698

cakephp
tags question: http://stackoverflow.com/q/29088839
type: Tag
tags question: http://stackoverflow.com/q/29074207
tag name: cakephp
tags question: http://stackoverflow.com/q/29065824
tags question: http://stackoverflow.com/q/29142736

http://stackoverflow.com/comment/46423533
has text: Go through [this](http://developer.android.com/guide/webapps/webview.html#BindingJavaScript)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29094861
type: AnswerComment

http://stackoverflow.com/a/29177629
answers question: http://stackoverflow.com/q/29177602
has body: Try change the if ($("#entry .caption").height()&gt;250) to: if ($("#entry .caption").height()&gt;=250) so you also match 250px of height and above. And for each element that matches: $(document).ready(function(){ $('.entry .caption').each(function(i, ui){ if ($(this).height()&gt;=250) { $(this).parents('.entry').find('.b').show(); } }); });
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46572809
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29177602
has comment: http://stackoverflow.com/comment/46572914
has comment: http://stackoverflow.com/comment/46572841

http://stackoverflow.com/comment/46367317
score: 0
type: Comment
type: QuestionComment
has text: I then have to use 3 x ng-repeats to access the data
comment on: http://stackoverflow.com/q/29065836

http://stackoverflow.com/q/29122495
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46476136
has comment: http://stackoverflow.com/comment/46475608
has comment: http://stackoverflow.com/comment/46502071
has comment: http://stackoverflow.com/comment/46489522
has body: I have Topic Search and Google and all search engines want to have 301 redirect, my project is set up on Heroku Cloud use node server and have problem whit redirect 301 'domain.com' to 'www.domain.com'....
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46476733
has comment: http://stackoverflow.com/comment/46475401
tagged with: javascript
has title: How to make 301 redirect in Node JS project with Express JS router?
tagged with: express
has answer: http://stackoverflow.com/a/29141693
type: Question
has comment: http://stackoverflow.com/comment/46476359
tagged with: node.js
has comment: http://stackoverflow.com/comment/46502271

image
tags question: http://stackoverflow.com/q/29103809
tags question: http://stackoverflow.com/q/29138316
tags question: http://stackoverflow.com/q/29189234
tags question: http://stackoverflow.com/q/29106347
tags question: http://stackoverflow.com/q/29093285
tags question: http://stackoverflow.com/q/29094378
tags question: http://stackoverflow.com/q/29213004
tags question: http://stackoverflow.com/q/29073020
tags question: http://stackoverflow.com/q/29186385
tags question: http://stackoverflow.com/q/29147731
tags question: http://stackoverflow.com/q/29197291
tags question: http://stackoverflow.com/q/29087361
tags question: http://stackoverflow.com/q/29187029
tags question: http://stackoverflow.com/q/29185142
tags question: http://stackoverflow.com/q/29200556
tags question: http://stackoverflow.com/q/29151529
tags question: http://stackoverflow.com/q/29211820
tags question: http://stackoverflow.com/q/29182283
tags question: http://stackoverflow.com/q/29189685
tags question: http://stackoverflow.com/q/29125645
tags question: http://stackoverflow.com/q/29081909
tags question: http://stackoverflow.com/q/29173548
tags question: http://stackoverflow.com/q/29073181
tags question: http://stackoverflow.com/q/29119014
tags question: http://stackoverflow.com/q/29169944
tags question: http://stackoverflow.com/q/29101861
tags question: http://stackoverflow.com/q/29182698
tags question: http://stackoverflow.com/q/29096705
tags question: http://stackoverflow.com/q/29111867
tag name: image
tags question: http://stackoverflow.com/q/29154661
tags question: http://stackoverflow.com/q/29114182
tags question: http://stackoverflow.com/q/29113855
tags question: http://stackoverflow.com/q/29126364
type: Tag
tags question: http://stackoverflow.com/q/29172223

http://stackoverflow.com/comment/46540982
has text: It worked. Sorry for the unawareness. I'm new to ajax and javascript. Let me just mark your answer as correct. :) thanks
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29160613
score: 0

http://stackoverflow.com/q/29208448
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46627027
tagged with: php
has comment: http://stackoverflow.com/comment/46627044
has body: I am trying to to use html select and basing on the selected value display the mysql query value. I pick the selected value by id using javascript and their after convert them to php variables as demostrated below I then use a comparison statement to evaluate the php variable and if true go ahead echo the db query result. However the if statement on the php script seems not to be working and doesnt return or echo anything //HTML FORM select MOH Day 1 Day 2 Day 1 and 2 "; $moh2 = " "; $moh3 = " "; //$moh = " " ; ?> <?php endif; ?> <?php $i=1; if ($data && $_GET['log'] == 'ATTNSC') { print_r($moe1); foreach ($data as $key => $value) { //print_r($moe3); if($moe3 == 'received_moe_day1_and_2'){ echo " ".$value['received_moe_day1_and_2']." "; } elseif ($moe2 == 'received_moe_day2'){ echo " ".$value['received_moe_day2']." "; } elseif ($moe1 == 'received_moe_day1'){ echo " ".$value['received_moe_day1']." "; } elseif ($moh3 == 'received_moh_day1_and_2'){ echo " ".$value['received_moh_day1_and_2']." "; } elseif ($moh2 == 'received_moh_day2'){ echo " ".$value['received_moh_day2']." "; } elseif ($moh1 == 'received_moh_day1') { echo " ".$value['received_moh_day1']." "; } $i++; } }else{ ?>
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46627275
has title: html select statement with js and php not working
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46627818
has comment: http://stackoverflow.com/comment/46629755

http://stackoverflow.com/comment/46373382
has text: Sorry about that. [Here's a link](http://jsbin.com/voxeleyazo/3/edit?html,js,output) to the JSbin.
score: 0
comment on: http://stackoverflow.com/a/29066334
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29096309
score: 0
has comment: http://stackoverflow.com/comment/46426129
has answer: http://stackoverflow.com/a/29101397
has body: How to Customize Text Above Order Summary in Paypal Like the title says, I'd like to ask how to change the text above the order summary in Paypal. Right now it displays my email address, and I'd like to change it to something more formal, like "My Store" or something. I'm using http://paypal.github.io/JavaScriptButtons/ to create my button, and here's the code that I got: &lt;script async="async" src="https://www.paypalobjects.com/js/external/paypal-button.min.js?merchant=&lt;email&gt;" data-button="buynow" data-size="large" data-name="test name" data-quantity="1" data-amount="5" data-currency="USD" data-callback="&lt;url&gt;" data-return="&lt;url&gt;" data-env="sandbox"&gt;&lt;/script&gt; Thanks.
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29101397
tagged with: paypal-sandbox
has title: How to Customize Text Above Order Summary in Paypal
type: Question
tagged with: paypal
answer count: 1

http://stackoverflow.com/comment/46621921
type: QuestionComment
comment on: http://stackoverflow.com/q/29205319
score: 0
has text: Indeed, I messed up with the curly braces on other parts of the code.
type: Comment

http://stackoverflow.com/q/29134961
has comment: http://stackoverflow.com/comment/46495306
has answer: http://stackoverflow.com/a/29135186
has comment: http://stackoverflow.com/comment/46495313
downvote count: 1
type: Question
answer count: 1
tagged with: javascript
score: 0
has body: console.log( ‘blah’.repeatMe( 3 ) ); Using Javascript write the code that would make the previous function print: Output: blahblahblah
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has title: javascript exercise - recursive function with a string
has comment: http://stackoverflow.com/comment/46495263
tagged with: recursion
has comment: http://stackoverflow.com/comment/46516425

http://stackoverflow.com/q/29147517
answer count: 1
has body: I'm using Durandal to create a single page application, and I want to use CKEditor in it. I've had some issues with Durandal using javascript within an html page, but given what I'm doing, I don't know an alternative to put the necessary javascript in the js file. The html file works fine on its own, but when Durandal runs it, the javascript seems to be ignored. By clicking in the div, CKEditor should display a toolbar for editing the html inline, but that doesn't happen when I run it with Durandal. createCourse.html Create a Course Inline Editing in Action! The "div" element that contains this text is now editable. createCourse.js define(["plugins/http", "durandal/app", "knockout", "ckeditor"], function (http, app, ko, cke) { var ctor = function () { this.displayName = "Create a Course"; this.description = "Add a new course"; }; return ctor; }); What can I do to allow CKEditor to work with Durandal?
tagged with: durandal
type: AnsweredQuestion
has title: Inline CKEditor in Durandal
type: Question
accepted answer: http://stackoverflow.com/a/31438038
tagged with: javascript
tagged with: ckeditor
score: 0
has answer: http://stackoverflow.com/a/31438038

http://stackoverflow.com/comment/46609379
score: 0
has text: You're returning a function, not calling the function and returning the result. Of course the variable is undefined.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29198420

http://stackoverflow.com/a/29209985
has body: Another approach: You could also store the trackId in a data attribute on the DOM element itself. for (var j = 0; j &lt; tracks; j++) { ctrl[j].setAttribute("data-trackId", j); ctrl[j].onclick = function(event) { console.log(event.toElement.getAttribute("data-trackId")); } }
type: Answer
answers question: http://stackoverflow.com/q/29208746
score: 0

http://stackoverflow.com/comment/46456557
comment on: http://stackoverflow.com/a/29098041
has text: [This](https://jsfiddle.net/fLzujvdx/) is the implementation of the above function
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46616353
score: 0
type: AnswerComment
has text: @Mickey That seems odd, I just tested and it seemed to work for me. Have you tried refreshing your page with ctrl+f5 ?
type: Comment
comment on: http://stackoverflow.com/a/29201927

http://stackoverflow.com/q/29146551
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Can exclude a div (class) from html doc. ready event?
tagged with: http://stackoverflow.com/tag/html
has body: I have an HTML page that has external javascript, mostly facebook plugins and other social plugins, which slow down the load time of whole page. I have a javascript loader that hides everything except "Loading" and the AJAX loader gif until whole page has completely loaded. Here is the script: My page looking somehow like this : I want to show the body content even before the social plugins load.
tagged with: css
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: facebook
upvote count: 1
has comment: http://stackoverflow.com/comment/46516050
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46516009

http://stackoverflow.com/a/29122065
score: 1
has body: Myops is not being injected. Change it to ... MyApp.controller("psCtrls",['$scope', 'Myops', function($scope,Myops) ...
upvote count: 1
answers question: http://stackoverflow.com/q/29121999
type: Answer
downvote count: 0

http://stackoverflow.com/q/29196112
tagged with: javascript
has comment: http://stackoverflow.com/comment/46605038
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46605097
type: UnansweredQuestion
has body: Just thinking of in Javascript, normally we put method inside prototype which can avoid code duplication. I am wondering if there is real cases that we need to put method as non-prototype method? If yes, could you provide some examples.
has answer: http://stackoverflow.com/a/29196283
type: Question
has title: Is there any case that a method should not be the prototype method?

http://stackoverflow.com/comment/46522762
comment on: http://stackoverflow.com/q/29150278
score: 0
has text: Please use the code blocks for any code you put in your question.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29181435
has body: Author of qwest here ;) As stated in the docs : the default Content-Type header is application/x-www-form-urlencoded for post and xhr2 data types, with a POST request. But Google Shortener service does not accept it. I assume it wants a JSON input type. Then you should set the dataType option of qwest to json. Furthermore, your responseType option is invalid and does not follow the docs. Normally, you don't have to set it if Google replies to request with a valid Content-Type header. Here's the good code : qwest.post('https://www.googleapis.com/urlshortener/v1/url?key=479dfb502221d2b4c4a0433c600e16ba5dc0df4e&amp;', {longUrl: longURL}, {dataType:'json'}) In the case where Google does not send a recognized Content-Type, just set the responseType option to json too.
type: Answer
accepted answer of: http://stackoverflow.com/q/29172753
downvote count: 0
score: 6
answers question: http://stackoverflow.com/q/29172753
has comment: http://stackoverflow.com/comment/87666183
has comment: http://stackoverflow.com/comment/46580299
upvote count: 6
has comment: http://stackoverflow.com/comment/87652224
has comment: http://stackoverflow.com/comment/46579567
type: AcceptedAnswer

http://stackoverflow.com/a/29214445
has comment: http://stackoverflow.com/comment/46638362
has comment: http://stackoverflow.com/comment/46638781
score: 0
has body: Seems like you are accessing your DOM before loading it. $( document ).ready(function(){ displaySkins(ashe); }); This will defer execution of your script until the DOM is loaded. It works in the fiddle as they put include the script in the end of the DOM. So DOM is loaded first and the script is included and finally executed. You do it the other way round (which is also fine) which obviously does not work
type: Answer
has comment: http://stackoverflow.com/comment/46638248
answers question: http://stackoverflow.com/q/29214139

http://stackoverflow.com/a/29212483
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29211435
upvote count: 2
type: AcceptedAnswer
has body: event.returnValue was an IE proprietary mechanism which is now deprecated.IE has been moving away from its old proprietary APIs and moving towards web standard adoption since around IE 9. The standard, and what will work on IE 11, is event.preventDefault. If you want to cover all your bases, you can continue to include the old APIs in your code, and use feature detection for preventDefault: onkeydown = "if (event.keyCode == 13) { event.returnValue = false; event.cancel = true; if (event.preventDefault) { event.preventDefault(); } }"
has comment: http://stackoverflow.com/comment/46799975
type: Answer
answers question: http://stackoverflow.com/q/29211435
score: 2

http://stackoverflow.com/a/32338004
score: 0
has body: "The reason behind it is that I need to login to the website from a mobile App" why not make http post request to user.php? do post request to login page grab cookies do post request to gather data grab input stream process response stream
answers question: http://stackoverflow.com/q/29068640
type: Answer

http://stackoverflow.com/a/29211662
score: 4
type: AcceptedAnswer
has body: You cannot have document object inside your script so remove below code from script.js $(document).ready(function() { $(function () { //Do my stuff }); }); Instead of above code, you can call your script function from html page like below &lt;script&gt; $(document).ready(function() { //call your script.js function from here }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/29211586
answers question: http://stackoverflow.com/q/29211586
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46632986

http://stackoverflow.com/comment/46494866
type: QuestionComment
comment on: http://stackoverflow.com/q/29134656
has text: It should be just `if (isNaN(field)) {`
score: 0
type: Comment

http://stackoverflow.com/q/29124217
has title: I need to put a link next to a checkbox in XPages
has comment: http://stackoverflow.com/comment/46489905
has comment: http://stackoverflow.com/comment/46490392
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46475000
has answer: http://stackoverflow.com/a/29124419
has body: I am trying to use a link instead of the checkbox label because I want the checkbox to be ticked when I click the checkbox and something else to happen when I click the link. I have tried to put the link after the checkbox and inside the checkbox but the checkbox seem to be wrapped in a div causing it to be misaligned Here is my code &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &lt;xp:panel style="margin:20px"&gt; &lt;xp:checkBox id="checkBox2"&gt;&lt;/xp:checkBox&gt; &lt;xp:link escape="true" text="Link2" id="link2"&gt;&lt;/xp:link&gt; &lt;xp:checkBox id="checkBox1"&gt; &lt;xp:link escape="true" text="Link1" id="link1"&gt;&lt;/xp:link&gt; &lt;/xp:checkBox&gt; &lt;/xp:panel&gt; &lt;/xp:view&gt; This is the resulting HTML This is the web page result Is there a way I can add an xp:link next to my checkbox?
type: Question
answer count: 3
tagged with: javascript
tagged with: xpages
possible better answer: http://stackoverflow.com/a/29124991
score: 0
has answer: http://stackoverflow.com/a/29124991
accepted answer: http://stackoverflow.com/a/29124419
tagged with: checkbox
has comment: http://stackoverflow.com/comment/46490328
has answer: http://stackoverflow.com/a/29125360
has comment: http://stackoverflow.com/comment/46475840

http://stackoverflow.com/comment/46372412
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29068502
has text: Yes, you're right, jquery is not required. I'd started down a different way and forgot to remove it.
type: AnswerComment

http://stackoverflow.com/comment/46462397
comment on: http://stackoverflow.com/a/29117306
type: AnswerComment
has text: @John The first solution is for explanation why your code didn't work and the second solution is how you code should be like to make your function work.
score: 0
type: Comment

http://stackoverflow.com/comment/46586721
type: AnswerComment
has text: one more doubt. When you put alert alert ending for loop for DATE[0] or DATE[1] the months are coming in order but after 01-DEC-2014 the next month must be 01-JAN-2015. But here in your code it is 01-JAN-2014
score: 0
comment on: http://stackoverflow.com/a/29184660
type: Comment

http://stackoverflow.com/comment/46511348
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29144027
has text: it doesn't showing me the expected output. See i did't get any output in `console.log(newArr[0])`
score: 0

http://stackoverflow.com/q/29145690
linked to: http://stackoverflow.com/q/3150371
has title: Fullcalendar month time format like weeks
tagged with: javascript
tagged with: fullcalendar
type: Question
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29148375
duplicate of: http://stackoverflow.com/q/3150371
downvote count: 0
type: UnansweredQuestion
score: 1
has body: Can anyone suggests how could I change month time format to look like week format? There is this calendar 'framework' http://fullcalendar.io/views/month/ If you changed to weeks, you could see it uses time like this: start_time - end_time In months calendar view, it only shows start_time. I didn't find where I should change in view to show it exactly like in a week. In default options I found this object: timeFormat : { // for agendaWeek and agendaDay agenda: shortTimeformat + '{ - ' + shortTimeformat + '}', // 5:00 - 6:30 // for all other views '': shortTimeformat.replace(/:mm/,'(:mm)') // 7pm }, I tried duplicating agenda format for other views (simply replacing // 7pm format with the one above), but it didn't change anything. Maybe someone have more experience with this Fullcalendar and can suggest something?

http://stackoverflow.com/a/29268334
answers question: http://stackoverflow.com/q/29206210
has body: You can also use this function to check in between: &lt;html&gt; &lt;head&gt; &lt;script&gt; onload = function() { var element = document.getElementById("upload"); var minutes = new Date().getMinutes(); if (check_between(minutes,25,35) || check_between(minutes,54,06)){ element.style.display = 'inline'; } else { element.style.display = 'none'; } function check_between(minutes,n1,n2){ if (minutes &gt; n1 &amp;&amp; minutes &lt; n2){ return true; }else{ return false; } } } &lt;/script&gt; &lt;head&gt; &lt;body&gt; &lt;button id="upload" style="display:none;"&gt; SIGN IN &lt;/button&gt; &lt;/body&gt; &lt;/html&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/46629983
has text: Yes but i want to reload the widget only
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29209173

http://stackoverflow.com/a/29174888
has comment: http://stackoverflow.com/comment/46567847
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46588698
has comment: http://stackoverflow.com/comment/46851119
has comment: http://stackoverflow.com/comment/46568107
has comment: http://stackoverflow.com/comment/46843592
answers question: http://stackoverflow.com/q/29172041
has comment: http://stackoverflow.com/comment/46570348
has comment: http://stackoverflow.com/comment/46852317
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29172041
has comment: http://stackoverflow.com/comment/46569097
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46568540
has body: If I understand you correctly, when you click a link in the notifications template, you want to take the user to the commentList page and then manipulate the CSS of the referred-to comment? There are probably a couple of ways to do this. The first step is going to be to make sure that you have a way to select that particular DOM element once the page loads. For that, in your commentItem template, you might do something like this: &lt;template name='commentItem'&gt; &lt;div class='commentItem' id='comment-{{_id}}'&gt; .... &lt;/div&gt; &lt;/template&gt; If you're using iron:router, a quick and easy way (but not a particularly robust way) to do this would be to manually redirect to the commentList page, then perform your manipulation as part of the event handler once the page has rendered: Template.notification.events({ 'click a':function(event) { event.preventDefault(); // don't let this take you anywhere var commentTemplate = this.commentId; Router.go($(event.currentTarget).attr('href')); setTimeout(function() { $('#comment-' + commentTemplate).addClass('whatever-class-you-want'); }, 500); // need to wait for the page to render first -- this is probably not a robust method } }); A more robust option, which has the added benefit of persisting on page refresh, might be to add an optional referrer parameter to the URL (i.e., have the link be something like &lt;a href="{{pathFor commentsPage query='referrer=[comment _id]'}}"&gt;...&lt;/a&gt;, where [comment _id] is replaced by the _id of the comment in question), then in your commentList template, once your page has rendered, you can see if there's a referrer, and if there is, change the CSS: Template.commentList.rendered = function() { var referrer = Router.current().params.query.referrer; if (referrer) { $('#comment-' + referrer).addClass('whatever-class-you-want'); } }
type: Answer

http://stackoverflow.com/a/29138286
score: 0
accepted answer of: http://stackoverflow.com/q/29137946
type: Answer
answers question: http://stackoverflow.com/q/29137946
has body: Found the answer. Renaming it on form.parse() doest the trick. form.parse(req, function(err, fields, files) { var img_name = randomInt(0,100000).toString(); fs.rename(files.upload.path, _path +'/'+ img_name + '.png', function (error) { if (error) { fs.unlink(_path +'/'+img_name+'.png'); fs.rename(files.upload.path, _path +'/'+img_name+'.png'); } }); });
has comment: http://stackoverflow.com/comment/46501679
type: AcceptedAnswer

http://stackoverflow.com/q/29122193
score: 0
has comment: http://stackoverflow.com/comment/46476598
has comment: http://stackoverflow.com/comment/46471220
has comment: http://stackoverflow.com/comment/46475865
has title: D3 force layout using canvas zoom
has body: i have basic d3 force layout, but for rendering edges and nodes I´m using canvas. What I need is to set up zoom behaviour. When I implemented zoom, like on example below, zoom works only after d3 layout animation is stopped. When I´m draging nodes zoom don´t work too. Here is my draw method, which I call onTick event: function drawCanvas() { context.clearRect(0, 0, width, height); edges.forEach(function (d) { // Draw a line from source to target. context.beginPath(); context.moveTo(d.source.x, d.source.y); context.lineTo(d.target.x, d.target.y); context.stroke(); }); } I also registered zoom event which fire this method: function onZoomChanged() { context.save(); context.clearRect(0, 0, width, height); context.scale(d3.event.scale, d3.event.scale); context.translate(d3.event.translate[0], d3.event.translate[1]); drawCanvas(); context.restore(); container.attr("transform", "translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")"); } Like I mentioned, zoom works only if layout is stoped and nodes are not moving. It is possible to get it work ALL TIME, when layout is still procesing ? Taknks for help! I create basic example of my problem on this fiddle. Zoom work after while..
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46475691
type: Question
tagged with: force-layout
has comment: http://stackoverflow.com/comment/46471646
tagged with: canvas
has comment: http://stackoverflow.com/comment/46476816
tagged with: javascript
has comment: http://stackoverflow.com/comment/46470945

http://stackoverflow.com/a/29109012
score: 0
has comment: http://stackoverflow.com/comment/46529073
has comment: http://stackoverflow.com/comment/46478401
has body: First, there is a Typo on &lt;%:Model.DataTable%&gt; this should be &lt;%=Model.DataTable%&gt; see if that helps otherwise what you can do is put that object as an hidden element in may be an input tag with an ID and pass that element object by the help of javascript document.getElementById(id of your hidden Input) see if that helps.
type: Answer
answers question: http://stackoverflow.com/q/29107783
has comment: http://stackoverflow.com/comment/46528793
has comment: http://stackoverflow.com/comment/46451809
has comment: http://stackoverflow.com/comment/46494906
has comment: http://stackoverflow.com/comment/46448195
has comment: http://stackoverflow.com/comment/46528644

http://stackoverflow.com/q/29141766
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: forms
has body: I am trying to build an extension to a form using AngularJS whereby a series of set, fixed values pre-exist, whose values correspond to parameters which are passed through to a controller. Once these five, fixed values are set and present, custom options may be present which should use the same values, for which I'm using ng-repeat for. I've got my values returning correctly, however by design, multiple checkboxes exist with the same value, which obviously causes all the inputs with the same value to select when selecting any one individual radio button. My initial code being used to generate the form is as follows: Select a report type Grade Weight Calendar of supply Postmortem Dead weight gain {{report.name}} which gives me resulting HTML of: Grade Weight Calendar of supply Postmortem Dead weight gain Test save report Test save report Test save report Custom DWG report Test Postmortem report ...and I've made a stab at updating the values so they don't clash with the following code, which does alleviate the issue insofar as the radio buttons are now isolated in scope and only one selects at a time, due to the number_ prefix on each input's value attribute: Select a report type Grade Weight Calendar of supply Postmortem Dead weight gain {{report.name}} My controller which handles all these inputs has a block with the following: vm.searchParams = { datefrom: $state.params.datefrom ? new Date($state.params.datefrom) : void 0, dateto: $state.params.dateto ? new Date($state.params.dateto) : void 0, lot: $state.params.lot, site: $state.params.site || constants.DEFAULT_ANY, type: $state.params.type || constants.DEFAULT_TYPE, name: $state.params.name }; Essentially, I'm looking for some way to get the value attribute of the 'custom' reports, so a user can select only one radio button at any one time (so they should all have unique values), but when passed to the controller, the values should all be the same (so 6_weights should be passed as weights, 7_grades should be pass…
has title: AngularJS - Getting value of radio inputs where multiples exist
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: regex
tagged with: angularjs-ng-repeat
answer count: 0

http://stackoverflow.com/comment/46466042
type: AnswerComment
type: Comment
has text: problem is that if you see the documentation, you cannot use '%' when setting height and width, thats the big problem,
comment on: http://stackoverflow.com/a/29119006
score: 0

http://stackoverflow.com/comment/46503958
type: Comment
has text: My suggestion of solution was wrong....but if you take five minuts to read the question I linked you may find a good solution....or may be you can ask @mplungjan...
comment on: http://stackoverflow.com/a/29126756
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46473603
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29123676
has text: Try to first solve your problem. From there on, try to optimise it.

http://stackoverflow.com/comment/46467192
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29119674
type: Comment
has text: Given that you are trying to access a property of variable in javascript object notation, it should work just fine. Are you certain that the returned 'result' is an object, not a string?

http://stackoverflow.com/a/29208346
type: Answer
answers question: http://stackoverflow.com/q/29208315
upvote count: 2
score: 2
has body: Looking at your echo statement rendering the markup, you haven't designated class="checkbox" at all: echo '&lt;input type="checkbox" name="db" id="' . $row ['Database'] . '" value="' . $row ['Database'] . '" /&gt;'; Since you haven't added it, pointing to $(".checkbox") won't work. You need to add them in the echo.
downvote count: 0

flux
tag name: flux
tags question: http://stackoverflow.com/q/29075534
tags question: http://stackoverflow.com/q/29177799
tags question: http://stackoverflow.com/q/29170956
type: Tag

http://stackoverflow.com/comment/46555050
score: 0
type: Comment
type: AnswerComment
has text: Do you have `@constituency` object here
comment on: http://stackoverflow.com/a/29097235

http://stackoverflow.com/comment/46361299
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29062563
has text: I guess static is not needed it can be simply src="js/controller.js" and "js/app.js"
score: 0

http://stackoverflow.com/comment/46510439
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29143185
type: Comment
has text: When loading my page again its redirected to www.dinamalar.com

http://stackoverflow.com/q/29090543
downvote count: 2
type: Question
has title: Should I include the Google Map script tag on every page of my website?
has answer: http://stackoverflow.com/a/29090562
accepted answer: http://stackoverflow.com/a/29090562
tagged with: google-maps
upvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/29090570
tagged with: http://stackoverflow.com/tag/html
score: -2
has answer: http://stackoverflow.com/a/29090573
has answer: http://stackoverflow.com/a/29090570
type: AnsweredQuestion
has body: It seems that if I do not include the script tag for the google map on each page of my website, then I get this error: "Uncaught ReferenceError: google is not defined". If I do include the script tag on a page where there is no map I get this error "Uncaught TypeError: Cannot read property 'offsetWidth' of null". Maybe I need some sort of check system in the javascript to see if that ID exists? I wasn't sure what is the correct way of incorporating the Google map API? This is what my javascript looks like: // Google Map function initialize() { var mapCanvas = document.getElementById('map-canvas'); var mapOptions = { center: new google.maps.LatLng(44.5403, -78.5463), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(mapCanvas, mapOptions) } google.maps.event.addDomListener(window, 'load', initialize);

http://stackoverflow.com/q/29145130
accepted answer: http://stackoverflow.com/a/29145372
has comment: http://stackoverflow.com/comment/46512902
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29145322
has title: Last created DIV to be above other DIVs
has comment: http://stackoverflow.com/comment/46512891
has answer: http://stackoverflow.com/a/29145372
has answer: http://stackoverflow.com/a/29145313
type: Question
has comment: http://stackoverflow.com/comment/46513031
has answer: http://stackoverflow.com/a/29145195
has answer: http://stackoverflow.com/a/29145200
has body: I'm creating DIVs dynamically and appending them to a particular DIV. My question is how do I always make the last created DIV to be above other DIVs within the appended (its parent) DIV? So basically I want the last created DIV to be on the top level of the other. DIV 4 - [created at 4:32pm] DIV 3 - [created at 4:29pm] DIV 2 - [created at 4:27pm] DIV 1 - [created at 4:26pm] the dynamic DIV css: .dynamicDIV{ width:100%; position: relative; } the append DIV css: .parentDiv{ width: 100%; margin-top: 5px; } I'm not referring to the z-index. I want to position it above the others.
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29145200

http://stackoverflow.com/a/29202705
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29202231
has body: You can look these: - Backbone: http://backbonejs.org/ - EmberJS: http://emberjs.com/

http://stackoverflow.com/q/29155605
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29246727
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Are they any syntax highlighting plugins that will allow you to embed an ignorable html element into a snippet?
accepted answer: http://stackoverflow.com/a/29246727
upvote count: 1
tagged with: syntax-highlighting
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46533053
has body: I am trying to make dynamic code examples for our api that can be constructed from from input html elements. A paired down example looks like this, I give the user an input to name the device they would like to create. I would then like that input to update code examples (replacing the device name in the example with the one the user inputs). device = { "name": "Name" } client.createDevicewrite(device) I have all of the code setup for observing a change in the input and updating the code examples, this works great. All of the syntax highlighters I have looked at, usually chop the snippet up and rerender the example wrapped with its own html (for styling). Is there an option/configurable way to get a syntax highlighter to not strip the these tags, or is there a different approach I should be looking at for preserving the syntax highlighting and still supporting dynamic updates without having to do a full text search of each snippet's rendered tags. The example output of the pygment (current syntax highlighter I'm using). device = { "name" : "Name" }

http://stackoverflow.com/comment/46391974
score: 0
type: Comment
type: QuestionComment
has text: That's giving you a clue not the exact answer and wow you solve it by yourself, nice for you.
comment on: http://stackoverflow.com/q/29078769

http://stackoverflow.com/comment/46624807
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29205289
type: QuestionComment
has text: Probably something is wrong inside of js file.

http://stackoverflow.com/comment/46630835
type: Comment
comment on: http://stackoverflow.com/a/29210553
score: 0
type: AnswerComment
has text: Sorry, I don't have access to the server. I'm doing this with jquery + JS as it's a userscript.

http://stackoverflow.com/a/77382334
answers question: http://stackoverflow.com/q/29167697
has body: Easily add this snippet to calander arguments: eventOverlap: function(stillEvent, movingEvent) { return false; }
score: 0
type: Answer

http://stackoverflow.com/comment/46610534
score: 0
type: AnswerComment
has text: Agreed. All variables belong at the top of a function body.
type: Comment
comment on: http://stackoverflow.com/a/29199090

http://stackoverflow.com/comment/46437755
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29092417
has text: Basically the encodeURIComponent escapes more characters than the encodeURI, so that's why it works.

http://stackoverflow.com/q/29183605
tagged with: http://stackoverflow.com/tag/html
has title: outer div content going inside of inner div
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29183658
upvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/29183658
has body: Hello I need 2 div one inside another. The HTML code is below:- &lt;div style="width: 500px; height: 500px; border: 1px solid red; position: relative"&gt; &lt;div&gt; Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular durin…
has comment: http://stackoverflow.com/comment/46583298
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/45126813
score: 15
has comment: http://stackoverflow.com/comment/100236323
type: Answer
has body: Have a look over this code: var qr = require('qr-image'); var express = require('express'); var app = express(); app.get('/', function(req, res) { var code = qr.image(new Date().toString(), { type: 'svg' }); res.type('svg'); code.pipe(res); }); app.listen(3000); visit npm-qr-image
upvote count: 15
answers question: http://stackoverflow.com/q/29067450
has comment: http://stackoverflow.com/comment/100168558
downvote count: 0

http://stackoverflow.com/a/38326418
has comment: http://stackoverflow.com/comment/114911553
upvote count: 2
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29170799
has body: Use this script, it is previous version of jquery. Solved my problem.

http://stackoverflow.com/q/29079913
tagged with: jasmine
favorite count: 0
tagged with: angularjs
has body: I'm attempting to write Jasmine tests for a directive that requires a parent directive to be present. I found this question: Testing directives that require controllers, however, this is a bit dated (Angular 1.1.5 I believe), and the plunkr doesn't appear to work with new versions of Jasmine (2.2.1) and Angular (1.3.14). I get: TypeError: undefined is not a function at Object.&lt;anonymous&gt; (http://run.plnkr.co/AHQtPtvSezB4DsnJ/appSpec.js:18:33) Here's the code: var app = angular.module('plunker', []); app.directive('foo', function() { return { restrict: 'E', controller: function($scope) { this.add = function(x, y) { return x + y; } } }; }); app.directive('bar', function() { return { restrict: 'E', require: '^foo', link: function(scope, element, attrs, foo) { scope.callFoo = function(x, y) { scope.sum = foo.add(x, y); } } }; }); And the test: describe('Testing directives', function() { var $scope, $compile, element; beforeEach(function() { module('plunker'); inject(function($rootScope, _$compile_) { $scope = $rootScope.$new(); $compile = _$compile_; }); }); it('ensures callFoo does whatever it is supposed to', function() { // Arrange var element = $compile('&lt;foo&gt;&lt;bar&gt;&lt;/bar&gt;&lt;/foo&gt;')($scope); var fooController = element.controller('foo'); var barScope = element.find('bar').scope(); spyOn(fooController, 'add').andReturn(3); // Act barScope.callFoo(1, 2); // Assert expect(barScope.sum).toBe(3); expect(fooController.add).toHaveBeenCalledWith(1, 2); }); }); Here's the working plunker: http://plnkr.co/edit/bC5BY81x0hi576xwSdyo?p=preview I'm aware this design may not be the best, however, I'm sort of stuck with it at the moment. Thanks!
type: AnsweredQuestion
downvote count: 1
has title: How do I test an Angular directive that requires another controller in Angular 1.3.14?
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29085721
linked to: http://stackoverflow.com/q/19227036
upvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29085721

http://stackoverflow.com/q/29204570
has body: My js function is function view_customerTOTable(){ var name = $('#name').val(); //alert(name); $.ajax({ type: 'post', url: 'viewCustomerData', data: name, success: function (data) { alert('test'+data); var result = JSON.parse(data); var datas = []; for (var x = 0; x < result.length; x++) { datas.push(' ' + ' ' + result[x].C_email + ' ' + ' ' + result[x].C_clientint + ' ' + ' ' + result[x].C_status + ' ' + ' ' + result[x].C_clientcode + ' ' + ' ' + result[x].C_name + ' ' + ' ' + result[x].C_nic + ' ' + ' ' + ' ' + ' ' + ' '); } $j('#bdy_customer_details').html(datas); //alert(data); }, error: function(){ alert('error'); } }); } controller function is function viewCustomerData(){ $this->load->model('customer/customer_model'); echo json_encode($this->customer_model->loadCustomerDetails()); } the values return from this modle function function loadCustomerDetails(){ //$query = $this->db->select('*')->from('customer'); $sql = "SELECT * FROM customer where C_name = '{$_POST['name']}'"; //$send = $query->mod_select(); try { return $this->db->select($sql); } catch (Exception $exc) { return $exc->getTraceAsString(); } } view page is Asset Type Client Code Contract No Contract Name Customer Name NIC No. View i want to display those data in table. but i cant return data. in js function function move to success point. but json.parse point it not works
type: Question
has answer: http://stackoverflow.com/a/29204753
tagged with: javascript
upvote count: 2
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46621441
favorite count: 0
tagged with: php
type: AnsweredQuestion
has title: why i can't get data from js function return from database in codeigniter
accepted answer: http://stackoverflow.com/a/29204753
score: 1
tagged with: codeigniter

http://stackoverflow.com/comment/46363778
score: 1
comment on: http://stackoverflow.com/q/29063897
type: Comment
type: QuestionComment
has text: It is possible, but to provide a solution would require to build a table of possible solutions and choose the optimal one. The code for this would be quite big.

http://stackoverflow.com/a/30914732
type: Answer
score: 0
has body: you set the clearTarget: true, that removes the menu page from the apps pages aggregation. If you are using navContainer and splitcontainer you should set clearTarget to false since they are building up an navigation stack and need pages to be constantly in their aggregations. BR, Tobias
answers question: http://stackoverflow.com/q/29095465

http://stackoverflow.com/comment/46502362
type: Comment
has text: @AvinashRaj I think OP posted the expected output after "instead of"
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29139187

http://stackoverflow.com/a/29193928
downvote count: 0
has comment: http://stackoverflow.com/comment/46601527
accepted answer of: http://stackoverflow.com/q/29193909
score: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29193909
upvote count: 2
has body: Before you declare function a you could save this in a variable, i.e. var self = this;. Then return self inside a.
type: Answer

http://stackoverflow.com/q/29188374
favorite count: 0
has answer: http://stackoverflow.com/a/29188440
has body: what is meaning of this piece of code? <%= noteNumber %> and where using?
type: UnansweredQuestion
score: -4
has title: what is meaning of this piece of code?<%= some varible %>
type: Question
has comment: http://stackoverflow.com/comment/46591554
downvote count: 4
has comment: http://stackoverflow.com/comment/46591524
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29158163
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29157807
accepted answer of: http://stackoverflow.com/q/29157807
type: AcceptedAnswer
downvote count: 0
has body: You could do it like this, it adds some logging, the sending of the info you can handle outside of your constructor, and you would also have abstracted away the SocketWrapper in its own namespace (ok, yes, it's in window now :)) You can check the dev tools (F12 in most browsers) to see whats happening in the logs/error, eg: here it throws an error, as there is no socket available :) And you are not required to give a value for all events, just the ones you need (your case onopen + maybe onmessage?) (inside the defined callbacks, this would point towards the socket, not the SocketWrapper, the SocketWrapper also doesn't offer the ws variable, it's kind of private, but it should do i guess) There is a send method on the SocketWrapper, that throws an error, when you send to a closed stream, but in case it wasn't opened yet, it will queue the messages till it gets opened and then empty the queue to the websocket (so in a sence, you are not required to set the onopen callback, just adding it using the send method should be fine ;) (function(nameSpace) { function createMethod(method, options, stateCallback) { var that = this; this[method] = function() { if (stateCallback &amp;&amp; stateCallback.apply) { stateCallback(method); } console.info(method); if (options[method] &amp;&amp; options[method].apply) { options[method].apply(that, arguments); } }; } function SocketWrapper(options) { var ws, events = ['onopen', 'onmessage', 'onclose', 'onerror'], i, len, prop = { opened: false, closed: false, error: false }, method; if (typeof options === 'undefined' || !options) { throw 'ArgumentException: please add default constructor options'; } this.queue = []; this.onEventTrigger = function(eventName) { var i, len; if (eventName === 'onopen') { prop.opened = true; prop.closed = false; // openend send queue if (this.queue.length &gt; 0) { for (i = this.queue.length; --i &gt;= 0;) { this.send.apply(this, this.queue[0]); this.queue.splice(0, 1); } } } if (eventName === 'onerror') { pro…
type: Answer

google-chrome-extension
tags question: http://stackoverflow.com/q/29192846
tags question: http://stackoverflow.com/q/29062657
tags question: http://stackoverflow.com/q/29067198
tags question: http://stackoverflow.com/q/29077544
tags question: http://stackoverflow.com/q/29189641
tags question: http://stackoverflow.com/q/29071285
tags question: http://stackoverflow.com/q/29121599
tags question: http://stackoverflow.com/q/29173983
tags question: http://stackoverflow.com/q/29178193
tags question: http://stackoverflow.com/q/29170869
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/29088507
tags question: http://stackoverflow.com/q/29209558
tags question: http://stackoverflow.com/q/29159314
tags question: http://stackoverflow.com/q/29185601
tags question: http://stackoverflow.com/q/29191731
tags question: http://stackoverflow.com/q/29207785
tags question: http://stackoverflow.com/q/29104566
tags question: http://stackoverflow.com/q/29152166
tags question: http://stackoverflow.com/q/29130394
type: Tag
tags question: http://stackoverflow.com/q/29106368
tags question: http://stackoverflow.com/q/29076233
tags question: http://stackoverflow.com/q/29157563
tags question: http://stackoverflow.com/q/29155997
tags question: http://stackoverflow.com/q/29203502
tags question: http://stackoverflow.com/q/29113974
tags question: http://stackoverflow.com/q/29100577
tags question: http://stackoverflow.com/q/29114794
tags question: http://stackoverflow.com/q/29067531
tags question: http://stackoverflow.com/q/29097527
tags question: http://stackoverflow.com/q/29190800
tags question: http://stackoverflow.com/q/29103660
tags question: http://stackoverflow.com/q/29171868
tags question: http://stackoverflow.com/q/29100856
tags question: http://stackoverflow.com/q/29157708
tags question: http://stackoverflow.com/q/29152672
tags question: http://stackoverflow.com/q/29161939
tags question: http://stackoverflow.com/q/29183963
tags question: http://stackoverflow.com/q/29217410
tags question: http://stackoverflow.com/q/29184621
tags question: http://stackoverflow.com/q/29134935

http://stackoverflow.com/comment/46550980
type: QuestionComment
has text: No this isn't possible. The fact that you use the term "function" should tell you this isn't possible without js.
comment on: http://stackoverflow.com/q/29166194
score: 2
type: Comment

http://stackoverflow.com/a/29114968
answers question: http://stackoverflow.com/q/29112895
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29112895
has body: I think this is what you want. $(document).ready(function () { $('#sg_rules').html(' '); $('#sg_table').dataTable({ "columnDefs": [ { "render": function ( data, type, row ) { return ' '+data[0].range_name+' '+data[0].name+' '; }, "targets": [0, 1] } ], "data": dataSet, "columns": [{ "title": "s_group", "data": "s_group" }, { "title": "d_group", "data": "d_group" }, { "title": "Action", "data": "action" }, { "title": "Protocol", "data": "protocol" }, { "title": "SRC_PORT", "data": "src_port" }, { "title": "DST_PORT", "data": "dst_port" }] }); });

http://stackoverflow.com/q/29109659
has answer: http://stackoverflow.com/a/29110847
tagged with: nashorn
tagged with: typescript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29110847
type: Question
tagged with: intellij-idea
has body: I'm using IntelliJ IDEA as an IDE for development which also involves JavaScript-development. My fundamental aim is to make code-completion work in the IDE in the following way with my own "library". The "library", to be exact, is Nashorn delegating special calls to Java. I am currently evaluating if TypeScript and DefinitelyTyped could solve my problem of code-completion. I have a function that I want to be called as follows: obj.func("", false, { xyz: "", abf: "", f7d: 17.5, cccts: true }); The parameters in detail are just examples. Notice that there is one parameter that is an JavaScript-object and that has a whole bunch of defined but not easy-to-memorize attributes. I want the IDE to code-complete not just the function, but also the possible attributes in the inner object. My try, using TypeScript, is the following: function func( p1:string, p2?:boolean, p3?:{ xyz: string; abf: string; f7d: number; cccts: boolean; } ):void; This works well as the IDE tells me what the functions name is, what parameters it expects and what types are needed. Nevertheless, after typing the opening curly bracket of p3, I get no further code-completion of what should or could be inserted in the object. I can even type something like "ccc", but the IDE has nothing to auto-complete anymore. I wrote down the whole signature in TypeScript - so either I wrote the information down in a wrong way or the IDE does not use it as I expect it to do. So far is my knowledge - can anyone of you tell me, how to make IntelliJ IDEA autocomplete this objects attributes, too? I hope so! Best wishes and thanks in advance, Dennis
answer count: 1
has title: IntelliJ: Autocomplete object as function-parameter
tagged with: javascript
tagged with: code-completion
score: 0

http://stackoverflow.com/comment/46445041
has text: @RobsonGilli yes, but `event.preventDefault()` don't let the URL to change from the correct (previous page) to incorrect (current page with 404 error)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29101645

http://stackoverflow.com/comment/46384947
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29065220
has text: @Rickkwa: I just tried your suggestion and it works. Just the "|" that is inbetween needs to be deleted after the break. But thanks.
score: 0

http://stackoverflow.com/comment/46548922
has text: This causes `TypeError: window.$ is not a function` in Browser Console.
score: 0
comment on: http://stackoverflow.com/q/29163638
type: Comment
type: QuestionComment

lodash
tags question: http://stackoverflow.com/q/29186985
tags question: http://stackoverflow.com/q/29133406
tag name: lodash
tags question: http://stackoverflow.com/q/29090202
type: Tag
tags question: http://stackoverflow.com/q/29103299
tags question: http://stackoverflow.com/q/29152422
tags question: http://stackoverflow.com/q/29128366
tags question: http://stackoverflow.com/q/29202901
tags question: http://stackoverflow.com/q/29086580
tags question: http://stackoverflow.com/q/29089308
tags question: http://stackoverflow.com/q/29076574
tags question: http://stackoverflow.com/q/29139075
tags question: http://stackoverflow.com/q/29131561

http://stackoverflow.com/comment/46414481
has text: You can change the class of the document. as for now it is deleting the .item class.
score: 1
comment on: http://stackoverflow.com/q/29091145
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29097262
has comment: http://stackoverflow.com/comment/46470594
linked to: http://stackoverflow.com/q/197769
has answer: http://stackoverflow.com/a/29097573
has comment: http://stackoverflow.com/comment/46425597
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46471588
possible better answer: http://stackoverflow.com/a/29097573
has answer: http://stackoverflow.com/a/29097350
has body: If I store an array using a txt file, how can I load it back to jQuery? Assuming the external txt is ['Parrot', 'Green'], ['Crow', 'Black'], ['Duck', 'White'] How can I load it as var myArr = [ ['Parrot', 'Green'], ['Crow', 'Black'], ['Duck', 'White'] ]; This is what I've been trying. Does not work. var myArr; $.ajax({url: 'files/external.txt'}).done(function(d) { myArr = JSON.parse('[' + d + ']'); });
has comment: http://stackoverflow.com/comment/46425230
type: Question
has title: Load an array from an external txt
accepted answer: http://stackoverflow.com/a/29097350
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46425134
score: 0
answer count: 2

http://stackoverflow.com/comment/46499285
has text: I tried it, but it still isn't working. Am I supposed to put the tag in each of the page's heads that I want to render differently on mobile?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29137366

http://stackoverflow.com/q/29184454
has title: Regex find all closing html tags, all opening separately
upvote count: 2
has comment: http://stackoverflow.com/comment/46584842
has comment: http://stackoverflow.com/comment/46584717
type: AnsweredQuestion
downvote count: 3
score: -1
has body: I have a javascript function performing filtering on strings. I currently have the filter stripping out all html tags. return String(text).replace(/&lt;[^&gt;]+&gt;/gm, ''); I've realized that I actually need to perform two operations: First, to replace all closing tags with &lt;br&gt; and then a second operation to remove all opening tags. I'm not too familiar with regEx. How could I specify /&lt;[^&gt;]+&gt;/gm to be only opening or closing?
has answer: http://stackoverflow.com/a/29184500
type: Question
accepted answer: http://stackoverflow.com/a/29184500
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/1732348
tagged with: regex
has comment: http://stackoverflow.com/comment/46584740
favorite count: 0

http://stackoverflow.com/comment/46544812
type: QuestionComment
has text: I think that the css doesn't mutter because if I delete "(location).attr('href',URLTOGO");" command the button is hidden.
comment on: http://stackoverflow.com/q/29162613
score: 0
type: Comment

http://stackoverflow.com/q/29113787
tagged with: drag-and-drop
linked to: http://stackoverflow.com/q/10104732
type: UnansweredQuestion
has title: jQuery draggable clone - safari issue
has answer: http://stackoverflow.com/a/29114746
tagged with: draggable
has comment: http://stackoverflow.com/comment/46601491
type: Question
tagged with: safari
score: 0
answer count: 1
has body: I have a issue with dragging and dropping element within the Safari 8.0.4 on Mac. In all other browsers that I tested on Mac and Win everything works fine except in this one. I have a draggable element with clone helper and containment set to 'document', and iFrameFix to true. When I remove this clone helper line everything works fine, but when the helper is enabled, element can be dropped only if the top of the dragged element is inside the droppable area. On droppable element i have tolerance set to touch but that's ignored in this case with clone helper. The same situation as here: jQuery UI: Droppable ('drop' event, tolerance: touch ) bug in safari (mac) Any hint? My page is included in iframe btw, don't know if that's important or not.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29142097
has body: Ajax is your best bet:
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29141883
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29141883
type: Answer
score: 1

http://stackoverflow.com/comment/46638729
score: 0
type: AnswerComment
type: Comment
has text: Thank you, but how can I do this with my return value dynamically? Also, I am using jQuery. I forgot to mention.
comment on: http://stackoverflow.com/a/29214637

http://stackoverflow.com/q/29116199
type: AnsweredQuestion
tagged with: auto-indent
has title: Vim - how to achieve correct indentation when code has parentheses in literal string
answer count: 2
tagged with: indentation
tagged with: javascript
has answer: http://stackoverflow.com/a/29120473
linked to: http://stackoverflow.com/q/1652765
score: 0
has answer: http://stackoverflow.com/a/29116468
possible better answer: http://stackoverflow.com/a/29120473
has body: I have following javascript code: function abc(alpha) { if(alpha == undefined) { alpha='0.5' }; var color='rgba('; for(var ii =0; ii &lt; 3; ii++) { color += Math.round(Math.random()*255) + ","; } color += alpha; color += ')'; return color; } Vim indents above code as: function abc(alpha) { if(alpha == undefined) { alpha='0.5' }; var color='rgba('; for(var ii =0; ii &lt; 3; ii++) { color += Math.round(Math.random()*255) + ","; } color += alpha; color += ')'; return color; } This kind of behavior occurs in many programming languages, whenever we have '(' or '{' as part of a literal string. Rest of the file gets incorrect indentation as well. How to achieve correct indentation in such cases?
type: Question
tagged with: vim
accepted answer: http://stackoverflow.com/a/29116468

http://stackoverflow.com/a/29066662
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46370662
has body: Got it working as you want with : &lt;select ng-model="find" ng-options="entry.category as entry.category for entry in parsedEntries | unique: 'category'"&gt; The unique filter is from angular-filter. It requires to add 'angular.filter' you to your modules dependencies: var app = angular.module('myApp', ['angular.filter']); See fiddle NB: Not a problem by itself but I took the &lt;select&gt; element out of the &lt;ul&gt; one.
accepted answer of: http://stackoverflow.com/q/29066127
answers question: http://stackoverflow.com/q/29066127
has comment: http://stackoverflow.com/comment/46371155
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46557312
score: 0
comment on: http://stackoverflow.com/q/29158228
type: Comment
type: QuestionComment
has text: Ohhh. I changed that around and pasted it into JSHint and it said there werent anymore errors. And it still works. Thanks! Im always willing to learn new stuff about syntax, because thats the part I cant really learn by myself without a class, and my college totally skimmed over javascript when teaching us. So Ive been on my own lol

http://stackoverflow.com/comment/46395980
has text: @JeremyThille : this is ASP.NET Razor syntax. `@Url.Action()` method is executed on server-side and generates a fully qualified URL. ([more information about Razor](http://www.asp.net/web-pages/overview/getting-started/introducing-razor-syntax-%28c%29))
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29081246

http://stackoverflow.com/q/29119799
score: 3
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46466968
tagged with: javascript
has answer: http://stackoverflow.com/a/29140755
has body: So I have datepicker where changing tabs day/month/year should change minMode of datepicker switch($rootScope.tab){ case 'd': $scope.datePicker = 'day'; $scope.dateOptions = {minMode : 'day'}; break; case 'm': $scope.datePicker = 'month'; $scope.dateOptions = {minMode: 'month', datepickerMode: 'month'}; break; case 'y': $scope.datePicker = 'year'; $scope.dateOptions = {minMode : 'year'}; break; case 't': $scope.datePicker = 'none'; $scope.dateOptions = {minMode : 'none'}; } the problem is that datepicker updates fine but dateOptions just ignores minMode and still lets you select day instead of month/year and so. DatePicker in view &lt;span type="hidden" style="display: none;" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="{{minDate}}" max-date="{{maxDate}}" datepicker-mode="datePicker" datepicker-options="dateOptions" ng-required="true" close-text="Close"/&gt; Is there workaround for this like redrawing datepicker everytime tab changes?(datepicker is outside tabset).
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/40157498
tagged with: angularjs
type: UnansweredQuestion
tagged with: datepicker
has title: Angular boostrap-ui datepicker dynamically changing minMode
has answer: http://stackoverflow.com/a/32823499

http://stackoverflow.com/q/29128304
type: Question
tagged with: angularjs-directive
upvote count: 5
downvote count: 0
has answer: http://stackoverflow.com/a/30078407
tagged with: javascript
answer count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/30078407
has body: I am trying to use the ionic framework with angular.I want to do validation of my form on button click.Mean I need to validate all field on button click.All field are required ..I need to show an error message if a field does not fulfil the requirement. Like password minimum character 5 and maximum 10. And email validation. could you please tell m how I will do validation.Here is my code Sign-in, Then Tabs Example name email password check validation
score: 5
has title: how to validate form in ionic using angular js
type: AnsweredQuestion
tagged with: angularjs-scope
tagged with: ionic-framework

http://stackoverflow.com/a/29176721
accepted answer of: http://stackoverflow.com/q/29176409
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29176409
has body: Ok I think there is some conflict in jQuery library as I am working in Yii2 framework, where it loads it own jQuery. I get it done using this code: &lt;?php $this-&gt;registerJs("$('#dailywardentry-ipd_patient_id').on('change', function(){ $('#div2').removeClass('hidden'); });"); ?&gt;
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29194562
type: Question
has comment: http://stackoverflow.com/comment/46603785
score: 0
tagged with: visualization
has comment: http://stackoverflow.com/comment/46614376
has comment: http://stackoverflow.com/comment/46606982
has title: D3 Visualization from example using SVG and Canvas hybrid
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46603298
has body: I am learning D3, and finding it quite painful to get a handle on all of the moving pieces. After going over basics and reading sections of a few books, I decided to try and bind my own data to a popular, more complex Mike Bostock example found in the wild (Facebook IPO). I figure more often than not, this is similar to the workflow I'll use in real life, rather than coding a viz from scratch. Here is my current code (http://codepen.io/dharkko/pen/bNOOOo/). Here are my questions: Why isn't any of my Javascript affecting the SVG? How can I rescale via transform/translate, both the X and Y axis within the 900 by 500 SVG (or 875 by 480 canvas)? Since the Javascript is not affecting the SVG, no data will bind. Why? I have faith that this might all seem clear to me one day, but my awareness level won't currently allow it. Lastly, in the few D3s I have done thus far, I settled on a simplified template that went like so: //put your svg/canvas here Might this template be helpful here? Thanks Updated: Thanks to @Mark, the issue with formatting the x-axis to a specific date range has been solved by adding these lines: var x = d3.time.scale() .range([0, width]); function randomDate(start, end) { return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime())); } var data = []; for (var i = 0; i < 100; i++) { data.push({ x: randomDate(new Date(1970, 0, 1), new Date(2015, 0, 1)), y: Math.random() * 100, r: Math.random() * 30, c: color(Math.random() * 3) }); } x.domain([new Date(1970, 0, 1), new Date(2015, 0, 1)]); y.domain([-10, 110]).nice();
tagged with: javascript
has comment: http://stackoverflow.com/comment/46602997

http://stackoverflow.com/q/29074936
has comment: http://stackoverflow.com/comment/46383634
tagged with: mysql
type: Question
has title: how to persist a value of variable between page refresh?
has comment: http://stackoverflow.com/comment/46383703
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29075043
has comment: http://stackoverflow.com/comment/46383802
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46383581
tagged with: php
has body: In the following code i want value of $dischargeDate variable as it is after refreshing page. My problem is in this code sorting code is included and for every column click for sorting by user page is refreshed and value of $dischargeDat getting null and it affects output. &lt;?php include_once("session_check.php"); ?&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Date Wise Report&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="css/first.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="css/NewCss.css" /&gt; &lt;link href="font-awesome-4.2.0/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet"&gt; &lt;link rel="stylesheet" href="css/jquery-ui.min.css" /&gt; &lt;link rel="stylesheet" href="css/jquery-ui.theme.min.css" /&gt; &lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#searchTerm_id').keyup(function() { if ($(this).val().length &gt; 3) searchTable($(this).val()); else if ($(this).val().length &lt; 3) searchTable(""); }); }); function searchTable(inputVal) { $.ajax({ type: "GET", url: "report_admitdatewise.php", data: ({ search_keyword: inputVal }), success: function(success) { window.location.href = "report_admitdatewise.php?search_keyword=" + inputVal; } }); } /////datepicker code $(document).ready(function() { $('#reportdate_id').datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true, changeYear: true, yearRange: '1900:2060', ///maxDate: new Date() }); $("#datawtable").hide(); $("#show").click(function() { $("#datawtable").show(); }); }); /*function formsubmit() { if(true) { document.getElementById('form_id').submit(); } }*/ &lt;/script&gt; &lt;/head&gt; &lt;body &gt; &lt;div class="row-fluid"&gt; &lt;div class="area-top clearfix"&gt; &lt;div class="header"&gt; &lt;h3 class="title"&gt;&lt;i class="fa fa-info-circle"&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Date Wise Repo…

http://stackoverflow.com/q/29131448
has body: I'm trying to dynamically add a new row with Jquery - I am able to do so, except it is cloning the row exactly and not giving me a new blank row. Here is the code I am using: $('#add').click(function(){ $('#invoicetable tbody&gt;tr:last').clone(true).insertAfter('#invoicetable tbody&gt;tr:last') $("#invoicetable tbody&gt;tr:last").each(function() {this.reset().val('');}); return false; });
tagged with: javascript
score: 0
answer count: 1
has title: Reset a Jquery added row blank:
tagged with: jquery
has answer: http://stackoverflow.com/a/29131490
has comment: http://stackoverflow.com/comment/46488808
linked to: http://stackoverflow.com/q/10308621
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46488597
has comment: http://stackoverflow.com/comment/46489223
type: Question

http://stackoverflow.com/a/29388230
accepted answer of: http://stackoverflow.com/q/29129814
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46954485
has comment: http://stackoverflow.com/comment/47153896
type: Answer
has body: You have to have something inside the divs i.e. stick a nbsp; inside empty div &lt;div id="smart_q117" style="display: inline-block;"&gt;&amp;nbsp;&lt;/div&gt; [see http://jsfiddle.net/WackyDad/utLsfyga/] PS You also appear to have some stray tags (e.g. closing td followed by opening that is not closed and neither inside a table)
answers question: http://stackoverflow.com/q/29129814
score: 3
upvote count: 3
downvote count: 0

http://stackoverflow.com/comment/46389546
has text: what do you mean? do you wish to display all rows? if so, then you can try this: `var table = $('#example').DataTable({ "paging":false });`
comment on: http://stackoverflow.com/q/29077902
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46516210
type: QuestionComment
comment on: http://stackoverflow.com/q/29146877
score: 1
has text: Duplicate of http://stackoverflow.com/questions/19468334/call-a-method-of-a-controller-from-another-controller-using-scope-in-angularjs
type: Comment

http://stackoverflow.com/comment/46550658
comment on: http://stackoverflow.com/q/29165191
score: 0
type: QuestionComment
type: Comment
has text: is it **ui-grid** or **ng-grid** ?

http://stackoverflow.com/q/29190110
tagged with: dom-events
favorite count: 0
tagged with: hammer.js
has title: How can you prevent a click from firing at the end of a long press?
type: AnsweredQuestion
tagged with: onclick
accepted answer: http://stackoverflow.com/a/29294922
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/58066432
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/6038613
answer count: 2
possible better answer: http://stackoverflow.com/a/58066432
has body: I ask because of this situation: I put down my finger on a list item. After 500ms, a Hammer press event is triggered, and the page shows an action sheet. After 1s, I raise my finger, and a click event fires (a regular click, not one emitted by Hammer). My finger at that point is over the action sheet backdrop, which has a click handler that closes itself. I realize using the Hammer tap event to close the action sheet would work, because it has a 250ms maximum duration, but the action sheet library uses a click event. Is there a way to tell the browser to not fire clicks if the duration is eg 250ms? Or to alternatively tell the browser to not emit the next click that happens?
downvote count: 0
has answer: http://stackoverflow.com/a/29294922

http://stackoverflow.com/comment/46606939
has text: @Mathieu it would be nice if you could reproduce my fiddle field generation to do same task using React.js ( jsfiddle has support for react.js) We could see if there is a significant difference in performance.
comment on: http://stackoverflow.com/a/29196198
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46545694
score: 0
type: Comment
type: QuestionComment
has text: you should use a callback
comment on: http://stackoverflow.com/q/29163091

http://stackoverflow.com/q/29110266
has comment: http://stackoverflow.com/comment/46452143
type: UnansweredQuestion
tagged with: datetime
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46450701
answer count: 0
has comment: http://stackoverflow.com/comment/46452233
type: Question
has title: Setting value to datetime-local HTML input
has body: I have an HTML input object of type="datetime-local" to which I would like to set a custom value which is now() + 3 hours everytime its value is changed. Basing on the fact that alert(object.value) returns a string of type YYYY-MM-DDTHH:MM, I've thought I would need (apart for calculating the date) also to format the string properly. So I have: Added the onchange attribute to the HTML &lt;input .... onchange="datesReactions()"/&gt; Extended the JS Date prototype to add the hours Date.prototype.addHours = function(h) { this.setTime(this.getTime() + (h*60*60*1000)); return this; } Created the datesReactions() function as follows function datesReaction(){ var adesso = new Date; document.getElementById('ExecutionDate').value = parseDateToInput(adesso.addHours(3)); } where the parsing to string is performed by the following simple function: function parseDateToInput(jsDate){ var jsDay = jsDate.getDate(); if (jsDay &lt; 10){jsDay = '0' + jsDay;} var jsMonth = jsDate.getMonth(); if (jsMonth &lt; 10){jsMonth = '0' + jsMonth;} var jsYear = jsDate.getFullYear(); if (jsYear &lt; 10){jsYear = '0' + jsYear;} var jsHour = jsDate.getHours(); if (jsHour &lt; 10){jsHour = '0' + jsHour;} var jsMinute = jsDate.getMinutes(); if (jsMinute &lt; 10){jsMinute = '0' + jsMinute;} return jsYear + '-' + jsMonth + '-' + jsDay + 'T' + jsHour + ':' + jsMinute; } However, although the single pieces of code work themselves, the above does nothing when I change the value of my input. Could anyone please help me understanding what I do wrong? I have prepared the following fiddle in order to help you helping a beginner debugging :) Thanks in advance.
score: 0
tagged with: javascript

http://stackoverflow.com/comment/46557695
type: Comment
type: QuestionComment
has text: and what is server log when you do this?
comment on: http://stackoverflow.com/q/29168007
score: 0

http://stackoverflow.com/comment/46639046
type: QuestionComment
has text: I know it is not correct to execute the queries in this way but is for a test.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29214528

http://stackoverflow.com/comment/46565792
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29173648
score: 0
has text: It is an LDAP server using basic authentication.

http://stackoverflow.com/comment/83607800
score: 0
type: AnswerComment
has text: @RegularJoe I added an example. My goal was to keep it simple, but you're right that if you want to handle nested curly braces, you would need to change the regex. However, I can't think of a use case for that when evaluating a regular string as if it were a template literal (the whole purpose of this function). What did you have in mind?
type: Comment
comment on: http://stackoverflow.com/a/47358102

http://stackoverflow.com/a/29346396
has comment: http://stackoverflow.com/comment/46905809
answers question: http://stackoverflow.com/q/29115706
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: I found this jQuery plugin, hope it helps.
accepted answer of: http://stackoverflow.com/q/29115706

http://stackoverflow.com/comment/46453249
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29101115
has text: ok this is great. one more question: how do i get it to clear the color the next time the function is called (ie the next time i click a link to an anchor)?
score: 0

http://stackoverflow.com/comment/46606040
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29196533
has text: I am trying to focus on the goals of the user, not on the current problem. I have copied what he has written and added my lines of code as a suggesttion, I find the question rather ambiguous which might led us teaching him the wrong approach. That is why I am asking him his primary goal.

http://stackoverflow.com/comment/46483766
comment on: http://stackoverflow.com/a/29122931
has text: Had to make a few other additional tricks to get the node labels visible, mainly by adopting ideas from http://bl.ocks.org/mbostock/2706022. This issue is thus now solved.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29166447
has body: How do you load javascript files in version 8? In version 7, you could simply show the location of js in manifesto file (__openerp__.py) like this: 'js': ['static/src/js/file.js'], Now it does not work. For example I created js file in my module with this code: openerp.calendar_service = function(instance) { var _t = instance.web._t, _lt = instance.web._lt, QWeb = instance.web.qweb; instance.calendar_service = {}; console.log('TEST') }; But using debugger, I don't see that TEST is printed. If I add such print in some source js files (in other modules), it will print it fine. So how do I make my js files load?
score: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/29431763
has answer: http://stackoverflow.com/a/29166734
has answer: http://stackoverflow.com/a/29431763
favorite count: 0
upvote count: 2
type: AnsweredQuestion
tagged with: odoo
tagged with: odoo-8
accepted answer: http://stackoverflow.com/a/29166734
has title: Odoo loading javascript files in version 8?
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/29085911
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46404673
has comment: http://stackoverflow.com/comment/46404794
type: Question
has answer: http://stackoverflow.com/a/29088043
has comment: http://stackoverflow.com/comment/46406497
has body: I am trying to render a catalog from an XML document and everything works, although when trying to show a default image if there is no image present in the XML node, it disables the parent node therefore forcing it not to show any of it and it reads me an error in my console saying: Uncaught TypeError: Cannot read property 'getElementsByTagName' of undefined Which is pointing to this part of the code: if (records[i].getElementsByTagName("IMAGE")[0].childNodes.length > 0) { So my question is where in my code below is my error causing it to not load the XML node? PS: If anybody needs more of my code please let me know, and I would be happy to post it. for (var i = fromItem; i &lt; nextMaxItem; i++) { if (records[i].getElementsByTagName("IMAGE")[0].childNodes.length &gt; 0) { xmlContent += '&lt;article class="post all ' + records[i].getElementsByTagName("CATEGORY")[0].childNodes[0].nodeValue + '" id=""&gt;' + '&lt;div class="col-sm-4 col-lg-4 col-md-4"&gt;&lt;div class="thumbnail img-hover"&gt;' + '&lt;a class="fancybox" rel="group" href="' + records[i].getElementsByTagName("BIGIMAGE")[0].childNodes[0].nodeValue + '" title="'+ records[i].getElementsByTagName("SHORTDESCRIPTION")[0].childNodes[0].nodeValue +'"&gt;' + '&lt;img class="product-image" src="' + records[i].getElementsByTagName("IMAGE")[0].childNodes[0].nodeValue + '" alt="' + records[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue + '" /&gt;' + '&lt;div class="caption"&gt;' + '&lt;h4&gt;' + records[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue + '&lt;/h4&gt;' + '&lt;p&gt;' + records[i].getElementsByTagName("SHORTDESCRIPTION")[0].childNodes[0].nodeValue + '&lt;/p&gt;' + '&lt;/div&gt;' + "&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/article&gt;"; } else { xmlContent += '&lt;article class="post all ' + records[i].getElementsByTagName("CATEGORY")[0].childNodes[0].nodeValue + '" id=""&gt;' + '&lt;div class="col-sm-4 col-lg-4 col-md-4"&gt;&lt;div class="thumbnail img-hover"&gt;' + '&lt;a class="f…
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/46405389
has comment: http://stackoverflow.com/comment/46404873
score: 0
has title: JavaScript error with XML when trying to read empty node
answer count: 1
accepted answer: http://stackoverflow.com/a/29088043
has comment: http://stackoverflow.com/comment/46406277
tagged with: javascript
linked to: http://stackoverflow.com/q/28641444

http://stackoverflow.com/a/29111880
answers question: http://stackoverflow.com/q/29111819
type: Answer
score: 1
has body: The method is named getElementsByName, and it returns a NodeList of found items. The name of the elements are check[0] and check[1], HTML names doesn't have a concept of element arrays by naming them with an index. So, to get the values you need to access the items on at a time. Note that you need to use [0] to access the element returned, as it's always a list even if there is only one element: var check0 = document.getElementsByName('check[0]')[0].value; var check1 = document.getElementsByName('check[1]')[0].value;
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/46441850
type: Comment
comment on: http://stackoverflow.com/q/29096098
type: QuestionComment
has text: Ok I can see that it works in Firefox, but Chrome, Opera and Explorer it doesn't. Damn this is weird. Can someone else please try? :-)
score: 0

http://stackoverflow.com/comment/46621107
type: Comment
has text: So you are passing "http://localhost:49771/rentalone/lp.aspx/getCities?province=Ontario"?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29204877

http://stackoverflow.com/a/29090587
has comment: http://stackoverflow.com/comment/46426163
answers question: http://stackoverflow.com/q/29090349
type: Answer
has comment: http://stackoverflow.com/comment/46425892
has comment: http://stackoverflow.com/comment/46426308
score: 0
upvote count: 1
downvote count: 1
has body: It seems as though there is an error occurring inside jquery-1.11.2.min.js. Not in the document which contains the script tag. So, the question is: why does your local copy of jquery-1.11.2.min.js contain a &lt;? The answer is that it most likely doesn't. The request for jquery-1.11.2.min.js is probably resulting in a HTML response, which the browser attempts to load as JavaScript, and fails on the first character. Ensure that javascripts/jquery-1.11.2.min.js is the correct path to your JavaScript file. It can be shown that this is the case because a SyntaxError is a JavaScript error. MDN says the following (emphasis mine): A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code. So, the error is being thrown by the JavaScript engine, which means that the browser is actually trying to load a script file. As you can see from the error message, the error is thrown at jquery-1.11.2.min.js:1, which is line one of jquery-1.11.2.min.js. You can reproduce the same error message using the following code saved in a file named foo.html: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="foo.html"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt;&lt;/body&gt; &lt;/html&gt; Alternatively, you can view a demonstration of equivalent code here (check your console).

http://stackoverflow.com/a/29065784
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29065666
has body: The style property represents the inline style set on an element so this.style.boxShadow will initially be "" because the style is coming from a stylesheet and not a style attribute. The first click hits the else branch and explicitly sets the inline style to match the style that is cascaded from the stylesheet. The second click then matches the first part of the if statement.
answers question: http://stackoverflow.com/q/29065666
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46564390
comment on: http://stackoverflow.com/a/29172909
score: 0
type: AnswerComment
has text: alright I've edited it in, I also have a fieldset between my radio buttons if that matters.
type: Comment

http://stackoverflow.com/a/29211215
has comment: http://stackoverflow.com/comment/46632472
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46632548
accepted answer of: http://stackoverflow.com/q/29210868
has body: Yes, the more elegant way is to use ES6 syntax: var values = {[keys.A]: 1, [keys.B]: 2}; The thing in brackets can be any expression, so run wild: var values = { [createPropName() + "_prop"]: 42 } This is called "computed (dynamic) property names". See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Computed_property_names.
answers question: http://stackoverflow.com/q/29210868
has comment: http://stackoverflow.com/comment/46632408
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46605483
score: 0
has text: can you see some mistake when you run it, in the console of the browser?
type: Comment
comment on: http://stackoverflow.com/q/29196265
type: QuestionComment

http://stackoverflow.com/a/29209779
type: AcceptedAnswer
score: 0
type: Answer
has body: I hope this is what you are luking for. I changed your code a little bit, but it works fine now. Try it and let me know &lt;script type="text/javascript"&gt; var sheet, ln, cn = 0; $(document).ready(function () { $("#toggleMenu").find("a").on("click", function (e) { ln = $(this); sheet = ln.parent().data('target'); $("#" + sheet).toggleClass("active").siblings().removeClass('active'); $(".sheets").find("section").each(function () { if ($(this).hasClass("active")) cn++; }); if (cn) { $(".sheets").addClass('active'); cn = 0; } else $(".sheets").removeClass('active'); }); $('.corpoBelt').click(function () { $(".sheets").removeClass("active"); }); }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/29207013
answers question: http://stackoverflow.com/q/29207013
has comment: http://stackoverflow.com/comment/46634449

http://stackoverflow.com/q/29185548
has body: I was unable to retrieve the dynamic generated textfields and radio buttons that I created using javascript but was able to retrieve the those that I manually added into the form using html. Previously, I use styling to hide and show all my textfields instead of dynamically created textfields, so I have no problem getting all the textfields and can safely assume my PHP processing doesn't have any problem. My HTML/Interface coding <?php for ($x = 1; $x <= 5; $x++) { $inputAreaID = "inputArea".$x;// Creating all dynamic options and etc in this div using javascript $typeID = "type".$x; //for select type id $opt2ID = "ans".$x; $optID = "opt".$x; $comID = "com".$x; $qnName = "qn".$x // for qn textfield name?> Question <?php echo $x ?> <input type="text" name='<?php echo $qnName ?>' required> Question Type <select id="<?php echo $typeID ?>" name="<?php echo $typeID ?>" onclick="showQuestionSelect('<?php echo $x ?>', '<?php echo $typeID ?>', '<?php echo $inputAreaID ?>')"> Please select one option Yes/No True/False A. B. C. D. <div id='<?php echo $inputAreaID ?>' style="margin-bottom: 1px;margin-top:1px;"> JavaScript coding function showQuestionSelect(questionNo, typeID, inputArea) { var s = String(typeID); var i = String(inputArea); var e = document.getElementById(s); var selectedOpt = e.options[e.selectedIndex].value; ansID = questionNo + "_ans"; comID = questionNo + "_com"; optA = questionNo + "_optA"; optB = questionNo + "_optB"; optC = questionNo + "_optC"; optD = questionNo + "_optD"; var msg = ""; if (selectedOpt == "True,False") { msg =" Submit True as Answer Submit False as Answer "; msg +=" Reason for the answer: " } else if (selectedOpt == 3) { msg = " "; msg += "Option A: Submit as Answer "; msg += "Option B: Submit as Answer "; msg += "Option C: Submit as Answer "; msg += "Option D: Submit as Answer "; msg +=" Reason for the answer: "; } document.getElementById(i).innerHTML = msg; } PHP Processing Coding for ($x = 1; $x <= 5; $x++) { $qn = $_POST["qn".$x]; // …
type: Question
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29185926
tagged with: http://stackoverflow.com/tag/html
has title: Php unable to retrieve dynamic generated textfields
tagged with: php

http://stackoverflow.com/q/29082065
has answer: http://stackoverflow.com/a/29083882
type: Question
has answer: http://stackoverflow.com/a/29082622
has title: PHP Post to a div on main html page - So it can be parsed by Javascript
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46397123
score: 0
answer count: 3
has body: I have PHP code which successfully gets the contents of a directory on my server. I wish to then write this array to a specific div on my main html page (so that I can parse this later and use this information further) Currently my PHP navigates me away from my current page to write this array which I want to prevent. Furthermore I wish to do all of the PHP work on a button click, and return the values on the main html page after. How can I do this??? My button on my html page is as follows: &lt;form action="PHP_Function.php"&gt; &lt;input type="submit" class="learnButton" name="insert" value="Find Available Evidence" /&gt; &lt;/form&gt; And my PHP code looks like this to carry out the work: if (isset($_POST['action'])) { switch ($_POST['action']) { case 'insert': insert(); break; }} I have an array: "IfPresentArray" which I then wish to write to my main html page: if(in_array("Facebook.xml", $dirArray)){ $IfPresentArray[0]="1"; }else { $IfPresentArray[0]="0"; } Any help would be greatly appreciated as I am very new to PHP. Thanks in advance
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29082241
tagged with: php

http://stackoverflow.com/q/29140168
tagged with: ruby-on-rails
type: Question
score: 3
has answer: http://stackoverflow.com/a/29401652
tagged with: javascript
has comment: http://stackoverflow.com/comment/47038597
has comment: http://stackoverflow.com/comment/46504235
has title: How do I force the fresh render of a modal?
answer count: 3
tagged with: ruby-on-rails-4
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29184182
has comment: http://stackoverflow.com/comment/46893003
upvote count: 3
has answer: http://stackoverflow.com/a/29402292
has body: I have a modal that is generated on the first page load, but because this modal is rendered for each node on the page, it always has the wrong node value because the modal is always stale. i.e. if the rendered HTML has node.id=7 on completed page load, it will always work on node.id=7 even if you want it to render for node.id=6. This is my modal: &lt;div class="modal tagging fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Tag User&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;%=s imple_form_for node, url: add_tagged_user_node_path(node), method: :post do |f| %&gt; &lt;%=f .error_notification %&gt; &lt;div class="form-inputs"&gt; &lt;%=f .association :user, label: "Users", collection: @users, as: :check_boxes, checked: node.user_tags %&gt; &lt;/div&gt; &lt;div class="form-actions"&gt; &lt;%=f .button :submit %&gt; &lt;/div&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; This is the trigger for that modal: &lt;a class="plus" href="javascript:;" data-toggle="modal" data-target="#myModal"&gt;&amp;nbsp;&lt;/a&gt; What I would like to do is whenever the trigger is pressed, it basically performs a fresh page request for that modal - which would then populate the modal with the correct node.id. How do I force that refresh when the button is pressed? Edit 1 Here is the entire index.html.erb that the partials are called from: &lt;% @nodes.each do |node| %&gt; &lt;!-- Upload Video Comment Popup --&gt; &lt;%= render partial: "shared/upload", locals: {node: node} %&gt; &lt;div class="box"&gt; &lt;%= render partial: "nodes/box", locals: {node: node} %&gt; &lt;%= render partial: "nodes/comments",…
has comment: http://stackoverflow.com/comment/46504401
downvote count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/a/29105885
downvote count: 0
has body: You are already using the for attribute for each so you do not need to wrap the elements with the . All you need to do it unwrap and you'll have working code. Check it out: JSFiddle. If you must do it without unwrapping, replace .text() with .html() check out this: JSFiddle HTML Months Billing Cycles 3 Months 6 Months 9 Months 12 Months jQuery $("input[name='timeFrame']").on("change", function() { var tframe = $(this).val(); var oldtext = "Months"; var newtext = "Cycles"; if (tframe == "months") { oldtext = "Cycles"; newtext = "Months"; } var tperiods = $("#timePeriods label"); $.each(tperiods, function(idx, val) { var newLabel = $(this).text().replace(oldtext, newtext); $(this).text(newLabel); }); });
upvote count: 2
has comment: http://stackoverflow.com/comment/46442325
answers question: http://stackoverflow.com/q/29105674
type: Answer
score: 2

http://stackoverflow.com/comment/46569117
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29175677
type: Comment
has text: are't you contradicting yourself in your second statement ? , also can you be a bit more elaborate with your first point of 'not being able to modify the object' ... that sounds interesting to me .

http://stackoverflow.com/q/29131466
tagged with: javascript
has comment: http://stackoverflow.com/comment/46488874
has comment: http://stackoverflow.com/comment/46489261
has comment: http://stackoverflow.com/comment/46489619
upvote count: 1
has comment: http://stackoverflow.com/comment/46489555
has title: change ghost image in HTML5 drag and drop
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29131825
favorite count: 0
has comment: http://stackoverflow.com/comment/46488958
has comment: http://stackoverflow.com/comment/46489466
has answer: http://stackoverflow.com/a/29131825
tagged with: css
type: AnsweredQuestion
has body: Here I have some big div, but it ghost is too big for me, and I want to change it. Here is my solution: &lt;div draggable = "true" id = "ololo"&gt; &lt;/div&gt; var k = document.getElementById("ololo"); k.addEventListener("dragstart", _drag, false); function _drag(evt){ var cl = this.cloneNode(true); cl.style.backgroundColor = "blue"; cl.style.width = "10px"; cl.style.height = "10px"; cl.style.position = "absolute"; cl.style.left = "1000px"; cl.style.overflow = "hidden"; document.getElementsByTagName("body")[0].appendChild(cl); evt.dataTransfer.setDragImage(cl, 0, 0); window.setTimeout(function() { cl.parentNode.removeChild(cl); }, 1000); } Jsffidle demo It works fine, but is it good use it in production? Why there is a scroll bar even I hidded it when it is overflow?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46489101
type: Question
linked to: http://stackoverflow.com/q/133051
has comment: http://stackoverflow.com/comment/46488763

http://stackoverflow.com/comment/46456352
type: Comment
comment on: http://stackoverflow.com/q/29086299
has text: Have you define ` ` within your index.html? @ribsies and @dfsq, he is not using `ui-router` just so you know even if the two work pretty much the same way :)
score: 0
type: QuestionComment

http://stackoverflow.com/q/29125088
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29127389
has title: How to split files in Gulp task
possible better answer: http://stackoverflow.com/a/51775556
type: Question
has answer: http://stackoverflow.com/a/51775556
score: 3
tagged with: javascript
upvote count: 3
answer count: 2
tagged with: gulp
favorite count: 0
has body: For example, I have some array in the mydata.json [ { "name": "item1", "description": "bla bla bla" }, { "name": "item2", "description": "lorem lorem lorem" }, { "name": "item3", "description": "ipsum ipsum ipsum" }, ] I need to split the mydata.json to three files: item1.json, item2.json and item3.json. What I have to add to my Gulp task? gulp.task('mytask', function () { return gulp.src("src/mydata.json") .pipe( ??? ) .pipe(gulp.dest('./dist')); });
accepted answer: http://stackoverflow.com/a/29127389
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/46576174
type: Comment
type: AnswerComment
has text: Chances are your other services is `$http(req)`, which takes an object, rather than `$http.get(req)`, which takes a url string
comment on: http://stackoverflow.com/a/29179673
score: 0

http://stackoverflow.com/q/29100435
has answer: http://stackoverflow.com/a/29101272
favorite count: 0
tagged with: npm
tagged with: node.js
tagged with: selenium-webdriver
type: AnsweredQuestion
has body: I have a folder Test/Automation contains many test cases, e.g. a.js, b.js, c.js, etc. I am using WebdriverJs Selenium. I use this command to execute all the tests in this folder: node Test/**/*.js But only a.js was executed and then it's done. Anyone knows the reason why? Is there something wrong with this? Thanks
score: 1
upvote count: 1
tagged with: webdriver
has title: Node command doesn't execute asterisk path
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29101272
has answer: http://stackoverflow.com/a/29101298
has answer: http://stackoverflow.com/a/29118782
accepted answer: http://stackoverflow.com/a/29118782
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/46591441
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29163638
has text: And you are running the script in GreaseMonkey, not Scriptish nor TamperMonkey?

http://stackoverflow.com/comment/46592313
score: 0
has text: There are a million ways to do what you want. The best depends on what you're comfortable with if you're doing it yourself, otherwise, it depends on who you're going to pay to do it for you. You don't need anything server-side unless you're trying to capture data. Many template systems or frameworks for building single-page javascript applications will help you make sure the back button works.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29188777

http://stackoverflow.com/a/29265145
has body: You are right that there should be a standard way to do this. The problem is that it doesn't fit into dc.js's way of dealing with data through crossfilter, and there are any number of graphical objects you might want to overlay on a chart. So, for now we have renderlets. The idea of using a renderlet is to write a function that drops into lower-level d3 code once the chart has rendered. You might search around for the exact d3 code you want, but here is something which adds a single red line on top of the bars: .on('renderlet', function(chart) { var extra_data = [{x: chart.x().range()[0], y: chart.y()(10)}, {x: chart.x().range()[1], y: chart.y()(70)}]; var line = d3.svg.line() .x(function(d) { return d.x; }) .y(function(d) { return d.y; }) .interpolate('linear'); var path = chart.select('g.chart-body').selectAll('path.extra').data([extra_data]); path.enter().append('path').attr('class', 'extra').attr('stroke', 'red'); path.attr('d', line); }); This draws the line from the left side to the right side, from Y value 10 to Y value 70, using the x and y scales to obtain the SVG coordinates. I created a bar with extra line example. Hopefully this will get you started!
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/62826903
answers question: http://stackoverflow.com/q/29211204
upvote count: 2
has comment: http://stackoverflow.com/comment/62848728

http://stackoverflow.com/a/29242186
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29200845
accepted answer of: http://stackoverflow.com/q/29200845
upvote count: 1
has body: I was passing $http in service.js when there was no need. I was also passing in '$choiceServiceProvider' in config.js when it should have been just 'choiceServiceProvider'
score: 1

http://stackoverflow.com/q/29191432
score: -3
has answer: http://stackoverflow.com/a/29191923
has title: Redirecting to a web without changing the URL
tagged with: php
has comment: http://stackoverflow.com/comment/46596773
type: Question
has body: I wants to redirect my users who opens my web page to a new page but i also wants that if the user see the URL of the page in the url bar then the url of the first page should be visible. For example,let i have a web named http://example.com and i wants that every users that visits should be redirected to http://google.com but also when he see the URL of the page in the URL bar then it should show example.com. I there's any way to does it?
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
type: UnansweredQuestion
tagged with: http-redirect

http://stackoverflow.com/comment/46380558
has text: This code is not deleting the correct row.its deleting some other else in my case.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29071400
type: AnswerComment

http://stackoverflow.com/comment/46391372
has text: What do you mean by **//checking if letter is in the word**? `alert(word);`can't work... word isn't defined
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29079014

http://stackoverflow.com/q/29204616
favorite count: 0
has comment: http://stackoverflow.com/comment/46620422
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29204847
has comment: http://stackoverflow.com/comment/46620701
has comment: http://stackoverflow.com/comment/46620685
type: Question
has body: I want to be able to assemble a sandwich by selecting what you want on it. Using radio buttons, I want to see the sandwich assemble as you click what you want on it. I've made each individual part of the sandwich, and I want to be able to stack each image on top of another, so I don't have to make 100 unique images and functions. Similar to apps I've used, like Pizza Hut's or Dominoes', to order a pizza, and the image of the pizza changes as you select what you want on it. Is this possible how I'm explaining it? Thanks.
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29204851
answer count: 2
downvote count: 2
has title: Using javascript to place a transparent image on top of another and another
upvote count: 1
has comment: http://stackoverflow.com/comment/46620434

regex
tags question: http://stackoverflow.com/q/29103299
tags question: http://stackoverflow.com/q/29178467
tags question: http://stackoverflow.com/q/29147658
tags question: http://stackoverflow.com/q/29138803
tags question: http://stackoverflow.com/q/29087839
tags question: http://stackoverflow.com/q/29129623
tags question: http://stackoverflow.com/q/29111481
tags question: http://stackoverflow.com/q/29184454
tags question: http://stackoverflow.com/q/29203800
tags question: http://stackoverflow.com/q/29164550
tags question: http://stackoverflow.com/q/29185006
tags question: http://stackoverflow.com/q/29171842
tags question: http://stackoverflow.com/q/29186216
tags question: http://stackoverflow.com/q/29073221
tag name: regex
tags question: http://stackoverflow.com/q/29094910
tags question: http://stackoverflow.com/q/29085649
tags question: http://stackoverflow.com/q/29135657
tags question: http://stackoverflow.com/q/29136137
tags question: http://stackoverflow.com/q/29095001
tags question: http://stackoverflow.com/q/29144642
tags question: http://stackoverflow.com/q/29071576
tags question: http://stackoverflow.com/q/29143693
tags question: http://stackoverflow.com/q/29143920
tags question: http://stackoverflow.com/q/29065668
tags question: http://stackoverflow.com/q/29206890
tags question: http://stackoverflow.com/q/29159071
tags question: http://stackoverflow.com/q/29205798
tags question: http://stackoverflow.com/q/29097921
tags question: http://stackoverflow.com/q/29065656
tags question: http://stackoverflow.com/q/29197865
tags question: http://stackoverflow.com/q/29188409
tags question: http://stackoverflow.com/q/29135246
tags question: http://stackoverflow.com/q/29123676
tags question: http://stackoverflow.com/q/29097352
tags question: http://stackoverflow.com/q/29139129
tags question: http://stackoverflow.com/q/29120713
tags question: http://stackoverflow.com/q/29077498
tags question: http://stackoverflow.com/q/29122913
tags question: http://stackoverflow.com/q/29197033
tags question: http://stackoverflow.com/q/29110922
tags question: http://stackoverflow.com/q/29080835
tags question: http://stackoverflow.com/q/29177286
tags question: http://stackoverflow.com/q/29116704
tags question: http://stackoverflow.com/q/29204384
tags question: http://stackoverflow.com/q/29189181
tags question: http://stackoverflow.com/q/29110479
tags question: http://stackoverflow.com/q/29096477
tags question: http://stackoverflow.com/q/29185843
tags question: http://stackoverflow.com/q/29211960
tags question: http://stackoverflow.com/q/29124298
tags question: http://stackoverflow.com/q/29171276
tags question: http://stackoverflow.com/q/29185422
tags question: http://stackoverflow.com/q/29163194
tags question: http://stackoverflow.com/q/29098244
tags question: http://stackoverflow.com/q/29082909
tags question: http://stackoverflow.com/q/29160705
tags question: http://stackoverflow.com/q/29217615
tags question: http://stackoverflow.com/q/29206632
tags question: http://stackoverflow.com/q/29170998
tags question: http://stackoverflow.com/q/29132902
tags question: http://stackoverflow.com/q/29162322
tags question: http://stackoverflow.com/q/29124893
tags question: http://stackoverflow.com/q/29123136
tags question: http://stackoverflow.com/q/29169447
tags question: http://stackoverflow.com/q/29070087
tags question: http://stackoverflow.com/q/29117347
tags question: http://stackoverflow.com/q/29214193
tags question: http://stackoverflow.com/q/29101374
tags question: http://stackoverflow.com/q/29091390
tags question: http://stackoverflow.com/q/29170259
tags question: http://stackoverflow.com/q/29184771
tags question: http://stackoverflow.com/q/29088061
tags question: http://stackoverflow.com/q/29163258
tags question: http://stackoverflow.com/q/29139187
tags question: http://stackoverflow.com/q/29123844
tags question: http://stackoverflow.com/q/29166004
tags question: http://stackoverflow.com/q/29141766
tags question: http://stackoverflow.com/q/29214169
tags question: http://stackoverflow.com/q/29151601

http://stackoverflow.com/comment/46591879
comment on: http://stackoverflow.com/a/29188609
has text: Yes! I could've sworn I'd tried that, but I guess not.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29165957
has comment: http://stackoverflow.com/comment/46553450
has comment: http://stackoverflow.com/comment/46587329
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46551282
score: 0
upvote count: 1
has body: Hello I am using the below script to display my advertisement <a href="<?php the_permalink() ?>" onclick="func()" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?> i am using onclick to display my advertisement It is only opening the advertisement window but i want to open the link used in xxxxx.html (i.e) script i denoted above
downvote count: 1
has answer: http://stackoverflow.com/a/29167195
type: Question
linked to: http://stackoverflow.com/q/19761241
tagged with: javascript
tagged with: jquery
has title: Want to display my advertisement when I click href link

http://stackoverflow.com/comment/46394857
type: QuestionComment
has text: Here is an example: http://jsfiddle.net/v465D/28/ in this example, I have given elements nested within a div being observed, an id, a class and also have an element without either. Now, instead of using the update button, if you highlight the text of say the element with the id="hello", undefined is returned. If you press the update button, replacing the content of the div being observed entirely with text, the id of that div is returned with mutation.target.id. Is it impossible to know the id or class names of the elements nested within the observed div when they change?
comment on: http://stackoverflow.com/q/29078708
score: 0
type: Comment

http://stackoverflow.com/comment/46429379
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29099504
type: Comment
has text: look at [jquery ID selector](http://api.jquery.com/id-selector/)

http://stackoverflow.com/comment/46617558
type: Comment
comment on: http://stackoverflow.com/a/29177349
has text: yes, I have already used that and I am successful in sending notification too. But my notifications contains a header and a single line message. Instead I want to remove the header and add more of messages.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46488728
has text: Thanks for your comment. I'd rather avoid using eval at all cost. I was hoping to be able to get around something, but apparently not.
comment on: http://stackoverflow.com/a/29131106
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29108067
tagged with: javascript
has title: Marionette - populating a set size collection with empty data
has comment: http://stackoverflow.com/comment/46450575
score: 0
has comment: http://stackoverflow.com/comment/46483003
tagged with: http://stackoverflow.com/tag/html
tagged with: marionette
has answer: http://stackoverflow.com/a/29169322
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/46477765
has body: I am trying to populate a set of lists, using only a certain number of elements that specify which row they need to be added to. Example: Each node item has a number that corresponds to a specific UL and which position to get added to, but the "total" number of elements is already known. Simplified example data (assume pre-determined array size is 5): nodes = new Entities.NodeCollection([ { listID: 1, position: 2, name: "node2" }, { listID: 1, position: 5, name: "node5" }, { listID: 2, position: 4, name: "node4" } ]); Expected Output: Each node is inserted at the correct location, with empty LI's filling in the remaining locations. Expected output: How do I create a template that lets me insert the data into the correct spot and auto-fills the missing pieces? I could do this with jQuery easily, (pre-fill the right length and just select the child #) but I'm required to use Marionette/Backbone, to build out the event management and database queries side of the app. Worst case, the ability to loop through the known # of elements and check if there is a data point that should go there, filling in the correct html (or empty one) as necessary, but that doesn't seem like a common Marionette/Backbone paradigm. I think I have the template for the actual row correct; and the views: RowView = Backbone.Marionette.ItemView.extend({ tagName: "li", template: "#node-list-item" //something goes here to correctly handle empty pieces? }); ListView = Backbone.Marionette.CompositeView.extend({ itemView: RowView, itemViewContainer: "ul", //I don't think template implementation isn't important for this example template: "#list-layout" }); Am I just going about this wrong, and I should modify the data set before adding to the collection to include the empty parts? (If so, I would need to switch the template depending on if the source array item is empty, but that seems like a different can of worms, with excessive empty data points.) Ultimately, the output is like a table, but the data is…
has comment: http://stackoverflow.com/comment/46482325
tagged with: dataformat
has comment: http://stackoverflow.com/comment/46482477
has comment: http://stackoverflow.com/comment/46475580
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29169322
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/46475034
has comment: http://stackoverflow.com/comment/46450597

http://stackoverflow.com/a/29192102
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29184370
answers question: http://stackoverflow.com/q/29184370
has body: A couple of ideas You can try to wait a few frames to check for results var vs = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vs, vSource); gl.compileShader(vs); var fs = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fs, vSource); gl.compileShader(fs); var p = gl.createProgram(); gl.attachShader(p, vs); gl.attachshader(p, fs); gl.linkProgram(p); gl.flush(); // Important! setTimeout(checkResults, 2000); // check results 2 seconds later function checkResults() { var status = gl.getProgramParameter(p, gl.LINK_STATUS); ... } At least in Chrome this might mean the GPU process will compile the program while the Render process (The one running your JavaScript) will continue to run so at least JavaScript will not block unless of course if it's not finished by the time you check for results. Break stuff up into multiple steps var tasks = []; addTask(compileVertexShader); addTask(compileFragmentShader); addTask(linkProgram); addTask(render); function addTask(fn) { tasks.push(fn); runNextTask(); } var taskRunning = false; function runNextTask() { if (taskRunning) { return; } var taskFn = tasks.shift(); if (taskFn) { taskRunning = true; setTimeout(function() { taskRunning = false; taskFn(); runNextTask(); }, 1); } } function compileVertexShader() { ... } function compileFragmentShader() { ... } function linkProgram() { ... } function render() { ... } As long as one function doesn't take too long there won't be any issues. There are some common libraries for helping with this kind of stuff. For example the async library.
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46615996
upvote count: 2

http://stackoverflow.com/comment/46445091
comment on: http://stackoverflow.com/a/29107505
type: Comment
has text: That's not equivalent to the code example in the OP.
score: 3
type: AnswerComment

http://stackoverflow.com/comment/46496318
type: Comment
comment on: http://stackoverflow.com/a/29114294
has text: I don't see any problem based on the script anymore. Problem should be on the html. You should provide them. And I think you should make 2 functions like AddError(obj, errmsg) and RemoveError(obj), to clean your script a bit, avoiding repetitive codes.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/46607757
comment on: http://stackoverflow.com/q/29197539
type: Comment
has text: I've just put debugger inside finally, and it is being executed and variable `a` is changed to `3`
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46498765
has text: Doesn't display anything at all on the chart. Nothing at all in console either. That's what is baffling me.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29131445

http://stackoverflow.com/comment/46587513
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29186126
score: 1
has text: There is a chance that the JS is running before the divs are rendered.

http://stackoverflow.com/a/29177627
answers question: http://stackoverflow.com/q/29177566
has body: /// recursion answer function john( arr, i, j, total, coord) { var total = total || 0; var coord = coord || []; if(i &lt; arr.length) { if(j &lt; arr[i].temperatures.length) { total = arr[i].temperatures[j] + total; john(arr, i, j + 1, total, coord) } ave = total / arr[i].temperatures.length; total = 0; coord.push([ave, arr[i].population]) // it need return john(arr, i + 1, 0, total, coord) // cannot be john(arr, i+1, 0, total, coord) return john(arr, i + 1, 0, total, coord) } return coord; }
type: Answer
downvote count: 1
upvote count: 0
score: -1

http://stackoverflow.com/comment/46591856
type: QuestionComment
type: Comment
has text: I'm not sure if I can follow. You're assigning your the result of your call to map to a nodes variable which you then never use. I don't understand what this code is supposed to do or achieve.
comment on: http://stackoverflow.com/q/29188326
score: 0

http://stackoverflow.com/q/29104225
answer count: 1
tagged with: javascript
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29104243
has body: I got an unexpected return value "undefined" from function 'fnExample1' if I indent code like this : function fnExample1() { return 1; } I have made this simple example : Example jsfiddle Thanks.
has title: Javascript unexpected return value with specific indentation
linked to: http://stackoverflow.com/q/18221963
type: Question
duplicate of: http://stackoverflow.com/q/18221963

http://stackoverflow.com/a/29083619
type: Answer
answers question: http://stackoverflow.com/q/29083539
has body: I assume the example you posted uses only 1 style sheet that stores multiple css properties. Once you click the link it chooses the appropriate properties for that over arching theme from that single style sheet and disregards the rest. Given that, why would you want multiple style sheets?
score: 0

http://stackoverflow.com/comment/46473638
comment on: http://stackoverflow.com/a/29123103
type: Comment
has text: I have removed the downvote, but I think you should remove the answer. I am not looking to create a function delegate. I am looking for a short syntax. Your suggestion is longer, not shorter, than doing function.apply(context, args)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/112258748
score: 1
comment on: http://stackoverflow.com/a/29100805
type: AnswerComment
type: Comment
has text: It took me some time to find the documentation about "<all_urls>" in the chrome docs: https://developer.chrome.com/extensions/match_patterns

http://stackoverflow.com/q/29154048
has comment: http://stackoverflow.com/comment/46529176
has answer: http://stackoverflow.com/a/29154454
possible better answer: http://stackoverflow.com/a/29154277
accepted answer: http://stackoverflow.com/a/29154454
has comment: http://stackoverflow.com/comment/46529334
has comment: http://stackoverflow.com/comment/46529503
tagged with: javascript
tagged with: jquery
has title: Add and remove data from input field
score: 0
answer count: 3
has body: I have a form like this: Description Add I want to add below it a list of buttons/words (ex: Car, Food, Battery, House), and when the user clicks that word, it gets added in the input field called "descr" . If he clicks again on that word, it gets removed from the input field ex: I click Car, Food, House, the Input contains: "car, food, house" . I click food again, the input contains "car, house" Also, it would be perfect if after i click pe word/button, it gets forwarded to the start of the list(ex; car, food, battery, monopoly, money, cards, virgo, website If i click "cards", the list becomes: cards, car, food, battery, monopoly, money, virgo, website If you have any advice on how can I do this with JQuery/Json/javascript, please give me a hint/example. Thank you.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29154277
has answer: http://stackoverflow.com/a/29154389
tagged with: php
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/29181429
has comment: http://stackoverflow.com/comment/46579325
has comment: http://stackoverflow.com/comment/46580561
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46579579
has answer: http://stackoverflow.com/a/29181667
upvote count: 1
has comment: http://stackoverflow.com/comment/46580508
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29181954
has answer: http://stackoverflow.com/a/29196175
has answer: http://stackoverflow.com/a/29182165
linked to: http://stackoverflow.com/q/1145208
score: 0
has title: how to use html script template correctly
has comment: http://stackoverflow.com/comment/46584269
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29181641
has body: I have to generate some li element automatically and the way I was doing it it through a function that return text inside a loop, something like this: function getLi(data) { return ' ' + data + ' '; } then I found a better way to do it by writing html inside a div: and then I would change the id and value get the html and reset the element to original state: var element = $("#value"); element.html(data); element.attr('id', getNewId()); var htmlText = $("#Template").html(); element.html(''); element.attr('id', 'value'); return htmlText; then I was reading on script template and I figured this could be a better way of doing it, However apply the previous code didn't work as the inner elements didn't exist according to this article so how can I apply this? EDIT: I put inside a ul tag, I use this method to get the items dynamically EDIT2: some text this isn't necessarily what I have but something along the way Edit3: my ul does not exist orgialy it's generated dynamically I insist this is not a duplicate I want to know how to use a template with some dynamic variables
favorite count: 0

http://stackoverflow.com/comment/46623286
type: QuestionComment
score: 0
has text: Can you post the code for routeProvider and the detail controllers too?
comment on: http://stackoverflow.com/q/29205906
type: Comment

http://stackoverflow.com/q/29124038
downvote count: 0
has answer: http://stackoverflow.com/a/29124497
accepted answer: http://stackoverflow.com/a/29124497
favorite count: 0
tagged with: immutability
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/31274941
has title: How do I get a specific object from an immutable js map by value?
has answer: http://stackoverflow.com/a/35999315
has answer: http://stackoverflow.com/a/44635542
type: Question
score: 37
upvote count: 37
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29124164
has answer: http://stackoverflow.com/a/31274941
has answer: http://stackoverflow.com/a/38418807
has body: I created an immutable map (with Immutable-JS) from a list of objects: var result = [{'id': 2}, {'id': 4}]; var map = Immutable.fromJS(result); Now i want to get the object with id = 4. Is there an easier way than this: var object = map.filter(function(obj){ return obj.get('id') === 4 }).first();

http://stackoverflow.com/a/29087846
answers question: http://stackoverflow.com/q/29087600
has comment: http://stackoverflow.com/comment/46408863
has body: JavaScriptResult simply returns JavaScript to the client, so you can, for instance, access it from a &lt;script&gt; element: &lt;script src="/MyCoolController/GiveMeScript?param5=7"&gt;&lt;/script&gt; How that JavaScript gets executed is up to you. I don't really see why the performance of eval() would be a concern if your objective is to redirect the page, but this sounds like a pretty questionable approach to (especially if it involves eval()). Why not just return a JsonResult that indicates a redirect using some pre-decided convention, and then have your script act accordingly: // in controller return JsonResult(new { redirectTo = "http://www.google.co.uk" }); // in script $.ajax({ type: 'POST', url: '...', success: function (result) { if (result.redirectTo) { window.location = result.redirectTo; } // handle result if not redirecting ... } });
score: 0
type: Answer

http://stackoverflow.com/comment/46369299
has text: `without loading them entirely` unfortunately this is not possible. You can only check the image by requesting it, which will mean that the image data is returned in the request. The first 2 examples are restricted by browser security due to the [Same Origin Policy](http://en.wikipedia.org/wiki/Same-origin_policy). The third is the only workable client-side solution.
comment on: http://stackoverflow.com/q/29066863
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46625243
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29207396
has text: `dat` is a local variable. It's not a pointer. Changing it won't change the original parameter.

http://stackoverflow.com/q/29136693
has body: I am new to canvas and I need to do the following: Given we have the following code for changing the image color var myImage = new Image(); cnxt = myCanvas.getContext("2d"); cnxt.drawImage(theImage, 0, 0); myImage.src = "test.png"; myImage = context.getImageData(0, 0, 200, 200); var data = myImage.data; for (var i = 0; i &lt; data.length; i += 4) { //red bytes myImage.data[i] = 0; // green bytes myImage.data[i+1] = val; // blue bytes. myImage.data[i+2] = val; //alpha bytes myImage.data[i+2] = val; } cnxt.putImageData(myImage, 0, 0); I need to change the image color based on a input text field value on my page say a range from 0 to 100 and the image color changes from yellow to blue. Can someone help with this? how do we change the image data to accept a range of number and effect the image color?!
has comment: http://stackoverflow.com/comment/46498297
has comment: http://stackoverflow.com/comment/46498495
type: Question
tagged with: canvas
tagged with: javascript
tagged with: jquery
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2688961
has title: HTML5 canvas image color change based on value

memory-management
tags question: http://stackoverflow.com/q/29111339
type: Tag
tag name: memory-management

http://stackoverflow.com/a/29181028
downvote count: 0
has comment: http://stackoverflow.com/comment/46579069
type: Answer
answers question: http://stackoverflow.com/q/29180936
has body: And just for fun, a recursive implementation (which will be optimized using TR optimization in ES6): function reduce(arr, func, start) { if (arr.length == 0) { return start; } var accum = typeof start == 'undefined' ? arr[0] : func(start, arr[0]); return reduce(arr.slice(1), func, accum); } console.log(reduce([1,2,3], function(a,b){return a + b;})); JSFiddle: http://jsfiddle.net/k3kuoz3w/1/ UPD: In the comments @Tomalak mentioned that this solution would create an array every iteration. For even better fun here is a solution that does not create unnecessary copies: function reduce(arr, func, start, i) { if (arr.length == i) { return start; } i = i || 0; var accum = typeof start == 'undefined' ? arr[i] : func(start, arr[i]); return reduce(arr, func, accum, i + 1); } http://jsfiddle.net/k3kuoz3w/2/ UPD 2: the last solution (I promise) that encapsulates the dirty i exposed in the previous code: function reduce(arr, func, start) { function real_reduce(arr, func, start, i) { if (arr.length == i) { return start; } var accum = typeof start == 'undefined' ? arr[i] : func(start, arr[i]); return real_reduce(arr, func, accum, i + 1); } return real_reduce(arr, func, start, 0) } http://jsfiddle.net/k3kuoz3w/3/
has comment: http://stackoverflow.com/comment/46579008
has comment: http://stackoverflow.com/comment/46579041
has comment: http://stackoverflow.com/comment/46578898
has comment: http://stackoverflow.com/comment/46578743
upvote count: 2
has comment: http://stackoverflow.com/comment/46578650
has comment: http://stackoverflow.com/comment/46578624
has comment: http://stackoverflow.com/comment/46578982
score: 2
has comment: http://stackoverflow.com/comment/46578719
has comment: http://stackoverflow.com/comment/46578774
has comment: http://stackoverflow.com/comment/46578638
has comment: http://stackoverflow.com/comment/46578885
has comment: http://stackoverflow.com/comment/46578643

http://stackoverflow.com/comment/46626423
comment on: http://stackoverflow.com/q/29206729
has text: @ErikHonn I have a navigation with "Teams" which I want to give a `active` class when I'm on a state which has something to do with teams.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46627135
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29154616
has text: In the series.data you have all your points.
score: 0

http://stackoverflow.com/comment/46443067
comment on: http://stackoverflow.com/q/29106661
type: Comment
type: QuestionComment
has text: See: [What is JavaScript's highest integer value that a Number can go to without losing precision?](http://stackoverflow.com/questions/307179/what-is-javascripts-highest-integer-value-that-a-number-can-go-to-without-losin) That loop is guaranteed to be safe.
score: 3

http://stackoverflow.com/q/29122509
has body: We are doing link validation of html files using PHP. Where we have lots of links with various domains like .com, .co.in, .ie etc. If we validate the file with .com links, it is being automatically redirected to a .co.in page on recognizing the IP address. So how would I avoid such redirection and how would I go about getting the appropriate domain while navigating the links.
type: Question
has title: How to block the auto redirection of websites using curlPHP
score: 0
tagged with: php
answer count: 1
has answer: http://stackoverflow.com/a/29122776
type: UnansweredQuestion
tagged with: javascript

http://stackoverflow.com/a/29118683
score: 0
answers question: http://stackoverflow.com/q/29118621
type: Answer
has body: You wrote this : while(correctAns==correctFloorAns){ alert("hi") } { primaryNumber = random(200); primaryNumber = primaryNumber * 1; secondaryNumber = random(200); secondaryNumber = secondaryNumber * 1; correctAns = primaryNumber / secondaryNumber; correctAns = correctAns * 1; correctFloorAns = Math.floor(correctAns); } The code in the second block { } won't be executed in the while loop, it's executed only once. I think what you wanted to write is this : while(correctAns==correctFloorAns){ // I advise you to comment your alert once your debug is done, it will be very annoying alert("hi"); primaryNumber = random(200); primaryNumber = primaryNumber * 1; secondaryNumber = random(200); secondaryNumber = secondaryNumber * 1; correctAns = primaryNumber / secondaryNumber; correctAns = correctAns * 1; correctFloorAns = Math.floor(correctAns); } Cheers
has comment: http://stackoverflow.com/comment/46465454
has comment: http://stackoverflow.com/comment/46465048

http://stackoverflow.com/comment/46607670
has text: The sails.js gitter room is also a good place to chat and get support: https://gitter.im/balderdashy/sails
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29184118
type: Comment

http://stackoverflow.com/a/29070312
score: -1
has body: attr is a jquery fn, should call by jquery object use like this $('[name=common_name]').attr('data-X') so try dataX = $($('[name=common_name]').get(i)).attr('data-X');
downvote count: 1
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/29070267
has comment: http://stackoverflow.com/comment/46417408

http://stackoverflow.com/a/29109109
downvote count: 0
has body: If you create a promise up front, you could keep chaining off of it to get your desired effect. // ajax mock function sendRequest(v, delay) { var def = $.Deferred(); setTimeout(function () { def.resolve(v); }, delay); return def.promise(); } var ajaxPromise = $.Deferred().resolve().promise(); var delay = 600; // will decrement this with each use to simulate later requests finishing sooner // think of this as a click event handler function doAction (btnName) { delay -= 100; var promise = sendRequest(btnName, delay); ajaxPromise = ajaxPromise.then(function () { return promise; }).done(function () { console.log(btnName); }); } doAction("1"); doAction("2"); doAction("3"); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; Since i delayed them by 500ms, 400ms, and 300ms, none of them logged until after 500ms. Here's your code with the same technique: var ajaxPromise = $.Deferred().resolve().promise(); $('#button1').click(function(){ var promise = $.ajax({url: 'dosomething1.html'}) ajaxPromise = ajaxPromise.then(function () { return promise; }, function () { return promise; // to also handle fail conditions gracefully }).done( function(){ console.log('something 1 success'); } ) .fail( function(){ console.log('something 1 failure'); } ); }); // repeat for other two buttons The important thing is all of the ajax requests will always be sent immediately, but the done and fail handlers won't be executed until their turn.
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29108436
accepted answer of: http://stackoverflow.com/q/29108436
has comment: http://stackoverflow.com/comment/46474492
type: Answer
score: 3

http://stackoverflow.com/a/29121169
has body: To tell the difference you might want to look at what is A and what is new A(): c = new A(); // This is an instance of A. The constructor property is A. console.log(c.constructor) // function() { this.d = 123; } console.log(new c.constructor()) // Creates another instance of A. console.log(Object.getPrototypeOf(new c.constructor())) // A {c: 999, d: 333} var c = A; // This is a function. The constructor property is a base Function. console.log(c.constructor) // function Function() { [native code] } console.log(new c.constructor()) // Creates instance of base Function. console.log(Object.getPrototypeOf(new c.constructor())) // function Empty() {} Without the new operator on your custom constructor (A) you are not creating an instance of A. More information on new operator: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new
downvote count: 0
answers question: http://stackoverflow.com/q/29120877
type: Answer
score: 2
upvote count: 2

touch
tags question: http://stackoverflow.com/q/29080256
type: Tag
tags question: http://stackoverflow.com/q/29062770
tags question: http://stackoverflow.com/q/29143142
tag name: touch

http://stackoverflow.com/a/29128117
has body: The issue was that a JS line earlier up was failing silently, and preventing further lines of javascript from running
score: 0
answers question: http://stackoverflow.com/q/29127748
type: Answer

http://stackoverflow.com/comment/46444073
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29106393
score: 0
has text: I added a little to my question based off your answer, It really helps but how can I make this data global?

http://stackoverflow.com/q/29119401
tagged with: javascript
tagged with: gruntjs
score: 3
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/54603422
favorite count: 0
has comment: http://stackoverflow.com/comment/54607862
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33430383
has body: I want to avoid duplicate code, so i am trying to load grunt task from Grunt file "a" and use them in gruntfile "b". that means: i want to see all task of "a" in file "b" (but without code), just setup like a reference or template to another gruntfile. here is grunt file "b": module.exports = function (grunt) { 'use strict'; var karmaGrunt = './../../grunt', abortHandler = function () { var errors = grunt.fail.errorcount, warnings = grunt.fail.warncount; if (errors &gt; 0 || warnings &gt; 0) { //run rocketlauncher python script and then stop the grunt runner. grunt.task.run(["shell:rocketlauncher", "fatal"]); } }, fatal = function () { // this function stops grunt and make the jenkins build red. grunt.fail.fatal('failed'); }; require("grunt-load-gruntfile")(grunt); // load grunt task from another file and add it. grunt.loadGruntfile(karmaGrunt); //grunt needs to continue on error or warnings, that's why we have to set the force property true grunt.option('force', true); grunt.initConfig({ shell: { options: { execOptions: { cwd: '../scripts' } }, 'rocketlauncher': { command: './runRocketLauncher.sh' } } }); grunt.loadNpmTasks('grunt-karma'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build-process', ['karma', 'abortHandler']); grunt.registerTask('abortHandler', abortHandler); grunt.registerTask('fatal', fatal); } here is file "a": module.exports = function (grunt) { "use strict"; var eConfig = '../e-specs/karma.config.js', dConfig = '../d-specs/karma.config.js', cConfig = '../c-specs/karma.config.js'; grunt.initConfig({ karma: { options: { reporters: ['progress', 'coverage', 'threshold'] }, c: { configFile: cConfig }, d: { configFile: dConfig }, e: { configFile: eConfig } } }); grunt.loadNpmTasks('grunt-karma'); }; my file b load the task "Karma" but if i run only the grunt file of a i have 3 nested task ("e","c","d") but if i load them from another file, the only task i can see is "karma" the error is: No "karma" targets found. Warning: Task "karma" fail…
upvote count: 3
has title: load grunt task from another gruntfile
type: Question

http://stackoverflow.com/comment/46483165
type: AnswerComment
type: Comment
score: 0
has text: ok worked well, thanks,, now my question is if it is valid approach to have arbitrary values stored inside an input field ?
comment on: http://stackoverflow.com/a/29128663

http://stackoverflow.com/a/29146730
answers question: http://stackoverflow.com/q/29146546
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46538418
downvote count: 0
has comment: http://stackoverflow.com/comment/46538343
has comment: http://stackoverflow.com/comment/46538394
has comment: http://stackoverflow.com/comment/46538350
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29146546
has body: Javascript thinks your param is part of the String and not the variable. You need to pull param out of the String an concatenate all of the Strings using the +operator. Take a look at this: function load_home(param) { var param = "xyz.xml"; document.getElementById("content").innerHTML = ' '; }

file
type: Tag
tag name: file
tags question: http://stackoverflow.com/q/29095409
tags question: http://stackoverflow.com/q/29200256
tags question: http://stackoverflow.com/q/29148634
tags question: http://stackoverflow.com/q/29122816
tags question: http://stackoverflow.com/q/29106631
tags question: http://stackoverflow.com/q/29078653

http://stackoverflow.com/comment/46508902
has text: apology for the late reply. There are currently no errors or data shown in the console log (chrome firebug). Thanks
comment on: http://stackoverflow.com/q/29141521
score: 0
type: Comment
type: QuestionComment

annotate
tag name: annotate
type: Tag
tags question: http://stackoverflow.com/q/29192066

http://stackoverflow.com/a/29172036
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46562884
score: 1
answers question: http://stackoverflow.com/q/29171951
upvote count: 1
has body: As you use (note the second parameter in json_decode): $json = json_decode($execResult,true); You will have an associative array, so your value will be in: $json['result']['last'] Note that $json-&gt;result-&gt;Last would work if you use json_decode() without the second parameter (the default value, false).
has comment: http://stackoverflow.com/comment/46562426
has comment: http://stackoverflow.com/comment/46562860

http://stackoverflow.com/comment/46399723
type: Comment
has text: @TristanLee How did you put @Zach? It's @Zack lol.. but anyway, `.click()` will trigger the *event* of clicking on an element *just like* if the mouse actually clicked on that element, at that point, if there are any handlers that were added with `.click(function()...`, those handlers will run, but you do not have to have handlers assigned to a click *event* for that event to happen.
type: AnswerComment
comment on: http://stackoverflow.com/a/29082527
score: 0

http://stackoverflow.com/comment/46372355
type: AnswerComment
has text: Make sure you don't call the random function multiple times! That would break the conditional logic
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29068482

http://stackoverflow.com/q/29065139
has title: Error sending JSON over webscket
has comment: http://stackoverflow.com/comment/46366052
has comment: http://stackoverflow.com/comment/46365969
type: UnansweredQuestion
tagged with: node.js
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29065707
has body: i have this small chat app in javascript and node and i am trying to send a simple JSON object over websocket, but it is displaying an error related to the "JSON.parse" i am doing in the server side. I've tried to change the code, but nothing seems to work. Why could this be? my operating system is windows 8.1 and i am using firefox and chrome. undefined:1 undefined ^ SyntaxError: Unexpected token u at Object.parse (native) at WebSocketConnection.&lt;anonymous&gt; (C:\Users\*****\Documents\simple _chat\server.js:39:22) here is the code on the client side var socket = new WebSocket('ws://127.0.0.1:1234'); function sendMessage(){ var message = document.getElementById('message').value; var message_send ={ name_:"WHATEVER", message_:message } socket.send(JSON.stringify(message_send)); } socket.addEventListener("message", function(e){ var msg = e.data; console.log(e); document.getElementById('chatlog').innerHTML+='&lt;br&gt;'+msg; }) here is the server code: var count = 0; var client ={}; var websocket = require('websocket').server; wsServer = new websocket({httpServer:server}); wsServer.on('request',function(r){ var connection = r.accept(null, r.origin); var id = count++; client[id]=connection console.log((new Date()) + ' Connection accepted [' + id + ']'); connection.on('message', function (message) { var k = JSON.parse(message.data); var message_ = k.content_ var name_ = k.name_; console.log(name_ +" "+message_); for(var i in client){ client[i].sendUTF(name_+": "+message_); } }); connection.on('close', function (reasonCode, description) { delete client[id]; console.log((new Date()) + ' Peer ' + connection.remoteAddress + ' disconnected.'); }) })
type: Question
answer count: 1
tagged with: websocket
tagged with: javascript
score: 0

http://stackoverflow.com/a/29095253
score: 1
has comment: http://stackoverflow.com/comment/46423582
has comment: http://stackoverflow.com/comment/46422052
has comment: http://stackoverflow.com/comment/46425913
has comment: http://stackoverflow.com/comment/46421677
has body: In wordpress you in ject your javascript files into your theme using the wordpress api/hooks. the method you want is wp_enqueue_script. Here are the docs It's used like this: add_action('wp_enqueue_scripts', 'addScript'); function addScript() { wp_enqueue_script( 'script-name', get_template_directory_uri() . '/path-to-your-script.js', array('jquery') // any script dependancies. i.e. jquery ); } Depending on the version of php you have, you can inline the function: add_action('wp_enqueue_scripts', function () { wp_enqueue_script( 'script-name', get_template_directory_uri() . '/path-to-your-script.js', array('jquery') // any script dependancies. i.e. jquery ); });
has comment: http://stackoverflow.com/comment/46425598
has comment: http://stackoverflow.com/comment/46425762
downvote count: 0
has comment: http://stackoverflow.com/comment/46421711
answers question: http://stackoverflow.com/q/29094915
has comment: http://stackoverflow.com/comment/46425659
type: Answer
has comment: http://stackoverflow.com/comment/46422211
upvote count: 1
has comment: http://stackoverflow.com/comment/46422281

http://stackoverflow.com/q/29070171
has answer: http://stackoverflow.com/a/29070273
accepted answer: http://stackoverflow.com/a/29070265
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29070273
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29070352
has comment: http://stackoverflow.com/comment/46375404
has comment: http://stackoverflow.com/comment/46375395
has comment: http://stackoverflow.com/comment/46375518
type: Question
has body: I am trying to create a dataset pattern like this from the rest service in my angular application. Example: $scope.chartSeries = [ {"name": "Google", "data": [100, 200, 400, 700, 300]}, {"name": "Yahoo", "data": [300, 100, null, 500, 200]}, {"name": "Facebook", "data": [500, 200, 200, 300, 500] }, {"name": "Microsoft", "data": [100, 100, 200, 300, 200] } ]; Right now this is my code to build a similar pattern , if (datai){ $rootScope.DashboardData =[]; $rootScope.DashboardData = datai; var _fieldData = []; widget.chartConfig.series = []; widget.chartConfig.series = $rootScope.DashboardData.map(function(elm) { return { name: elm[widget.seriesname], data:_fieldData.push(elm[widget.dataname]) }; }); } Problem is data field is not creating an array. This is the final output which the above code generates. [{"name": "Google", "data": 1}];
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46375422
has title: Create an array inside for loop javascript
has comment: http://stackoverflow.com/comment/46375370
has answer: http://stackoverflow.com/a/29070308
score: 0
has answer: http://stackoverflow.com/a/29070265
has comment: http://stackoverflow.com/comment/46375373
has comment: http://stackoverflow.com/comment/46375384
has comment: http://stackoverflow.com/comment/46375411

http://stackoverflow.com/comment/46584983
comment on: http://stackoverflow.com/a/29184500
has text: This will fail on basic valid HTML syntax such as `< div>`.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29073515
type: UnansweredQuestion
has body: I have a label in a div which I want to show or hide depending on the value of another text box the JavaScript function is written and working but in the ASP.NET code behind I use a select case statement to set the DIVid.Visible to True or False on the page load. The javascript function for hiding the div only works when on the load it the DIVid.Visible is true the other parts of the JS function (disable a text box) work fine. Is it something to do with because it can't find the DIVid because visible is false and how would I overcome this?
upvote count: 1
has answer: http://stackoverflow.com/a/29073547
has title: Show/Hide Div in Web Application
has answer: http://stackoverflow.com/a/29073609
type: Question
tagged with: c#
answer count: 2
tagged with: javascript
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46381069
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/comment/46469335
score: 0
has text: but it is normal. When you call will cURL, it is server side it will not read html/js code as a browser does, it just get the html/js code but will not interpret that
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29121327

video
tags question: http://stackoverflow.com/q/29151675
type: Tag
tags question: http://stackoverflow.com/q/29202164
tags question: http://stackoverflow.com/q/29207304
tags question: http://stackoverflow.com/q/29094448
tags question: http://stackoverflow.com/q/29070316
tags question: http://stackoverflow.com/q/29090378
tags question: http://stackoverflow.com/q/29212462
tags question: http://stackoverflow.com/q/29207071
tags question: http://stackoverflow.com/q/29156371
tags question: http://stackoverflow.com/q/29212690
tags question: http://stackoverflow.com/q/29158365
tag name: video
tags question: http://stackoverflow.com/q/29209868
tags question: http://stackoverflow.com/q/29198100
tags question: http://stackoverflow.com/q/29206664

memory-leaks
tags question: http://stackoverflow.com/q/29064684
tags question: http://stackoverflow.com/q/29107816
tags question: http://stackoverflow.com/q/29175315
tags question: http://stackoverflow.com/q/29190471
type: Tag
tag name: memory-leaks

http://stackoverflow.com/comment/46400681
type: QuestionComment
comment on: http://stackoverflow.com/q/29083642
has text: you tried adding `var_dump($_POST);` in somepage.php? what is it dumping?
score: 1
type: Comment

http://stackoverflow.com/comment/46495405
comment on: http://stackoverflow.com/q/29134955
has text: @Thilo [codereview.se] is NOT for seeking explanations of code written by other people, which is primarily what this question appears to be.
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29075349
downvote count: 0
answers question: http://stackoverflow.com/q/29074347
has body: You would need to emit code that distinguishes the cases at runtime. That is not too hard, but not a completely trivial change either. Moreover, you'd also need to adapt the optimising compiler. But that's the easy part. Changing the meaning of typeof will break other parts of the system, which rely on the correct semantics. For example, all uses of the IS_STRING primitive in V8's built-in libraries will become incorrect -- you are likely to introduce crashes that way. Even if you managed to fix all that, the idea would be very questionable from a language semantics perspective. There is a reason why proxies cannot fake strings, first and foremost, strings aren't objects. You would also break JavaScript code that relies on the spec'ed behaviour. In short: don't. It's a really bad idea.
has comment: http://stackoverflow.com/comment/46435787
has comment: http://stackoverflow.com/comment/46386946
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46387376
score: 1
has comment: http://stackoverflow.com/comment/46386645

http://stackoverflow.com/comment/46664373
has text: Just another thing suppose we want see how many times a function was called we will write : expect(<some obj>.<some method>.callCount).toEqual(1); But if i want to know how many times a method was called with particulars arguments : expect(<some obj>.<some method>).toHaveBeenCalledWith("arg","arg2"); Is it possible to check how many times this was called?
comment on: http://stackoverflow.com/a/29209667
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/48515671
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29117847
type: Comment
has text: when i do `var td = $("table#flooring tr").find('td:nth-child('+i+')'); var value = td.parent().find('.floormaterialname').text();`the value of `value` will be all the span i want is one row only for for example in row one checkbox value of row one span only

http://stackoverflow.com/a/29165165
upvote count: 1
has comment: http://stackoverflow.com/comment/46549152
has comment: http://stackoverflow.com/comment/46549349
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46549192
has body: As I understand, you want independent clock in JS, right? It's pretty simple: Make an ajax request to your server, while the script is loaded by the user, to get current time (UNIX). Set interval for example 1 sec, and just increment your time, that you get in pt 1, for the interval you choose. When user change his time on local machine it wouldn't affect the script, also refreshing script would again load time from your server.
answers question: http://stackoverflow.com/q/29117771
type: Answer

http://stackoverflow.com/comment/46634640
has text: So would a statement like `delete myOb.myProp ? alert("deleted") : alert("not deleted")` make sense?
comment on: http://stackoverflow.com/q/29212359
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46452415
comment on: http://stackoverflow.com/q/29109987
has text: But what we will use in node.js? There is no `window`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29213553
accepted answer: http://stackoverflow.com/a/29238784
type: Question
tagged with: javascript
tagged with: extjs
score: 2
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29238784
has body: Hi I'm very new to 'Ext JS' (about 4 days) and have to edit 'Ext JS' form. That form is to edit existing entry. So I have to update 'project name' field in this form and need to follow following conditions. Users can submit form with its old project name (old old project name means project name when form is load). When user select existing project name from suggestion drop down (except old project name), need to show error. Basic idea of this conditions is prevent duplicate project names. So I try to do this with 'validator' but I can't find a way to compare old project name and new project name. Is there any method to compare those values ?? Any other way to validate this field ??? this is what I have done so far... _est.project.view.panel.updateprojectname.combox = function (projectdetails) { var nstore = _est.project.view.panel.updateprojectnstore(); var combo = Ext.create('Ext.form.ComboBox', { fieldLabel: _est.project.text.nameText, store: nstore, labelSeparator: ' ', vtype: 'text', afterLabelTextTpl: _est.afterLabelTextRequiredTpl, msgTarget: 'side', displayField: 'projectname', valueField: 'projectname', labelWidth: 130, maxLength: 200 name: 'projectname', allowBlank: false, pageSize: true, triggerAction: 'query', autoSelect: true, minChars: 0, itemId : 'project-name-field', value: Ext.htmlDecode(projectdetails.projectname), hideTrigger: true, anchor: '95%', validator: function(oldValue) { var existnstore = Ext.StoreMgr.lookup("ptoject-project-names-get-store"); if(existnstore){ var nstore = existnstore.findExact('projectname',oldValue); if(nstore < 0){ return true; }else{ return 'Job name already exist.'; } } }, listConfig: { getInnerTpl: function () { return '' + '{projectstate}' + '{projectname}' + ''; } }, }); return combo; } any suggestions or opinions to do this :) thanks in advance..
favorite count: 0
upvote count: 2
has title: 'Ext Js' form field validation using 'validator'
type: AnsweredQuestion

http://stackoverflow.com/comment/46553526
has text: @Mawg thanks for reminding, I've updated my code.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29167351
type: Comment

http://stackoverflow.com/a/29162425
has comment: http://stackoverflow.com/comment/46544689
accepted answer of: http://stackoverflow.com/q/29162322
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46544746
has body: Ok, here's a pattern: ^(?=(?:\d*?-){4}\d*$)(?=(?:-*?\d){10}-*$).{14}$ Demo Explanation: The main part is ^.{14}$ which simply checks there are 14 characters in the string. Then, there are two lookaheads at the start: (?=(?:\d*?-){4}\d*$) (?=(?:-*?\d){10}-*$) The first one checks the hyphens, and the second one checks the digits and make sure the count is correct. Both match the entire input string and are very similar so let's just take a look at the first one. (?:\d*?-){4} matches any number of digits (or none) followed by a hyphen, four times. After this match, we know there are four hyphens. (I used an ungreedy quantifier (*?) just to prevent useless backtracking, as an optimization) \d*$ just makes sure the rest of the string is only made of digits.
has comment: http://stackoverflow.com/comment/46545073
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29162322
type: Answer

http://stackoverflow.com/a/29090568
has body: var old_array = ["1","2","3","4","5"], new_array = [], num_of_columns = 3; // adjustable for(var i=0, n=old_array.length; i&lt;n; i++) { // 1: turn string into an Int var val = parseInt(old_array[i]); // 2: determine column placement // change 'val' to 'i' if wanting it by index of old_array (not by value) var col_num = val % num_of_columns; // 3: create the new column array if it doesn't exist, otherwise use the old one var col_arr = new_array[col_num] = new_array[col_num] || []; // 4: store the value in the correct column col_arr[ col_arr.length ] = val; } Explanation: Your output is showing that you've converted your input as string to a numeric value (no other answer does this conversion) It's unclear if you're grouping the columns by value, or the position they are in your old_array, so you'll have to decide, regardless, I've made it a simple change In order to add to an array, an array must exist; simply grab the column array if you've already created it, or create a new blank array to use next time Assign the value; notice the syntax, which should be a little faster than a .push() call Result: new_array[0] = [3] new_array[1] = [1, 4] new_array[2] = [2, 5]
type: Answer
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29090475

http://stackoverflow.com/a/29063162
score: 0
type: Answer
has body: try this: app.js: angular .module('feedsmanagerApp', [ 'ngRoute', 'feedsmanagerAppHome' ]) .config(function ($routeProvider) { debugger; $routeProvider .when('/home', { templateUrl: 'scripts/feedsmanager/home.html', controller: 'HomeCtrl' }) .otherwise({ redirectTo: '/home' }); }); scripts/feedsmanager/home.js: angular.module('feedsmanagerAppHome', []) .controller('HomeCtrl', function ($scope) { alert('works'); });
has comment: http://stackoverflow.com/comment/46367354
answers question: http://stackoverflow.com/q/29063114

http://stackoverflow.com/comment/46513975
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29145454
score: 0
has text: No, it's not possible. Look at the question & answers linked as a duplicate of this one. You have to change the structure of the application: instead of expecting functions like this to return values, you design them to allow callbacks to be passed in.

http://stackoverflow.com/comment/46548307
comment on: http://stackoverflow.com/q/29164673
type: Comment
type: QuestionComment
has text: try event delegation - http://stackoverflow.com/questions/203198/event-binding-on-dynamically-created-elements
score: 0

http://stackoverflow.com/comment/47069054
has text: Does `expect(scope.page.errors).toBeArray();` pass?
score: 0
comment on: http://stackoverflow.com/q/29134106
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29134762
score: 2
type: AnsweredQuestion
has body: Gulp is running fine for me until saving a file, when I get an error: "Task 'browsersync.reload' is not in your gulpfile". I'm not sure what I'm doing wrong (I'm following a Gulp tutorial and the source is the same, as far as I can see). Gulp file: // Load Node Modules/Plugins var gulp = require('gulp'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var uglify = require('gulp-uglify'); var jshint = require('gulp-jshint'); var imagemin = require('gulp-imagemin'); var connect = require('connect'); var serve = require('serve-static'); var browsersync = require('browser-sync'); // Styles task gulp.task('styles', function(){ return gulp.src('app/css/*.scss') .pipe(sass()) .pipe(gulp.dest('dist')); }); gulp.task('scripts', function(){ return gulp.src('app/js/*.js') .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(concat('all.js')) .pipe(uglify()) .pipe(gulp.dest('dist')); }); gulp.task('images', function(){ return gulp.src('app/img/*') .pipe(imagemin()) .pipe(gulp.dest('dist/img')); }); gulp.task('server', function(){ return connect().use(serve(__dirname)) .listen(8080) .on('listening', function(){ console.log('Server Running: View at http://localhost:8080'); }); }); gulp.task('browsersync', function(cb) { return browsersync({ server: { baseDir:'./' } }, cb); }); gulp.task('watch', function(){ gulp.watch('app/css/*.css', ['styles', 'browsersync.reload']); gulp.watch('app/js/*.js', ['scripts', 'browsersync.reload']); gulp.watch('app/img/*', ['images', 'browsersync.reload']); }); gulp.task('default', ['styles', 'scripts', 'images', 'server', 'browsersync', 'watch']);
downvote count: 0
tagged with: javascript
type: Question
tagged with: gulp
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29135556
answer count: 2
has title: Errors when using BrowserSync with Gulp
possible better answer: http://stackoverflow.com/a/29134908
accepted answer: http://stackoverflow.com/a/29135556
has answer: http://stackoverflow.com/a/29134908

http://stackoverflow.com/q/29136937
has body: I'm here first time, and i'd need a little help if it's possible, first of all my english is not good as most of people here, but i'll try to explain what I need So i have contact form php script on my website, and i want to contact_form work only from 20:30 till 22:00 I have no idea how to do that, here is my php code &lt;?php //Fetching Values from URL $name = $_POST['name1']; $email = $_POST['email1']; $message = $_POST['message1']; $contact = $_POST['contact1']; //sanitizing email $email = filter_var($email, FILTER_SANITIZE_EMAIL); //After sanitization Validation is performed $subject = $name; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From:' . $email. "\r\n"; // Sender's Email $headers .= 'Cc:' . $email. "\r\n"; // Carbon copy to Sender $template = '&lt;div style="padding:50px; color:white;"&gt;&lt;br/&gt;' . '&lt;br/&gt;' . 'Ime:' . $name . '&lt;br/&gt;' . 'IG Ime:' . $email . '&lt;br/&gt;' . 'Pjesma:' . $contact . '&lt;br/&gt;' . 'Poruka:' . $message . '&lt;br/&gt;&lt;br/&gt;'; $sendmessage = "&lt;div style=\"background-color:#7E7E7E; color:white;\"&gt;" . $template . "&lt;/div&gt;"; // message lines should not exceed 70 characters (PHP rule), so wrap it $sendmessage = wordwrap($sendmessage, 70); // Send mail by PHP Mail Function mail("inbox@ug-slike.com", $subject, $sendmessage, $headers); echo "Vaša pjesma je naručena! Bit će uskoro emitirana."; ?&gt; and here is .js $(document).ready(function(){ $("#submit").click(function(){ var name = $("#name").val(); var email = $("#email").val(); var message = $("#message").val(); var contact = $("#contact").val(); $("#returnmessage").empty(); //To empty previous error/success message. //checking for blank fields if(name==''||contact=='') { alert("Please Fill Required Fields"); } else{ // Returns successful data submission message when the entered information is stored in database. $…
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46498797
has title: PHP - active contact form only 2 hours per day
has comment: http://stackoverflow.com/comment/46498625
type: Question
has comment: http://stackoverflow.com/comment/46498834
upvote count: 1
tagged with: javascript
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29137406

http://stackoverflow.com/a/29131756
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46489582
has comment: http://stackoverflow.com/comment/46489664
type: Answer
has body: You could use HTML attribute required on the fields that cannot be empty &lt;input type="text" required/&gt; AND/OR Have some javascript check before you submit $(function() { var form = $('#form'); var submit = $('#submit'); form.on('submit', function(e) { e.preventDefault(); if($('input', this).val().trim() == ''){ //handle error message } else{ $.ajax({ url: '', type: 'POST', dataType: 'html', data: form.serialize(), beforeSend: function() { document.getElementById("submit").value = "Loading..."; }, success: function() { form.trigger('reset'); document.getElementById("submit").value = "Message sent!"; }, }); } }); }); AND/OR You do server side checking to make sure the value is not empty in PHP: if(empty($_POST['input_name'])){ //handle error }
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29131606
answers question: http://stackoverflow.com/q/29131606

http://stackoverflow.com/q/29139894
type: AnsweredQuestion
has title: Polling mechanism through an Ajax call
has body: I need to add polling mechanism to call a web service through my web page. For that I am trying to use an ajax call inside a javascript page. I am very new to ajax and javascript. I wrote the below code. What I need is to fire the alert TEST in every 10 seconds. Anybody please help me on this. I will edit the post with my two jsp files. index.jsp file polling.jsp file Thanks
has comment: http://stackoverflow.com/comment/46504144
has comment: http://stackoverflow.com/comment/46503804
has comment: http://stackoverflow.com/comment/46504837
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46504332
tagged with: polling
has comment: http://stackoverflow.com/comment/46503763
possible better answer: http://stackoverflow.com/a/29140036
has answer: http://stackoverflow.com/a/29149770
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29149770
has comment: http://stackoverflow.com/comment/46503884
tagged with: ajax
has comment: http://stackoverflow.com/comment/46504553
score: 0
has comment: http://stackoverflow.com/comment/46506215
has answer: http://stackoverflow.com/a/29140036
has comment: http://stackoverflow.com/comment/46504224

http://stackoverflow.com/a/29156405
score: 3
has comment: http://stackoverflow.com/comment/46589006
accepted answer of: http://stackoverflow.com/q/29154881
has comment: http://stackoverflow.com/comment/46534236
answers question: http://stackoverflow.com/q/29154881
has body: It appears that Highcharts is taking into account the pointRange of the series with the largest pointRange (although it is hidden) and displaying the x-axis based on that. The range of your "Calls/Hour" series is 1 hour, so it makes sure that if that series had a point at the very end, it would still have room to show. I'm not sure if there's any elegant way of solving this, but a bit of a "hack" in your case is to change the pointRange of all series to that of the currently showing one. My crude implementation of this has three changes to your code: Your series that are visible: false by default also get pointRange: 1 so they don't disrupt the x-axis range for the only visible series. When the chart has been created we store the correct point range of each series for future reference, for example with the callback function: $('#callFrequencyGraph').highcharts({ // Options... }, function(event) { var series = this.series; // Store the correct point ranges for(var i = 0; i &lt; series.length; i++) { series[i].update({ historicalPointRange: (series[i].closestPointRange ? series[i].closestPointRange : 3600000) }, false); this.redraw(); } } Extend your events.legendItemClick function to update all series pointRange to that of the series which will be showing after the click is completed: legendItemClick: function() { if(this.visible){ return false; } else { var series = this.chart.series; for(var i = 0; i &lt; series.length; i++) { series[i].update({ pointRange: this.options.historicalPointRange }, false); } } } See this updated JSFiddle for the result of all these changes. Edit: jsFiddle Update for bug
upvote count: 3
has comment: http://stackoverflow.com/comment/46562618
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46550582
has comment: http://stackoverflow.com/comment/46534229
has comment: http://stackoverflow.com/comment/46559734
has comment: http://stackoverflow.com/comment/46556754
type: Answer
has comment: http://stackoverflow.com/comment/46566311
has comment: http://stackoverflow.com/comment/46557344

http://stackoverflow.com/a/36147955
answers question: http://stackoverflow.com/q/29108779
upvote count: 19
has comment: http://stackoverflow.com/comment/140177288
has body: Implement your Dropdown as this.menu = input}> N/A 1 2 3 4 Now, to obtain the selected option value of the dropdown menu just use: let res = this.menu.value;
downvote count: 1
has comment: http://stackoverflow.com/comment/70352775
score: 18
type: Answer

pug
tags question: http://stackoverflow.com/q/29089925
tags question: http://stackoverflow.com/q/29182710
tags question: http://stackoverflow.com/q/29214934
tags question: http://stackoverflow.com/q/29097354
tag name: pug
type: Tag
tags question: http://stackoverflow.com/q/29078593
tags question: http://stackoverflow.com/q/29165800

http://stackoverflow.com/comment/46395169
type: Comment
has text: @epascarello It's a normal field, the user CAN modify it's value and it must be visible, I don't think that's a good option because I'm working with forms with over 30 fields each and I think that duplicating a field (one visible and one hidden) is not a good option.
comment on: http://stackoverflow.com/q/29080812
score: 0
type: QuestionComment

http://stackoverflow.com/q/29171304
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29171469
tagged with: jquery-mobile
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29171469
has answer: http://stackoverflow.com/a/29171582
has body: My project has a popup that contains several collapsible elements. When the popup is first displayed, the collapsible elements are collapsed. The user expands one or more element and then takes an action. The problem is that I want to reset the popup after the user takes the action so that all collapsibles are closed the next time the popup is shown. I have tried to trigger the collapse as shown below. I have read several posts that suggest that this trigger should work but I have had no success. A jsfiddle is included below. The example in the jsfiddle only has one collapsible element, but shows the issue.... Your help and suggestions would be very much appreciated. $('#manageChecklistPopup').on('popupafterclose', function(event) { // collapse not working :( console.log('popup has closed.'); $('.ui-collapsible').trigger('collapse'); }); https://jsfiddle.net/qyg53ejy/
upvote count: 1
possible better answer: http://stackoverflow.com/a/29171582
has title: Can't programmatically close collapsible in jQuery mobile popup
type: AnsweredQuestion

http://stackoverflow.com/q/29144491
has answer: http://stackoverflow.com/a/29145312
type: Question
type: AnsweredQuestion
has title: multiple submit buttons in one form correlating to javascript functions please
linked to: http://stackoverflow.com/q/20932543
tagged with: php
answer count: 1
accepted answer: http://stackoverflow.com/a/29145312
tagged with: laravel
score: 0
has body: I have a php form which requires two submit buttons. One to submit the form using ajax(which works), but now i need to add another button which will complete the sale. My current approach is adding another submit button to form &amp; trying to distinguish between the two in javascript (which i dont know how to do). so any help here would be appreciated or any othher recommended approach please. php form &lt;form id="bidForm"&gt; &lt;div class="form-group" id="divCheckbox" style="visibility: hidden"&gt; {{ Form::hidden('item_id', $item-&gt;id) }} {{ Form::hidden('user_id', Auth::User()-&gt;id) }} &lt;/div&gt; &lt;!-- bid --&gt; &lt;div class="form-group" style="width: 100px" style="text-align: right"&gt; {{Form::label('bid_amount', 'Bid:') }} {{Form::text('bid_amount', null, ['class' =&gt; 'form-control', 'id' =&gt; 'bid-amount']) }} &lt;/div&gt; &lt;!-- max bid &lt;div class="form-group"&gt; {{Form::label('max_bid', 'Max Bid:') }} {{Form::text('max_bid', null, ['class' =&gt; 'form-control']) }} &lt;/div&gt; --&gt; {{ Form::hidden('permission', "userr") }} &lt;!-- submit`` --&gt; &lt;div class="form-group"&gt; {{Form::submit('Bid', ['class' =&gt; 'btn btn-primary', 'id' =&gt; 'submit']) }} &lt;/div&gt; {{ Form::close() }} script $( "#bidForm" ).submit(function( e ) { // Async submit a form's input. e.preventDefault(); var form = $(this); var method = 'POST'; var url= "/items/" + {{ $item-&gt;id }}; //var bid = $("#winner").innerHTML().val(); var bid = document.getElementById("winner").innerHTML; var new_bid = $("#bid-amount").val(); bigger = (new_bid &gt; bid) ? true : false; console.log(''); if(bigger){ $.ajax({ type: method, url: url, data: form.serialize(), action:"http://localhost:8000/items" + {{ $item-&gt;id }}, success: function(data) { console.log("AJAX request was successfull"); $('#bid-amount').val(''); }, failure: function() { console.log("AJAX request failed"); } }); } else{ window.alert("This is not a high bid"); } });
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/46639856
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29215229
has text: What errors are you getting on your page? Is jQuery loaded?

http://stackoverflow.com/comment/46416815
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29087084
has text: No, the error persists in chrome. In Firefox changekey contains the expected value.
score: 0

http://stackoverflow.com/comment/46479255
type: QuestionComment
score: 0
has text: Is there a forward stack in the history API?
comment on: http://stackoverflow.com/q/29125703
type: Comment

http://stackoverflow.com/a/29197327
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29196288
has comment: http://stackoverflow.com/comment/46608432
has comment: http://stackoverflow.com/comment/46608000
answers question: http://stackoverflow.com/q/29196288
has body: If I understand you right you can try something like this: example: http://jsfiddle.net/hju3dyot/ if you want it to appear more like a scroller you can simple reduce time in the setTimeout function like this HTML: CSS: #container { height: 900px; width: 450px; margin: 2% auto; border: 1px solid #5970bb; border-radius: 3px; box-shadow: 10px 10px 20px rgba(35, 35, 35, 0.50); padding: 5px; } .img { background: url(http://s14.postimg.org/cdkclcbep/cat.jpg) no-repeat; height: 250px; width: 200px; display: inline-block; opacity: 0; -moz-transition: opacity 1s; -o-transition: opacity 1s; -webkit-transition: opacity 1s; transition: opacity 1s; } #left-top { background-position: -34px 0; } #right-top { background-position: -199px -10px; } #left-bottom { background-position: -25px -210px; } #right-bottom { background-position: -208px -207px; } .visible { opacity: 1; -moz-transition: opacity 1s; -o-transition: opacity 1s; -webkit-transition: opacity 1s; transition: opacity 1s; } SCRIPT: var arr = ["#left-top", "#right-top", "#right-bottom", "#left-bottom"]; var counter = 0; $(document).ready(function () { function makeItVisible() { if (counter < arr.length) { $(".img").removeClass("visible"); $(arr[counter++]).addClass("visible"); } else { counter = 0; return; } }; setInterval(makeItVisible, 2000); });
score: 3
has comment: http://stackoverflow.com/comment/46607696
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46608400
downvote count: 0
has comment: http://stackoverflow.com/comment/46607366
has comment: http://stackoverflow.com/comment/46607661

http://stackoverflow.com/q/29160924
has answer: http://stackoverflow.com/a/29162684
tagged with: angularjs
upvote count: 2
tagged with: angular-promise
has answer: http://stackoverflow.com/a/29161042
possible better answer: http://stackoverflow.com/a/29162684
type: AnsweredQuestion
score: 2
type: Question
accepted answer: http://stackoverflow.com/a/29161042
has answer: http://stackoverflow.com/a/29160973
downvote count: 0
has title: How to assign multiple onError functions to a promise (returned by angular's $http.post)
tagged with: javascript
answer count: 3
has body: My AngularJS code needs to chain multiple onSuccess, onError functions to a promise returned by $http.post var promise = $http.post(url); promise .then( /*success 1*/function () { console.log("success 1"); }, /*error 1*/function () { console.log("error 1"); }) .then( /*success 2*/function () { console.log("success 2"); }, /*error 2*/function () { console.log("error 2"); }); The problem with above code is that it prints error 1 > success 2 when the HTTP response fails instead of error 1 > error 2. I did some research on stackoverflow and found that when you have access to $q you can just do $q.reject() in error 1 to trigger error 2 but in my case i only have access to the promise returned by $http.post. So what do I do? P.S. Of course, I can call error2() from inside of error 1 but i want to chain them because it looks more readable and extensible. Any ideas?
favorite count: 0
tagged with: promise

http://stackoverflow.com/comment/75284724
has text: @MohitPandey I was getting same error when I was running tests of this code under PhantomJS and it was passing under chrome. If that is the case, I think there is new beta version of PhantomJS on the way with better support for ES6, you can try to install it.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/41015840
score: 1

http://stackoverflow.com/q/29146535
accepted answer: http://stackoverflow.com/a/29146602
answer count: 1
tagged with: jslint
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46515808
has body: Im getting 2 errors in this for-loop. Both are giving me error: Expected an assignment or function call and instead saw an expression. The error is because of the two rows marked "//Here" below: var f=""; var printRange =function(rangeStart,rangeStop){ for (var a3=rangeStart; rangeStop&gt;=a3; a3++) rangeStop &gt;=a3 &amp;&amp; (f+=a3+","); //Here a3==rangeStop &amp;&amp; (f+=a3); //Here return f.substr(0,f.length-1); }; ANSWER = printRange(28,47); I can't figure out why they are not correct. I can't see what I've done wrong.
has answer: http://stackoverflow.com/a/29146602
upvote count: 2
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46515825
score: 1
has comment: http://stackoverflow.com/comment/46519111
has title: Error - Expected an assignment or function call and instead saw an expression
type: Question

http://stackoverflow.com/a/29219563
type: Answer
has body: When the parent tab is clicked, set a variable (in my example, tab.activate1) to true. Then, use that value to activate first child tab: {{tab.countyName}}--{{tab.phoneNumber}} Here is a working demo: http://plnkr.co/edit/Wcs2hdVtem5b2gzbCy5L?p=preview
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29153623
answers question: http://stackoverflow.com/q/29153623

http://stackoverflow.com/q/29134611
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/46495197
has comment: http://stackoverflow.com/comment/46495370
possible better answer: http://stackoverflow.com/a/36510986
type: Question
has answer: http://stackoverflow.com/a/36510986
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/46495149
tagged with: javascript
tagged with: express
tagged with: require
tagged with: browserify
has answer: http://stackoverflow.com/a/29134736
accepted answer: http://stackoverflow.com/a/29134736
tagged with: node.js
has body: I am building a webapp with node.js and express. I want to use Browserify to make my local modules available in the browser. My app is structured like this: ├── app.js ├── lib │ ├── controller │ │ ├── home.js │ │ └── mixer.js │ ├── model │ │ ├── command.js │ │ ├── control.js │ │ ├── room.js │ │ └── user.js │ └── view │ ├── error.jade │ ├── index.jade │ ├── input.jade │ ├── layout.jade │ └── room.jade ├── package.json └── public ├── images ├── scripts │ ├── app.js │ ├── command.js │ ├── index.js │ ├── room.js │ └── user.js └── styles └── styles.css I have a local module called Control: module.exports = function() { var control = {}; control.command = false; control.create = false; control.last = 0; control.room = false; control.state = 2; control.time = 0; return control; }; I used Browserify to create a file public/scripts/app.js by running the command: browserify -d lib/controller/home.js &gt; public/scripts/app.js home.js requires lib/model/user.js which requires lib/model/control.js, so it should be available in in the compiled script. In my lib/views/layout.jade file, I load this script: doctype html html head title cosette #{name} link(rel='stylesheet', href='http://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap.min.css') link(rel='stylesheet', href='http://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap-theme.min.css') link(rel='stylesheet', href='http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css') link(rel='stylesheet', href='http://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.6.0/bootstrap-table.min.css') script(src='http://code.jquery.com/jquery-1.11.1.js') script(src='http://code.jquery.com/ui/1.11.2/jquery-ui.min.js') script(src='http://cdn.jsdelivr.net/bootstrap/3.3.0/js/bootstrap.min.js') script(src='http://cdn.socket.io/socket.io-1.2.0.js') script(src='http://underscorejs.org/underscore-min.js') script(src='/scripts/app.js') link(rel='stylesheet', href='/styles/styles.css') body .container-fluid .page-header h1 a(href='/')#title coset…
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/46494673
has title: Browserify does not make require available

http://stackoverflow.com/comment/46502993
comment on: http://stackoverflow.com/q/29139316
score: 0
type: Comment
type: QuestionComment
has text: @guest271314 the data is from ajax data success so i cant include it i can out the entire code of success if you want i just though it is not relevant let me change it give me a minute

http://stackoverflow.com/comment/77143468
type: Comment
has text: Unless I'm missing something `$provide.service` only accepts a constructor, not the name of another service https://docs.angularjs.org/api/auto/service/$provide#service.
type: AnswerComment
comment on: http://stackoverflow.com/a/31915378
score: 0

http://stackoverflow.com/comment/46611274
score: 0
type: AnswerComment
has text: You mean IE is not doing it right? Inconceivable! So, I get from a specification and DOM perspective, ID or name do not have precedence over one another, and they are both just added to a collection. Is there any best practice to use one over the other?
type: Comment
comment on: http://stackoverflow.com/a/29199103

http://stackoverflow.com/comment/46412908
score: 0
type: Comment
has text: It should be `mouseenter` instead of `mouseover`
type: QuestionComment
comment on: http://stackoverflow.com/q/29090245

http://stackoverflow.com/comment/46393922
has text: The `layer` object which is returned by the `eachLayer` method has a member property called `feature` which holds the actual geojson featureobject. So you'll need `layer.feature.geometry.coordinates`. I'll edit my answer to clarify that.
type: Comment
comment on: http://stackoverflow.com/a/29079714
score: 1
type: AnswerComment

http://stackoverflow.com/comment/46612478
type: QuestionComment
comment on: http://stackoverflow.com/q/29199572
has text: ?? a lots and I tried to make function reusable , I can just pass the specific element the return html to append
score: 0
type: Comment

http://stackoverflow.com/a/30685224
has comment: http://stackoverflow.com/comment/49556425
type: Answer
score: 6
has comment: http://stackoverflow.com/comment/49554225
has comment: http://stackoverflow.com/comment/49586473
has comment: http://stackoverflow.com/comment/49554064
has body: This is a big concern, but it's not coming from you. These are Javascript Injection attacks (client machine malware) using self-signed root certificate. Specifically, sf_main.html, and deals.html have been linked to Superfish, which has been shipping with Lenovo's recently. As Lenovo has been pushing its new lines of PC's, reports of the attacks have blown up recently. These Man-in-the-middle attacks start by hijacking the client's requests and and then injecting HTML and Javascript. The reason there are so many undefined symbols is because Superfish, true to it's name, is fishing for plugins, extensions, and libraries it can take advantage of using their expected names, tokens, and paths. This is brute force XSS. Oh, no, what can I do?? Little. Not much. As the requests are being hijacked on the client machine and by http request hijacking, you won't know the difference. You could try to "fish" for certain kind of hostile "indicators" but now you are doing the work of Anti-Malware. Lenovo claims that SuperFish has completely disabled server side interactions (since January) on all Lenovo products so that the software product is no longer active, effectively disabling SuperFish for all products in the market While I trust the sincerity of China-based Lenovo, which has serious market interests in the Western world, I wouldn't trust the word of China based malware company Superfish. These attacks are less a problem for you than your customers Unless you work for a big bank or popular Social Networking site, it's highly unlikely that Malware like Superfish, has targeted you specifically. Your customer's bank and social network accounts are at risk, but not because of anything you did or can do to stop it. As always, the cure for client side fishing attacks is good client side protection.
downvote count: 0
has comment: http://stackoverflow.com/comment/49675687
has comment: http://stackoverflow.com/comment/50034842
has comment: http://stackoverflow.com/comment/50039328
has comment: http://stackoverflow.com/comment/49677037
answers question: http://stackoverflow.com/q/29161294
upvote count: 6
has comment: http://stackoverflow.com/comment/49553462

http://stackoverflow.com/comment/46404783
type: Comment
type: QuestionComment
has text: ^ if it's Google's geocoder, it sure is.
comment on: http://stackoverflow.com/q/29085955
score: 0

http://stackoverflow.com/q/29138950
score: 0
has comment: http://stackoverflow.com/comment/46502754
answer count: 2
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29139152
has body: i have a table that generated from yii2, i want to make a tabular input but before sending submit, there are a client validation to the input field. Consider i dont know the input id, because it is generated by yii2. Here's the code snippet of first row 1 Pengadaan Barang Kuasi, Buku Uji, Plat Uji dan Stiker Uji screenshoot : http://www.imagebam.com/image/569de2398154258 the input sp2d will check input anggaran and do some validation if (sp2d > anggaran) then "sp2d exceed anggaran limit" Here the initial javascript function to check that function is triggered via onchange function tesbos(){ var sp2d = $(".sp2d").attr("id"); console.log(sp2d); } when i go to row no 2 in sp2d input, still when i check my console log, it still print the sp2d input id of row #1, how to get my input id automatically/dynamically when i go to any row? any help would be appreciated
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29139788
has answer: http://stackoverflow.com/a/29139788
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46502171
type: Question
accepted answer: http://stackoverflow.com/a/29139152
tagged with: yii2
tagged with: javascript
has title: jquery how to detect current input id

http://stackoverflow.com/comment/46610016
type: Comment
type: QuestionComment
has text: @Brad I'm using Mongoose. What would cause the cors callback to fire before Mongoose's lookup callback, since one is wrapped inside the other?
comment on: http://stackoverflow.com/q/29198119
score: 0

http://stackoverflow.com/comment/46508451
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29142530
type: Comment
has text: @Alnitak indeed. Most renderers are lenient and will let you away with it, but the HTML is still invalid. Here's a question on the subject: http://stackoverflow.com/questions/18665303/how-does-angularjs-get-away-with-using-custom-html5-element-tags-and-attributes

http://stackoverflow.com/comment/52357417
type: Comment
has text: Hrmm, anonymous classes are different with `export default class {}`, perhaps just checking for the `_classCallCheck` is a better option.
score: 0
comment on: http://stackoverflow.com/a/32235930
type: AnswerComment

http://stackoverflow.com/a/29180800
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29179731
has body: Unless you used the secure flag while setting the cookie, your cookie should be sent with both http as https. You need to double-check that your domain name is exactly identical in both cases. Check for example if you are not using http://www.yourdomain/ (with www.) when setting the cookie and https://yourdomain/ (without www.) when trying to read the cookie.

http://stackoverflow.com/a/29181652
answers question: http://stackoverflow.com/q/29181615
has body: You are attempting to read back element j in the cdate array and then push a new object into the array. To add new elements you use the array name directly as shown below. cdate.push(cmsk_date[0]); You can also perform a check at any point to ensure that the array is defined: if (cdate != undefined) { cdate.push(cmsk_data[0]) ; } Also, you have a few issues with your code: if(name=data[j].MFG_NAME) { cmsk_data = data[j].CONCATED_MKT_SHARE.split('|'); cdate[j].push(cmsk_data[0]) ; //Here I am getting the error mkt_share[j].push(cmsk_data[1]) ; //Here I am getting the error } You are assigning name in your conditional statement, not comparing, you should use == or ===. For example: if (name == data[j].MFG_NAME) { } Also you are creating two new arrays for each iteration in the for loop: for(j=0; j&lt;data.length; j++){ mkt_share = new Array(); cdate = new Array(); } If data had a length of 1,000 it would create 2,000 arrays and eat up memory on the client's browser.
type: Answer
has comment: http://stackoverflow.com/comment/46579664
score: 0

http://stackoverflow.com/comment/46385179
type: Comment
has text: @Sjoerd so you don't plan on refactoring your spaghetti code?
comment on: http://stackoverflow.com/a/29075444
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46542545
type: AnswerComment
has text: @MikeD you should try to use a code editor for these changes. Even in your question you can see that the syntax highlight for the "bad" lines is not working correctly. These visual cues can be very useful in diagnosing these kind of problems
type: Comment
comment on: http://stackoverflow.com/a/29159850
score: 0

http://stackoverflow.com/a/29200476
answers question: http://stackoverflow.com/q/29200120
has comment: http://stackoverflow.com/comment/46613465
has body: I think this is what you are going for: &lt;form&gt; &lt;input type="checkbox" class="item" onclick="checkAddress(this)" /&gt;My Item&lt;br&gt; &lt;input type="checkbox" class="item" onclick="checkAddress(this)" /&gt;My Item&lt;br&gt; &lt;input type="checkbox" class="item" onclick="checkAddress(this)" /&gt;My Item&lt;br&gt; &lt;input type="checkbox" class="item" onclick="checkAddress(this)" /&gt;My Item&lt;br&gt; &lt;/form&gt; &lt;script&gt; function checkAddress(checkbox) { if (checkbox.checked) { var count = 0; var checkboxes = document.getElementsByClassName("item"); for(var ii = 1; ii &lt; checkboxes.length; ii++){ if(checkboxes[ii].checked){ count++; } checkbox.name = "my-list-item" + count; } } } &lt;/script&gt; If you want to add the value, just add checkbox.value = "your value"; under the checkbox.name. Here is the JSFiddle: https://jsfiddle.net/7teq1o9f/54/ This will output: &lt;input type="checkbox" class="item" name="my-list-item&lt;1&gt;" onclick="checkAddress(this)"&gt;
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46613349
has comment: http://stackoverflow.com/comment/46613494
has comment: http://stackoverflow.com/comment/46613301
has comment: http://stackoverflow.com/comment/46613567
has comment: http://stackoverflow.com/comment/46613418
type: Answer
has comment: http://stackoverflow.com/comment/46613991
score: 2
has comment: http://stackoverflow.com/comment/46613257
downvote count: 0
has comment: http://stackoverflow.com/comment/46613431
accepted answer of: http://stackoverflow.com/q/29200120

http://stackoverflow.com/q/29071825
tagged with: scope
type: Question
linked to: http://stackoverflow.com/q/14220321
accepted answer: http://stackoverflow.com/a/29071872
has body: I have this code but I am unable to understand why when I print 'globalData' first it prints all values fine but later when I print it again it print just an empty array? I'm new to JavaScript and jQuery. &lt;script&gt; var globalData = []; $( document ).ready(function() { $.get( "http://....", function( data ) { globalData.push(data[i]); . . . }); console.log(globalData); //["fg", "wedsd", "hjkyu"] }); console.log(globalData); //[] &lt;/script&gt;
score: 0
duplicate of: http://stackoverflow.com/q/14220321
answer count: 1
has title: How does the scope of JavaScript variables work in this script?
has comment: http://stackoverflow.com/comment/46378074
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29071872
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46376610
type: QuestionComment
has text: Data related to most selection should be persisted on backend side.
comment on: http://stackoverflow.com/q/29070942
score: 0
type: Comment

http://stackoverflow.com/comment/46447588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29108779
has text: ` `, or use the more complex off-side bind, or from in JS, `method(drowdown.value)`
score: 1

http://stackoverflow.com/q/29181031
tagged with: css
type: Question
has body: What I've been trying to do is that I have a box, that contains text obviously and I want that whenever it is hovered, to remove the current content and add another one and when it hovered out, to get back the old one. And my attempts as you realise are not going very well, I would like to know what's the exacy problem. Thanks in advance. var i1,span1,a1,p1; function changeContent1() { var item = document.getElementById('item1'); var i = document.getElementById('icon1'); var span = document.getElementById('itemSpan1'); i1 = i; span1 = span; item.removeChild(i); item.removeChild(span); var p = document.createElement("p"); var t = document.createTextNode("The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem"); var a = document.createElement("a"); a.href = "#"; p1 = p; a1 = a; var at = document.createTextNode("Read More"); p.appendChild(t); a.appendChild(at); item.appendChild(p); item.appendChild(a); item.style.background = "#ff3f3f"; item.style.padding = '0'; } function resetContent1() { var item = document.getElementById('item1'); item.removeChild(a1); item.removeChild(p1); item.appendChild(i1); item.appendChild(span1); } .item { width:270px; height:270px; margin-left:40px; float:left; box-sizing:border-box; border:1px solid #dcdcdc; text-align:center; padding:100px 0; } .item i{ font-size:3em; margin-bottom:20px; } .item span { font-family:OpenSans-Bold; font-size:1.5em; text-transform:uppercase; } Some text
has title: onmouse out not working as needed
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29181142
answer count: 1
has comment: http://stackoverflow.com/comment/46578544
has comment: http://stackoverflow.com/comment/46578604
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46527071
type: AnswerComment
has text: Oops, I forget to remove the target push stuff (writing code in comments is hard :P): `var target = _.flatten(_.map(templates, function(n) { return _.pluck(n, 'settings'); })); `. It just moves from an imperative style to a more functional style. (I also don't think `_.filter` is necessary).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29152538

http://stackoverflow.com/q/29073020
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29073168
has answer: http://stackoverflow.com/a/29073137
accepted answer: http://stackoverflow.com/a/29073137
has comment: http://stackoverflow.com/comment/46380322
tagged with: image
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/29073168
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to remove strange a/img border or underline after drag or click de image?
has body: For understand de problem please, look the image or access the website: http://www.crishk.com/ click in the top image logo, and you will see that strange underline or border below the logo. When you click the image and drag the mouse to another part of the page, then drop it and return to the logo and you move the mouse over the image you will see that border/underline there too. Can you help? It only appears on Chrome.

http://stackoverflow.com/q/29135713
score: 0
has comment: http://stackoverflow.com/comment/46496862
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46496984
has body: I am designing a simple, one-page website that uses a navigation menu at the top to scroll to various points of the page. As of recently, I am having trouble scrolling to one of the pages. When I attempt to scroll to my "About" section, the jQuery function scrolls past the beginning of the section and down to the top of the first element inside the section. However, all I need to do is simply add a border to the section(border: 2px dashed yellow), and the function correctly scrolls to the top of the "About" section (and displays the border at the very top). Here is the jQuery function. I know that it is correct, because the menus scrolls normally to the "Contact" section that is directly below on the page. function scrollTo(element) { var tag = $("#" + element + ""); $('html, body').animate({scrollTop: tag.offset().top}, 500); } And my HTML for the Menu Bar... Home Products Projects About Me Contact Me And then HTML for the About section And the CSS that makes it function correctly... #aboutSection { /* Testing purposes */ border: 2px dashed yellow; } Once again, when I remove this last line of CSS, the jQuery function scrolls past the top of the with id="aboutSection", and down to the top of the next element. Example of About section Is there an easy way to fix this? Let me know if I need to include anything else.
has answer: http://stackoverflow.com/a/29152524
type: UnansweredQuestion
tagged with: scroll
has comment: http://stackoverflow.com/comment/46496882
type: Question
has title: jQuery ScrollTo function scrolling past element id
has comment: http://stackoverflow.com/comment/46496829
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29206766
type: AcceptedAnswer
score: 0
type: Answer
has body: Using static delimiters for the block #each students:num is declaring that it will not be updated after initial render. Change them to {{#each students:num}} and it works fine (see http://jsfiddle.net/18fccpnj/4/). There's also no need to reset the data on the entire array, you can just push the new member: ractive.push("students", {name: "Pedro Perez", note: 3});
answers question: http://stackoverflow.com/q/29204126
accepted answer of: http://stackoverflow.com/q/29204126

http://stackoverflow.com/q/29141509
score: -1
accepted answer: http://stackoverflow.com/a/29144777
type: Question
has comment: http://stackoverflow.com/comment/46507436
tagged with: browser
has title: Prevent JS from revealing IE browser by running conditional compilations
has comment: http://stackoverflow.com/comment/46506651
has comment: http://stackoverflow.com/comment/46507903
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29144777
downvote count: 1
has comment: http://stackoverflow.com/comment/46506808
favorite count: 0
linked to: http://stackoverflow.com/q/12489546
has comment: http://stackoverflow.com/comment/46509708
type: AnsweredQuestion
upvote count: 0
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/46507061
tagged with: activex
has body: The JS code below can reveal if your browser is an IE. var isIE = /*@cc_on!@*/!1; Is there a way to prevent this behavior without disabling javascript?

http://stackoverflow.com/q/29163399
tagged with: javascript
tagged with: express
tagged with: ejs
favorite count: 0
tagged with: angularjs
has body: The answer to this question may become clearer to me as I continue learning about both technologies, but I've learned a little Angular and a little Express and the ejs view template. I'm able to create the same html view using Angular directives as I am using ejs templates. Is there an advantage to using one over the other, say in a situation where I am displaying all contents of an array. Angular's ng-repeat directive seems easy enough, but then I can do the same using inline js and ejs.
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
has title: AngularJS vs Express template views - When to use
type: Question
downvote count: 0

http://stackoverflow.com/a/29092436
upvote count: 1
downvote count: 0
has body: You can create global variable with window["zebra"] = "abc"; and use later ether with the same indexer syntax or directly - zebra.
type: Answer
answers question: http://stackoverflow.com/q/29092406
score: 1

jsonp
tags question: http://stackoverflow.com/q/29165857
type: Tag
tags question: http://stackoverflow.com/q/29172184
tags question: http://stackoverflow.com/q/29153939
tags question: http://stackoverflow.com/q/29063187
tags question: http://stackoverflow.com/q/29177190
tag name: jsonp

http://stackoverflow.com/comment/46446058
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29107853
type: Comment
has text: It seems to works well here: http://codepen.io/jlowcs/pen/LEXgPR

http://stackoverflow.com/comment/46538960
type: Comment
comment on: http://stackoverflow.com/a/29158941
has text: Hmmm well a lot of the code your using will not work in firefox or safari because it does not comply with W3C standards...I will have to think abt this and get back to you on it
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46438586
type: QuestionComment
has text: there is no error @j08691
comment on: http://stackoverflow.com/q/29103466
score: 0
type: Comment

http://stackoverflow.com/q/29206906
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29206993
favorite count: 0
type: Question
upvote count: 1
has body: I have two &lt;html:submit&gt; buttons for validating both buttons by using common method form on submit(), both submit buttons are same value "save" how can I get which button is clicked in JavaScript for the purpose of separate validations..
has title: how to get which <html:submit> button is clicked in javascript
has answer: http://stackoverflow.com/a/29206930
has comment: http://stackoverflow.com/comment/46624352
answer count: 3
has answer: http://stackoverflow.com/a/29207036

http://stackoverflow.com/a/29196009
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: The callback() function should be inside the callback for the request. That ways, only when the request is completed would it get called. function getContent(address, result, callback){ request(address, function (err, response, body) { if(err) throw err; if (response.statusCode == 200) { console.log(body); callback(null, result); } }); }
accepted answer of: http://stackoverflow.com/q/29195972
answers question: http://stackoverflow.com/q/29195972
type: AcceptedAnswer

http://stackoverflow.com/q/29089925
upvote count: 35
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29089926
accepted answer: http://stackoverflow.com/a/29089926
has body: I would like to set a class on the body tag by declaring a variable in a template that extends a base layout. When I try, the body_class variable is undefined in the layout. It appears the layout is executed before the extending template, or they are executed in different scopes or something. Is there another way? Would a mixin work here? _layout.jade: doctype html html(lang="en-au") head meta(charset="utf-8") block css body(class=(body_class || "it-did-not-work")) block header block content block footer home.jade: var body_class = 'i-am-the-home-page' extends _layout block header h1 home
favorite count: 0
score: 35
tagged with: node.js
linked to: http://stackoverflow.com/q/15035624
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46412435
has title: Pass variables to base layout from extending pug/jade template
tagged with: pug

http://stackoverflow.com/comment/46595455
type: Comment
has text: usually I would send JSON data as: { {"y": "2006", "a": "100", b: "90"}, {"y": "2007", "a": "75"}....} and so on
comment on: http://stackoverflow.com/q/29190320
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46511202
score: 0
comment on: http://stackoverflow.com/q/29144091
type: Comment
type: QuestionComment
has text: seems to be a bug. raise it in github. jquery ui team will clarify

http://stackoverflow.com/q/29092211
answer count: 2
has comment: http://stackoverflow.com/comment/46416301
has body: Had to redo the snippet.I hope it's visible now. This is with the new code that when you select a block, they change backgroundcolor of td. Now I just nee to not change the color of the one that was clicked. Here we go again. .active{background-color:red;} &lt;html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"&gt; &lt;head&gt; &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"&gt; &lt;meta name=Generator content="Microsoft Word 12 (filtered medium)"&gt; &lt;link rel="stylesheet" href="FNBStyle.css" type="text/css" media="screen" title="Stylesheet" /&gt; &lt;!--[if !mso]&gt;&lt;style&gt;v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt;&lt;![endif]--&gt; &lt;title&gt;Help Desk Survey&lt;/title&gt; &lt;style&gt; &lt;!-- /* Font Definitions */ @font-face { font-family: "Cambria Math"; panose-1: 2 4 5 3 5 4 6 3 2 4; } @font-face { font-family: Calibri; panose-1: 2 15 5 2 2 2 4 3 2 4; } @font-face { font-family: Tahoma; panose-1: 2 11 6 4 3 5 4 4 2 4; } /* Style Definitions */ p.MsoNormal,li.MsoNormal,div.MsoNormal { margin: 0cm; margin-bottom: .0001pt; font-size: 12.0pt; font-family: "Times New Roman", "serif"; } a:link,span.MsoHyperlink { mso-style-priority: 99; text-decoration: none none; } td.TheSelection:hover { background:#009999; } &lt;!-- begin snippet: js hide: false --&gt; a:visited,span.MsoHyperlinkFollowed { mso-style-priority: 99; text-decoration: none none; } td.TheSelection:active { color:black; } td.red-cell { background: #F00; /* Or some other color */ } a:hover { background: #009999; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease; } p { mso-styl…
upvote count: 0
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/29120234
tagged with: wicket
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 2
has title: Stopping wicket hyperlink refreshing page
has answer: http://stackoverflow.com/a/29093621
accepted answer: http://stackoverflow.com/a/29120234
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46417102
tagged with: java
possible better answer: http://stackoverflow.com/a/29093621
type: Question

http://stackoverflow.com/comment/46546329
has text: can you please update the code snippet you posted with this, so everyone can benefit from it thank you.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29163156
type: Comment

http://stackoverflow.com/a/29139029
score: 0
answers question: http://stackoverflow.com/q/29138999
has body: You need to pass ViewBag.alert as string to alert() function. Currently you are assign string to ViewBag.alert Use &lt;script&gt; alert('@ViewBag.alert'); &lt;/script&gt;
type: Answer

http://stackoverflow.com/a/29173686
score: 7
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/59123154
downvote count: 0
has body: I'm not totally sure what you're trying to do. But you probably want to pass totalCount out in a callback like this: function getProducts(callback){ Inventory.find({sku_id : sku_id, bay_id : bay_id}).then( function(inventory_items){ callback(null, inventory_items.length) }, function(err){ console.log(err); callback(err); }); } If there is an error, it will call back with the error as it's first parameter, so do a null check on that. If the first parameter is null, then the second parameter will be the length of your array. If you'd rather return all of the products and not just the length (as the name of the function implies), then it's very similar: function getProducts(callback){ Inventory.find({sku_id : sku_id, bay_id : bay_id}).then( function(inventory_items){ callback(null, inventory_items) }, function(err){ console.log(err); callback(err); }); } You'd use it like this for the first case: getProducts(function(err, productCount) { if(err) { console.log(err); return err; } else { var totalCount = productCount; } //etc etc... } ...or this for the second case: getProducts(function(err,products) { if(err) { console.log(err); return err; } else { var productArray = products; } //etc etc... }
type: Answer
has comment: http://stackoverflow.com/comment/57934461
has comment: http://stackoverflow.com/comment/57961087
answers question: http://stackoverflow.com/q/29172620
has comment: http://stackoverflow.com/comment/57961738
accepted answer of: http://stackoverflow.com/q/29172620

http://stackoverflow.com/q/29117131
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46462180
has body: Hello just working through my Javascript stuff , ran into an little issue which doesn't make any sense why it wouldn't be working?. I would like to use id "prototype function parameter" through my prototype function body but it doesn't work for some reason?, is this a syntax error what am I missing also where can I learn more about this simply?. function BG(type) { this.type = type; } BG.prototype.RootFrame = function (x, y, size, title, id) { // document.write("hello!" + x); var RF = document.getElementsByTagName(id); RF.innerHTML = 'Hello!'; }; var BG = new BG(); var execute = function () { BG.RootFrame(0, 0, 0, 0, 'test'); }; if (!!(window.addEventListener)) window.addEventListener("DOMContentLoaded", execute) else window.attachEvent("onload", execute) This code works : function BG(type) { this.type = type; } BG.prototype.RootFrame = function (x, y, size, title, id) { // document.write("hellocrap!" + x); var RF = document.getElementById(id); RF.innerHTML = 'Hello!'; }; var BG = new BG(); var execute = function () { BG.RootFrame(0, 0, 0, 0, 'test'); }; if (!!(window.addEventListener)) window.addEventListener("DOMContentLoaded", execute) else window.attachEvent("onload", execute)
has title: How do get a id through a prototype function parameter?
tagged with: prototype
tagged with: javascript
has answer: http://stackoverflow.com/a/29117293
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29117177
possible better answer: http://stackoverflow.com/a/29117270
has answer: http://stackoverflow.com/a/29117270
accepted answer: http://stackoverflow.com/a/29117177
type: Question

http://stackoverflow.com/q/29197033
has comment: http://stackoverflow.com/comment/46607137
favorite count: 0
type: Question
has body: First of all, I know how most RegExp questions go; and this is not one of those, "please write my code" questions. My confusion lies in the fact that my RegExp works on regexr, and in chrome's dev tools when polling the document.body.textContent, but not on an HTML file after I have read it in io.js. io.js is version 1.5.1, running on windows 8 Why would it work in both places listed, but not in io.js? Am I not taking something into consideration that io.js does to read files? My RegExp should be matching "@{each ___->___} text and line breaks @{/each}" as it does in the link below, but instead, it returns null Here is what I'm trying to use: http://regexr.com/3aldk RegExp: /@\{each ([a-zA-Z0-9->.]*)\}([\s\S]*)@\{\/each}/g JS (Example): fs.readFile('view.html', {encoding:'utf8'}, function(error, html) { console.log(html.match(myRegExp)); // null }); HTML: @{title} @{foo.bar} Lorem ipsum dolor sit amet, @{foo.baz.hoo} @{each people->person} @{person.name}: @{person.age} @{/each} Am I missing something obvious, like a character, that is present on the back side, but not once served?
tagged with: regex
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29197424
upvote count: 7
has comment: http://stackoverflow.com/comment/46607121
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46607293
has comment: http://stackoverflow.com/comment/46607099
has title: RegExp not working on read HTML file
tagged with: javascript
has comment: http://stackoverflow.com/comment/46607045
score: 6
has comment: http://stackoverflow.com/comment/46607022
has comment: http://stackoverflow.com/comment/46607224
has comment: http://stackoverflow.com/comment/46607181
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29197424
has comment: http://stackoverflow.com/comment/46607248
has comment: http://stackoverflow.com/comment/46607120

http://stackoverflow.com/comment/46607092
has text: Are you sure it's not your binding? [I tested](http://jsfiddle.net/kevinvanlierde/0qgrd84m/) with 2million chars and it renders pretty quickly. Do you only render text or also HTML?
comment on: http://stackoverflow.com/q/29195506
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46401522
comment on: http://stackoverflow.com/q/29084041
has text: @epascarello : The server is communicating only with POST request. Requests are sent as POST and received as POST from the web server to the VPS server. However, the request sent from VPS to Web server are sent as POST and received as GET. I assumed it was due to this
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29072902
type: Question
has answer: http://stackoverflow.com/a/29072922
has comment: http://stackoverflow.com/comment/46380168
upvote count: 1
has body: I have this code snippet from an html page: 36 I am in the input element "size-quantity" and I would reach the "alltablergt" element. If $this is the size-quantity element, I thought the way to reach the "alltablergt" element was: $(this).parentsUntil(".alltablergt") but this doesen't work. How can I reach it?
answer count: 1
accepted answer: http://stackoverflow.com/a/29072922
has title: jQuery tree traversal from child to closest filtered parent
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/29169827
tagged with: popupwindow
has title: How Do I Open a Pop Up Window over Destination URL?
downvote count: 1
has answer: http://stackoverflow.com/a/29170547
favorite count: 0
accepted answer: http://stackoverflow.com/a/29170547
upvote count: 0
has comment: http://stackoverflow.com/comment/46558214
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46558052
score: -1
type: Question
has answer: http://stackoverflow.com/a/29171438
answer count: 2
has body: I want to link to a url and after the destination page opens, pop up a window over it. I've seen some examples of this but don't know how to code it. I'm a .NET developer but perhaps this needs javascript? Anyone know how to do it? Page 1 Link 2 Page 2 ---> Page 2 opens... Popup opens over Page 2. Thanks.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29171438

http://stackoverflow.com/comment/46508429
type: AnswerComment
comment on: http://stackoverflow.com/a/29139518
score: 0
type: Comment
has text: This is the html dom after the javascript executes. It seems one of the script files' src is wrong. Check line 45 of WidgetScript ` `

http://stackoverflow.com/comment/94653191
type: AnswerComment
comment on: http://stackoverflow.com/a/29425761
type: Comment
has text: It doesn't even work without a whole bunch of parameters and jumping through the hoops, so look for the answer below.
score: 0

http://stackoverflow.com/comment/46580082
comment on: http://stackoverflow.com/q/29181857
type: Comment
type: QuestionComment
has text: They are all arrays.. You probably want to concatenate instead.
score: 0

quicksand
tags question: http://stackoverflow.com/q/29078769
tag name: quicksand
type: Tag

http://stackoverflow.com/q/29163519
answer count: 0
has body: I have a checkbox list ([checkgroup]) in the form, and I have the leading "check/uncheck all" checkbox ([checkgroup].checkall-responsive). Yet this one is not only facade/interface focused, but is meant to send the value to the server, indicating either ALL or NOT ALL elements in the list have been checked. Thus, I have simple JQuery behaviour applied to all checkbox list elements and the leading "check all" element, so that if all of the list elements are checked, the leading checkbox gets checked automatically. And it does get checked fine visually, but when I submit the form, the value does not arrive. In other words, the value gets passed to the server only when I check the leading checkbox manually, but not via checking all the checkboxes in the list. Confirmed on FF and Safari on MacOS. Tried prop and attr: same result. Here is the snippet: $("input[checkgroup]").live("click",function () { var group=$(this).attr("checkgroup"); //alert(group); if ($(this).hasClass("checkall-responsive")) { if ($(this).is(":checked")) { $("input[checkgroup="+group+"]").not(".checkall-responsive").prop('checked', true); } else { $("input[checkgroup="+group+"]").not(".checkall-responsive").prop('checked', false); } } else { if ($("input[checkgroup="+group+"]").not(".checkall-responsive").length==$("input[checkgroup="+group+"]:checked").not(".checkall-responsive").length) { $("input[checkgroup="+group+"].checkall-responsive").prop('checked', true); //alert($("input[type=checkbox].checkall-responsive").length); } else { $("input[checkgroup="+group+"].checkall-responsive").prop('checked', false); } } })
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: frontend
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46761405
has title: prop('checked', true) sets value only visually, but not passed to server on submit
has comment: http://stackoverflow.com/comment/46546233

http://stackoverflow.com/q/29144488
has answer: http://stackoverflow.com/a/29145739
has answer: http://stackoverflow.com/a/29144702
accepted answer: http://stackoverflow.com/a/29144702
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46512764
has comment: http://stackoverflow.com/comment/46514074
possible better answer: http://stackoverflow.com/a/29146839
has comment: http://stackoverflow.com/comment/46513414
tagged with: arrays
has title: How to build an array from a jSon object
has answer: http://stackoverflow.com/a/29145960
tagged with: javascript
has comment: http://stackoverflow.com/comment/46511721
tagged with: jquery
favorite count: 0
has body: I am trying to build 2 arrays from JSON arrays. { "2015-03-24": { "bind": 0, "info": "", "notes": "", "price": "150", "promo": "", "status": "available" }, "2015-03-25": { "bind": 0, "info": "", "notes": "", "price": "150", "promo": "", "status": "available" }, "2015-03-26": { "bind": 0, "info": "", "notes": "", "price": "150", "promo": "", "status": "available" }, "2015-03-27": { "bind": 0, "info": "", "notes": "", "price": "100", "promo": "", "status": "available" }, "2015-03-28": { "bind": 0, "info": "", "notes": "", "price": "100", "promo": "", "status": "available" }, "2015-03-29": { "bind": 0, "info": "", "notes": "", "price": "100", "promo": "", "status": "available" }, "2015-04-10": { "bind": 0, "info": "", "notes": "", "price": "", "promo": "", "status": "booked" }, "2015-04-11": { "bind": 0, "info": "", "notes": "", "price": "", "promo": "", "status": "booked" }, "2015-05-01": { "bind": 0, "info": "", "notes": "", "price": "", "promo": "", "status": "unavailable" }, "2015-05-02": { "bind": 0, "info": "", "notes": "", "price": "", "promo": "", "status": "unavailable" }, "2015-05-03": { "bind": 0, "info": "", "notes": "", "price": "", "promo": "", "status": "unavailable" }, } This is the jSon array, so I want to build 2 arrays. 1 array holding only keys (in this case the date) of those element where status=='booked' nOR status=='unavailable' and build it in jQuery array like this var array = ['2015-03-19', '2015-03-20', '2015-03-21', '2015-03-22', '2015-03-23', '2015-03-24', '2015-03-25', '2015-03-26', '2015-04-07', '2015-04-08', '2015-04-09', '2015-04-10']; Another is building another array with the dates of those days where status=='available' AND price > '100$' var array2 = [ '2015-03-25', '2015-03-26', '2015-04-07', '2015-04-08']; How can I achieve this on with jQuery?
upvote count: 7
has comment: http://stackoverflow.com/comment/46512945
linked to: http://stackoverflow.com/q/2295496
downvote count: 1
has comment: http://stackoverflow.com/comment/46513194
answer count: 4
has answer: http://stackoverflow.com/a/29146839
score: 6

http://stackoverflow.com/comment/46560666
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29171133
score: 0
has text: Check this out, it might help. The answer has a way of making sure that empty is what you think it is: http://stackoverflow.com/questions/6813227/how-do-i-check-if-an-html-element-is-empty-using-jquery

http://stackoverflow.com/q/29103188
has answer: http://stackoverflow.com/a/29103419
favorite count: 0
tagged with: ajax
has body: I am attempting to do some duplication checking in my MVC5/EF Code-First application. On my Create() Asset View, I show/hide textboxes for entering a new location_dept/location_room via JS: @*@Html.LabelFor(model => model.Location_Id, "Location_Id", htmlAttributes: new { @class = "control-label col-md-2" })*@ Location: @*@Html.DropDownList("Location_Id", null, htmlAttributes: new { @class = "form-control dropdown" })*@ @Html.DropDownListFor(model => model.Location_Id, (SelectList)ViewBag.Model_List, htmlAttributes: new { @class = "form-control dropdown", @id = "selectLocation" }) @Html.ValidationMessageFor(model => model.Location_Id, "", new { @class = "text-danger" }) CREATE NEW JS: $('#createNewLocation').click(function () { $('#createLocationFormContainer').show(); }) $('#cancelNewLocation').click(function () { $('#createLocationFormContainer').hide(); }) $('#submitNewLocation').click(function () { var form = $(this).closest('form'); var data = { location_dept: document.getElementById('textNewLocationDept').value, location_room: document.getElementById('textNewLocationRoom').value }; // CORRECTLY SHOWING alert("Dept: " + data.location_dept + " | Room: " + data.location_room); $.ajax({ type: "POST", dataType: "JSON", url: '@Url.Action("createNewLocation", "INV_Assets")', data: data, success: function (resp) { if (resp.LocationRoomExists) { alert("Room Location [" + resp.Text + "] already exists. Please select from the DropDown."); } else { // FALSE alert("LocationRoomExists: " + resp.LocationRoomExists); // `undefined` returned for both values alert("Department: " + resp.location_dept + " | Room: " + resp.location_room); $ $('#selectLocation').append($(' ').val(resp.ID).text(resp.LocDept + "| " + resp.LocRoom)); $('#createLocationFormContainer').hide(); var count = $('#selectLocation option').size(); $("#selectLocation").prop('selectedIndex', count - 1); } }, error: function () { alert("ERROR - Something went wrong adding new Room Location [" + resp.Text + "]!"); …
upvote count: 2
accepted answer: http://stackoverflow.com/a/29103419
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/2758734
type: Question
tagged with: asp.net-mvc
has title: MVC5: Posting JSON via Ajax not correctly passing data to Controller?
linked to: http://stackoverflow.com/q/29169132
tagged with: javascript
has comment: http://stackoverflow.com/comment/46436852
downvote count: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/46603200
type: QuestionComment
score: 0
has text: can you show the code for `appService.startApp`?
comment on: http://stackoverflow.com/q/29195134
type: Comment

http://stackoverflow.com/q/29151034
has body: This is my query for a optimum solution to my case. I have some tables in HBase in a remote computer. I am using Putty to scan the tables for data. I want to use those data for visualization using d3.js. My question is whether there is any better way to use those data for front end? Right now I am just using the data from putty to write to a csv file and using that. That is reducing the dynamic nature of my work.
has answer: http://stackoverflow.com/a/29153449
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29153449
has title: How can i use the data from Hbase to visualize using d3.js
score: 0
answer count: 1
tagged with: d3.js
tagged with: hbase
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/46589107
type: Comment
has text: I do in the show method within the controller - not within Index though - should I? Am I not passing it the :id within the options_from_collection_for_select tag??
comment on: http://stackoverflow.com/a/29097235
score: 0
type: AnswerComment

http://stackoverflow.com/q/29099521
type: Question
has comment: http://stackoverflow.com/comment/46467913
has body: i got the error "Uncaught TypeError: undefined is not a function" in my jquery code. code is working perfect on this link when i code it separate check here http://www.test2.guru99.com/career_guide/ but when i placed this code in my joomla website code is not working check the design it is messed up http://screencast.com/t/EcXh407N40 and check the link same code is not working here http://www.test2.guru99.com/best-sap-module.html
tagged with: javascript
score: -1
has title: Jquery "Uncaught TypeError"
has answer: http://stackoverflow.com/a/29111278
has comment: http://stackoverflow.com/comment/46430885
upvote count: 0
has comment: http://stackoverflow.com/comment/46429726
answer count: 1
tagged with: jquery
tagged with: joomla
favorite count: 0
has comment: http://stackoverflow.com/comment/46429846
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46429559
has comment: http://stackoverflow.com/comment/46429551
has comment: http://stackoverflow.com/comment/46429513
downvote count: 1

http://stackoverflow.com/comment/46474962
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29124370
has text: i have corrected it now
type: Comment

http://stackoverflow.com/q/29063252
has answer: http://stackoverflow.com/a/29063410
has comment: http://stackoverflow.com/comment/46363393
has comment: http://stackoverflow.com/comment/46362837
answer count: 1
downvote count: 0
tagged with: mongoose
has title: Bluebird promises - nesting vs rejecting pattern
has comment: http://stackoverflow.com/comment/46362715
favorite count: 0
has body: I'm working on an app for which we're using promises. I'm attempting to figure out what the better pattern is. Breaking up concerns between thenables and rejecting the promise if an error. Rejection is then handled in a catch block. Or is it better to throw a new type of error and handle in the catch block? Account.findOneAsync({email: request.payload.email}) .then(function (user) { if (user) { return user.compareHash(request.payload.password); } else { // Account not found return Bpromise.reject('AccountNotFound'); } }) .then(function (validPassword) { if (validPassword) { return request.auth.jwt.user.sign(); } else { // Invalid password return Bpromise.reject('InvalidPassword'); } }) .then(function (jwt) { var response = reply.success(); return response.header('authorization', jwt); }) .catch(function (e) { if (e === 'AccountNotFound' || e === 'Invalid Password') { return reply(Boom.unauthorized('Invalid username/password')); } else { // Perhaps log something like unhandled error return reply(Boom.unauthorized('Invalid username/password')); } }); Or nesting promising as such. I feel here that this is just going down the same rabbit hole of "callback hell" though. Account.findOneAsync({email: request.payload.email}) .then(function (user) { if (user) { user.compareHash(request.payload.password) .then(function (valid) { if (valid) { request.server.plugins.jwt.sign() .then(function (jwt) { var response = reply.success(); return response.header('authorization', jwt); }); } else { // Invalid password return reply(Boom.unauthorized('Invalid username/password')); } }); } else { // Account not found return reply(Boom.unauthorized('Invalid username/password')); } }) .catch(function (e) { console.log(e); });
tagged with: promise
accepted answer: http://stackoverflow.com/a/29063410
type: AnsweredQuestion
tagged with: bluebird
upvote count: 3
has comment: http://stackoverflow.com/comment/46362591
has comment: http://stackoverflow.com/comment/46362744
type: Question
linked to: http://stackoverflow.com/q/26076511
has comment: http://stackoverflow.com/comment/46362997
score: 3
tagged with: javascript

http://stackoverflow.com/q/29098871
has comment: http://stackoverflow.com/comment/46428355
has comment: http://stackoverflow.com/comment/46428389
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33406799
has comment: http://stackoverflow.com/comment/46428788
has body: I am using jquery datepicker as monthpicker and it is working but the only problem is if I select one month from calander then it shows that month in the input field, but when i click on that input field again then it doesn't show selected month but it shows current month. HTML Date : JS $(function() { $('.date-picker').datepicker( { changeMonth: true, changeYear: true, showButtonPanel: true, dateFormat: 'MM yy', onClose: function(dateText, inst) { function isDonePressed(){ return ($('#ui-datepicker-div').html().indexOf('ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all ui-state-hover') > -1); } if (isDonePressed()){ var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val(); var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val(); $(this).datepicker('setDate', new Date(year, month, 1)); console.log('Done is pressed') } } }); }); Here is the fiddle for my question. http://jsfiddle.net/DBpJe/5103/
type: Question
tagged with: jquery-ui
linked to: http://stackoverflow.com/q/13566552
has title: jQuery UI DatePicker for month and year selection is not working
has answer: http://stackoverflow.com/a/29099452
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29099452
tagged with: jquery
has comment: http://stackoverflow.com/comment/46428577
has answer: http://stackoverflow.com/a/29099147
possible better answer: http://stackoverflow.com/a/33406799
has comment: http://stackoverflow.com/comment/46428826
has comment: http://stackoverflow.com/comment/46428721
answer count: 4
favorite count: 0
linked to: http://stackoverflow.com/q/33411152
has answer: http://stackoverflow.com/a/29099175
downvote count: 2
tagged with: datepicker
upvote count: 4

http://stackoverflow.com/a/29128663
downvote count: 0
has comment: http://stackoverflow.com/comment/46483165
has comment: http://stackoverflow.com/comment/46483295
has body: You need to use .data() or dataset var URL = $(this).data("targeturl"); //OR //var URL = this.dataset.targeturl; instead of var URL = this.data-targeturl
answers question: http://stackoverflow.com/q/29128631
upvote count: 2
has comment: http://stackoverflow.com/comment/46483456
accepted answer of: http://stackoverflow.com/q/29128631
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46483184
type: Answer
score: 2

http://stackoverflow.com/q/29094378
has title: amChart CategoryAxes with icons
answer count: 1
has comment: http://stackoverflow.com/comment/46471899
tagged with: javascript
has answer: http://stackoverflow.com/a/29124744
accepted answer: http://stackoverflow.com/a/29124744
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: amcharts
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46467743
tagged with: image
has body: I was wondering if there's a way to add images to the CategoryAxes in amChart. I found a demo that can include images in each graph, but these are always near the graph and/or given an offset of them, but I need to have those images stay on top of the chart. I tried to give an &lt;img src =""&gt; to the category field on the CategoryAxes, but it displays only text, showing all the tag. I read the methods and options this category can have, but I didn't find anything that says it can haves images displayed, so, it's possible to add them? Add: //Doesn't works the "category" option "dataProvider": [ "category": "&lt;img src='link_to_image.png'&gt;", "column-1": 120.99, //other values... "myBullet1": "&lt;img src='link_to_image.png'&gt;" //this with graph works, but doesn't puts it on top of the chart ], "graphs": [ "customBulletField": "myBullet1", "bulletOffset": 20, "bulletSize": 34, //other values ], //other options

http://stackoverflow.com/comment/46593236
comment on: http://stackoverflow.com/q/29189328
type: Comment
has text: Maybe I'm missing something, but they aren't identical, because your first function returns a promise, and your second function doesn't return anything.
score: 3
type: QuestionComment

http://stackoverflow.com/comment/46641226
type: QuestionComment
score: 0
has text: Do you have errors in your console? What is the behavior of your incorrect implementation? - It looks like you may have a syntax error as well.
comment on: http://stackoverflow.com/q/29215718
type: Comment

http://stackoverflow.com/q/29197291
tagged with: image
tagged with: draw
type: Question
has body: Is there a javascript library that has the ability to modify and save images? It would preferably be able to draw primitives and then save the image at the very least.
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29198430
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46607220
tagged with: shapes
has title: Is there a javascript library that has the ability to modify and save images?
tagged with: save

http://stackoverflow.com/q/29196991
favorite count: 0
tagged with: typeerror
has title: JS: Failed to execute 'getComputedStyle' on 'Window': parameter is not of type 'Element'
type: Question
has answer: http://stackoverflow.com/a/78609778
has answer: http://stackoverflow.com/a/29841371
tagged with: getcomputedstyle
has answer: http://stackoverflow.com/a/57943816
tagged with: mediawiki
has body: In short: I am trying to understand the meaning of this: TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' The error appears while lunching Mediawiki's VisualEditor, as can be seen here: http://www.wiki.org.il/index.php?title=new-page&amp;veaction=edit The error doesn't enables creating new pages or editing the wiki anonymously. However, with the use of a different skin the error disappears: http://www.wiki.org.il/index.php/Main_Page?useskin=vector The wiki runs on 1.25alpha.
has answer: http://stackoverflow.com/a/51376417
answer count: 11
score: 53
has answer: http://stackoverflow.com/a/76283028
tagged with: visual-editor
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/68856228
has answer: http://stackoverflow.com/a/73493930
upvote count: 53
has answer: http://stackoverflow.com/a/29201122
downvote count: 0
has answer: http://stackoverflow.com/a/47097646
has answer: http://stackoverflow.com/a/56364988
has answer: http://stackoverflow.com/a/74054222

http://stackoverflow.com/comment/46566582
comment on: http://stackoverflow.com/q/29174353
score: 0
type: Comment
type: QuestionComment
has text: How is it changing? I would assume via jQuery? Can you catch that event?

http://stackoverflow.com/a/29145670
has comment: http://stackoverflow.com/comment/46515184
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46515262
type: Answer
has comment: http://stackoverflow.com/comment/46515446
score: 3
upvote count: 3
has body: You can't prevent submitting of the form by returning false in ajax response it need to be in that function, solution is to always return false and resubmit in ajax response: var secondCall = false; function checkform(){ if (secondCall) { return; } var username = $("#username").val(); $.ajax({url:"&lt;?php echo base_url() ?&gt;Delivery/usernamecheck/", data: {username: username}, type:'post', async:false, success: function(data){ if(data &gt; 0){ $("#info").attr("class","form-group has-error"); $("#info1").html("Duplicate Username!"); }else{ secondCall = true; $('.form-signin').submit(); } } }); return false; } Note that it's better to bind submit event in JavaScript: $('.form-signin').submit(checkform);
has comment: http://stackoverflow.com/comment/46516133
has comment: http://stackoverflow.com/comment/46521068
accepted answer of: http://stackoverflow.com/q/29145511
answers question: http://stackoverflow.com/q/29145511
has comment: http://stackoverflow.com/comment/46515803

http://stackoverflow.com/comment/46601847
type: Comment
comment on: http://stackoverflow.com/a/29193974
type: AnswerComment
has text: this is all the code. I tried a minimal file to found the error . i never used e. prevendefault. Do i have to add more code in the main code, or somewhere else?
score: 0

http://stackoverflow.com/q/29064651
tagged with: javascript
type: AnsweredQuestion
has title: node module object scope : share an object across all functions
type: Question
has answer: http://stackoverflow.com/a/29071128
answer count: 1
tagged with: node.js
score: 0
has comment: http://stackoverflow.com/comment/46365570
has body: I'm writing a multi-file node.js application, and I'm using modules to organize it's functionality like so: var custom_module = require('./module'); It has a lot of dependencies, namely MySQL. I don't want to pass the connection object as an argument to all the functions in the module (since all of them require it), so I tried something like this: // Module var database = require('mysql'); (function (db) { var mysqlConn = db.createConnection ({...}); var connection = mysqlConn.connect(); var function moduleFunction (someArgs) { connection.query('SELECT * FROM ....', function (err, result) {...}); } }(database); I get the error cannot call query method of undefined, basically the object hasn't been initialized / out of scope. It is noteworthy that the module had time to load before the function is called since moduleFunction is called as a result of express.get('/url_here', function (req, res) { custom_module.moduleFunction(....); }); in the main script. Is there any way to make sure the connection object is initialized and in scope at the time any module functions are called? Or do I have to initialize it every time and pass it as an argument in the callback?
accepted answer: http://stackoverflow.com/a/29071128

http://stackoverflow.com/q/29099308
type: Question
has title: Java Script Logical Operator In IF ELSEIF Statement
has comment: http://stackoverflow.com/comment/46429235
has comment: http://stackoverflow.com/comment/46429073
has comment: http://stackoverflow.com/comment/46428988
downvote count: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29099585
has comment: http://stackoverflow.com/comment/46429068
answer count: 2
has answer: http://stackoverflow.com/a/29099585
has answer: http://stackoverflow.com/a/29099612
upvote count: 0
has comment: http://stackoverflow.com/comment/46428964
favorite count: 0
has comment: http://stackoverflow.com/comment/46429085
has body: I have a problem here my code for elseif statement isn't working. How do I use the && operator in html or javascript? Compute Letter Grade Enter Numeric Grade &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp compute letter grade
has comment: http://stackoverflow.com/comment/46429078
has comment: http://stackoverflow.com/comment/46429385
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29099612
score: -5
has comment: http://stackoverflow.com/comment/46429205

http://stackoverflow.com/comment/46534446
type: QuestionComment
comment on: http://stackoverflow.com/q/29156767
score: 0
type: Comment
has text: Thank you @Phatjam98 although the Navbar would be suited as a collapsed menu for mobile it doesn't work as tabs for desktop. Can you can send me an example?

http://stackoverflow.com/q/29104920
has comment: http://stackoverflow.com/comment/46439900
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46441583
has comment: http://stackoverflow.com/comment/46439924
has body: I have a vendor that would like me to add their GA tracking code "UA-XXX-2" to our website. I cannot add their GA tracking code because it will interfere with our GA tracking code "UA-XXX-1". Is there a way I can send GA data to their "UA-XXX-2" UA number without screwing up my analytics for my domain? AutoLink seemed like it might work, but AutoLink seems to be for when you own and maintain both domains. GA AutoLink Any help would be greatly appreciated. Thank you!
has title: Is it possible to send google analytics data to a vendor?
type: Question
has comment: http://stackoverflow.com/comment/46439951
tagged with: google-analytics
tagged with: javascript
has answer: http://stackoverflow.com/a/29104955
score: 0

http://stackoverflow.com/a/29210998
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29178819
has comment: http://stackoverflow.com/comment/46631588
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29178819
upvote count: 1
type: Answer
has body: The component on screenshoot is a Tree actually. In common case, you may use "menu" or "list" { view:"menu", layout:"y", select:true, width:150, data:[ "Firts", "Second", "Third" ]}, http://webix.com/snippet/07fa93b6

http://stackoverflow.com/a/29062686
accepted answer of: http://stackoverflow.com/q/29062456
answers question: http://stackoverflow.com/q/29062456
has comment: http://stackoverflow.com/comment/46361571
has comment: http://stackoverflow.com/comment/46361500
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46361428
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46361886
has comment: http://stackoverflow.com/comment/46361883
upvote count: 3
has comment: http://stackoverflow.com/comment/46361627
has body: Put your Javascript in /app/assets/javascripts and you'll be able to include it like this: &lt;%= javascript_include_tag 'file-name' %&gt; Please note that you shouldn't include the extension. Rails will find it for you. Each controller has it's own Javascript and CSS files, using them is a good idea. Be warned that if you add more assets, you'll have to add Rails.application.config.assets.precompile += %w( [file name] ) to config/initializers/assets.rb and restart your server Libs isn't exactly for what you think, and using public is a bad idea... It's best just to put it in /app/assets/javascripts, as I've said.
has comment: http://stackoverflow.com/comment/46361847
score: 3
has comment: http://stackoverflow.com/comment/46361464

http://stackoverflow.com/q/29179001
has body: this is very tricky for me and I don't know how to solve this one.. i have 2 identical database table [table1,table2] i want to transfer database item to another database and delete the data from the previous database to avoid duplication.. I used ListBox1 and ListBox2 so after I transfer the data, the next step is I want to save the changes.. I have insert code on C# and I'm using on asp.net but the problem is after I transfer the item from listbox1 to listbox2 then I click save changes button the item that i move to listbox2 will go back to listbox1 then run the c# code -_- delay? I think it will submit first before run the c# code.. which is the save code so it will save the same items :-/ that's why i come up with the idea of calling the c# code to function since the javacript always comes up first .. if you have a better idea please share here's my tranfer item javascript code &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { $("#left").bind("click", function () { var options = $("[id*=RIghtBox] option:selected"); for (var i = 0; i &lt; options.length; i++) { var opt = $(options[i]).clone(); $(options[i]).remove(); $("[id*=LeftBox]").append(opt); } }); $("#right").bind("click", function () { var options = $("[id*=LeftBox] option:selected"); for (var i = 0; i &lt; options.length; i++) { var opt = $(options[i]).clone(); $(options[i]).remove(); $("[id*=RIghtBox]").append(opt); } }); }); &lt;/script&gt; here's my save C# code for (int i = LeftBox.Items.Count - 1; i &gt;= 0; i--) { //◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘ ◘ADD◘ ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘ string[] splits = LeftBox.Items[i].ToString().Split(new char[] { '-' }); string id_split = splits[0]; conn.Close(); conn.Open(); string str = "Select * FROM User_table_list WHERE ID='" + id_split + "'"; SqlCommand com = new SqlCommand(str, conn); SqlDataReader reader = com.ExecuteReader();…
tagged with: mysql
has comment: http://stackoverflow.com/comment/46576452
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/46575820
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46576435
has comment: http://stackoverflow.com/comment/46615396
tagged with: asp.net
has title: Is it possible to call the code command from c# to javascript function?
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46462118
type: Comment
comment on: http://stackoverflow.com/a/29117177
score: 1
has text: There's no s in `getElementById()`
type: AnswerComment

http://stackoverflow.com/comment/46501869
score: 0
type: Comment
type: QuestionComment
has text: I am actually working on a software called Flexicapture and can write codes only in Javascript. Data of Table1 is actually captured on its own but data in table2 needs to be extracted as per the mentioned criteria..
comment on: http://stackoverflow.com/q/29138858

http://stackoverflow.com/q/29175455
tagged with: promise
tagged with: angularjs
has answer: http://stackoverflow.com/a/29176077
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/46570436
upvote count: 7
type: Question
accepted answer: http://stackoverflow.com/a/29176077
has title: $q.reject and handling errors in AngularJS chained promises
tagged with: javascript
has body: I'm having trouble understanding a basic concept of error handling with chaining promises. In order to learn the rules, I have written a simple example, guessing what the result will be. But unfortunatly it doesn't behave as I though it will. I have read multiple articles about the subject but perhaps can't I get details because of my poor english language. Anyway, here is my code : var promiseStart = $q.when("start"); var promise1 = promiseStart.then(function() { return Serviceforpromise1.get(); }); var promise2 = promise1.then(function(data1) { return Serviceforpromise2.get(data1); },function(error) { return $q.reject(); }); var promiseend = promise2.then(function(data2) { return data2; },function(error) { return error; }); return promiseend; Well I know that it can be way better coded but it's just for the purpose. Here is the code of Serviceforpromise1 function : function Serviceforpromise1() { ... return $http.get(*whatever*).then(function (data){ return data; },function(error) { return $q.reject(); }); } Consider only the case of Serviceforpromise1's failure. A $q.reject is sent back to main chain so I'm waiting the error callback of "promise1 .then(" to be called and it worked as expected. I decided for the example to transfert the error to the "promise2 .then" so in this error callback I added the line return $q.reject(); But it never reached the second error callback (the "promise2 .then" one) and I don't understand why (like Serviceforpromise1, I returned a rejected promise !) I will be happy to deeply understand what is happening here. Thanks for your help.
has comment: http://stackoverflow.com/comment/46569920
answer count: 1
downvote count: 0
tagged with: chaining
favorite count: 0

sapui5
tags question: http://stackoverflow.com/q/29208897
tags question: http://stackoverflow.com/q/29127408
tag name: sapui5
type: Tag
tags question: http://stackoverflow.com/q/29169037
tags question: http://stackoverflow.com/q/29077048
tags question: http://stackoverflow.com/q/29081454
tags question: http://stackoverflow.com/q/29095465
tags question: http://stackoverflow.com/q/29097484
tags question: http://stackoverflow.com/q/29123102
tags question: http://stackoverflow.com/q/29125331
tags question: http://stackoverflow.com/q/29104488

http://stackoverflow.com/comment/46539053
type: QuestionComment
comment on: http://stackoverflow.com/q/29159500
type: Comment
score: 2
has text: Your code does that though. You select the path with the button, and it gets colored...

http://stackoverflow.com/comment/46473075
has text: In addition, how does it fail?
score: 1
comment on: http://stackoverflow.com/q/29123083
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46603408
comment on: http://stackoverflow.com/q/29190050
type: QuestionComment
has text: @Aaron : Actually, no. But I need it to be able to scale with css along with the game canvas.
type: Comment
score: 0

http://stackoverflow.com/comment/46423407
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29095044
type: Comment
has text: Anyway in your case it wouldn't harm to remove the negative margins from the .row selector: http://jsfiddle.net/2patspw2/531/

http://stackoverflow.com/q/29126974
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has title: SVG-edit link won't open in new window
type: Question
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29127247
has answer: http://stackoverflow.com/a/29127289
has body: I have created a link in SVG Edit and I want this link to open in a new window. I googled if this was possible which it apparently is by adding this code: xlink:show="new" I click SVG source and add it where the page tells me to add it, but the code won´t stay and if I open the SVG source again, the code is gone. What am I doing wrong? Can I open a link in SVG edit in a new window and how?

http://stackoverflow.com/comment/46415060
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29091434
has text: Can you display where you get the data array? `data[i]` Also, are you getting the correct messages in the console depending on the input 0/1?
score: 0

http://stackoverflow.com/comment/46405389
type: QuestionComment
has text: I have added my whole code, would both of you mind taking a second look?
score: 0
comment on: http://stackoverflow.com/q/29085911
type: Comment

http://stackoverflow.com/q/29070448
has body: I'm using Angular "currency" filter to show price in a shopping cart. The prices are fetched from a back end server. So sometimes the price may not be available to show to the user. In that case I just want to show the user that the price is not available in the same field as of currency field. I can not show plain text in a currency filter. The only solution I found is to keep another text field to show/hide when a price is not available.But this is some what unnecessary I think. Is there any way to extend or override the built in "currency" filter of Angular js ?. Kindly appreciate some help. &lt;div class="large-12 medium-12 small-12 columns pad-none nzs-pro-list-item-price"&gt; &lt;/div&gt;
upvote count: 1
has answer: http://stackoverflow.com/a/48186588
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29070559
tagged with: filter
answer count: 3
downvote count: 0
has title: How do we customize the built in Angular "currency" filter?
favorite count: 0
tagged with: currency
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/38718939
has answer: http://stackoverflow.com/a/38718939
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29070559
score: 1

http://stackoverflow.com/comment/46519548
type: AnswerComment
has text: It would not be overriding if done correctly according to its parent... I'll give an example.
type: Comment
comment on: http://stackoverflow.com/a/29148246
score: 0

http://stackoverflow.com/q/29093133
has comment: http://stackoverflow.com/comment/46456715
tagged with: javascript
tagged with: prototype
has comment: http://stackoverflow.com/comment/46418361
upvote count: 2
has comment: http://stackoverflow.com/comment/46457037
answer count: 1
has answer: http://stackoverflow.com/a/29093352
accepted answer: http://stackoverflow.com/a/29093352
has comment: http://stackoverflow.com/comment/46457887
favorite count: 0
tagged with: constructor
has title: Prototype inheritance is not working as expected
has body: Since my JavaScript childhood I have read and followed that I should override the constructor in case of prototypical inheritance. But I am surprised to see that the following example outputs the same at console even if the overriding constructor statement is commented. Please enlighten. function A() { console.info("A constructor"); } function B() { console.info("B constructor"); } B.prototype = A.prototype; B.prototype.constructor = B; // Do we really need this statement? console.info("cp 1"); var b = new B(); console.info("cp 2");
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question

http://stackoverflow.com/a/41227532
upvote count: 6
downvote count: 0
answers question: http://stackoverflow.com/q/29090331
score: 6
type: Answer
has body: connect-sequence: a dedicated node module for that specific purpose: You can just use the module connect-sequence which is designed for that purpose: npm install --save connect-sequence see: the npmjs page: https://www.npmjs.com/package/connect-sequence or the github project: https://github.com/sirap-group/connect-sequence and then, here an example of usage: /** * Product API * @module */ var ConnectSequence = require('connect-sequence') var productsController = require('./products.controller') module.exports = productRouter function productRouter (app) { app.route('/api/products/:productId') .get(function (req, res, next) { // Create a ConnectSequence instance and setup it with the current `req`, // `res` objects and the `next` callback var seq = new ConnectSequence(req, res, next) // build the desired middlewares sequence thanks to: // - ConnectSequence#append(mid0, ..., mid1), // - ConnectSequence#appendList([mid0, ..., mid1]) // - and ConnectSequence#appendIf(condition, mid) if (req.query.filter) { seq.append(productsController.filter) } if (req.query.format) { seq.append( productsController.validateFormat, productsController.beforeFormat, productsController.format, productsController.afterFormat ) } // append the productsController.prepareResponse middleware to the sequence // only if the condition `req.query.format &amp;&amp; req.formatedProduct` is true // at the moment where the middleware would be called. // So the condition is tested after the previous middleware is called and thus // if the previous modifies the `req` object, we can test it. seq.appendIf(isProductFormatted, productsController.prepareResponse) seq.append(productsController.sendResponse) // run the sequence seq.run() }) app.param('productId', function (req, res, next, id) { // ... yield the product by ID and bind it to the req object }) function isProductFormatted (req) { return Boolean(req.formatedProduct) } } This is open source, PR are welcome! If you like and use connect-sequence, but i…
has comment: http://stackoverflow.com/comment/124085870

http://stackoverflow.com/q/29195707
score: 0
answer count: 1
type: UnansweredQuestion
has body: I can't seem to figure out what's wrong with my JS function. I'm trying to find the largest prime factor of a given number. It worked when called with 2 or 4, but fails with 3. Jsfiddle: http://jsfiddle.net/prashanthcr/23y59nLa/ (It's towards the bottom of the JS part) JS: var problem3 = function(num) { var max = 0; var i = 3; var prime; while (num%2==0) { num/=2; max=2; } for (num;num&gt;1;i+=2) { prime = true; for (var j=3;j&lt;=Math.ceil(sqrt(i));j++) { if (i%j==0) { prime = false; break; } } if (prime==false) { continue; } if (num%i!=0) { continue; } while (num%i==0) { num/=i; max=i; } } document.getElementById('answer3').innerHTML = max; }
tagged with: primes
has answer: http://stackoverflow.com/a/29195772
type: Question
tagged with: algorithm
has title: What's wrong with my largest prime finding function?
tagged with: javascript

http://stackoverflow.com/comment/46404937
has text: i tried, but it doesn't look right in jsfiddle. it looks and works right in a browser.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29085489
score: 0

http://stackoverflow.com/comment/46476365
comment on: http://stackoverflow.com/q/29125018
type: Comment
has text: See this: http://stackoverflow.com/questions/1484875/i-need-the-full-dom-node-path-of-element
type: QuestionComment
score: 1

http://stackoverflow.com/a/29241654
has body: Answer: Passing a function reference preserves the usage of this. example: function output() { var x = $(this).val(); $("#output").val(x); } // Watch input and throttle calls to output $("input").on("change input paste keyup", _.throttle(output, 350)); Source: I google-fu'd some more and found the answer in an article I had already skimmed over, but did not "read". @Michael : Unfortunately your code doesn't work on first principle. You can't declare a variable the way that you did, in the spot that you did. I'm guessing you may have meant to say either this: // this will not work $("input").on("change input paste keyup", self = this, // this throws an error _.throttle( output( $(self).val() ) ) ); or this: //This does not work either $("input").on("change input paste keyup", function(){ self = this; // this still throws an error _.throttle( output( $(self).val() ) ); }); They both throw the same error.
answers question: http://stackoverflow.com/q/29202901
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46616395
comment on: http://stackoverflow.com/q/29195856
has text: What is that quote refering to? Where is it from?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29079854
tagged with: object
has body: I would like to launch a function at the end of my sound, this code works : var mysound; var next = function(){ alert('end'); }; soundManager.onready(function () { mysound = soundManager.createSound({ id:'foo', url:'http://soundbible.com/grab.php?id=2077&amp;type=mp3' }) mysound.play({onfinish:next}); // change to this // mysound.play(); }); // in another .js // mysound.onfinish(next) // doesn't work // mysound.prototype.options.onfinish = next // doesn't work I would like to do something like I comment. code on jsfiddle
type: Question
has comment: http://stackoverflow.com/comment/46392925
answer count: 1
tagged with: javascript
has title: onfinish on global soundmanager object
score: 0
tagged with: soundmanager2
has answer: http://stackoverflow.com/a/29080081
type: UnansweredQuestion

http://stackoverflow.com/q/29169872
has comment: http://stackoverflow.com/comment/46558352
has body: I'm having something strange concerning the length of an array, maybe the problem is obvious and i don't see it. I have an array: this.roles which is an array of simple objects: this.roles = [ { GRO_id:1, ROL_id:1 } ]; When I add objects in it I use the method push with a new object: this.roles.push({ GRO_id: GRO_id, ROL_id: ROL_id }); But when I try to loop on this.roles the script can't seem to go through all objects, so I tried console.log to see what it gives: console.log(this.roles); //l.69 console.log(this.roles[0]); //l.70 console.log(this.roles[1]); //l.71 console.log(this.roles.length); //l.72 console.log(this.roles); //l.73 And here are the results: [Object] 0: Object 1: Object length: 2 __proto__: Array[0] //l.69 Object {GRO_id: 1, ROL_id: 1} //l.70 Undefined //l.71 1 //l.72 [Object] 0: Object 1: Object length: 2 __proto__: Array[0] //l.73 Can someone explain to me why I got different length? It's as if the objects were wrapped in a single object, or as if I had accidentally made the variable this.roles reference 2 different arrays...
answer count: 0
type: UnansweredQuestion
upvote count: 1
duplicate of: http://stackoverflow.com/q/4057440
downvote count: 1
type: Question
has title: Wrong array length
linked to: http://stackoverflow.com/q/4057440
tagged with: javascript
has comment: http://stackoverflow.com/comment/46558269
score: 0
has comment: http://stackoverflow.com/comment/46558397
tagged with: arrays
favorite count: 0

http://stackoverflow.com/comment/46583298
comment on: http://stackoverflow.com/q/29183605
score: 0
type: QuestionComment
type: Comment
has text: are you trying to set div next to each other ?

http://stackoverflow.com/q/29133380
duplicate of: http://stackoverflow.com/q/23667086
upvote count: 2
answer count: 2
has body: http://jsfiddle.net/75pxp9ms/5/ In the JSfiddle i have above, im asking it to change the text of the id "text" when the counter variable is under and over ten but it doesn't seem to be working, was wondering if anyone could help me out! It's probably a really easy fix but im fairly new to javascript so forgive me, ill get the hang of it thanks var counter = 0; var value = 1; var spin = document.getElementById("var"); var lol = document.getElementById("text"); setInterval(function () { counter += value; spin.innerHTML = counter; }, 1000); if (counter &gt; 10) { lol.innerHTML = "WOW YOU REALLY LOVE KEVIN XO" } edit: Sorry for duplicate post and thanks for the help guys!
favorite count: 0
has title: Javascript if statement not functioning
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/46492510
downvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29133399
accepted answer: http://stackoverflow.com/a/29133399
possible better answer: http://stackoverflow.com/a/29133398
type: Question
has answer: http://stackoverflow.com/a/29133398
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46492513

http://stackoverflow.com/q/29109647
answer count: 1
accepted answer: http://stackoverflow.com/a/29109979
type: AnsweredQuestion
has body: I've been a while thinkig on how to set de readOnly param to de jRate plugin after clicking on a star and i cant find the solution. This is the code I've been working on: $("#jRate").jRate({ startColor: 'yellow', endColor: 'red', width: 17, height: 17, backgroundColor: 'black', min: 0, max: 5, precision: 0, /* Show rating when mouse over*/ onChange: function (rating ) { $('#rating ').text(" " + rating ); readOnly: true; }, /*set a click's behavior*/ onSet: function (readOnly) { //$('#demo-onset-value').text("Selected Rating: " + rating); readOnly: true; alert(readOnly); // just only to view readOnly value } }); I've tried to set param directly as you see, I've tried TO set a global viriable like var read = false, and then on "onSet" function set read = true and return that value, so finally set readOnly: onSet(); Now way, I cant set readOnly variable after a click. Yes I can set only the variable readOnly: true, before onSet() function but this only make the stars disable. This plug-in is to make a visual "stars" rating like: * * * * * Regards !!!
type: Question
has title: How to set readOnly on a jRate plugin's param after make a click on a star
has answer: http://stackoverflow.com/a/29109979
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
score: 0

http://stackoverflow.com/q/29134039
has comment: http://stackoverflow.com/comment/46493641
tagged with: javascript
score: -7
has title: Not looping through for loop - javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/46493664
answer count: 2
has comment: http://stackoverflow.com/comment/46493723
has answer: http://stackoverflow.com/a/29134096
accepted answer: http://stackoverflow.com/a/29134096
favorite count: 0
downvote count: 9
possible better answer: http://stackoverflow.com/a/29134160
has comment: http://stackoverflow.com/comment/46493623
has answer: http://stackoverflow.com/a/29134160
has body: The for loops in the following code dont seem to get activated. var updateMobs = function(){ for (var b = 0; b &lt; mobsBlue; b++){ BM = mobsBlue[b] BM.x = BM.x - 1 doCollision(BM, redBase, BM) doCollision(BM, debugPlayer, BM) console.log("draw1") BM.Draw(ctx, false) } for (var r = 0; r &lt; mobsRed; r++){ RM = mobsRed[r] RM.x = RM.x + 1 doCollision(RM, blueBase, RM) doCollision(RM, debugPlayer, RM) console.log("draw2") RM.Draw(ctx, false) for (var bb = 0; bb &lt; mobsBlue; bb++){ BM = mobsBlue[bb] console.log("draw3") BM.Draw(ctx, false) RM.Draw(ctx, false) } } } also, feel free to comment any improvements i could do to my code to make this work better if you have any. I also understand i dont have semi colons on the end of my javascript so dont comment me on that I do not get any errors and mobsBlue and mobsRed are both arrays. Also, I am calling this function in a loop. I am sorry for insulting. It was uncalled for and i should of awnsered the question :|. Thanks for helping me out though My sincere apologies
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46493719
tagged with: loops
type: Question
tagged with: for-loop

http://stackoverflow.com/comment/46661257
comment on: http://stackoverflow.com/a/29224814
type: AnswerComment
score: 0
type: Comment
has text: Yes, but what then `.gm-style-iw` is changed to `.gm-st-iw` or similar? And how to distinct properly between multiple infowindows?

http://stackoverflow.com/comment/47070873
type: QuestionComment
has text: In FF Page Setup you need to check `Print Background (colors & images)`. Other browsers have similar option. And make sure to remove ` `
comment on: http://stackoverflow.com/q/29180904
score: 0
type: Comment

http://stackoverflow.com/a/29097939
type: Answer
answers question: http://stackoverflow.com/q/29097872
has body: They seem to be on the same level of the DOM tree, so you would use: $(this).next().click();
score: 0

http://stackoverflow.com/a/29172338
has comment: http://stackoverflow.com/comment/46564544
has comment: http://stackoverflow.com/comment/46564866
has comment: http://stackoverflow.com/comment/46564971
has comment: http://stackoverflow.com/comment/46564552
type: AcceptedAnswer
has body: You can convert the array of objects to the desired format like this: var dataFromPhp = [{p: '123456',latlng: '52.012312,-.4213123'},{p: '78910',latlng: '53.01,-.4123'}]; var dataForGoogle = dataFromPhp.map(function (obj) { return [obj.p].concat(obj.latlng.split(',')); }) document.write(dataForGoogle.join(' ** '));
has comment: http://stackoverflow.com/comment/46564212
has comment: http://stackoverflow.com/comment/46565531
has comment: http://stackoverflow.com/comment/46564926
score: 0
has comment: http://stackoverflow.com/comment/46563709
type: Answer
has comment: http://stackoverflow.com/comment/46564536
accepted answer of: http://stackoverflow.com/q/29171630
answers question: http://stackoverflow.com/q/29171630
has comment: http://stackoverflow.com/comment/46564166

http://stackoverflow.com/a/29098007
has comment: http://stackoverflow.com/comment/46426659
score: 9
downvote count: 0
upvote count: 9
has comment: http://stackoverflow.com/comment/69437646
answers question: http://stackoverflow.com/q/29097921
type: Answer
has comment: http://stackoverflow.com/comment/69329163
has comment: http://stackoverflow.com/comment/69328832
has body: works fine. If it works fine, then why bother? Your solution is totally acceptable. but I want to know is there is any other way to remove these kind of unnecessary characters. You could also use "↵select * from eici limit 10".split("↵").join("")
has comment: http://stackoverflow.com/comment/78608365

http://stackoverflow.com/comment/46441366
type: AnswerComment
type: Comment
has text: @Heidi You are trying to solve the wrong problem. The problem is that you are trying to handwrite 50 levels of nesting instead of writing elegant code. And to answer your question, no, since `element1` is a string in this example, every occurrence of `$(element1)` will create a new div.
comment on: http://stackoverflow.com/a/29105520
score: 0

http://stackoverflow.com/q/29204572
has body: I'm sorry first if this question is not appropriate to be asked here. Here is my problem : my page will contains 10 - 500 images (at most) with 1 button below each image while at first, all of the images wont be shown, and the user can click the button to show that images. I am using ajax to retrieve image_file_path from Database to get the right image for the right button. but sometimes , they just don't have any image related to that button, so I will display Default Images. My question is should I use cookies for this default images or is it handled already by user's browser or anything?
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29204646
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29204642
tagged with: php
possible better answer: http://stackoverflow.com/a/29204646
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29204642
tagged with: cookies
has title: Tag in HTML (Web) and Cookies in Server (PHP)
score: -1

http://stackoverflow.com/comment/46569503
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29175516
type: Comment
has text: How would you do then the selected value? If I use the the value from `customer.country` after I select a value the int changes to an object there may be a better way than the $watch and the change function

http://stackoverflow.com/q/29193504
type: Question
tagged with: javascript
has body: I'm trying to write an Angular directive which has a template containing two input fields (eventually this will be a Date and Time picker) and can't get $watch to fire on either of the input value changes. I have as a test: HTML &lt;tw-input-test label="Test" ng-model="myModel.value"&gt;&lt;/tw-input-test&gt; Angular app.directive("twInputTest", function(){ return{ restrict: 'E', require: 'ngModel', scope:{ label:'=' }, templateUrl:"templates/tw-input-test.html", link: function(scope,element,attrs){ scope.twone=42; scope.twtwo=27; scope.updateTest=function(){ scope.label= scope.twone.toString()+"-"+scope.twtwo.toString(); } scope.$watch(scope.twone,scope.updateTest, true); scope.$watch('scope.twtwo',scope.updateTest, true); } }; }); Template &lt;div class="form-item"&gt; &lt;span&gt;{{label}}&lt;/span&gt; &lt;input type='number' style="width:80px" ng-model="twone"&gt; &lt;input type='number' style="width:80px" ng-model="twtwo"&gt; &lt;/div&gt; I can see the values of scope.twone, scope.twtwo change when the input boxes are altered (using Chrome dev tools), but updateTest() is only called when the link function is initially called.
has comment: http://stackoverflow.com/comment/46600493
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46600450
has comment: http://stackoverflow.com/comment/46600557
answer count: 0
type: UnansweredQuestion
has title: Angular directive with two input elements: can't get $watch to work on ng-model value
tagged with: angularjs-directive
tagged with: angularjs-scope

http://stackoverflow.com/q/29180336
possible better answer: http://stackoverflow.com/a/29180451
has answer: http://stackoverflow.com/a/29181104
downvote count: 0
accepted answer: http://stackoverflow.com/a/29180387
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46577282
favorite count: 0
has title: some urls are not opening in iframe
type: Question
has body: so problem is simple but i unable to find the solution . I am creating a portfolio plugin and trying to open the projects in the iframe to show responsive layout but problem is some urls are not opening in iframe nothing is showing when i hit these urls in iframe . Here is the JS fiddle iframe2 I want to check with jquery if it is able to open in iframe then ok otherwise the link will open in new tab instead .
tagged with: iframe
upvote count: 1
has answer: http://stackoverflow.com/a/29180387
tagged with: javascript
has answer: http://stackoverflow.com/a/29180451
has comment: http://stackoverflow.com/comment/46577279
answer count: 3
type: AnsweredQuestion

http://stackoverflow.com/a/29156367
downvote count: 0
has comment: http://stackoverflow.com/comment/46533406
upvote count: 3
has comment: http://stackoverflow.com/comment/46533659
has comment: http://stackoverflow.com/comment/46533491
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29156240
has comment: http://stackoverflow.com/comment/46533474
accepted answer of: http://stackoverflow.com/q/29156240
type: Answer
has body: The prompt function return a string. So when you use the + operator on two string you are combining them together. Instead, parse the number strings to a number: var firstNumber = parseInt(prompt("Please enter the first number."), 10); var secondNumber = parseInt(prompt("Please enter the second number."), 10);
score: 3

http://stackoverflow.com/comment/46616500
type: Comment
has text: Now here is the issue,how do I set session variables dynamically? There is no use setting the statically as Session.set('row1'), session.set('row2') etc rather I want to set it dynamically as Session.set(myrowvariable) and retrieve it with session.get(myrowvariable) which Iam not able to do as session.set(myrowvariable) is not setting the session.
type: AnswerComment
comment on: http://stackoverflow.com/a/29201785
score: 0

http://stackoverflow.com/comment/46639190
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29214824
has text: Why not just store your values in one nested array?
score: 0

http://stackoverflow.com/q/29150973
tagged with: javascript
tagged with: hashids
has comment: http://stackoverflow.com/comment/46523788
score: 0
has comment: http://stackoverflow.com/comment/46548942
answer count: 1
tagged with: hash
type: UnansweredQuestion
tagged with: php
has body: Hello I'm trying to use the Hashids library (Website) in both of its versions, the PHP to generate server side hash and the JS to decode the given hash by the server. In both cases I'm using the same SALT. PHP example: $hashids = new Hashids\Hashids(SALT); echo $hashids-&gt;encode(9); //prints GX JS example: var hashids = new Hashids(SALT); return hashids.encode(9); //prints rE I know I'm not decoding the PHP version with the JS version as mentioned but, the idea is to illustrate that they both give different results using the same SALT and ID. Does anyone knows if its even possible to use hashids the way I'm doing it? Thanks for your help
has title: Hashids PHP and JS compatibility
type: Question
has answer: http://stackoverflow.com/a/29338380
has comment: http://stackoverflow.com/comment/46524681

variables
tag name: variables
tags question: http://stackoverflow.com/q/29132902
tags question: http://stackoverflow.com/q/29141239
tags question: http://stackoverflow.com/q/29198651
tags question: http://stackoverflow.com/q/29063291
tags question: http://stackoverflow.com/q/29110088
type: Tag
tags question: http://stackoverflow.com/q/29206609
tags question: http://stackoverflow.com/q/29112540
tags question: http://stackoverflow.com/q/29171616
tags question: http://stackoverflow.com/q/29169245
tags question: http://stackoverflow.com/q/29107121
tags question: http://stackoverflow.com/q/29210657
tags question: http://stackoverflow.com/q/29137862
tags question: http://stackoverflow.com/q/29087017
tags question: http://stackoverflow.com/q/29163097
tags question: http://stackoverflow.com/q/29141827

http://stackoverflow.com/comment/46547329
has text: i just pasted your code only my answer is to achieve in a single file instead of 2 php files
comment on: http://stackoverflow.com/a/29164051
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29122480
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46471705
score: 2
answers question: http://stackoverflow.com/q/29122275
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29122275
has body: Just update one line in your code onclose event of beginDatePicker use this line var minDate2 = new Date(selectedDate); minDate2.setDate(minDate2.getDate() + 1); $("#endDate").datepicker("option", "minDate", minDate2); instead of $("#endDate").datepicker("option", "minDate", selectedDate); fiddle

http://stackoverflow.com/comment/62865167
type: Comment
comment on: http://stackoverflow.com/a/30539642
has text: @adc do we really need style loader in this case? it could be just loader: ExtractTextPlugin.extract( "css!sass") }]
score: 0
type: AnswerComment

http://stackoverflow.com/q/29109848
tagged with: security
tagged with: rest
tagged with: basic-authentication
upvote count: 4
linked to: http://stackoverflow.com/q/28855554
has answer: http://stackoverflow.com/a/29117626
has answer: http://stackoverflow.com/a/29109923
has body: I have this application that consists of a REST back-end intended to servicing requests from an HTML5/JavaScript client (which I'm also building). I'm planning on implementing an authentication mechanism that uses Basic Authentication where the JavaScript client would store the Base64-encoded user's credentials for the duration of a session. These credentials would be sent with each REST request in the "Authorization: Basic" header. All the conversation between the JavaScript client and the REST backend would occur over HTTPS. I'm know that's a performance drawback in itself as it adds the overhead of encrypting/decrypting every single request/response, and that's ok for now. What I'm really interested in at this point is the security aspect of it. I know the schema I've described is nothing novel and a lot of people have used it in their implementations (at least that's my understanding). However, I'm interested in knowing if anyone has encountered any security breaches or drawbacks with that. The only thing I can think of would be if malicious code on the client side could somehow gain access to the stored credentials… I think thats is highly unlikely (but hackers are a creative bunch and some JS engines are buggy, so you never know :-)). Thoughts?
tagged with: authentication
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46449767
has comment: http://stackoverflow.com/comment/46495660
type: Question
has title: What are (if any) the security drawbacks of REST Basic Authentication with Javascript clients?
answer count: 3
has comment: http://stackoverflow.com/comment/46449683
possible better answer: http://stackoverflow.com/a/29109923
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29115192
accepted answer: http://stackoverflow.com/a/29115192

http://stackoverflow.com/comment/46486925
type: Comment
comment on: http://stackoverflow.com/q/29129930
type: QuestionComment
has text: @TroyThompson It took a bit, but I'm all done: http://jsfiddle.net/kg4dckL8/
score: 0

http://stackoverflow.com/comment/46500407
has text: You may want to mention you're using CoffeeScript (I think??) It took me a while to parse what was going on.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29138035
score: 0

http://stackoverflow.com/q/29138232
favorite count: 0
has answer: http://stackoverflow.com/a/29158725
tagged with: dst
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29179239
score: 1
tagged with: java
has body: I want to have a code which will work in below manner. display time of 8-10 cities in which the DST should be handled automatically. For example : Melbourne observes DST, a API using which I can fetch the current time based on location without any hardcode done for DST calculation. Currently the code which is working is based on hardcoded values.It picks the system time converts to GMT and then add/subtract offset based on location. Then calculate the DST based on dates and add appropriately. But I want to use some API to remove the hardcoded values, I m trying to use the below code. The below code giving time for IST/GMT, but when I put AEST/AEDT it doesnt give the correct time. public class DateFormatter { public static String formatDateToString(Date date, String format, String timeZone) { // null check if (date == null) return null; // create SimpleDateFormat object with input format SimpleDateFormat sdf = new SimpleDateFormat(format); // default system timezone if passed null or empty if (timeZone == null || "".equalsIgnoreCase(timeZone.trim())) { timeZone = Calendar.getInstance().getTimeZone().getID(); } // set timezone to SimpleDateFormat sdf.setTimeZone(TimeZone.getTimeZone(timeZone)); // return Date in required format with timezone as String return sdf.format(date); } public static void main(String[] args) { //Test formatDateToString method Date date = new Date(); System.out.println("Default Date:"+date.toString()); System.out.println("System Date: "+formatDateToString(date, "dd MMM yyyy hh:mm:ss a", null)); System.out.println("System Date in PST: "+formatDateToString(date, "dd MMM yyyy hh:mm:ss a", "PST")); System.out.println("System Date in IST: "+formatDateToString(date, "dd MMM yyyy hh:mm:ss a", "IST")); System.out.println("System Date in GMT: "+formatDateToString(date, "dd MMM yyyy hh:mm:ss a", "GMT")); System.out.println("System Date in CT: "+formatDateToString(date, "dd MMM yyyy hh:mm:ss a", "BDT")); } }
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46506855
has comment: http://stackoverflow.com/comment/46502317
has title: Time with DST for any city in JS/Java
tagged with: clock
tagged with: javascript
tagged with: datetime-format
answer count: 2
has comment: http://stackoverflow.com/comment/46500887
has comment: http://stackoverflow.com/comment/46506964
downvote count: 0

http://stackoverflow.com/a/29111723
has comment: http://stackoverflow.com/comment/46452632
has comment: http://stackoverflow.com/comment/46456646
has comment: http://stackoverflow.com/comment/96062111
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/29111626
has body: What does r() do? The ordering is indeterminate because you're thenning on the same promise -> this specifically refers to the second and third chain. If you were doing the following, then order can be guaranteed: var p = Promise.resolve().then(function() { w(0); }).then(function() { w(1); }); // Key difference, continuing the promise chain "correctly". p = p.then(function() { w(2); return new Promise(function(r) { w(3); r(); }).then(function() { w(4); }); }).then(function() { w(5); }); p.then(function() { w(6); });
score: 4
has comment: http://stackoverflow.com/comment/120504339
has comment: http://stackoverflow.com/comment/46452614

http://stackoverflow.com/q/29174095
has title: angularjs ng-repeat determine what item is clicked
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29187054
favorite count: 0
has answer: http://stackoverflow.com/a/29187054
tagged with: angularjs
has body: Im loading objects into clickable boxes using ng-repeat. now i want to return the objects title when the user has clicked its item-box normally i would put it in a ng-model but since im using ng-repeat the model will be reused in every created box... i am searching for a way to check the selected objects title. and put it in a ng-model for re-use later on. code now: creation of object boxes in html: {{catagories.title}} {{catagories.description}} selected is: {{main.CreateProject.ProjectCatagorie}} contoller js file: // objects vm.catagories = [ { id: 1, title: 'Mobile and Desktop', description: 'Full concept design to complete App', image: '../img/Project/desktop_mobile.png' }, { id: 2, title: 'Desktop', description: 'Blogs, Webshops, complete full back-end Web-Apps', image: '../img/Project/desktop.png' }, { id: 3, title: 'Mobile', description: 'Mobile websites, Apps for Android and/or IOS', image: '../img/Project/mobile.png' } ]; //javascript to put the checked prop on the checked box: //works $(function(){ $('div.product-chooser').find('div.product-chooser-item').on('click', function(){ // remove selected class form all $(this).parent().parent().find('div.product-chooser-item').removeClass('selected'); // put checked $(this).addClass('selected'); $(this).find('input[type="radio"]').prop("checked", true); // get seleciton if ($('input[type=radio]:checked').length > 0) { // do something here alert($('input[type=radio]:checked').val()); } // set rest disabled $('div.product-chooser').not('.selected').addClass('disabled'); }); }); vm.CreateProject = function(){ // selected catagorie //fails ProjectCatagorie = $('input[type=radio]:checked').val(); // this model is in the function: CreateProject within the maincontroller. // function doesnt end here...
has answer: http://stackoverflow.com/a/29174221
tagged with: angularjs-ng-repeat
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: angular-ngmodel
accepted answer: http://stackoverflow.com/a/29174221
answer count: 2

http://stackoverflow.com/a/29113895
type: Answer
has body: why not just use two buttons to meet your needs. bind different functions to the two buttons; using css display:none/block to controll which button will show. then everything is ok
score: 0
answers question: http://stackoverflow.com/q/29113855

http://stackoverflow.com/q/29105163
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to get my ticks on my axis to have conditional formatting. For example, if their positive numbers I want them to be green and red if they are negative numbers. var bonus_penalties = [ -1,-13,-5,0,5,10,15]; var bpAxisScale = d3.scale.linear() .domain([0,6]) .range([bottom- 45, 45]); var bpAxis = d3.svg.axis() .scale(bpAxisScale) .orient('right') .tickFormat(function(d) { return bonus_penalties[d]}); var bp_axis = d3.select("#experienceView").append('svg:g') .attr("transform", "translate(160,0)") .attr('class', 'bp') .call(bpAxis) .style('fill', function(d) { if(bonus_penalties[d] &lt; 0){ return 'red'; } else { return 'green'; } });
favorite count: 0
has answer: http://stackoverflow.com/a/29259632
upvote count: 2
has comment: http://stackoverflow.com/comment/46652047
tagged with: d3.js
tagged with: css
has answer: http://stackoverflow.com/a/58352542
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46648650
possible better answer: http://stackoverflow.com/a/58352542
accepted answer: http://stackoverflow.com/a/29259632
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46440469
has title: D3.js axis tick conditional formatting

http://stackoverflow.com/q/29072992
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46380457
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46380188
has comment: http://stackoverflow.com/comment/46380397
type: Question
has comment: http://stackoverflow.com/comment/46380181
tagged with: javascript
has comment: http://stackoverflow.com/comment/46380432
has comment: http://stackoverflow.com/comment/46380372
has comment: http://stackoverflow.com/comment/46380251
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/29073523
has body: Hello angular experts! I used this custom directive for a table (implementation) but when I try to use $http service load that json array from a file, json is not loaded into $scope.items, I am a beginner in angular and on fairly advance javascript thus I need some help from you. controller initialization fessmodule.controller('ptiListController', function($http, $scope, $filter) { $http service call $http.get('data/ptis/ptis.json').then(function(response) { $scope.items = response.data; } ); browser console error TypeError: Cannot read property 'length' of undefined at Scope.$scope.groupToPages (http://localhost:8000/app/modules/app/phone/scripts/pti-list-controller.js:75:49) at Scope.$scope.search (http://localhost:8000/app/modules/app/phone/scripts/pti-list-controller.js:68:16) at new &lt;anonymous&gt; (http://localhost:8000/app/modules/app/phone/scripts/pti-list-controller.js:117:12) at invoke (http://localhost:8000/app/lib/js/angular.js:4185:17) at Object.instantiate (http://localhost:8000/app/lib/js/angular.js:4193:27) at http://localhost:8000/app/lib/js/angular.js:8462:28 at link (http://localhost:8000/app/lib/js/angular-route.js:975:26) at invokeLinkFn (http://localhost:8000/app/lib/js/angular.js:8219:9) at nodeLinkFn (http://localhost:8000/app/lib/js/angular.js:7729:11) at compositeLinkFn (http://localhost:8000/app/lib/js/angular.js:7078:13) &lt;div ng-view="" class="ng-scope"&gt; so what I have changed from the fiddle is: instead of: $scope.items = [ {"id":1,"name":"name 1","description":"description 1","field3":"field3 1","field4":"field4 1","field5 ":"field5 1"}, {"id":2,"name":"name 2","description":"description 1","field3":"field3 2","field4":"field4 2","field5 ":"field5 2"}, {"id":3,"name":"name 3","description":"description 1","field3":"field3 3","field4":"field4 3","field5 ":"field5 3"} ]; i have changed to this: $http.get('data/ptis/ptis.json').then(function(response) { $scope.items = response.data; } ); and also, I have tried using the service cal…
has answer: http://stackoverflow.com/a/29073523
favorite count: 0
has title: Angular $http service does not load json file
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46380206
has comment: http://stackoverflow.com/comment/46380723
has answer: http://stackoverflow.com/a/29073290
has comment: http://stackoverflow.com/comment/46380599
accepted answer: http://stackoverflow.com/a/29073290

http://stackoverflow.com/comment/46361915
type: Comment
type: QuestionComment
score: 2
has text: The above api does not give `tags`. I'm not sure where you got the json data from but the current api does not give tags anymore
comment on: http://stackoverflow.com/q/29062821

http://stackoverflow.com/q/29201051
has comment: http://stackoverflow.com/comment/46614210
has body: I need someone to look at this code. I am a beginner at javascript and I can't find the error(s) in this code I made. var user = prompt ("Are you a goblin, knight, troll, human, or wizard?").toLowerCase() var name = prompt("What is your name?").toLowerCase() var gender = prompt("Are you male or female?").toLowerCase() switch(user) { case 'goblin': console.log("Hello, you are going to have a fun journey as a goblin"); var meetAnt = prompt ("You run into a giant ant eater, you can attack or run. Do you choose to attack?").toLowerCase() if(meetAnt = yes) { console.log ("you stab him in the eye, but then he hits you with his trunk. You are injured"); var finishAnt = prompt("you can either risk your life and finish him, or try to run away. Do you finish him?").toLowerCase() if(finishAnt = yes) { return true; console.log("congratulations you have killed the aint eater!") } else if(finishAnt = no) { return false; console.log("You run away and barley make it, you are badly hurt"); else { console.log("sorry thats not an option") } } } else { return true; console.log("You run past the ant eater and get to saftey. You are very lucky") } break; case 'knight': console.log("Hello, you are going to have a fun journey as a knight"); var dayFight = prompt("You are versing the goblins in a fight, you need to choose how many days you go to fight(1-100). Remember if you choose too little days then you won't have stayed long enough to win the fight but if you stay to long you have more of a chance of dying or getting injured").toLowerCase() if(dayFight &lt; 40) { return false; console.log("You did not fight enough days, which has resulted in your kingdome loosing the war to the goblins."); } else if(dayFight &gt; 60) { return false; console.log("You have went to war to long and been seriously injured."); } else if(40&lt;=dayFight=&gt;60) { return true; console.log("You have been at war for the right amount of time. You have came out of the war with no injuries and you also have defieted…
has title: I need someone to look over some javascript code for me because I'm getting an error that says syntax error
upvote count: 0
has comment: http://stackoverflow.com/comment/46614472
type: UnansweredQuestion
tagged with: switch-statement
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46614232
has answer: http://stackoverflow.com/a/29201410
answer count: 1
downvote count: 1
favorite count: 0

http://stackoverflow.com/q/29126856
downvote count: 1
type: Question
tagged with: javascript
has body: I wanna improve myself in angularjs and with following scripts I only receive the categories, but the products aren't displayed. I didn't receive any kind of error, so I'm not able to follow the script to its mistake. HTML: {{cat.cateName}} Name Beschreibung Preis {{cat.cateName}} Name Preis {{cat.cateName}} Name Beschreibung Preis {{product.nr}} {{product.name}} {{product.description}} {{product.price}} {{product.price1}} Json (data/products.json): [ { "nr": "75", "name": "Hollandaisesauce", "description": "", "price": 0.60, "category": 10 } { "nr": "76", "name": "Pizza Magherita", "description": "Tomatensauce und Goudakaese", "price": 3.00, "price1": 4.00, "category": 11 } ] Json (data/categories): [ { "category": "11", "cateName": "Pizza" }, { "category": "12", "cateName": "Pizzabrötchen" } ] JavaScript (js/app.js): angular.module("orderSystem",[]) .controller('ProductsCtrl', function($scope, $http){ $http.get('data/products.json').then(function(productsResponse) { $scope.products = productsResponse.data; }); }) .controller('CategoriesCtrl', function($scope, $http){ $http.get('data/categories.json').then(function(categoriesResponse) { $scope.categories = categoriesResponse.data; }); }); After hours I didn't recognize my mistake(s) in my files. I'm thankful for each answer :)
has comment: http://stackoverflow.com/comment/46480772
has answer: http://stackoverflow.com/a/29128698
has comment: http://stackoverflow.com/comment/46479774
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29128698
favorite count: 0
tagged with: angularjs
has title: No output for angularjs- script
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
upvote count: 1

http://stackoverflow.com/comment/46469184
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29120382
has text: No you can't. But why do you need the callback itself rather than just ```res.write()``` and ```res.end()``` ?

http://stackoverflow.com/q/29184341
tagged with: meteor
has comment: http://stackoverflow.com/comment/46585213
has body: I am trying to use chartist.js with my meteor application. I placed the code for it in Template.reportPage.onRendered() so that it generate a bar chart after the template DOM have been inserted. I tried putting an alert in and see that it's never called. I also have a helper define in Template.reportPage.helpers and it runs fine. I'm getting the error: [Error] TypeError: undefined is not a function (evaluating 'Template.reportPage.onRendered') (anonymous function) Here is my code: Template.reportPage.onRendered(function(){ var data = {}; var orders = Orders.find({ created_at: { //query for month 3 $gt: new Date(2015, 2, 0), $lte: new Date(2015, 3, 0) } }, {sort: {created_at: 1}} ).fetch(); //ascending data.series = [[]]; var noOfDays = new Date(2015,3,0).getDate() data.labels = _(noOfDays).times( function(n) { data.series[0][n] = 0; return n+1; }); orders.forEach(function(order, index, array){ var date = order.created_at.getDate(); data.series[0][date-1]++; }); console.log(data); alert('comon'); new Chartist.Bar('#orderVsTime', data); //put chart in element with #orderVsTime });
has comment: http://stackoverflow.com/comment/46585227
has answer: http://stackoverflow.com/a/29184560
accepted answer: http://stackoverflow.com/a/29184560
type: AnsweredQuestion
has title: Meteor Template onRendered callback not called
has comment: http://stackoverflow.com/comment/46585040
type: Question
tagged with: chartist.js
tagged with: javascript
tagged with: meteor-blaze
has comment: http://stackoverflow.com/comment/46584815
has comment: http://stackoverflow.com/comment/46585532
score: 0
has comment: http://stackoverflow.com/comment/46585373
answer count: 1

http://stackoverflow.com/a/29201334
has comment: http://stackoverflow.com/comment/46614970
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46615186
has body: You can use the following syntax: ng-model="page[page.name+'_access']" But as a matter of fact, it looks one can move those groups into controller as well, then use another ng-repeat. Like this: HTML: {{ page.title }} Log JS: var module = angular.module('myAp', []) .controller('PageCtrl', ['$scope', function ($scope) { $scope.pages = [{ name: 'users', title: "Users" }, { name: 'roles', title: 'Roles' }]; $scope.rights = ['access', 'show', 'edit', 'delete']; $scope.log = function (page) { console.log(page); } }]).filter('capitalize', function() { return function (value) { return value.charAt(0).toUpperCase() + value.slice(1); }; }); Demo.
upvote count: 7
type: Answer
answers question: http://stackoverflow.com/q/29201237
has comment: http://stackoverflow.com/comment/55744440
accepted answer of: http://stackoverflow.com/q/29201237
downvote count: 0
has comment: http://stackoverflow.com/comment/46614948
score: 7

http://stackoverflow.com/comment/46426846
score: 0
has text: What's the problem in particular?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29097925

http://stackoverflow.com/q/29163901
score: 1
type: Question
has body: I know that there are so many to find on the internet, however, I have been trying this for hours now, and still not working, Maybe the community could help me out:) http://jsfiddle.net/dkk2nqyg/14/ I've got a little explanation in the jsfiddle, else, you can take a look in my previous question, JavaScript array splice Basicly, I want the values from selected ( 3 picked up cards ) in php, because I want to mail those values;) $.ajax({ url: 'data.php', //I actually want it to be on same page, trying this for debugging type: 'post', data: {data : selected}, success: function(data) { alert("worked"); } }); in the data.php : &lt;?php $data = json_decode(stripslashes($_POST['data'])); foreach($data as $d){ echo $d; } ?&gt; I would like that I don't even need that data.php but just 1 page, so in the index.php, is that even possible? Edit: Please, link a JsFiddle, would really help!
tagged with: javascript
has comment: http://stackoverflow.com/comment/46553475
answer count: 3
upvote count: 1
has title: AJAX - Javascript array to php
accepted answer: http://stackoverflow.com/a/29163969
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29164051
has answer: http://stackoverflow.com/a/29164142
tagged with: php
has answer: http://stackoverflow.com/a/29163969
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29164051
linked to: http://stackoverflow.com/q/29072506
downvote count: 0

http://stackoverflow.com/a/29216622
answers question: http://stackoverflow.com/q/29216497
upvote count: 0
has body: You just need to create a new obj inside the first for loop. You're just editing the current obj defined outside the for loop. So each loops sets the id of the one obj to it's i value, then you're inserting a copy of that into the array, so on the next loop, each reference to the original object is changed. Inside the for loop, I just added 'var' so obj is a new one, not the same one that is in the parent scope: var obj.id = i; But you may want to reformat it a bit better than that.
score: -1
downvote count: 1
type: Answer

http://stackoverflow.com/comment/46625036
comment on: http://stackoverflow.com/q/29206583
has text: In the link which you have attached you have a thing called Github just explore it you will get some ideas. "https://github.com/trentrichardson/jQuery-Timepicker-Addon"
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46621644
type: Comment
comment on: http://stackoverflow.com/a/29205262
type: AnswerComment
has text: @Suffii: that is because you have not added the class `btn-edit` in next two edit buttons
score: 0

http://stackoverflow.com/comment/46543970
type: AnswerComment
has text: i think you got any console error, please verify it
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29162028

http://stackoverflow.com/a/29137008
has comment: http://stackoverflow.com/comment/46498821
type: Answer
answers question: http://stackoverflow.com/q/29136941
score: 0
has body: If you look in to the console, there should be a hyperlink on the right side of the error and if you click on that it will take you to the error point. I would prefer put the breakpoint on certain area of the code and debug the code. with f10, f11, f8 key to see where it breaks.

http://stackoverflow.com/comment/46503350
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29138955
has text: Thanks for this however I have to be able to generate on. As you can see on my code I have a button that generate codes this allows the user to generate as many as he want this is part of the function of the page. After this I plan to save the x and y of the div created and send it to a database.
score: 0

http://stackoverflow.com/a/29099211
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29098802
has comment: http://stackoverflow.com/comment/46429368
has comment: http://stackoverflow.com/comment/46467441
answers question: http://stackoverflow.com/q/29098802
has comment: http://stackoverflow.com/comment/46465890
type: AcceptedAnswer
downvote count: 0
has body: Instead of passing the $index of the relevant item to your displayFullPricing function you should just pass the object itself, e.g. ng-click="displayFullPricing(prices)" Presumably somewhere in // rest of code you're just selecting the relevant item based on its index anyway?
type: Answer

http://stackoverflow.com/a/29152696
has body: I did like this.. is there any better way to solve this? _.forEach(templates, function(n) { _.forEach(_.pluck(_.filter(n), 'settings'), function(obj) { console.log(obj); }); });
score: 0
has comment: http://stackoverflow.com/comment/46526889
answers question: http://stackoverflow.com/q/29152422
type: Answer
has comment: http://stackoverflow.com/comment/46526866
has comment: http://stackoverflow.com/comment/46526922

http://stackoverflow.com/q/29186098
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/29186270
upvote count: 3
has comment: http://stackoverflow.com/comment/46587547
has title: Knockout.js binding scope
has comment: http://stackoverflow.com/comment/46587990
answer count: 1
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29186270
tagged with: knockout.js
type: Question
has body: What is the best way to share a variable between the init and the update part of a bindinghandler? ko.bindingHandlers.someBinding = { init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { // declare something here }, update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { // use the variable here } } I know for sure that I don't want to pollute the view model itself. I could attach it to the element by jQuery.data() but that feels pretty ugly.

http://stackoverflow.com/a/29209077
has comment: http://stackoverflow.com/comment/46629112
has body: $("div#menu1").find("li").first().hasClass('selected') Try the above code.
has comment: http://stackoverflow.com/comment/46628901
score: 0
answers question: http://stackoverflow.com/q/29209021
type: Answer

http://stackoverflow.com/q/29083372
score: 0
has comment: http://stackoverflow.com/comment/46400479
linked to: http://stackoverflow.com/q/24599119
answer count: 1
has title: Getting Mongo to Connect to Express App
has comment: http://stackoverflow.com/comment/46401457
has answer: http://stackoverflow.com/a/29085301
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46400684
tagged with: node.js
has body: Yosemite Mongo user working through a MEAN book. I've been following the steps exactly, but the MongoDB isn't connecting as expected. I installed Mongo once before to mess around with importing data, but didn't get too far. Below is all the Mongo related code I have besides package.json: In app.js I have require('./app_server/models/db'); and in that folder I have: var mongoose = require( 'mongoose' ); var dbURI = 'mongodb://localhost/Loc8r'; mongoose.connect(dbURI); // CONNECTION EVENTS mongoose.connection.on('connected', function () { console.log('Mongoose connected to ' + dbURI); }); mongoose.connection.on('error',function (err) { console.log('Mongoose connection error: ' + err); }); mongoose.connection.on('disconnected', function () { console.log('Mongoose disconnected'); }); I am expecting to get Express server listening on port 3000 Mongoose connected to mongodb://localhost/Loc8r But instead get: Mongoose disconnected Mongoose connection error: Error: failed to connect to [localhost:27017] I've tried changing a line to var dbURI = 'mongodb://localhost:3000/Loc8r'; because that's what my computer is using, but then get this error: Mongoose disconnected Mongoose connection error: Error: connection closed Any help is much appreciated thanks.
has comment: http://stackoverflow.com/comment/46400239
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46401010
tagged with: mongoose
tagged with: javascript
has comment: http://stackoverflow.com/comment/46400300
tagged with: express

http://stackoverflow.com/comment/46475457
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29124403
has text: Yep, the filter expression can be a string, object or function. Read more at https://docs.angularjs.org/api/ng/filter/filter

http://stackoverflow.com/comment/46462775
comment on: http://stackoverflow.com/a/29105003
has text: Then you probably made a typo... any errors in the console?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46593066
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29188992
has text: Ah i just left the surrounding tags out, but I'm not sooo bad as to forget even that °v° i meant "why would it work if it returns that if it doesnt when it doesnt?" °v°
type: Comment

http://stackoverflow.com/comment/46507641
has text: I tried this and it works. I'm unable to fork the plunkr it currently
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29140487

http://stackoverflow.com/comment/46432372
has text: If you don't mind a little `this` abuse, you can do the split without the IIFE and without creating a variable. `var c = a.split(':').map(function(x, i) { return (+x) + (+this[i]); }, b.split(':')).join(':');`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29100793
score: 1

http://stackoverflow.com/a/29089411
answers question: http://stackoverflow.com/q/29089169
type: AcceptedAnswer
has body: Maybe I am not understanding your requirements, but can't you just test for this in your checkbox event routine and uncheck the checked radio button: $FBmngCH.click(function () { //toggle FB Management List $FBmngList.toggle(); if (!$FBmngList.attr('checked')) { $FBmngList.find('input:checked').attr('checked', false); } }); See this Fiddle.
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29089169

http://stackoverflow.com/a/29194445
upvote count: 1
downvote count: 0
has body: What I did was to store all my charts in an array when they are first created. I know that 'chart1' is a child of 'tab1', 'chart2' is a child of 'tab2' etc... (by design), so I can determine the index in the array using some regex. Once the index is known, we can refresh the chart object directly, accessed from the array by zero-based index. //Resize Event needs to be triggered when tab changes. $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) { var plotID, ev; try{ plotID = $(e.target).attr("href").replace(/[#A-Za-z$-]/g,"") d3.select("#chart"+ plotID +" svg").call(charts[(plotID-1)]) }catch(err){ //Fallback ev = document.createEvent('Event'); ev.initEvent('resize', true, true); window.dispatchEvent(ev); } }); Net result, redraw times much much faster when compared to triggering resize event.
type: Answer
answers question: http://stackoverflow.com/q/29191348
score: 1

http://stackoverflow.com/a/29150883
has body: Try using retryWhen: src.retryWhen(function (errors) { // retry for some errors, end the stream with an error for others return errors.do(function (e) { if (!canRetry(e)) { throw e; } }); });
upvote count: 10
accepted answer of: http://stackoverflow.com/q/29135235
downvote count: 0
answers question: http://stackoverflow.com/q/29135235
type: AcceptedAnswer
score: 10
type: Answer

http://stackoverflow.com/comment/46616206
type: Comment
has text: I don't know the code to get the HTML. Can you please tell me, Stephane? Thanks!
comment on: http://stackoverflow.com/a/29200762
score: 0
type: AnswerComment

http://stackoverflow.com/q/29076242
has answer: http://stackoverflow.com/a/29083407
has body: I want to get :hover css for multiple elements with js/jquery and I already have the working function but I get this eror: SecurityError: The operation is insecure. ruleList = sheetList[i].cssRules; Function: function getStyleBySelector(selector){ var sheetList = document.styleSheets; var ruleList; var i, j; for (i=sheetList.length-1; i &gt;= 0; i--){ ruleList = sheetList[i].cssRules; for (j=0; j&lt;ruleList.length; j++){ if (ruleList[j].type == CSSRule.STYLE_RULE &amp;&amp; ruleList[j].selectorText == selector){ return ruleList[j].style; } } } return null; } getStyleBySelector('#desc a:hover').background I know it's a CORS problem, because I import CSS from another domain + google fonts but I have this in my .htaccess Access-Control-Allow-Origin "*" This is more a firefox bug. Any help with this please?
type: Question
possible better answer: http://stackoverflow.com/a/29082604
has comment: http://stackoverflow.com/comment/46399311
has comment: http://stackoverflow.com/comment/46390306
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29082604
has title: How to get element:hover background with javascript and CORS
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: .htaccess
favorite count: 0
has comment: http://stackoverflow.com/comment/46390137
accepted answer: http://stackoverflow.com/a/29083407
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/29147853
score: 1
accepted answer: http://stackoverflow.com/a/29152455
tagged with: gruntjs
type: Question
tagged with: sass
has title: how to use grunt-autoprefixer and grunt-sass together?
answer count: 1
has comment: http://stackoverflow.com/comment/46519906
tagged with: javascript
favorite count: 0
tagged with: autoprefixer
has comment: http://stackoverflow.com/comment/46518423
has body: I'm new to grunt tooling and sass in general, it's been a great learning experience. :) I currently have grunt configured to concat/minimize my SCSS on build. I would like to use the grunt-autoprefixer plugin to add vendor prefixes, however I'm not entirely sure how to integrate it into my existing Gruntfile. In the code below I've started to implement it ( see the commented out "TODO" section), but if anyone could point me in the right direction to get it working it'd be much appreciated :) Here's my current Gruntfile.js: module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { options: { sourceMap: true }, dist: { options: { outputStyle: 'compressed' }, files: { 'css/foundation.css': 'scss/foundation.scss' } } }, copy: { scripts: { expand: true, cwd: 'bower_components/foundation/js/vendor/', src: '**', flatten: 'true', dest: 'js/vendor/' }, iconfonts: { expand: true, cwd: 'bower_components/fontawesome/', src: ['**', '!**/less/**', '!**/css/**', '!bower.json'], dest: 'assets/fontawesome/' }, }, // TODO: setup autoprefixer // autoprefixer: { // options: { // // Task-specific options go here. // browsers: ['last 2 versions', 'ie 8', 'ie 9'] // }, // your_target: { // // Target-specific file lists and/or options go here. // }, // }, 'string-replace': { fontawesome: { files: { 'assets/fontawesome/scss/_variables.scss': 'assets/fontawesome/scss/_variables.scss' }, options: { replacements: [ { pattern: '../fonts', replacement: '../assets/fontawesome/fonts' } ] } }, }, concat: { options: { separator: ';', }, dist: { src: [ // Foundation core 'bower_components/foundation/js/foundation/foundation.js', // Pick the componenets you need in your project 'bower_components/foundation/js/foundation/foundation.abide.js', 'bower_components/foundation/js/foundation/foundation.accordion.js', 'bower_components/foundation/js/foundation/foundation.alert.js', 'bower_components/foundation/js/foundation/foundation.clearing.js', 'bower_component…
has answer: http://stackoverflow.com/a/29152455
upvote count: 2
has comment: http://stackoverflow.com/comment/46546626
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46524293

http://stackoverflow.com/comment/46625082
comment on: http://stackoverflow.com/q/29202303
has text: Have a look at [Direction Waypoints](https://developers.google.com/maps/documentation/javascript/directions#Waypoints). You are limited to 8 waypoints per request though (23 with the API for Work customers).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29124976
upvote count: 1
downvote count: 1
has body: I think that false expression is not well converted to angular false. I can prove this by setting: &lt;div ng-if="!true"&gt; Which doesn't render text in current div. Anyway, it executes alert, i suppose it is executed before angular runs, that's why.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46476389
answers question: http://stackoverflow.com/q/29120637

http://stackoverflow.com/comment/46399379
has text: @Amanda all functions should get executed, if one or more aren't then it leads me to believe an exception is being thrown. Have you checked the console output?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29082912

http://stackoverflow.com/comment/46603040
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29194745
has text: @RobinHellemans F12 only works in windows. For chrome on mac, it's `command-option-I`, ditto for Firefox on mac
type: AnswerComment

http://stackoverflow.com/q/29196138
tagged with: javascript
has comment: http://stackoverflow.com/comment/46605113
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: events
duplicate of: http://stackoverflow.com/q/13914618
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46605476
has comment: http://stackoverflow.com/comment/46605057
tagged with: onclick
has title: Why can't I make "onclick" event handler in my javascript code?
tagged with: dom
linked to: http://stackoverflow.com/q/13914618
type: Question
has body: It works when I put the "onclick" handler as an attribute. Like But it doesn't work when I do it like ... Around here has "title","meta" and "css link", then ... ... Any thing here ... ... Any thing here ... And "myEvent.js" looks like var myDiv = document.getElementsByClassName("myDiv"); myDiv.onclick = function(){ window.location = "http://www.google.com/ }; Thank you!

http://stackoverflow.com/comment/46368584
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29066399
has text: Local storage? How about calling a server with ajax to read/set a field in a database? :) That's the worst I can think of...
type: Comment

http://stackoverflow.com/a/29076977
score: 1
type: Answer
has body: It says that they use Advance risk analysis engine.. what does that mean? They didn't publish how it exactly works. This would not make sense anyway because then it would be easier to make a bot bypass it.
upvote count: 1
answers question: http://stackoverflow.com/q/29076710
downvote count: 0

http://stackoverflow.com/a/29124497
accepted answer of: http://stackoverflow.com/q/29124038
type: AcceptedAnswer
score: 55
answers question: http://stackoverflow.com/q/29124038
type: Answer
upvote count: 56
has body: Essentially, no: you're performing a list lookup by value, not by index, so it will always be a linear traversal. An improvement would be to use find instead of filter: var result = map.find(function(obj){return obj.get('id') === 4;});
downvote count: 1

http://stackoverflow.com/a/31168523
type: Answer
upvote count: 1
has body: You need to set the window.prerenderReady variable. Thus, put this in your route controller: window.prerenderReady = false; ... and this in your controller's success callback function: window.prerenderReady = true;
answers question: http://stackoverflow.com/q/29080564
score: 1
downvote count: 0

http://stackoverflow.com/a/29194494
answers question: http://stackoverflow.com/q/29194404
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46602444
type: Answer
has body: It returns auto because the element is not visible after page load, see: $('.help-dialog').is(':visible') The help menu is initialized on click and that's when the left attribute is set. Click on it after page load and try again: $('.help-dialog').css('left')) To solve this, use: $('a.js-help-button').click(); var left=$('.help-dialog').css('left'); $('a.js-help-button').click(); alert(left);
score: 2
has comment: http://stackoverflow.com/comment/46602426
accepted answer of: http://stackoverflow.com/q/29194404

http://stackoverflow.com/q/29082596
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29082757
score: 1
type: Question
has body: I have a custom directive like this: myText.html: &lt;div&gt; &lt;label&gt;{{label}}&lt;/label&gt; &lt;input type="text" class="form-control" &gt; &lt;/div&gt; Javascript: app.directive("myText", function() { return { restrict: 'E', replace: true, templateUrl: "shared/form/myText.html", scope : { label : "@", } }; }); I just want to wrap an input and handle a label as an attribute. In my view i use the directive this way: &lt;my-text label="Name" ng-model="person.firstname"&gt;&lt;/my-text&gt; The problem is that ng-model is not binding the model to my input. What is the correct way to achieve this result? Thanks
tagged with: angular-ngmodel
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29082757
answer count: 1
downvote count: 0
has title: AngularJS - Inherit ngModel in custom directive
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/29124859
upvote count: 1
answers question: http://stackoverflow.com/q/29124455
type: Answer
has body: It looks like you had the right code in your Javascript for passing in the parameter, but your XSLT has to also be written to accept the parameter: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;!-- Declare it here --&gt; &lt;xsl:param name="cityName" /&gt; &lt;xsl:template match="/"&gt; &lt;!-- use it here ------v --&gt; &lt;xsl:for-each select="locations/location[cityname = $cityName]"&gt; ... &lt;/xsl:for-each&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt;
downvote count: 0
score: 1

http://stackoverflow.com/comment/46461785
has text: Yes, it's redundant in this case. You just call it directly `run()`.
score: 1
comment on: http://stackoverflow.com/a/29115994
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46446193
type: AnswerComment
comment on: http://stackoverflow.com/a/29107901
type: Comment
has text: i tried this sol but instead of bubble it shows filled with orange color. Do i have to reduce size of this img ?
score: 0

http://stackoverflow.com/q/29172515
has answer: http://stackoverflow.com/a/29657340
has comment: http://stackoverflow.com/comment/46599125
has title: Constructing a DOMTokenList/DOMSettableTokenList instance
has comment: http://stackoverflow.com/comment/47451498
tagged with: dom
has answer: http://stackoverflow.com/a/29656169
type: Question
linked to: http://stackoverflow.com/q/4561845
linked to: http://stackoverflow.com/q/10383888
tagged with: javascript
has body: The DOMTokenList and DOMSettableTokenList interfaces (MDN, WHATWG) provide methods for manipulating ordered sets of string tokens represented by space-delimited strings. They are most commonly used in the form of the Element.prototype.classList property, a DOMTokenList which reflects the class attribute of an associated element. var div = document.createElement('div'); div.setAttribute('class', 'hello world goodnight moon'); var list = div.classList; console.assert(list.length === 4); console.assert(list[0] === 'hello'); console.assert(list.item(1) === 'world'); console.assert(list.contains('moon') === true); console.assert(list.contains('mars') === false); list.remove('world', 'earth', 'dirt', 'sand'); list.add('hello', 'mars'); list.toggle('goodnight'); console.assert(div.getAttribute('class') === 'hello moon mars'); I'm working on a custom element (HTML5Rocks, W3C Draft) which displays a real-time feed of the activity of specified Stack Overflow users. This list of users is specified in an ids attribute, and may be updated at any time. &lt;so-users ids="1114 22656 106224"&gt;&lt;/so-users&gt; document.querySelector('so-users').setAttribute('ids', '23354 115866'); Instead of requiring users to manipulate this attribute directly, I would like to have an .ids property providing a DOMTokenList that they can use instead. Ideally this would be directly associated with the attribute, but an unbound DOMSettableTokenList instance that I have to manually bind would also be fine. document.querySelector('so-users').ids.add('17174'); Unfortunately, I have been unable to find any way to create a DOMTokenList instance. The definition is not a constructor, and directly creating an object using its prototype results in errors when I call any associated methods: new DOMTokenList; // TypeError: Illegal constructor new DOMSettableTokenList; // TypeError: Illegal constructor var list = Object.create(DOMSettableTokenList.prototype, { value: { value: 'hello world' } }); console.assert(…
score: 35
answer count: 3
upvote count: 35
downvote count: 0
has answer: http://stackoverflow.com/a/75146762
has comment: http://stackoverflow.com/comment/47428988
has comment: http://stackoverflow.com/comment/47467537
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47452372
has comment: http://stackoverflow.com/comment/47339892
has comment: http://stackoverflow.com/comment/47451425
has comment: http://stackoverflow.com/comment/47450966

http://stackoverflow.com/a/29108163
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29107653
has body: Check this JSFiddle to reference the filepath displayed. http://jsfiddle.net/67y9tpd4/ HTML Print Filepath JS function getAfilepath(){ var afilepath = document.getElementById("uploadFile").value; document.getElementById("write").innerHTML=afilepath; }
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46642244
type: AnswerComment
score: 0
type: Comment
has text: Bergi, I agree, you can't offer the "jQuery proviso" every time. But your diagrams make this answer very clear and compelling - it's likely to be read by many people.
comment on: http://stackoverflow.com/a/29210662

http://stackoverflow.com/q/29084718
has answer: http://stackoverflow.com/a/29086367
has comment: http://stackoverflow.com/comment/46403236
type: Question
has body: I'm trying to click in a search button after my app reads a barcode, but so far it's without success. My search button is $scope.buscar How do I do this after $('#txtCode').val(imageData.text); ? BarCode Ctrl .controller("BarCode", function( $scope, $cordovaBarcodeScanner){ $scope.scanBarcode = function(){ $cordovaBarcodeScanner.scan().then(function(imageData){ $('#txtCode').val(imageData.text); }, function(error){ console.log('Deu Merda'+error); }); } }) People &amp; Corpo Ctrl .controller('PeopleCtrl',function($scope, $http) { $scope.people = []; angular.element(document).ready(function() { var httpRequest = $http({ method: 'GET', url: 'json/clientes.json', }).success(function(data, status) { $scope.people = data; }); }); }) .controller('CtrlCorpo',function($scope, $http) { $scope.people = []; angular.element(document).ready(function() { var httpRequest = $http({ method: 'GET', url: 'json/clientes.json', }).success(function(data, status) { $scope.people = data; }); }); Search Button $scope.buscar = function (){ angular.forEach($scope.people, function(c, i) { var item = "&lt;td&gt;&lt;a href=cardapio.html?"+c.id+"&gt;"+ c.id + "&lt;/a&gt;&lt;/td&gt;" + "&lt;td&gt;"+ c.name +"&lt;/td&gt;" if(c.id == $('#txtCode').val()){ $('#tabelaPessoa').html(''), $('#tabelaPessoa').append(item); } } ); } }); I have to search in JSON all clients and Start my APP showing. When I click in my BarCodeScanner button, I'll read the ID and automatically I've to search and if exists. Automatically enter in the second page 'cardapio.html?clientid'. For now I'm trying to search after reading the barcode.
has title: How to click after my function read a barcode?
tagged with: angularjs
score: 0
has comment: http://stackoverflow.com/comment/46404276
upvote count: 1
accepted answer: http://stackoverflow.com/a/29086367
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46404973
has comment: http://stackoverflow.com/comment/46403118
tagged with: ionic-framework
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46403636
favorite count: 0

http://stackoverflow.com/a/70558932
answers question: http://stackoverflow.com/q/29192559
has body: It's not safe to assume everyone can handle animation. People will have different needs. A lot of common animations, and common web design practices, give me awful migraines, so I set my browser to 1 frame per second to kill the animation without causing too much fast flashing.
type: Answer
score: 0

http://stackoverflow.com/comment/46465988
has text: thank mate seems to work pls submit answer so i could vote up and select as correct
comment on: http://stackoverflow.com/q/29119012
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29141952
score: 6
upvote count: 6
has body: If you want to access the inner property you need to access it with object notation: {{ item.name }} Check this plunker.
has comment: http://stackoverflow.com/comment/46539098
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46536297
has comment: http://stackoverflow.com/comment/46539283
type: Answer
accepted answer of: http://stackoverflow.com/q/29140487
answers question: http://stackoverflow.com/q/29140487

http://stackoverflow.com/comment/48316890
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29117847
has text: you can select the content with .text(), given the right selector. and then set the title attribute of the input box with this value: .attr( "title", hintText ); see http://api.jquery.com/text/ and http://api.jquery.com/attr/#attr2
type: AnswerComment

http://stackoverflow.com/comment/46462848
type: Comment
comment on: http://stackoverflow.com/a/29117447
has text: +1 for the bit of explanation on what's going on (although basically its the same answer then the one of @Arun P Johny)
score: 0
type: AnswerComment

http://stackoverflow.com/q/29103502
has answer: http://stackoverflow.com/a/29664206
tagged with: google-analytics
score: 3
has title: googleTagManager using JQueryMobile
tagged with: google-tag-manager
tagged with: jquery-mobile
tagged with: javascript
has body: I was working with an application using jQueryMobile and using googleTagManager instead of simple code for GA. Reviewing tracking of the website I found more visits for each page called. I mean, every time I see a simple page, is tracking for 2 or 4 visits. Here is the code: var dataLayer = dataLayer || []; dataLayer.push({'b_gaCode': 'UA-32085XX-3'}); dataLayer.push({'gaCode': 'UA-32085XX-3'}); var googleTagManager = function(w,d,s,l,i){ w[l]=w[l]||[]; w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); var f=d.getElementsByTagName(s)[0], j=d.createElement(s), dl=l!='dataLayer'?'&amp;l='+l:''; j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f); } $(document).on("pageinit", function(event, ui) { googleTagManager(window,document,'script','dataLayer','GTM-MX6TXX'); }); Thanks!
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
upvote count: 3
type: Question

http://stackoverflow.com/q/29189215
has answer: http://stackoverflow.com/a/29189686
has body: Should the following code work to reset AND refresh a form after it has been submitted? I have a reset button on the form also that works fine if incorrect information is entered, however I would also like to reset and clear the form as well after the form has been submitted. I am still seeing the information on the form after the submit using this code. onsubmit="setTimeout(function () { window.location.reload(); }, 10)" Here is my current HTML: &lt;form action="celebrantdata.php" method="post" id="weddata"&gt; &lt;div class="c1"&gt; &lt;input name="Submit" type="submit" class="style2" value="Submit" onsubmit="setTimeout(function () { window.location.reload(); }, 10)" /&gt; &lt;input name="Reset" type="reset" class="style2" value="Reset" onclick="clearform();"/&gt; &lt;/div&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/46593058
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46593085
tagged with: javascript
has title: Will the following code reset and refresh a form after a submit?
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46593267
has comment: http://stackoverflow.com/comment/46593378
has comment: http://stackoverflow.com/comment/46593425
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29189861

http://stackoverflow.com/comment/47286691
type: QuestionComment
has text: I must say, I am using IE 11 on Windows 7 and it's working perfectly fine.
type: Comment
comment on: http://stackoverflow.com/q/29149174
score: 0

http://stackoverflow.com/a/29167495
answers question: http://stackoverflow.com/q/29167451
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/29167451
has body: First, you need valid JSON. Your example isn't valid, it needs a key for the array, e.g.: { "array": [ {"plan": "basic", "plan_id": "sub33"}, {"plan": "advanced", "plan_id": "sub44"} ] } Or, if you just want an array and not an object wrapper around it: [ {"plan": "basic", "plan_id": "sub33"}, {"plan": "advanced", "plan_id": "sub44"} ] How can I create a JSON object from the above? You don't, you already have a "JSON object" (text that defines an object). JSON is a textual notation for data exchange; when you turn it into objects in memory, it's not text anymore, so it's not JSON anymore. (Just like a DOM element isn't an HTML string, even though it may have been created from an HTML string.) To turn it into a JavaScript object, you use JSON.parse (jQuery.parseJSON is fine too, and useful for really old browsers, but all modern browsers have JSON.parse now): var obj = JSON.parse(yourString); Example: var yourString = '{' + '"array": ' + ' [' + ' {"plan": "basic", "plan_id": "sub33"},' + ' {"plan": "advanced", "plan_id": "sub44"}' + ' ]' + '}'; var obj = JSON.parse(yourString); snippet.log(obj.array[0].plan); // "basic" &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; Or if you just want the array: Example: var yourString = '[' + ' {"plan": "basic", "plan_id": "sub33"},' + ' {"plan": "advanced", "plan_id": "sub44"}' + ']'; var array = JSON.parse(yourString); snippet.log(array[0].plan); // "basic" &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/46545469
comment on: http://stackoverflow.com/q/29163067
has text: Can u explain - what exactly u want at finish, mb it can be solved by ajax?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29075444
answers question: http://stackoverflow.com/q/29075286
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Use setInterval function for initiating a click on every 5 seconds var i=1; setInterval(function(){ jQuery(".facts-button"+i).click(); i++; if(i==7) i=1; }, 5000);
has comment: http://stackoverflow.com/comment/46385179
upvote count: 1
has comment: http://stackoverflow.com/comment/46385551
accepted answer of: http://stackoverflow.com/q/29075286
score: 1

http://stackoverflow.com/q/29136243
has comment: http://stackoverflow.com/comment/46537826
has title: When does Web Worker postMessage({}) return to caller
type: Question
tagged with: javascript
tagged with: web-worker
has answer: http://stackoverflow.com/a/32434963
has comment: http://stackoverflow.com/comment/46534041
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a recollection of reading that a postMessage request will not return until the onmessage event has been delivered to the recipient. Having said that, I can't seem to find any reference on the web at the mo and docs such as: - https://html.spec.whatwg.org/multipage/workers.html talk of message "queues" which make me think that messages can be stacked/queued up for processing. Does someone here have a reference pointer for the prescribed behaviour? Can a web-page and worker get into a deadlock by simply trying to send messages to each other at the same time?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46553850
score: 0

http://stackoverflow.com/q/29136295
has answer: http://stackoverflow.com/a/29157966
has body: I have a JavaScript image uploader which will upload an image and give me the image src. I need to save this value in my FireBase DB for the current user being created. I tried outputting the img.src to a hidden input but that didn't seem to work. Like so: $('.userImageValue').val(img.src); &lt;input class="userImageValue" ng-model="data.userImage" style="display: none;"&gt; I just figured out if I change the value once it is added to the invisible input it works. So how can I best make the input "register" after the src value is inserted? Here is the controller where a new user is created. $scope.list = $firebaseArray(new Firebase("https://my-db.firebaseio.com/users")); // Create user button $scope.add_new_user = function() { console.log($scope.data); $scope.list.$add($scope.data); $scope.data = {}; } This is an input on the page which currently works with the above code and saves a new field for the current user being created. &lt;input id="firstname" type="text" ng-model="data.firstname" class="form-control" placeholder="First name"&gt; This is the part I am stuck on I need to save the value of img.src from the code below as a new field in the FireBase DB for the user currently being created. var userImageUploader = document.getElementById('userImageUploader'); userImageUploader.addEventListener('change', function(e) { var file = userImageUploader.files[0]; var imageType = /image.*/; if (file.type.match(imageType)) { var reader = new FileReader(); reader.onload = function(e) { var img = new Image(); img.src = reader.result; } reader.readAsDataURL(file); } }); I hope that makes sense and thank you in advanced!
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46600363
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46600151
tagged with: angularjs
type: UnansweredQuestion
tagged with: firebase
has title: AngularJS + Firebase Upload profile image
linked to: http://stackoverflow.com/q/29143088
type: Question

http://stackoverflow.com/q/29216977
score: 0
accepted answer: http://stackoverflow.com/a/29217196
has comment: http://stackoverflow.com/comment/46643127
tagged with: loops
has comment: http://stackoverflow.com/comment/46643412
type: Question
has comment: http://stackoverflow.com/comment/46643193
has comment: http://stackoverflow.com/comment/46643182
answer count: 2
tagged with: for-loop
tagged with: arrays
possible better answer: http://stackoverflow.com/a/29217732
has comment: http://stackoverflow.com/comment/46643321
tagged with: javascript
has answer: http://stackoverflow.com/a/29217732
has title: Loop through arrays using arr[i]!==undefined
has body: I know the classic way of looping through an array arr is: for(var i=0 ; i&lt;arr.length ; i++) { // code } But someone recently showed me a different way of implementing the condition inside that loop, like this: for(var i=0 ; arr[i] !== undefined ; i++) { I think this solution is interesting because this is exactly what you need when you loop through an array: you don't want to get undefineds when you try to access an undefined index. I realize that if you count the characters it looks longer, and also that you might have some problems with arrays like this: ["Hello", , "World"], but apart from that - is there anything else I'm missing here? Why shouldn't we be using this technique instead?
linked to: http://stackoverflow.com/q/20680223
has answer: http://stackoverflow.com/a/29217196
tagged with: foreach
has comment: http://stackoverflow.com/comment/46643189
type: AnsweredQuestion

http://stackoverflow.com/a/29144177
has body: The problem is that you want to have both the default behavior as well as your custom behavior. Here's a simple solution you can try. &lt;form action="save.php" name="myform" method="POST" id="myform"&gt; &lt;input type="button" id="submit-btn" value="Submit" /&gt; In javascript, window.onload = function() { document.getElementById('submit-btn').onclick = function(event) { event.preventDefault(); refilter(); document.getElementById('myform').submit(); } } This will redirect the page to save.php anyway. If you don't want that, you can send a POST request via AJAX. Please find more about AJAX and post if you still face problems
downvote count: 0
answers question: http://stackoverflow.com/q/29143955
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29217432
tagged with: javascript
has body: I have an Angular / Firebase application that lets the user select a part from a list of parts. Each part has multiple fields and I want the user to be able to edit the fields for the part they pick. Everything should be 3-way bound to Firebase and all updates synced automatically. My Firebase data would look like this: { "partList": { "part1": { "field1": "value1", "field2": "value2", "field3": "value3" }, "part2": { "field1": "value1", "field2": "value2", "field3": "value3" }, "part3": { "field1": "value1", "field2": "value2", "field3": "value3" } } } Listing the parts is done with this ng-repeat: &lt;div ng-repeat="(key,value) in partList"&gt;{{key}}&lt;/div&gt; However, I'm not sure how to add form fields for the 3 fields on each part and have them correctly bind to the proper part when the user clicks on one in the list. I tried using $bindTo with a $scope variable to the correct Firebase child when a part was clicked, but calling $bindTo more than once on the same scope variable resulted in a weird state where multiple objects in Firebase seemed to be bound to each other and seemed not to work (e.g. the previous bind didn't stop when I did more binds). I can copy the object to a different $scope variable and then model that object to my input fields, but I lose 3-way binding when I do that and have to update Firebase manually. What is the correct way to do this?
has title: What's the correct Angular / Firebase way to edit one object at a time from a list of objects?
answer count: 1
has comment: http://stackoverflow.com/comment/46686188
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: firebase
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29220006
type: Question

http://stackoverflow.com/a/29176088
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46578228
downvote count: 0
answers question: http://stackoverflow.com/q/29171587
type: Answer
has body: You could put a computed observable for null checking and to keep it as clean as possible, like this: var ModuleViewModel = function(data) { var self = this; ko.mapping.fromJS(data, {}, self); //After mapping the object, add the computed observable here self.numberOfModules = ko.computed(function() { return this.Modules ? this.Modules().length : 0; }, self); }; Then in your binding: &lt;span data-bind="text: numberOfModules"&gt; This is specially handy if the computed is used in many different places in the HTML in order to avoid duplicating null checks everywhere.

http://stackoverflow.com/comment/46428090
has text: how will it know to call the function?
comment on: http://stackoverflow.com/q/29098289
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29196250
has comment: http://stackoverflow.com/comment/46606663
has comment: http://stackoverflow.com/comment/46608595
has answer: http://stackoverflow.com/a/31552755
type: Question
score: 0
tagged with: canvas
answer count: 1
has title: Javascript snake game not working
tagged with: javascript
has comment: http://stackoverflow.com/comment/46605335
tagged with: http://stackoverflow.com/tag/html
has body: What's wrong with my code here? My Snake is not working as in the book's code. The code is taken for the excellent book "JavaScript for Kids" by Nick Morgan. I downloaded the code from the book and it seems identical to mine, am I missing something? See JSFiddle here: http://jsfiddle.net/raenset/ehjyt08k/ Code: var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var width = canvas.width; var height = canvas.height; var blockSize = 10; var widthInBlocks = width / blockSize; var heightInBlocks = height / blockSize; var score = 0; var drawBorder = function () { ctx.fillStyle = "Gray"; ctx.fillRect (0, 0, width, blockSize); ctx.fillRect (0, height - blockSize, width, blockSize); ctx.fillRect (0, 0, blockSize, height); ctx.fillRect (width - blockSize, 0, blockSize, height); }; var drawScore = function () { ctx.font = "20px Courier"; ctx.fillStyle = "Black"; ctx.textAlign = "left"; ctx.textBaseline = "top"; ctx.fillText("Score: " + score, blockSize, blockSize); }; var gameOver = function () { clearInterval(intervalId); ctx.font = "60px Courier"; ctx.fillStyle = "Black"; ctx.textAlign = "center"; ctx.textBaseline = "middle"; ctx.fillText("Game Over", width / 2, height / 2); }; var circle = function (x, y, radius, fillCircle){ ctx.beginPath(); ctx.arc(x, y, radius, 0, Math.PI * 2, false); if (fillCircle){ ctx.fill(); } else { ctx.stroke(); } }; var Block = function (col, row) { this.col = col; this.row = row; }; Block.prototype.drawSquare = function (color) { var x = this.col * blockSize; var y = this.col * blockSize; ctx.fillStyle = color; ctx.fillRect(x, y, blockSize, blockSize); }; Block.prototype.drawCircle = function (color) { var centerX = this.col * blockSize + blockSize / 2; var centerY = this.row * blockSize + blockSize / 2; ctx.fillStyle = color; circle(centerX, centerY, blockSize / 2, true); }; Block.prototype.equal = function (otherBlock) { return this.col === otherBlock.col && this.row === otherBlock.row; }; var Snake = function()…
type: UnansweredQuestion

wamp
tag name: wamp
type: Tag
tags question: http://stackoverflow.com/q/29083855

http://stackoverflow.com/a/29151624
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29150892
type: AcceptedAnswer
has body: ** Solved by icecub ** The problem was that I was using same ID in divs, therefore, only first table would have been returned. I just needed to use different ID.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29150892
type: Answer

http://stackoverflow.com/q/29088730
has answer: http://stackoverflow.com/a/29088794
upvote count: 1
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/29088866
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29088866
has body: I am working for a client who needs their forms to show a value inside of their text box on a form, however with their system they are unable to do this due to how the module is coded. What would be the best way to do this as I am unable to edit the source code of the form creation module to allow for a value to be set automatically when a user creates the form. I know there are ways with JavaScript that this could be done, but most I have found require editing the input boxes or placing styles / attributes on the form itself which I do not have access to. I do however have pre-existing styles on these areas of code along with a wrapper around the form itself that could target specific areas inside it with styling or script.
has title: How would I auto Populate a Input Text Box VALUE to be the same as the NAME?
tagged with: css
possible better answer: http://stackoverflow.com/a/29088794
type: AnsweredQuestion

http://stackoverflow.com/q/29129432
score: -2
has comment: http://stackoverflow.com/comment/46484663
tagged with: arrays
tagged with: javascript
has title: What's the quickest way to get a defined section of an array? JS
has comment: http://stackoverflow.com/comment/46484762
has answer: http://stackoverflow.com/a/29129637
downvote count: 2
accepted answer: http://stackoverflow.com/a/29129637
possible better answer: http://stackoverflow.com/a/29129470
has answer: http://stackoverflow.com/a/29129470
favorite count: 0
upvote count: 0
has body: If I have an array var testArray= ["juice", "cow", "foo", "pig", "cat"] and a parameter string foo"-"cat How can I get the result foo, pig, cat
has comment: http://stackoverflow.com/comment/46484705
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46484835
type: Question
has comment: http://stackoverflow.com/comment/46484584
answer count: 2

http://stackoverflow.com/q/29151311
has comment: http://stackoverflow.com/comment/46524369
has comment: http://stackoverflow.com/comment/46524501
has comment: http://stackoverflow.com/comment/46524614
has body: I am defining a javascript prototype with a function that has a jquery selector in it. An over simplified version of my code can be found below: function MyObj(id1){ this.id1 = id1; } MyObj.prototype.MyFunc = function(id2){ $('#' + this.id1).val(id2) } var newObj = new MyObj("id1_val"); I cannot use this in MyFunc, because this is the context (as perseved by JQuery), Is there a way to access the value of id1? Is it even possible to have a prototype with a function that has jquery in it? I do need to maintain access to the context, because the code is part of a form submission and I have $(this).submit(); EDIT: I have a function bar(id2){ var newObj = new MyObj("id1_val"); Foo(id2, newObj.MyFunc) } bar is being called in fuction start() {bar}; window.onload = start;
downvote count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/46524468
upvote count: 4
duplicate of: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/46524474
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46524399
type: Question
score: 2
has title: javascript prototype with a jquery in a function

http://stackoverflow.com/q/29070267
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/29070312
has body: I am trying to pull 2 pieces of data from each of several fields. All the fields have been given the same "name" so as to allow them to be referenced easily. &lt;input type="text" name="common_name" data-X='ABC'&gt; The first piece of data I am pulling is their values, which does seem to be working. My issue is when I try to use attr(). It just stops dead in the water at that point. var length = $('[name=common_name]').size(); for(var i=0; i &lt; length; i++){ var value = parseInt($('[name=common_name]').get(i).value); //doesn't kill the script var dataX = $('[name=common_name]').get(i).attr('data-X'); //Script is killed here } Since I'm not having issues with using attr() in general when the selector is selecting the element based on an id, I would think the issue has to do with the fact that in this case multiple elements are being returned by jQuery. What I am confused by is that I thought that get(#) is supposed to grab a specific one…in which case I don't see what the problem would be. (After all, using get(#) DOES work when I use val()). So…why doesn't attr() work here?
has answer: http://stackoverflow.com/a/29070319
tagged with: javascript
has title: Using JQuery's .attr() When Selector Returns Multiple elements
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29071260
tagged with: attr
accepted answer: http://stackoverflow.com/a/29070319
type: Question
possible better answer: http://stackoverflow.com/a/29071260

http://stackoverflow.com/q/29138723
upvote count: 3
has title: How to remove the last new line in javascript?
downvote count: 0
has body: I tried to split the text by new lines then stored into array that the array return the length was 5. But my input file has four lines. How to remove the last new line. $.get('patrn', function (file) { var filedata = file; var seq = new Array; seq = filedata.split("\n"); var seqpass = new seqleng(seq); }, 'text'); function seqleng (b){ //Pdat = b.replace(/[\n]/gm,""); //But this is not working var Pdat = b; alert(Pdat.length); } My input file Like this PQEMTGKPLFIVE AAAG MTG KPLFIVE
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/29138823
type: Question
has answer: http://stackoverflow.com/a/29138823
answer count: 2
has answer: http://stackoverflow.com/a/29138772
accepted answer: http://stackoverflow.com/a/29138772
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/29074689
tags question: http://stackoverflow.com/q/29171802
tags question: http://stackoverflow.com/q/29135248
tags question: http://stackoverflow.com/q/29183135
tags question: http://stackoverflow.com/q/29129684
tags question: http://stackoverflow.com/q/29073766
tags question: http://stackoverflow.com/q/29194489

http://stackoverflow.com/comment/46503410
score: 0
type: Comment
type: QuestionComment
has text: I also tried the same with resourceURL. But as my data is changing dynamically so I need to update resourceURL param value. But when I am updating it than only partial data is going to my serveResource(-,-) method
comment on: http://stackoverflow.com/q/29139704

http://stackoverflow.com/comment/62337514
comment on: http://stackoverflow.com/q/29174810
has text: REF for getfullyear_method http://www.thesstech.com/javascript/date_getfullyear_method
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29202129
tagged with: javascript
has comment: http://stackoverflow.com/comment/46616229
score: 0
answer count: 1
tagged with: jquery-isotope
tagged with: jquery
has comment: http://stackoverflow.com/comment/46642107
has comment: http://stackoverflow.com/comment/46616475
has comment: http://stackoverflow.com/comment/46616439
has body: I am using Isotope to filter our portfolio section by category. Is it possible to create an URL that will link to directly to a filter? Currently the URL is http://new-had.herrmanneasyeditdemo.com/#filter for every category. I want to link directly to the law firm filter which is under the Industry drop down menu. Is this possible? Any help is greatly appreciated. http://new-had.herrmanneasyeditdemo.com/#work
has title: Is there a way to create a direct link to Isotope filter
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46616324
has comment: http://stackoverflow.com/comment/46616566
type: Question
has answer: http://stackoverflow.com/a/29202230
has comment: http://stackoverflow.com/comment/46642980

http://stackoverflow.com/q/29163638
has comment: http://stackoverflow.com/comment/46591474
has comment: http://stackoverflow.com/comment/49888225
has body: There's this userscript Twitter profile retweets hider (it hides retweets on Twitter profiles) Running it in greasemonkey (3.0 in FF36) causes (in Browser Console): TypeError: unsafeWindow.$ is not a function Twitter_pr:115:2 That's caused because of the changes to greasemonkey since v2.0, reflecting those to the Firefox (since v30) Add-on SDK: Greasemonkey Version 2.0 Released June 17, 2014 Backwards incompatible changes: - For stability, reliability, and security the privileged sandbox has been updated to match the new changes to unsafeWindow for the Add-on SDK. In order to write values to unsafeWindow you will need to use the new methods cloneInto(), exportFunction(), and/or createObjectIn(). ... The function which contains the unsafeWindow command is: window.setTimeout(function() { addMenuItem(); unsafeWindow.$(document).on("uiPageChanged", function() { addMenuItem(); }); }, 1); I've already reported it to it's developer in GitHub, and the reason why I ask for your help, is that he's said that he no longer uses this userscript, so, he's either open for a pull request, or else he'll deprecate it. I've tried a lot (with my limited javascript knowledge) to properly convert the forementioned function using either of cloneInto(), exportFunction(), and/or createObjectIn() (based on the instructions/examples on my 3rd link), but without any success. Edit: what I've tried so far based on Brock Adams comments: changed unsafeWindow.$(document)... to window.$(document)... It causes TypeError: window.$ is not a function in browser console changed unsafeWindow.$(document)... to jQuery(document)... It causes ReferenceError: jQuery is not defined
has comment: http://stackoverflow.com/comment/46591805
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46586160
favorite count: 0
has comment: http://stackoverflow.com/comment/46547552
has comment: http://stackoverflow.com/comment/46548552
has comment: http://stackoverflow.com/comment/46547823
has comment: http://stackoverflow.com/comment/46585270
has comment: http://stackoverflow.com/comment/46547745
answer count: 0
type: UnansweredQuestion
has title: How to change this function (of a userscript) so that it doesn't cause "unsafeWindow.$ is not a function" in browser console
upvote count: 1
has comment: http://stackoverflow.com/comment/46548922
type: Question
has comment: http://stackoverflow.com/comment/46549107
has comment: http://stackoverflow.com/comment/46548461
has comment: http://stackoverflow.com/comment/46591441
tagged with: greasemonkey
tagged with: javascript
has comment: http://stackoverflow.com/comment/46591788

http://stackoverflow.com/comment/46407270
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29085026
has text: I'm trying to make a calculator, to know the price of shipping things to panama. here is the code https://www.dropbox.com/s/vuceivpc0jl8y7y/valida.html?dl=0 if you type 1 and 1 on the price and lb the total should be 9.22 more or less but Im getting 6.

http://stackoverflow.com/q/29114678
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46457841
type: Question
has body: I have an array of objects that i am iterating over with an ng-repeat, and inside of that is an ng-click that sends the object from the array and sends it back to some random function in the backing controller like so: PLUNKERR: http://plnkr.co/edit/Chvx59rRhGFwX2ImHQva Profile Screen click edit in the top right, "X"'s show up next to the names. every time you click any "X" button, it clicks the first one and the one you actually click... its quick but you can see it if you watch it... sorry for the externals, i slimmed it down as best as i could... Thanks again..
has title: angular ng-click inside of ng-repeat always getting the same object
has comment: http://stackoverflow.com/comment/46574533
tagged with: ionic-framework
has answer: http://stackoverflow.com/a/29115337
score: 2
has answer: http://stackoverflow.com/a/29114836
downvote count: 0
has comment: http://stackoverflow.com/comment/46639526
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46457822
has answer: http://stackoverflow.com/a/36075784
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/46536871
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46458280

http://stackoverflow.com/comment/46558717
type: AnswerComment
comment on: http://stackoverflow.com/a/29148268
type: Comment
has text: result null i just test it :( `alert(myParam);` also another point i want to set this property like this for each param , `embed. = ;`
score: 0

http://stackoverflow.com/comment/46626223
type: QuestionComment
has text: Oh and yes, I presume you've already have a click function.
comment on: http://stackoverflow.com/q/29207787
score: 0
type: Comment

http://stackoverflow.com/q/29091830
has comment: http://stackoverflow.com/comment/46415790
has body: I am creating student report list with Angularjs ng-repeat. My issue if how i can dynamically appending numbering like ordered-list to the generated list in view. I want to achieve something like this # | Name of student | Student ID _________________________________ 1 | Samuel Addo | 346578 2 | GRace Asumani | 965433 3 | Zein Akill | 123455 4 | David Addoteye | 678543 The '#' column should be auto generate when rendering the model in view through ng-repeat. Honestly I don't know where to start cos i don't know how to do it. I will be glad if anyone can help me or point me to the right source. Thank you.
tagged with: angularjs
has answer: http://stackoverflow.com/a/29092056
type: AnsweredQuestion
type: Question
has title: Auto numbering of Angularjs ng-repeat list
tagged with: javascript
score: 15
possible better answer: http://stackoverflow.com/a/29092056
upvote count: 15
has answer: http://stackoverflow.com/a/29091846
accepted answer: http://stackoverflow.com/a/29091846
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46415691
favorite count: 0

http://stackoverflow.com/comment/97800723
comment on: http://stackoverflow.com/a/29191201
score: 0
has text: And if I don't use jQuery? `checkboxElement.dispatchEvent(new Event('change'));`, right?
type: Comment
type: AnswerComment

http://stackoverflow.com/a/33396840
has comment: http://stackoverflow.com/comment/60371327
score: 14
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29169739
has body: You should use the charset attribute to indicate which charset you are using. &lt;script src="../shared/jquery.js" type="text/javascript" charset="UTF-8"&gt;
upvote count: 14

http://stackoverflow.com/q/29210501
tagged with: javascript
has answer: http://stackoverflow.com/a/29210668
score: 0
has answer: http://stackoverflow.com/a/29210758
has answer: http://stackoverflow.com/a/29211303
tagged with: timer
has title: Clear timeout outside the launching scope?
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29210699
has body: I can't find a way to stop the interval timer outside of the calling function. What am I missing in the following code? Do I need to specifically declare a global variable called timer? var timer; // global timer? function updateStats(i) { i++; // increment alert("Im running! increment is " + i); checkCondition(i); timer = setInterval(function() { updateStats(i); }, 5000); } function checkCondition(i) { if(i == 2) { alert("condition met, resetting timer!"); clearInterval(timer); } } var i = 0; updateStats(i);
has answer: http://stackoverflow.com/a/29210660
type: Question
has comment: http://stackoverflow.com/comment/46630997

http://stackoverflow.com/q/29143898
has answer: http://stackoverflow.com/a/29144954
tagged with: knockout.js
type: Question
has title: Multiple text data-bind using knockout
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46512914
accepted answer: http://stackoverflow.com/a/29144954
has body: Hi i am trying to do a double data-bind on a option text. Now i want to include 2 things within the select drop-down. I have tried this and it only brings back the last data-bind of the description. is there a way to do 1 data-bind and include both values using knockout?
type: AnsweredQuestion

http://stackoverflow.com/comment/46421371
has text: are you using wordpress? if so you'd need to [inject the script into your page](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29094915
score: 0

http://stackoverflow.com/comment/46604883
comment on: http://stackoverflow.com/q/29195881
score: 0
type: Comment
type: QuestionComment
has text: @JosephCC thanks but I don't want to make a buble sort, i want to make combinaisons

http://stackoverflow.com/comment/46361607
score: 0
type: AnswerComment
type: Comment
has text: so remove the if and leave the $(this).css("background-color", "red") statement alone.
comment on: http://stackoverflow.com/a/29062735

http://stackoverflow.com/q/29134935
has comment: http://stackoverflow.com/comment/46497018
type: Question
has comment: http://stackoverflow.com/comment/46497109
has comment: http://stackoverflow.com/comment/46495988
tagged with: javascript
has body: So I want to determine if an element's font is sans-serif, serif, or monospace using JavaScript. This is for use in a Google Chrome Extension so it only has to work in Google Chrome. The extension will be used for substituting fonts for every element with the browser's default fonts. So for instance, if the default sans-serif font is Arial, and an element's font was detected as being sans-serif, the element's font would be changed to Arial. Also, since default fonts can be specified for multiple languages, would there be a way to determine the language of an element as well? EDIT: So what if I approached this by checking for if sans-serif, serif, or monospace was specified as a fallback font? It seems I would have to iterate over every element in the document to determine the font applied to it. What would be the most efficient way to do this? Or can I do this without iterating through every element? So here is what I came up with: /* main.js */ var elements=document.getElementsByTagName('*'); for(var i=0;i&lt;elements.length;++i){ var fontFamily=getComputedStyle(elements[i]).getPropertyValue('font-family'); if(~fontFamily.indexOf('monospace')){ fontFamily='monospace'; } else if(~fontFamily.indexOf('sans-serif')){ fontFamily='sans-serif'; } else if(~fontFamily.indexOf('serif')){ fontFamily='serif'; } else{ fontFamily=''; } elements[i].style.fontFamily=fontFamily; } And in the manifest.json: "content_scripts":[ { "matches":[ "&lt;all_urls&gt;" ], "js":[ "main.js" ], "run_at":"document_end" } ] So if I'm correct, this would set the font of all elements to be a generic font, which is then substituted automatically by the browser?
has comment: http://stackoverflow.com/comment/46495943
tagged with: google-chrome-extension
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46496962
has comment: http://stackoverflow.com/comment/46496889
favorite count: 0
has title: How can I get the style of a font?
has answer: http://stackoverflow.com/a/29135284
accepted answer: http://stackoverflow.com/a/29135284
score: 2
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/a/29117817
has comment: http://stackoverflow.com/comment/46463829
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29117764
accepted answer of: http://stackoverflow.com/q/29117764
type: Answer
has comment: http://stackoverflow.com/comment/46463509
has body: Just echo it out: &lt;?php session_start(); $_SESSION['test'] ="orange"; ?&gt; &lt;script&gt; var username = '&lt;?php echo $_SESSION["test"]; ?&gt;'; alert(username); &lt;/script&gt; BTW, you used ASP.NET inline expression tags. You can use &lt;?= ?&gt; for PHP if you have short tags enabled.
score: 0

http://stackoverflow.com/comment/46639940
type: QuestionComment
has text: Not necessarily. Any broad rules could be affecting it, especially anything table-centric. Can you reproduce the problem with a jsFiddle?
comment on: http://stackoverflow.com/q/29215071
score: 0
type: Comment

http://stackoverflow.com/comment/46367921
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29065923
type: Comment
has text: @HatemAhmed The anchor tags are dynamic and the onclick attribute is placed upon creating the element.

http://stackoverflow.com/q/29207396
downvote count: 1
has answer: http://stackoverflow.com/a/29207445
has answer: http://stackoverflow.com/a/29207486
type: Question
has comment: http://stackoverflow.com/comment/46625243
has comment: http://stackoverflow.com/comment/46625462
has comment: http://stackoverflow.com/comment/46625507
tagged with: javascript
has answer: http://stackoverflow.com/a/29207638
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46625412
answer count: 3
has body: I have passed a scope variable to a function where i am trying to change it even though the value is being accessible inside the function its values doesnt change. Here is my html Asset Type Here is the code in my controller $scope.dropdwns={assetshow:false}; $scope.drpdwn=function(dat){ if(dat==true) { dat=false; } else { dat=true; } console.log($scope.dropdwns); } I tried $apply but it gives me an error.Can someone help me thank you.
has comment: http://stackoverflow.com/comment/46625371
favorite count: 0
type: UnansweredQuestion
has title: $scope variable value is not changing in a function
upvote count: 1

http://stackoverflow.com/a/29171295
accepted answer of: http://stackoverflow.com/q/29170259
upvote count: 1
has body: Try: (?=(.*\d){2})(?=(.*[a-z]){2})(?=(.*[A-Z]){2})(?=.*[#?!@$%^&amp;-]).{9,} Tested here. The regex above matches only if all the 4 requeriments are respected. If you want at least 3, then there's the monster: ((?=(.*\d){2})(?=(.*[a-z]){2})(?=(.*[A-Z]){2})|(?=(.*\d){2})(?=(.*[a-z]){2})(?=.*[#?!@$%^&amp;-])|(?=(.*\d){2})(?=(.*[A-Z]){2})(?=.*[#?!@$%^&amp;-])|(?=(.*[a-z]){2})(?=(.*[A-Z]){2})(?=.*[#?!@$%^&amp;-])).{9,} Also tested here
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29170259
score: 1

http://stackoverflow.com/q/29134222
tagged with: javascript
has answer: http://stackoverflow.com/a/51271494
has title: Increment numbers at end of alphanumeric string in JavaScript
has answer: http://stackoverflow.com/a/29134225
has answer: http://stackoverflow.com/a/29135326
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/63585170
possible better answer: http://stackoverflow.com/a/29135326
has answer: http://stackoverflow.com/a/63585414
has comment: http://stackoverflow.com/comment/46499164
answer count: 5
accepted answer: http://stackoverflow.com/a/51271494
upvote count: 6
type: AnsweredQuestion
score: 6
has body: I have alphanumeric strings that will always end in a number, but which may have other numbers embedded early on. I need to increment the numeric ending and return new ID numbers. Example: A48-DBD7-398 Which will be incremented in a loop: A48-DBD7-398 A48-DBD7-399 A48-DBD7-400 How do I separate out the numeric tail from the rest of the string, and then save the two parts into different variables? I found several other S.O. questions that split numbers out of a string, but they cannot handle mixed alphanumeric characters in the first part -- or else they split out ALL the numbers, regardless where they are. I need to get only the trailing digits. Update I found a case where my solution does not work: ABC123-DE45-1 Duplicates as: ABC2 ABC3 ABC4 JS Fiddle demo
type: Question

http://stackoverflow.com/a/29178146
upvote count: 2
type: AcceptedAnswer
has body: There are a lot of different ways to do it, one is using remote forms, like this railscasts example or the detailed answer on this question. Another would be to call a controller from jQuery and render (similar to my code here): in javascript: $(document.body).on('click', '#user-list-body', function (e) { var url = '/get_user_list/ $.ajax({ url: url, datatype: 'html', type: 'GET', success: function(data){ $('#user_table tbody').append(data); } }); }); in controller (note: drastically simplified version): def get_user_list @users = User.all respond_to do |format| format.html { render :layout =&gt; false, :partial =&gt; 'users/users_list'} end end
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29177977
answers question: http://stackoverflow.com/q/29177977

http://stackoverflow.com/comment/46449246
comment on: http://stackoverflow.com/q/29109835
has text: Yup, should be working. I simplified it with a switch statement: http://jsfiddle.net/b659xmsc/
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29184566
has body: Try this On controller create scope. $scope.priceminrange = 1;
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29183718
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29183718
type: Answer

http://stackoverflow.com/q/29105596
linked to: http://stackoverflow.com/q/28815845
has comment: http://stackoverflow.com/comment/46441158
type: Question
tagged with: javascript
score: 0
has title: Why does document.createEvent("Event") intermittently error with "Object Expected" in IE 11?
has comment: http://stackoverflow.com/comment/46442477
has body: I am making some unit tests that create synthetic events. https://msdn.microsoft.com/en-us/library/ie/ff975304(v=vs.85).aspx indicates that I should just be able to do this: document.createEvent("Event"); When I run the unit tests, sometimes they succeed, and other time they fail on the createEvent call, with the error "Object expected." Running that code in the console also produces inconsistent results. I will reload the page, or open a new tab, and the function works, the next time I try, it fails with the error. I got tricked for a bit by the Windows 10 language in the link above, as happened to the guy in MouseEvent not working in Internet Explorer - don't let it happen to you. Any ideas why the same call is sometimes working and throwing errors at other times?
type: UnansweredQuestion
tagged with: internet-explorer
answer count: 0

http://stackoverflow.com/a/46173727
has comment: http://stackoverflow.com/comment/86791295
answers question: http://stackoverflow.com/q/29071620
downvote count: 0
score: 8
upvote count: 8
type: Answer
has body: AmCharts.makeChart("chartdiv", { "type": "pie", "radius": 100, "fontSize": 14 } ); Set the "radius" ...

http://stackoverflow.com/q/29149748
has comment: http://stackoverflow.com/comment/46521689
possible better answer: http://stackoverflow.com/a/29149877
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46521554
tagged with: jquery
has title: Avoiding repeat code in jQuery
has comment: http://stackoverflow.com/comment/46521851
answer count: 2
has answer: http://stackoverflow.com/a/29150129
has body: I currently have the following code. to get the #headerfader to resume running after the second function runs (hovering over and off again to reset the fading text) I've duplicated the code inside the function. Is there a more elegant way of handling this? //FADER TEXT $('#headerFader').carousel({ interval: 2500, pause: false }); //BACK HOME TEXT $('#headerText').hover( function(){ $(this).find("h1#masterHeader").animate({opacity:0}, 0, function(){ $(this).css("display", "none"); $('#headerText').find("h1#takemeback").css("display", "block"); $('#headerText').find("h1#takemeback").animate({opacity:1,}); }); }, function(){ $(this).find("h1#takemeback").animate({opacity:0}, 0, function(){ $(this).css("display", "none"); $('#headerText').find("h1#masterHeader").css("display", "block"); $('#headerText').find("h1#masterHeader").animate({opacity:1,}); //FADER TEXT $('#headerFader').carousel({ interval: 2500, pause: false }); }); } );
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29149877
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/29150129
has comment: http://stackoverflow.com/comment/46521593

http://stackoverflow.com/a/30458889
downvote count: 0
answers question: http://stackoverflow.com/q/29169739
upvote count: 2
has body: I had the same problem with jquery-1.5.1.min.js. Chrome kept evaluating it as Chinese (scripts worked fine in IE). I finally solved the problem by re-encoding the .js files using "convert to UTF-8" in Notepad++. Note, not UTF-8 without BOM, but UTF-8.
type: Answer
score: 2

http://stackoverflow.com/a/29192439
has body: use below code it will work. function ddd() { var monthNames = ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]; var ctdate = (new Date()).getMonth() + 1;// getting current month var str=new Date().getFullYear()+''; str= str.match(/\d{2}$/);//current year is 15(as this year is 2015) var strprev= str-1;//previous year is 14 var dynmonths = new Array(); dynmonths = monthNames.slice(ctdate).concat(monthNames.slice(0, ctdate)); //here the output comes for last 12 months starting from currentmonth-12 (i.e APR in this case) to current month (i.e MAR) //dynmonths = ["APR","MAY","JUN","JUL","AUG","SEP","AUG","SEP","OCT","NOV","DEC","JAN","FEB","MAR"]; //I am rotating dynmonths in a for loop to get full dates i.e between (01-APR-14 to 01-MAR-15) for (var i = 0, length = dynmonths.length; i &lt; length; i++) { if(dynmonths[i]=='JAN') { var str = parseInt(str)+parseInt(1); } var month = '01-' + dynmonths[i] + '-' + str; document.writeln(month); document.write("&lt;br /&gt;"); } } &lt;body onload="ddd()"&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/29192086
answers question: http://stackoverflow.com/q/29192086
upvote count: 1
downvote count: 1
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/46550924
type: Comment
comment on: http://stackoverflow.com/a/29165678
score: 0
type: AnswerComment
has text: Every row gets a unique ID from the database, called "IdUsers" I get the script to retrieve it now, same as I did in the delete function, but I can not get it to enable the text boxes.

http://stackoverflow.com/q/29173870
has body: I'm currently developing a website that that has a fixed banner div that is centered, and I'm using the jQuery below to ensure that it scrolls correctly even though it is a fixed positioned div. jQuery: $(window).scroll(function() { $('#top-content').css('left', -$(this).scrollLeft() + "px"); }); However, I have come across an issue within IE(version 9). The issue is that when the user scrolls the website (creating a minus left margin on the "top-content" div, to give the effect of scrolling) and then if they maximize the webpage, the left margin is still present causing the div to not be centered. I have attempted to remedy this with the jQuery below, but as of yet no luck $(window).resize(function() { if ($("#top-content").width() &lt; $(window).width()) { $('#top-content').css('left:0px'); } }); Any ideas?
has title: jQuery Div Scrolling Function: Issue in IE
type: Question
accepted answer: http://stackoverflow.com/a/29186587
tagged with: styling
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29186587
type: AnsweredQuestion

openlayers-3
type: Tag
tag name: openlayers-3
tags question: http://stackoverflow.com/q/29133612
tags question: http://stackoverflow.com/q/29117867

http://stackoverflow.com/comment/46547627
score: 0
type: AnswerComment
has text: You're exiting too early. Move the `exit` and `echo` lines into the `then` block.
type: Comment
comment on: http://stackoverflow.com/a/29136187

http://stackoverflow.com/q/29115278
upvote count: 9
type: Question
has comment: http://stackoverflow.com/comment/46459135
tagged with: geocode
downvote count: 0
has answer: http://stackoverflow.com/a/29134447
tagged with: javascript
tagged with: google-polyline
has body: I'd like to show and hide a tooltip when mouseover / mouseout on the polyline path, the issue is that my polyline path has a stroke width 2 only, so is not easy to hit that area in the mouseover event, that's definitely inconvenient to user experience. I'd like to know if there's a way to make that hit area wider using an arbitrary width, but invisible to the user? snippet of my code below path = new google.maps.Polyline(plotOptions); path.setMap(that.map); this.polyPathArray.push(path); google.maps.event.addListener(path, 'mouseover', (function(index) { return function(polyMouseevent) { $(".table&gt;tbody&gt;tr&gt;td").removeClass('highlight'); $(".table&gt;tbody&gt;tr").eq(index).find("td").addClass('highlight'); var latlngVal = ''; if(polyMouseevent) { latlngVal = polyMouseevent.latLng; } else { //calculate a random position on a polyline } that.infowindows[index].setPosition(latlngVal); that.infowindows[index].open(that.map); }; })(i)); Any help would be appreciated :)
answer count: 1
has title: How to increase mouseover “hit area” in polyline geomap
favorite count: 0
tagged with: geomap
accepted answer: http://stackoverflow.com/a/29134447
score: 9
type: AnsweredQuestion

http://stackoverflow.com/comment/46561951
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29171842
has text: possible duplicate of [Javascript change Div style](http://stackoverflow.com/questions/10071286/javascript-change-div-style)
score: 0

http://stackoverflow.com/comment/46596364
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29182710
score: 0
has text: Good answer and it indeed solved this problem,thanks a lot!

http://stackoverflow.com/a/29161738
upvote count: 3
type: AcceptedAnswer
type: Answer
has body: Try by assigning this to a variable: var XClass = function () { var that = this; this.dataMember = "hello world"; $("div").on("click", "button", function() { console.log(that.dataMember); }); } This way, that will refer to the current XClass object. Otherwise, inside a event handler callback, this refers to the object being clicked.
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29161723
answers question: http://stackoverflow.com/q/29161723

http://stackoverflow.com/comment/46531063
score: 1
has text: @Rorschach120, I'va added code example.
comment on: http://stackoverflow.com/q/29154925
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29151113
has comment: http://stackoverflow.com/comment/46526764
score: 1
answers question: http://stackoverflow.com/q/29150527
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your first example is a labeled statement: the expression "2" with the label "undefined_variable_here". Although JavaScript does not have a goto statement, there are still a few ways to jump to specific statements under certain circumstances. In order to do that, these statements need to have some kind of identifier attached, so that the machine knows where to go, and labels provide that identifier. Your second example is an object literal: an expression for a single object which has one property called "another_undefined_variable" with the value 3. In both cases, semicolon insertion implicitly ends the statement. So the first example is essentially equivalent to the statement: 2; This statement isn't very useful by itself, because it doesn't do anything, but it is legal JavaScript. The second example actually does a little bit of work, in that it has to create the object, but because it doesn't get put into a variable, there are no references left: you can't get at it, and the garbage collector will wipe it out at the next opportunity. Still not very useful, but still legal.
accepted answer of: http://stackoverflow.com/q/29150527

http://stackoverflow.com/a/29212676
has comment: http://stackoverflow.com/comment/46743604
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/46723926
type: Answer
answers question: http://stackoverflow.com/q/29212545
downvote count: 0
has comment: http://stackoverflow.com/comment/46634946
has body: Create a one controller and then place common methods inside that controller scope. So that you can use that scope anywhere else and get access to method inside controller. Controller app.controller('commonCtrl', function($scope) { $scope.alert = null; $scope.addAlert = function(message) { $scope.alert = { type: 'danger', msg: message }; }; $scope.clearAlerts = function() { $scope.alert = null; }; }); Thereafter use scope of this controller by inject it using $controller, and then inside curly brace you could assign common controller scope to the current scope of controller. Utilization of Common Controller app.controller('testCtrl', function($scope, $controller) { //inject comomon controller scope to current scope , //below line will add 'commonCtrl' scope to current scope $controller('commonCtrl', { $scope: $scope }); //common controller scope will be available from here }); Or more precise way would be using common sharable service, that exposed two method and alert data, you can use this service method by injecting service name inside your controller. Service app.service('commonService', function($scope) { this.alert = null; this.addAlert = function(message) { this.alert = { type: 'danger', msg: message }; }; this.clearAlerts = function() { this.alert = null; }; }); Utilization of service inside Controller app.controller('testCtrl', function($scope, commonService) { console.log(commonService.alert); commonService.addAlert("Something"); console.log("Updated Alert" + commonService.alert); }); Hope this has cleared your concept, Thanks.

http://stackoverflow.com/a/29085833
upvote count: 1
answers question: http://stackoverflow.com/q/29085636
downvote count: 0
has body: var container = $("#container"); $(":eq(0)", container).appendTo(container); My text 1 My text 2 My text 3
type: Answer
score: 1

http://stackoverflow.com/comment/46535385
type: Comment
has text: What I mean is lets say someone sends me an offer that giving me something I want it to accept. But if someone sends me an offer thats asking me to give them something want it to accept
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29157352

http://stackoverflow.com/a/39905494
downvote count: 1
upvote count: 4
answers question: http://stackoverflow.com/q/29079172
has body: I encountered the same problem in Chrome. You can try these approaches, the first one worked for me. setTimeout didn't work for me (had to edit this later). function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; w = window.open(); w.document.write(printContents); w.document.write('<scr' + 'ipt type="text/javascript">' + 'window.onload = function() { window.print(); window.close(); };' + '</sc' + 'ript>'); w.document.close(); // necessary for IE >= 10 w.focus(); // necessary for IE >= 10 return true; } setTimeout: Print me function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; w = window.open(); w.document.write(printContents); w.document.close(); // necessary for IE >= 10 w.focus(); // necessary for IE >= 10 setTimeout(function () { // necessary for Chrome w.print(); w.close(); }, 0); return true; }
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/111785884

http://stackoverflow.com/comment/46366503
has text: i created the code i used in jsfiddle im not familirar with that program so i just pasted it in but it doesnt owrk? You can see it here http://jsfiddle.net/r41fmj6n/
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29065371
type: AnswerComment

http://stackoverflow.com/q/29121830
downvote count: 0
favorite count: 0
tagged with: bootstrap-datepicker
type: Question
tagged with: twitter-bootstrap
tagged with: datepicker
has body: I have a button which sets the datepicker to tomorrow using the following code: $("#txtDateOfJourney").datepicker({ startDate: '+1d'}); But it's not working. Here's a demo in fiddle Any Ideas?
has answer: http://stackoverflow.com/a/29123675
accepted answer: http://stackoverflow.com/a/29123675
upvote count: 3
answer count: 1
has title: Bootstrap DatePicker - Setting the date to Tomorrow
tagged with: javascript
linked to: http://stackoverflow.com/q/3674539
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/29102788
has comment: http://stackoverflow.com/comment/46435677
has answer: http://stackoverflow.com/a/29103750
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46437928
type: Question
has title: Playing multiple looping sounds on a website
has comment: http://stackoverflow.com/comment/46435728
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29103750
has body: Is there a 'best way' to play sounds/music on a website? Should I use JS plugin? SWF app or a HTML element? Also I want it to support volume that can be controlled via HTML slider. If I want to play multiple sounds/music on top of each other do I have to have a 'player' for each one of them or can I have one player playing multiple sounds? Last time I needed to add sounds to my website was like 10 years ago so I have no idea what techniques people use nowadays.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/46630522
comment on: http://stackoverflow.com/q/29210048
type: QuestionComment
type: Comment
has text: Try using http://momentjs.com/ , does the issue still occur?
score: 0

http://stackoverflow.com/q/29162718
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46545110
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: angularjs
tagged with: ng-show
tagged with: ng-hide
favorite count: 0
has body: What I want is to show a DIV when I click a button and hide it after 2s. &lt;div ng-show="alertMsg.show"&gt;{{alertMsg.text}}&lt;/div&gt; After triggering the click event, the DIV shows correctly, but cannot hide. It seems that the value of "alertMsg.show" has been changed to FALSE correctly after 2s, but the DIV still there in the view. Click Event: $scope.$apply(function(){ $scope.alertMsg.show = true; }); $timeout(function () { $scope.alertMsg.show = false; }, 2000); I want to know how to hide the DIV via $timeout
has comment: http://stackoverflow.com/comment/46550890
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46545001
has title: ng-show in this sample not working
has answer: http://stackoverflow.com/a/29165816
tagged with: alert

http://stackoverflow.com/q/29070585
score: 0
tagged with: validation
answer count: 1
tagged with: jquery
has body: I have a checkbox field which determines whether the proceeding client ID field has an attribute of data-validate required:true, or data-validate required:false which drives my forms validation. &lt;input type="text" name="stID" id="stID" data-validate="required:true" /&gt; Using jquery i can change the requirement in real-time, along with show/hide and add/remove the error classes associated with that field. $("#input[name='stID']").attr("data-validate","required:false"); var form=$("#standard"); form.validate().resetForm(); The issue lies when someone tries to submit the form, then changes the initial checkbox option (if true, ID isn't required otherwise if false, ID is required). When this happens, despite the data-validate required:false being set and the error classes being hidden, the validation is still occurring and flagging the stID field. Does the jquery validator plug in have a cache/array of fields which resulted in errors that it determines on submit and possibly isn't being cleared/reset when the resetForm function on our validation is called?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46376009
has answer: http://stackoverflow.com/a/29089017
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Jquery Validation Plugin - Fields still producing errors
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46410775

http://stackoverflow.com/q/29199237
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
upvote count: 3
type: UnansweredQuestion
has body: I need to make this script to print the result (true, or false) for the transparency of the image in the divs according to the area if its transparent or not. Here is the example where I can see the result if its transparent but only on mouse move and for pixel by pixel according to the pointer. https://jsfiddle.net/kdichev/0jhazjoa/ Here i have put a overlay over the image with 1/10 of the size square divs which I would like to change colors depending if they have transparent pixels in their area or not https://jsfiddle.net/kdichev/ae9pjstm/1/ Ideally if there is one pixel below the box it should have a red background color or print in it false. (function () { var img = new Image(), output = document.getElementById('transparent'), bImg = document.getElementById('img'); img.src = bImg.src; function isTransparent(e) { var x = e.pageX - this.offsetLeft, y = e.pageY - this.offsetTop; var canvas = document.getElementById('imgcheck-canvas') || (function (_this) { var e = document.createElement('canvas'); e.setAttribute('width', _this.width); e.setAttribute('height', _this.height); e.setAttribute('id', _this.id + '-canvas'); e.setAttribute('style', 'display:none;'); document.body.appendChild(e); var cx = e.getContext('2d'); cx.drawImage(_this, 0, 0, _this.width, _this.height); return e; })(this); if (canvas.getContext === undefined) { return false; } var ctx = canvas.getContext('2d'); output.innerHTML = ((ctx.getImageData(x, y, 1, 1).data[3] === 0) ? true : false); } function init() { console.log('init'); bImg.addEventListener('mousemove', isTransparent, false); } img.addEventListener('load', init, true); })();
score: 3
has comment: http://stackoverflow.com/comment/58429720
type: Question
has comment: http://stackoverflow.com/comment/58428478
downvote count: 0
tagged with: ecmascript-5
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Function to show result in multiple divs

http://stackoverflow.com/comment/46537588
type: Comment
score: 1
has text: Yes that could be it.
comment on: http://stackoverflow.com/a/29158685
type: AnswerComment

http://stackoverflow.com/q/29171390
tagged with: kendo-ui
tagged with: telerik
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29172871
tagged with: refresh
type: Question
score: 0
has body: I am trying to create a refresh button on the top strip of my app and I cannot find any good info on how to do it without doing the "pull-to-refresh" way. Here is an example app of how I am doing here: http://jsbin.com/naxolu/3/edit Here is some sample code: HTML JS var data = { "AllArticles": [{ "id": 1,"trunc_title": "Title for 1","content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat nisl. In finibus scelerisque tempor. Nunc eleifend quam risus, lacinia fermentum dui tincidunt gravida. ", "list_date": "2015-10-31 11:08:00","thumbnail": "http://placehold.it/640x360"},{"id": 2,"trunc_title": "Title for 2","content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat nisl. In finibus scelerisque tempor. Nunc eleifend quam risus, lacinia fermentum dui tincidunt gravida. ","list_date": "2015-10-31 11:08:00", "thumbnail": "http://placehold.it/640x360" }, { "id": 3, "trunc_title": "Title for 3", "content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat nisl. In finibus scelerisque tempor. Nunc eleifend quam risus, lacinia fermentum dui tincidunt gravida. ","list_date": "2015-10-31 11:08:00","thumbnail": "http://placehold.it/640x360"},{ "id": 4,"trunc_title": "Title for 1","content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat nisl. In finibus scelerisque tempor. Nunc eleifend quam risus, lacinia fermentum dui tincidunt gravida. ", "list_date": "2015-10-31 11:08:00","thumbnail": "http://placehold.it/640x360"},{"id": 5,"trunc_title": "Title for 2","content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat nisl. In finibus scelerisque tempor. Nunc eleifend quam risus, lacinia fermentum dui tincidunt gravida. ","list_date": "2015-10-31 11:08:00", "thumbnail": "http://placehold.it/640x360" }, { "id": 6, "trunc_title": "Title for 3", "content": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id placerat n…
has title: How do I put a button to refresh my datasource in my telerik kendo mobile app?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46450658
has text: by any chance, do u know how i can modify my code so that the arrow keys will also move the sprite? thanks
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29110641

http://stackoverflow.com/q/29177699
has comment: http://stackoverflow.com/comment/46579593
has body: I have the following code that builds a grid using slickgrid.js. var grid; var gridDataview; var gridOptions = { enableCellNavigation: true, enableColumnReorder: true, forceFitColumns: false, topPanelHeight: 25 }; function createGrid(data) { gridDataview = new Slick.Data.DataView({ inlineFilters: true }); grid = new Slick.Grid("#grid", gridDataview, data.columns, gridOptions); grid.setSelectionModel(new Slick.RowSelectionModel()); var pager = new Slick.Controls.Pager(gridDataview, grid, $("#pager")); var columnpicker = new Slick.Controls.ColumnPicker(data.columns, grid, gridOptions); grid.onSort.subscribe(function (e, args) { sortdir = args.sortAsc ? 1 : -1; sortcol = args.sortCol.field; // using native sort with comparer // preferred method but can be very slow in IE with huge datasets gridDataview.sort(comparer, args.sortAsc); }); // if you don't want the items that are not visible (due to being filtered out // or being on a different page) to stay selected, pass 'false' to the second arg gridDataview.syncGridSelection(grid, true); $("#gridContainer").resizable(); } I am using this with knockout-js and initially only create the grid after the user makes a selection from a listbox, at which point i fetch data from an rest service and build the grid. each subsequent user selection will not create the grid, only update the data. self.selectedInstrument.subscribe(function (newValue) { $.getJSON('/data/' + self.selectedCategory().id + '/' + newValue.id, function (data) { self.cotData(data); if (grid == null) { debugger; createGrid(data); } //gridDataview.beginUpdate(); gridDataview.setItems(data.data); //gridDataview.endUpdate(); }); }); What's happening is: 1. when the grid is initially create, no data is shown, just the column headers. if i move re-order a column header, then the data is shown. 2. If i sort a column, the sort is not visibly reflected. if i start scrolling, then i see the sort being reflected. 3. if i add a grid.render() to the end of the subscription…
has answer: http://stackoverflow.com/a/29250325
has comment: http://stackoverflow.com/comment/46579672
tagged with: slickgrid
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29250325
tagged with: knockout.js
type: Question
has title: SlickGrid w/ DataView not immediately reflecting changes in underlying data
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/29111390
upvote count: 1
has comment: http://stackoverflow.com/comment/46465912
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29086574
has body: The code above is a React anti-pattern: In componentDidMount lifecycle, measure the height is correct, however your usage of setState() &amp;&amp; forceUpdate() should not be called in this life cycle. setState calculate the difference and re-render the react component. forceUpdate() is a duplicate after setState() To achieve your goal, please move the logic of changing the style of the emptyCell to componentDidUpdate lifecycle, which gives you an opportunity to update the rendered DOM.

http://stackoverflow.com/comment/46445247
has text: @Danina, it's php. Using form you send request to the server, server responds you. That process work with page reload
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29107609
type: Comment

audio
tags question: http://stackoverflow.com/q/29205255
tags question: http://stackoverflow.com/q/29132059
tags question: http://stackoverflow.com/q/29158228
tags question: http://stackoverflow.com/q/29192327
tags question: http://stackoverflow.com/q/29213216
tags question: http://stackoverflow.com/q/29215531
tags question: http://stackoverflow.com/q/29196513
type: Tag
tags question: http://stackoverflow.com/q/29204007
tags question: http://stackoverflow.com/q/29134964
tags question: http://stackoverflow.com/q/29108462
tag name: audio
tags question: http://stackoverflow.com/q/29141274
tags question: http://stackoverflow.com/q/29157863
tags question: http://stackoverflow.com/q/29185078
tags question: http://stackoverflow.com/q/29176858
tags question: http://stackoverflow.com/q/29185251
tags question: http://stackoverflow.com/q/29103003
tags question: http://stackoverflow.com/q/29127720
tags question: http://stackoverflow.com/q/29089503

http://stackoverflow.com/q/29082803
tagged with: javascript
has comment: http://stackoverflow.com/comment/46398688
has body: Question: How do I make sure that all of my $(document).ready pieces run and not just the first couple? I am trying to use an external .js file to change the value of hidden fields on my form based upon whether or not a box is checked. Right now my .js file looks like this: $(document).ready(function() { $(function() { $('[name="c1"]').on('change', function() { $('[name="i1"]').val('Wargo'); }); }); }); $(document).ready(function() { $(function() { $('[name="c2"]').on('change', function() { $('[name="i2"]').val('Wargo'); }); }); }); $(document).ready(function() { $(function() { $('[name="c3"]').on('change', function() { $('[name="i3"]').val('Wargo'); }); }); }); $(document).ready(function() { $(function() { $('[name="c4"]').on('change', function() { $('[name="i4"]').val('Daily'); }); }); }); $(document).ready(function() { $(function() { $('[name="c5"]').on('change', function() { $('[name="i5"]').val('Daily'); }); }); }); .... (one of these for each variable) Inside of my table where the check boxes are I have: &lt;input type="checkbox" id="c1" name="c1" value="17943"&gt; &lt;input type="hidden" name="i1" value="" /&gt; ... (one of these for each box) What is happening is that the first 3 of these ready calls will work properly and then none of the other values will change when their box is checked. (I'm testing it on Chrome.) The help forums I've found suggest that it's not looking at the ones further down the page because there is some type of error, but since they are all identical functions I'm not sure how to determine what that error might be and correct it. So -- How do I make sure that all of my $(document).ready pieces run and not just the first couple? So far I've seen a few suggestions to use $(document).live instead of $(document).ready, however making that change doesn't affect the end result any. I've also tried combining all of my name change bits of code into one set like I saw on a few pages, but that failed to do anything at all so I went back to se…
has comment: http://stackoverflow.com/comment/46398729
has comment: http://stackoverflow.com/comment/46398909
has answer: http://stackoverflow.com/a/29082907
tagged with: document-ready
tagged with: jquery
has comment: http://stackoverflow.com/comment/46399090
has comment: http://stackoverflow.com/comment/46398738
has comment: http://stackoverflow.com/comment/46399061
has answer: http://stackoverflow.com/a/29094263
has comment: http://stackoverflow.com/comment/46399416
has title: Multiple $(document).ready(function() but only the top couple are firing
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29082912
has comment: http://stackoverflow.com/comment/46398662
has comment: http://stackoverflow.com/comment/46399210
score: 0
has comment: http://stackoverflow.com/comment/46399332
has comment: http://stackoverflow.com/comment/46399246
has answer: http://stackoverflow.com/a/29082910
type: Question
has comment: http://stackoverflow.com/comment/46399373
has answer: http://stackoverflow.com/a/29083470
has comment: http://stackoverflow.com/comment/46399177

http://stackoverflow.com/a/29116011
has body: If you want to add a class to all the circles, then you'd want something like d3.selectAll("circle") .attr("class", "hide"); This is equivalent: d3.selectAll("circle") .classed("hide", true); Though I don't see where you're using d3.js specifically. The code you've provided uses jQuery syntax ($(a bunch of stuff)).
score: 0
upvote count: 1
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29115897

http://stackoverflow.com/a/29133068
type: Answer
has body: Use data-target. Assign the property "data-target" to the element that will be clicked which references the element that will be handled. Example: http://jsfiddle.net/710qj9ca/ Note that you can access the data-target attribute with this.dataset.target to access it directly from the element's property set or by using jQuery's "attr" selector $(this).attr('data-target')
answers question: http://stackoverflow.com/q/29132952
score: 0

http://stackoverflow.com/comment/46834197
type: AnswerComment
type: Comment
has text: Great answer! FYI I think you read my "painstakingly programmed..." comment in reverse (I probably wrote it poorly). I was saying, with websites where middle click _does_ work, is this because they put in extra effort to make it work. Your answer seems to suggest: yes.
comment on: http://stackoverflow.com/a/29319328
score: 1

http://stackoverflow.com/comment/46459059
has text: Sounds like an XY problem... TS wraps everything in an IIFE, can't you just export `Car`?
comment on: http://stackoverflow.com/q/29115417
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29184918
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29184449
has comment: http://stackoverflow.com/comment/46585590
has comment: http://stackoverflow.com/comment/46585560
has body: I agree with what Tomalak said in the comments; the problem you're trying to solve with Node alone and no libraries is not trivial, and requires a pretty thorough understanding of multiple different technologies. That said, I'll help get you started, and hopefully this will be a good jumping-off point for reading source code of the modules that do do this. Using nothing but Node, here's a minimal server that will log to the console the body of any request (I do not recommend sending a big file to this, or a binary file...start with text files): var http = require('http'); var server = http.createServer(function(req, res) { if(req.url === '/favicon.ico') return res.statusCode = 404, res.end(); console.log(req.method + ' ' + req.url); var data = ''; req.on('data', function(chunk) { data += chunk; }); req.on('end', function() { console.log(data); }); res.end('done'); }); server.listen(3000, function() { console.log('listening on 3000'); }); Then you can create an HTML form to connect to it: &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="http://localhost:3000" method="POST" enctype="multipart/form-data"&gt; &lt;input type="file" name="f"&gt; &lt;input type="submit"&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; Parsing multipart/form-data is not a trivial task, but you can start by reading the documentation here: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 If you want to look at someone's implementation of a multipart/form-data parser, this one is pretty solid: https://www.npmjs.com/package/dicer
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/46585604
answers question: http://stackoverflow.com/q/29184449

http://stackoverflow.com/comment/46567003
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29107374
has text: You can put a starting number in there, or setup the javascript to initialize it if you wanted. There is no starting number in my example because there wasn't one in yours.
type: AnswerComment

http://stackoverflow.com/comment/46373619
comment on: http://stackoverflow.com/q/29069217
type: Comment
type: QuestionComment
score: 0
has text: just a typo, fixed it, but doesn't seem to look like it does

http://stackoverflow.com/a/29183088
has comment: http://stackoverflow.com/comment/46582489
answers question: http://stackoverflow.com/q/29182698
has body: If the images are all the same name with a different number at the end, then you can do something like this with jquery: i = 1; $('#but').click(function() { $('#picture').attr('src', 'pic' + i + '.jpg'); console.log($('#picture').attr('src')); i++; if (i == 7) { i = 0; } }); Pushy Pushy
score: 0
type: Answer

http://stackoverflow.com/q/29140710
tagged with: htmlunit
has comment: http://stackoverflow.com/comment/47725788
answer count: 1
has title: Errors while trying to parse ember app with HtmlUnit
tagged with: javascript
has comment: http://stackoverflow.com/comment/47527919
has comment: http://stackoverflow.com/comment/48088821
favorite count: 0
has comment: http://stackoverflow.com/comment/47727816
has comment: http://stackoverflow.com/comment/47725848
upvote count: 6
has body: So I have an Ember app and I need to take a snapshot for crawling purposes. The Ember app uses Google+ API for singing in. It also has a Youtube video embedded in the index page. I use HtmlUnit v2.15. I'm using the following code to initialize HtmlUnit: // use the headless browser to obtain an HTML snapshot final WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setActiveXNative(true); webClient.getOptions().setAppletEnabled(true); webClient.getOptions().setCssEnabled(true); webClient.getOptions().setUseInsecureSSL(true); webClient.getOptions().setThrowExceptionOnScriptError(false); HtmlPage page = webClient.getPage(originalUrl); // important! Give the headless browser enough time to execute JavaScript // The exact time to wait may depend on your application. webClient.waitForBackgroundJavaScript(5000); // return the snapshot logger.info("Writing snapshot for URL: " + originalUrl); response.getWriter().write(page.asXml()); webClient.closeAllWindows(); Now, I have one issue that happens with all 3 major browser versions (CHROME, INTERNET_EXPLORER_11, FIREFOX_24): runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: *:x).] sourceName=[http://www.domain.com/assets/vendor.js] line=[1351] lineSource=[null] lineOffset=[0] Snipet from vendor.js: // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); // line 1351 is the problem rbuggyQSA.push(",.*:"); Then, I have the following type of error only with FIREFOX_24 and INTERNET_EXPLORER_11: Invalid rpc message origin. https://accounts.google.com vs http://www.domain.com Invalid rpc message origin. https://apis.google.com vs http://www.domain.com This happens only in INTERNET_EXPLORER_11: runtimeError: message=[Automation server can't create object for 'ShockwaveFlash.ShockwaveFlash.7'.] sourceName=[https://s.ytimg.com/yts/jsbin/www-embed-player-vflWiCus…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47901350
has comment: http://stackoverflow.com/comment/47723667
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/47727851
linked to: http://stackoverflow.com/q/15145108
has answer: http://stackoverflow.com/a/30007651
has comment: http://stackoverflow.com/comment/47727967
has comment: http://stackoverflow.com/comment/47725496
score: 5
accepted answer: http://stackoverflow.com/a/30007651

http://stackoverflow.com/comment/46637896
type: QuestionComment
has text: This is a FAQ from the docs... http://jqueryvalidation.org/reference/#link-fields-with-complex-names-(brackets-dots)
comment on: http://stackoverflow.com/q/29188167
score: 0
type: Comment

http://stackoverflow.com/q/29208312
type: Question
score: 0
has body: I just implemented a youtube-popup with magnific-popup and this is the code I'm using: setTimeout(function(){ $.magnificPopup.open({ items: { src: 'http://www.youtube.com/watch?v=0O2aH4XLbto' }, type: 'iframe' }); }, 5000) I would now like to show this popup for every user that visit the page only once for every user. Is there any possibility to do that? The problem I have is, that I can only implement the code in a global footer (it is not my page) and it would load on every subpage as well (which would be a bad idea).
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29208426
has title: Show magnific-popup only once for every user
tagged with: http://stackoverflow.com/tag/html
tagged with: magnific-popup
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/24189428
tagged with: cookies
linked to: http://stackoverflow.com/q/24189428

http://stackoverflow.com/comment/46416869
comment on: http://stackoverflow.com/a/29081692
score: 0
type: AnswerComment
type: Comment
has text: Thanks @ErikSvedin for pointing to right direction - i just added one more condition: `ng-if="autocompleteForm.autocompleteField.$touched || autocompleteForm.$submitted"`

http://stackoverflow.com/comment/46585187
has text: you can use ajax to send request to captcha.php in the script of index.php and in response from captcha.php you can get captcha code. no need to include directly.
comment on: http://stackoverflow.com/q/29184625
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46540229
has text: I recommend leaving out the ```maximum-scale=1.0; user-scalable=0;``` Why? Because it pisses people off. They should be able to pinch and zoom, if they want to. Disabling the default function of any device creates a terrible user experience. They won't enjoy being on your site and may not visit it again.
comment on: http://stackoverflow.com/a/29158583
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29188244
answers question: http://stackoverflow.com/q/29188202
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29188202
type: Answer
upvote count: 3
has body: getElementsByClassName returns a HTMLCollection, so you will have to loop over it and handle each link individually. In this case you no longer can use temporary variable to hold disabled link href. Simple solution would be to store removed href attribute in another attribute on the corresponding element. It can look something like this: function disable_link() { var links = document.getElementsByClassName('testlink'); for (var i = 0; i &lt; links.length; i++) { links[i].setAttribute('data-href', links[i].getAttribute('href')); links[i].removeAttribute('href'); } } function enable_link() { var links = document.getElementsByClassName('testlink'); for (var i = 0; i &lt; links.length; i++) { links[i].setAttribute("href", links[i].getAttribute('data-href')); } } Demo: http://jsfiddle.net/5z8av0xg/
score: 3

http://stackoverflow.com/q/29135618
has title: how to set onclick attribute in a loop
has answer: http://stackoverflow.com/a/29135697
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: dom
type: Question
has body: I am building a table with text in the first column and buttons that do stuff in the second column. Here is the complete .js file: var table = document.createElement("table"); var tableBody = document.createElement("tbody"); for(i = 0; i &lt; array.length; i++) { var row = table.insertRow(i); var cell = row.insertCell(0); cell.innerHTML = text[i]; var cell = row.insertCell(1); var cellElement = document.createElement("input"); cellElement.setAttribute("id", ID[i]); cellElement.setAttribute("type", "button"); cellElement.setAttribute("value", "button"); /////cellElement.onclick = /////function(){ doThisThing(i,ID[i]); } ); cell.appendChild(cellElement); row.appendChild(cell); } table.appendChild(tableBody); document.body.appendChild(table); Everything works except for the cellEllement.onclick = function(){}; The onlick() function does not set. I have tried variations on this: cellElement.setAttribute("onclick",doThisThing(i,ID[i])); How to I set the button onclick attribute when looping through to create a table?
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29135697
answer count: 1

http://stackoverflow.com/comment/46502929
has text: @RobG: True. You can get to other definitions of "word" by using appropriate lookbehind assertions instead of "word boundary".
comment on: http://stackoverflow.com/a/29138774
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/29190863
type: AnsweredQuestion
tagged with: angular-ui-router
accepted answer: http://stackoverflow.com/a/29192386
has title: How to submit test data and post requests between views in Angular?
type: Question
has answer: http://stackoverflow.com/a/29192386
tagged with: javascript
has body: I have a theory as to how to approach them, and was looking for some guidance on how to solve this problem and see if I am on the right path, because I am not sure. I have a web app for a project I am building, and I have a database that I need to query for specific information. I have a search button that is attached to a function in my MainController, and I need to have my data passed on to my result.html file, which displays information from a ResultsController. This is my theory for how to get this working using fake data, and an html request (which uses promises I imagine?) for fake/test data, I stored an array with objects that represents JSON data in my services file that was basically the parent to ResultsController and MainController, and ResultsController would take in that information and display it on the screen. For querying a database, my search function would search the database, and fill/replace the array in my services file with additional information. By virtue of changing that array of objects in my services, my results.html should pull down new data automatically when I click search, since the ResultsController has access to that same JSON data. (also, clicking search submits the query and then does $location.path("/results") after to get to the results page). For querying a database and dynamically changing the information on a page, are these the right steps to submitting a request to a database in pulling information down upon each "search" request?
score: 0
answer count: 1
tagged with: angularjs
tagged with: angular-services

http://stackoverflow.com/q/29138765
tagged with: gwt
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29155775
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29155775
has title: Wrapping JS into GWT cell table
has body: In GWT Cell Table I am wrapping jquery functionality (like grouping) Using JSNI. But its throwing JavaScriptObject Exception(function is undefine).I am calling this JSNI method once after the data is loaded table.setRowData(loadContactInfo()); //To Load Data loadGridData(); //Calling JSNI For Grouping private List&lt;ContactInfor&gt; loadContactInfo() { // To load data List&lt;ContactInfor&gt; lstContact = new ArrayList&lt;ContactInfor&gt;(); lstContact.add(new ContactInfor("XXX", "YYY", "t", "26", "0300",Big Street")); return ContactInfor; } public static native void loadGridData()/*-{ //calling js for grouping functionality which contains table tr element }-*/; Since its taking some few millisecond to redraw the cell table before that itself the JSNI method is called which throws JSO exception.Is there any other to wrap the JS into Cell table after the data gets loaded and Rendered? Any Suggestion on this?
has answer: http://stackoverflow.com/a/29230762
accepted answer: http://stackoverflow.com/a/29230762

http://stackoverflow.com/q/29193909
score: 2
type: AnsweredQuestion
has title: Javascript: get `this` outside the function
type: Question
upvote count: 2
answer count: 2
tagged with: function
tagged with: this
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46601226
possible better answer: http://stackoverflow.com/a/29194010
has body: Is it possible to get this of a function from outside without calling it in Javascript? I know about the execution context idea, but my logic is, if one can bind this to a function, probably there's a way to fetch it. E.g.: var a=function(){}; // let's imagine we have a magic function named `getThisFrom()` getThisFrom(a); // returns `window` (or nothing, because we haven't used `bind()`) var obj={}; var b=function(){}.bind(obj); getThisFrom(b); // returns `obj`
has comment: http://stackoverflow.com/comment/46601076
has answer: http://stackoverflow.com/a/29193928
accepted answer: http://stackoverflow.com/a/29193928
downvote count: 0
has answer: http://stackoverflow.com/a/29194010

http://stackoverflow.com/comment/46522646
has text: Nevermind, I think I see what the issue is. Added an answer.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29135682

http://stackoverflow.com/comment/46398689
score: 0
comment on: http://stackoverflow.com/q/29082768
has text: Well, at the moment you are trying to access `matrix[1]`, it does not exist yet. In the first iteration of the outer loop you add `[]` to `matrix` (i.e. `matrix[0] = []`). The first iteration of the inner loop calls `matrix[0].push`, which is fine. The second iteration calls `matrix[1].push`, which fails since you haven't added a second element to `matrix` yet.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29077278
downvote count: 2
possible better answer: http://stackoverflow.com/a/29077676
has answer: http://stackoverflow.com/a/29077676
has comment: http://stackoverflow.com/comment/46387926
type: Question
has comment: http://stackoverflow.com/comment/46389773
accepted answer: http://stackoverflow.com/a/29083328
has body: I am trying to accomplish the following. It needs to be done this way because of certain environmental/system requirements. I have this type of element: &lt;body&gt; .... &lt;script type="disabled" id="1" class="someclass" &gt; console.log("fire this"); &lt;/script&gt; ... &lt;/body&gt; I want to be able to change the type of the element to "text/javascript" and then execute the code within the script. For instance like this: &lt;script type="text/javascript"&gt; var el = document.getElementById("1"); el.setAttribute("type", "text/javascript"); ...execute code within el if some precondition..... &lt;/script&gt; Can this be done?
has comment: http://stackoverflow.com/comment/46387933
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46389240
answer count: 2
has comment: http://stackoverflow.com/comment/46387959
favorite count: 0
has answer: http://stackoverflow.com/a/29083328
has title: JavaScript access DOM element and run JavaScript within that element
has comment: http://stackoverflow.com/comment/46388657
type: AnsweredQuestion

http://stackoverflow.com/q/29117316
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29123094
tagged with: knockout.js
type: Question
tagged with: javascript
upvote count: 2
has body: I'm starting to learn and azure phonejs. Todo list get through a standard example: $(function() { var client = new WindowsAzure.MobileServiceClient('https://zaburrito.azure-mobile.net/', 'key'); var todoItemTable = client.getTable('todoitem'); // Read current data and rebuild UI. // If you plan to generate complex UIs like this, consider using a JavaScript templating library. function refreshTodoItems() { var query = todoItemTable.where({ complete: false }); query.read().then(function(todoItems) { var listItems = $.map(todoItems, function(item) { return $(' ') .attr('data-todoitem-id', item.id) .append($(' Delete ')) .append($(' ').prop('checked', item.complete)) .append($(' ').append($(' ').val(item.text))); }); $('#todo-items').empty().append(listItems).toggle(listItems.length > 0); $('#summary').html('' + todoItems.length + ' item(s)'); }, handleError); } function handleError(error) { var text = error + (error.request ? ' - ' + error.request.status : ''); $('#errorlog').append($(' ').text(text)); } function getTodoItemId(formElement) { return $(formElement).closest('li').attr('data-todoitem-id'); } // Handle insert $('#add-item').submit(function(evt) { var textbox = $('#new-item-text'), itemText = textbox.val(); if (itemText !== '') { todoItemTable.insert({ text: itemText, complete: false }).then(refreshTodoItems, handleError); } textbox.val('').focus(); evt.preventDefault(); }); // Handle update $(document.body).on('change', '.item-text', function() { var newText = $(this).val(); todoItemTable.update({ id: getTodoItemId(this), text: newText }).then(null, handleError); }); $(document.body).on('change', '.item-complete', function() { var isComplete = $(this).prop('checked'); todoItemTable.update({ id: getTodoItemId(this), complete: isComplete }).then(refreshTodoItems, handleError); }); // Handle delete $(document.body).on('click', '.item-delete', function () { todoItemTable.del({ id: getTodoItemId(this) }).then(refreshTodoItems, handleError); }); // On initial loa…
answer count: 1
favorite count: 0
tagged with: phonejs
accepted answer: http://stackoverflow.com/a/29123094
tagged with: azure
has title: Windows Azure + DevExrpess (PhoneJs) getting ToDoList (Standart Sample)
tagged with: devextreme

http://stackoverflow.com/a/29155323
accepted answer of: http://stackoverflow.com/q/29154976
has comment: http://stackoverflow.com/comment/82419656
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/82530377
has comment: http://stackoverflow.com/comment/82476688
answers question: http://stackoverflow.com/q/29154976
has body: DEMO: http://jsfiddle.net/opqdqLa0/ var calendar = $('#calendar').fullCalendar({ editable: true, selectable: true, //header and other values select: function(start, end, allDay) { if(end.getTime() != start.getTime()){ calendar.fullCalendar( 'unselect' ) ; } } });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46430101
has text: thank you for this :) however im still getting no success changing it to what you suggested.... Has it got anything to do with me changing the swf and js paths? in the source code from scriptcam it only states scriptcam.js where as i changed it to ~/scripts/scriptcam.js Sorry if its a bit confusing my jquery experience is only new :)
comment on: http://stackoverflow.com/a/29098902
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46494010
comment on: http://stackoverflow.com/a/29132913
score: 0
has text: Pretty close, but we run into cross domain issues trying to access window.location.hash on the new window.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46550528
comment on: http://stackoverflow.com/q/29161330
has text: Naturally this is because of reserved words in javascript. `for` is a reserved word and so cannot be used as a json key, which is what the jsx parser is turning your jsx attribute names into. Same reason it's `className` instead of `class`.
type: Comment
type: QuestionComment
score: 6

http://stackoverflow.com/q/29192837
has answer: http://stackoverflow.com/a/29192904
tagged with: mysql
has title: Posting Ajax Data to PHP REST SERVICE
tagged with: post
type: Question
has body: I know this question has been asked before but none of the solutions I have tried work, I wrote a php rest service which I'm hosting on a server, I used advanced rest client data on chrome to test my rest service and it works, it posts data to the database, but when I wrote my own client in an ajax post below the browser complains of No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access. I have tried adding a header to my php code still doesn't work i get another error..., I'm just wondering what I'm doing wrong? &gt;// MY PHP REST SERVICE &lt;?php $servername = "localhost"; $username = "root"; $password = "xxxx"; $dbname = "xxx"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn-&gt;connect_error) { die("Connection failed: " . $conn-&gt;connect_error); } if($_SERVER['REQUEST_METHOD'] == "POST"){ // Get data $name = $_POST['name']; $surname = $_POST['surname']; $email = $_POST['email']; $password = $_POST['password']; // Insert data into data base $sql = "INSERT INTO UserData.register (name, surname, email, password) VALUES ('$name', '$surname', '$email','$password')"; if ($conn-&gt;query($sql) === TRUE) { $json = array("status" =&gt; 1000, "msg" =&gt; "Done User added!"); } else { $json = array("status" =&gt; 0, "msg" =&gt; "Error adding user!"); } header('Content-type: application/json'); echo json_encode($json); $conn-&gt;close(); } &gt; //MY java script ajax client doing the posting. &lt;script type="text/javascript"&gt; function RegisterUser() { var name = $("#name").val(); var surname = $("#surname").val(); var email = $("#email").val(); var password = $("#password").val(); $.ajax({ type: "POST", url: "http://xxx.xxx.xxx.xxx/signup.php", data: '{"name":"' + name + '","surname":"' + surname + '","email":"' + email + '","password":"' + password + '"}', contentType: "application/json; charset=utf-8", dataType: "js…
tagged with: javascript
answer count: 1
type: UnansweredQuestion
tagged with: php
score: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/29069171
accepted answer: http://stackoverflow.com/a/29069542
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46373611
score: 0
has comment: http://stackoverflow.com/comment/46373635
answer count: 1
has comment: http://stackoverflow.com/comment/46374071
tagged with: jquery-select2
has title: f.select + javascript to add and remove div styles from select menu
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/29069542
type: AnsweredQuestion
has body: I an fairly new to Rails and very new to Javascript. I am trying to change the display style on a div class using an f.select menu. I'm trying to only show the secondary menus if their related value is set on the select menu. The form is for picking types of furniture. The primary select has 3 options: tables, chairs, and couches. If "table" is selected, then I want to be able to show another menu of types of tables (drop leaf, coffee, end..etc). I am using the Select2 gem...so that might be relevant. I can make this work with regular old HTML select menus...but not f.select. here is my code CSS #tableObject, #chairObject, #couchObject { display:none; } form <%= f.select :furniture, options_for_select([ ['FURNITURE TYPES' ,''], ['Chairs' ,'Chairs'], ['Tables' ,'Tables'], ['Couches' ,'Couches'] ]), {}, { style: 'width:300px', id: 'furnitures'} %> "List of Couches" "List of Chairs" "List of Tables" javascript UPDATE: HTML OUTPUT Tables Furnitures Tables Chairs Couches "List of Couches" "List of Chairs" "List of Tables"
has comment: http://stackoverflow.com/comment/46373902
type: Question
has comment: http://stackoverflow.com/comment/46374142
tagged with: select2-rails

http://stackoverflow.com/a/29120382
answers question: http://stackoverflow.com/q/29120216
score: 0
has comment: http://stackoverflow.com/comment/46467574
has comment: http://stackoverflow.com/comment/46469184
has comment: http://stackoverflow.com/comment/46471551
type: Answer
has body: The data event handler in the net library doesn't have a callback function. e.g: socket.on('data', function (chunk) { }); If you want to catch the event for when all the data is consumed you can use: socket.on('end', function () { }); Your code would look like this: var chunks = []; socket.on('data', function (chunk) { chunks.push(data); }); socket.on('end', function (chunk) { chunks = chunks.join(''); });

http://stackoverflow.com/comment/46622169
score: 0
comment on: http://stackoverflow.com/q/29204983
type: Comment
type: QuestionComment
has text: Seems your data is structured in order, `Heading`, followed by `Narrative`, then list of `Resource`s, and `Narrative` is optional

http://stackoverflow.com/q/29062581
has title: get the array key in a json encoded response
upvote count: 1
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/46361313
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have this json encoded array requestparser.php $array = array("ph" =&gt; array("phweb" =&gt; "yes", "phemail" =&gt; "yesss")); echo json_encode($array); and ajax post type request for sending and processing the return response. $.ajax({ type: 'POST', url: 'requestparser.php', data: { "request" : "pull" }, contentType: "application/json; charset=utf-8", dataType: 'json', cache: false, success: function(result) { alert(result["ph"]["phweb"]); alert(result["ph"]["phemail"]); } }); what I'm trying to do is to get the array key and filter it with if statement, like (refer below) var thearraykey = array key if (thearraykey === "ph"){ alert(array key) } how to get the array key that was in the json encoded response from requestparser.php? any help, ideas and clues would be greatly appreciated.
has comment: http://stackoverflow.com/comment/46361288
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29062642
linked to: http://stackoverflow.com/q/558981
has comment: http://stackoverflow.com/comment/46361304
type: UnansweredQuestion

http://stackoverflow.com/comment/46529462
has text: The original app is at http://webaudiodemos.appspot.com/AudioRecorder/index.html: There are two images. The mic get clicked twice to start and stop recording - I am wondering if that click is being picked by onclick? How can these be resolved?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29149881
score: 0

http://stackoverflow.com/q/29181309
tagged with: three.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/30223131
tagged with: shadow
has answer: http://stackoverflow.com/a/30223131
type: Question
has body: I am trying to learn Thee.js. And it is pretty straight forward. However for some reason i am unable to get the shadows working. I've set castShadows, recieveShadows, shadowMapEnabled to true on the places i found where to set them however they do not show shadows (anywhere). What i want to do is that my imported model casts shadows on itself so you can actually make out what the model is. This is my current code: var container; var camera, scene, renderer; var mouseX = 0, mouseY = 0; init(); animate(); function init(){ container = document.createElement( "div" ); document.body.appendChild( container ); camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 2000 ); camera.position.z = 100; controls = new THREE.TrackballControls( camera ); controls.rotateSpeed = 5.0; controls.zoomSpeed = 5; controls.panSpeed = 0; controls.noZoom = false; controls.noPan = true; controls.staticMoving = true; controls.dynamicDampingFactor = 0.3; scene = new THREE.Scene(); var ambient = new THREE.AmbientLight( 0xffffff ); scene.add( ambient ); /*var spotLight = new THREE.SpotLight( 0xffffff,1.5, 40 ); spotLight.position.set( -400, 1200, 300 ); spotLight.castShadow = true; spotLight.shadowDarkness = 0.5; spotLight.shadowCameraVisible = true; spotLight.target.position = new THREE.Object3D( 10, 10, 10 ); scene.add( spotLight );*/ var light = new THREE.DirectionalLight(0xffffff, 2); light.position.x = -100; light.position.y = 150; light.shadowCameraVisible = true; light.castShadow = true; light.shadowCameraNear = 100; light.shadowCameraFar = 300; light.shadowCameraFov = 20; light.shadowBias = -0.00022; light.shadowDarkness = 0.5; scene.add(light); var groundGeo = new THREE.PlaneGeometry(400,400); var groundMat = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); var ground = new THREE.Mesh(groundGeo,groundMat); ground.position.y = -20; ground.rotation.x = -Math.PI/2; ground.doubleSided = true; ground.reciveShadow = true; scene.add(ground); var manager = new THR…
tagged with: javascript
has title: Three.js .obj shadows not working
has comment: http://stackoverflow.com/comment/46581728
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29192690
accepted answer: http://stackoverflow.com/a/29192690

http://stackoverflow.com/comment/46487572
type: QuestionComment
has text: @ Alfonso: Sorry, it's not uploaded anywhere for you to see, it's only on my drive. I wanted to send a picture but apparently I need up to 10 rep points to do that. :( @ Icepickle: Yes I fixed it and it's working properly, it's just that in firebug, for some reason, the code doesn't show in three particular pages even though the link in all html pages are the same syntax connecting to the same .js file. Thanks for the tip btw :).
comment on: http://stackoverflow.com/q/29128003
score: 0
type: Comment

http://stackoverflow.com/q/29097872
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29097939
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29098375
type: Question
answer count: 2
tagged with: addclass
has body: I have created a vertical slider and I want the classes to move onto the next div on click (next) and previous on click (prev) here is my code and fiddle $(".bxslider-inner:nth-child(4n+1)").addClass('noBlur'); $(".bxslider-inner:nth-child(4n+2)").addClass('Blur1'); $(".bxslider-inner:nth-child(4n+3)").addClass('Blur2'); $(".bxslider-inner:nth-child(4n)").addClass('Blur3'); $("a.bx-next").click(function(){ $(".bxslider-inner:nth-child(4n+1)").next().addClass('noBlur'); $(".bxslider-inner:nth-child(4n+2)").next().addClass('Blur1'); $(".bxslider-inner:nth-child(4n+3)").next().addClass('Blur2'); $(".bxslider-inner:nth-child(4n)").next().addClass('Blur3'); }); $("a.bx-prev").click(function(){ $(".bxslider-inner:nth-child(4n+1)").prev().addClass('noBlur'); $(".bxslider-inner:nth-child(4n+2)").prev().addClass('Blur1'); $(".bxslider-inner:nth-child(4n+3)").prev().addClass('Blur2'); $(".bxslider-inner:nth-child(4n)").prev().addClass('Blur3'); });
tagged with: javascript
has comment: http://stackoverflow.com/comment/46426171
tagged with: jquery
has title: add class to next element jquery click function
linked to: http://stackoverflow.com/q/12745083

http://stackoverflow.com/a/29096686
has comment: http://stackoverflow.com/comment/46424089
answers question: http://stackoverflow.com/q/29096135
score: 0
type: Answer
has body: Check .pm2 folder in D:\Users\user\, if this folder not exist try create and after install.

http://stackoverflow.com/comment/46633638
has text: this is not jquery, this is pure js
score: 1
comment on: http://stackoverflow.com/q/29212041
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29065836
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
has title: Using ng-repeat on Parse.com results
has answer: http://stackoverflow.com/a/32776729
linked to: http://stackoverflow.com/q/26496451
upvote count: 2
possible better answer: http://stackoverflow.com/a/32776729
has comment: http://stackoverflow.com/comment/46367285
has body: The raw results returned from Parse.com are shown in the console as [child, child]. I imagine this means that there are three levels to this object? So in order to access in the first ng-repeat do I need to do a foreach in the controller before pushing to an array and then use that in $scope... seems a long way around to get what i want. Is it possible to use the raw results from Parse.com in the scope. I would like to do this: var query = new Parse.Query("Programme"); query.equalTo("userId", userId); query.find() .then(function(result){ $scope.programmes = result; console.log($scope.programmes); }); However this gives me the child elements - do I have to foreach, or is there some angular trickery?
favorite count: 0
tagged with: parse-platform
tagged with: angularjs
linked to: http://stackoverflow.com/q/22857363
type: AnsweredQuestion
tagged with: object
score: 2
has answer: http://stackoverflow.com/a/29066534
accepted answer: http://stackoverflow.com/a/29066534
downvote count: 0
has comment: http://stackoverflow.com/comment/46367317

http://stackoverflow.com/a/29110905
has comment: http://stackoverflow.com/comment/46479166
has comment: http://stackoverflow.com/comment/46475621
answers question: http://stackoverflow.com/q/29108966
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29108966
has comment: http://stackoverflow.com/comment/46481457
has body: Your code... $(document).on('click', '.btnSave', function (event) { .... if (isAdd == "Shipping") { $('input[id="inputAddressName"]').rules("add", { .... }); } else { $('input[id="inputAddressName"]').rules("add", { .... }); } $('#customerAddressForm').validate(....); // &lt;-initializes plugin }); I only get "Cannot read property 'settings' of undefined" You have some fatal errors in your code... You attempt to use the .rules() method before you've initialized the plugin on your form; and this is likely the source of your error message. The .validate() method is only used for the initialization of the plugin. Since the .validate() method is for the initialization of the plugin on your form, and only gets called once (in DOM ready event), you would never put it inside of a click handler. Do this instead... $(document).ready(function() { $('#customerAddressForm').validate(....); // &lt;-initializes plugin $(document).on('click', '.btnSave', function (event) { .... if (isAdd == "Shipping") { $('input[id="inputAddressName"]').rules("add", { .... }); } else { $('input[id="inputAddressName"]').rules("add", { .... }); } }); });
type: Answer
has comment: http://stackoverflow.com/comment/46475941
has comment: http://stackoverflow.com/comment/46482878
has comment: http://stackoverflow.com/comment/46482714
has comment: http://stackoverflow.com/comment/46481342
has comment: http://stackoverflow.com/comment/46481337
has comment: http://stackoverflow.com/comment/46480763
has comment: http://stackoverflow.com/comment/46478889
has comment: http://stackoverflow.com/comment/46479586
has comment: http://stackoverflow.com/comment/46488853

http://stackoverflow.com/a/29151264
has comment: http://stackoverflow.com/comment/74627481
has comment: http://stackoverflow.com/comment/87426247
answers question: http://stackoverflow.com/q/29150998
has comment: http://stackoverflow.com/comment/50917718
has comment: http://stackoverflow.com/comment/73588028
downvote count: 9
accepted answer of: http://stackoverflow.com/q/29150998
has body: First you need to start karma server with karma start Then, you can use grep to filter a specific test or describe block: karma run -- --grep=testDescriptionFilter
score: 69
type: AcceptedAnswer
type: Answer
upvote count: 78
has comment: http://stackoverflow.com/comment/57809621
has comment: http://stackoverflow.com/comment/72291555
has comment: http://stackoverflow.com/comment/50950211

http://stackoverflow.com/comment/46492513
score: 2
has text: You are executing the `if` statement before `counter` is ever incremented.
comment on: http://stackoverflow.com/q/29133380
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29191887
tagged with: javascript
favorite count: 0
has title: How to dynamically check the fields and create array?
possible better answer: http://stackoverflow.com/a/29192209
has answer: http://stackoverflow.com/a/29192209
accepted answer: http://stackoverflow.com/a/29192226
tagged with: http://stackoverflow.com/tag/html
has body: In my angular app, i am building a pivot table using pivot.js, which works prett well. I need to load all the indexes from elastic search, when the user changes the index, it has to load the corresponding data to the pivot table. This i have achieved with the following code. Now my issue is whenever user changes the index, i make a service call to get the fields of the table and the complete data of the table. I need to dynamically build an array for the pivot table. Here is a sample, i have a product table with the fields and data corresponding. I need to dynamically map the fields and obtain the data to be bind. //assume these are the fields of a table i get from the service $scope.ProductFields = ['Name','Code','UOM']; //assume this is the data i get from the rest service $scope.ProductData = [ { Name: "ProductA", Code: "#f00", UOM:"Units" }, { Name: "ProductB", Code: "#0f0", UOM:"Units" } // how can i build a dynamic object of product from the above data with the fields //something like this //for(dataItem in ProductData) // { // for(x in ProductFields) // { // $scope.datatobeBuild.push({fields[x]:data[dataItem]}); // } // } // $scope.products=$scope.datatobeBuild; ]; Here is the complete Code
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29192226
type: Question
answer count: 2
tagged with: arrays
downvote count: 0

http://stackoverflow.com/comment/46599164
comment on: http://stackoverflow.com/a/29192747
type: AnswerComment
score: 0
has text: I've never used `app` tag, where is this documented that it is *required*?
type: Comment

http://stackoverflow.com/comment/46440060
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/29104997
has text: Let me ask you this: why would you ever want that? The fact that `typeof(myvar2)` works even when `myvar2` is not defined seems like an epic JavaScript fail to me. BTW: neither `typeof` nor `delete` are functions. These are keywords and that's why this works.
type: Comment

http://stackoverflow.com/q/29124570
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46475202
has body: I'm having a problem with my mobile/tablet device orientation. So i'm trying to show a div when the device is held in landscape, but not when it's held in portrait. It works when i reload the site in portrait and turn it to landscape, but if i refresh in landscape, then the div dosen't show anymore? my Js. window.addEventListener("orientationchange", function() { if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ if(window.innerWidth &gt; window.innerHeight){ $('#rotate').css({display: "block"}); }else{ $('#rotate').css({display: "none"}); } } }, false); my Css @media only screen and (max-width:768px){ #rotate{ width:100vw; height:100vh; z-index:1000; position:fixed; top:0; left:0; display:none; background-color:#F8F8F8; } } Hope sombody can help me! Thanks
has answer: http://stackoverflow.com/a/29125221
accepted answer: http://stackoverflow.com/a/29125221
type: Question
has title: mobile/tablet device orientation partly working
tagged with: javascript
score: 0
tagged with: mobile
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46475395
tagged with: css

http://stackoverflow.com/a/29345620
score: 2
downvote count: 0
has body: You are executing the expectations in a callback function. This means that the code is being executed in the visibility.expand method. I'm pretty sure that the behaviour that you are seeing is because of the use of promises... are you using promises in the visibility.expand method?
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29162402
accepted answer of: http://stackoverflow.com/q/29162402
type: Answer

http://stackoverflow.com/q/29206397
has body: I have been using VivaGraphs for network analysis, but my knowledge is very rusty around JavaScript and concepts of SVG and WebGL in particular. I have been able to create nice networks using both SVG and WebGL and need a few pointers from you: I feel WebGL is way faster than SVG when it comes to rendering large networks. I tried on a network with 80k edges and 20k nodes. Am I right in this assumption? SVG is far easier to customize appearance of nodes and edges, WebGL is far too restrictive (or maybe my lack of knowledge). As in do you believe SVG gives me far more flexibility in customization? One thing I noticed is that I need to pause my graph after some time otherwise the clusters in my graph keep on drifting. Anyway I can restrict my graph coordinates so that it never goes out of my screen size? One major issue with WebGL I faced was that when I paused the rendered, none of my code worked (like events for node hover, click etc). But the moment I resumed it, it worked. This is not the case in SVG. My Hover,click functions on nodes work even if renderer is paused. This is a big showstopper in my case. Do you think there is a way to counter this?
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29247127
downvote count: 0
type: UnansweredQuestion
tagged with: graph
tagged with: vivagraphjs
score: 1
tagged with: webgl
has title: Questions around VivaGraph WebGL based rendering
type: Question

http://stackoverflow.com/comment/46514669
type: Comment
comment on: http://stackoverflow.com/a/29146102
type: AnswerComment
score: 0
has text: Will give it a try and get back to you:)

http://stackoverflow.com/comment/46547797
type: Comment
type: QuestionComment
has text: Without code we cant help you
score: 1
comment on: http://stackoverflow.com/q/29164415

http://stackoverflow.com/comment/46560193
score: 0
comment on: http://stackoverflow.com/q/29170476
type: QuestionComment
type: Comment
has text: From the example on this page http://jqueryvalidation.org/files/demo/marketo/, you want to hide the red line that appears at the top in case of fail? It has an `.error` class, so just add `.error{ display:none; }` to your CSS. If it doesn't work, try `.error{display:none!important; }`

http://stackoverflow.com/comment/46395245
score: 0
has text: possible duplicate of [How to replace \n with in JavaScript?](http://stackoverflow.com/questions/6331895/how-to-replace-n-with-br-in-javascript)
type: Comment
comment on: http://stackoverflow.com/q/29080989
type: QuestionComment

http://stackoverflow.com/comment/46643727
has text: That I understood. But how to push the variables into array like for (var i = 0, i < mlength; i++) { MARKETS[i].push(parseFloat(findDataForMonth(mname+i, month)) || null); }
comment on: http://stackoverflow.com/a/29216219
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46545267
has text: Submitted ticket: https://code.google.com/p/chromium/issues/detail?id=469095
comment on: http://stackoverflow.com/q/29162771
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29068124
score: 2
has comment: http://stackoverflow.com/comment/46371933
accepted answer of: http://stackoverflow.com/q/29068063
upvote count: 2
answers question: http://stackoverflow.com/q/29068063
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46372737
type: Answer
has body: This is because you are logging the variables before you actually set the new state. The reason you can see the updated properties in the object, because it logs a reference to the object, rather than a copy of the object when it was logged. Your monkey patch does not call the original pushState function until this line. return pushState.apply(history, arguments); To work around this, you could simple call the function before logging, then return the response afterwards. (function(history){ var pushState = history.pushState; history.pushState = function(state) { if (typeof history.onpushstate == "function") { history.onpushstate({state: state}); } var r = pushState.apply(history, arguments); console.log(window.location.hash); console.log(window.location.href); console.log(window.location); return r; } })(window.history); history.pushState(null, null, '#test');

http://stackoverflow.com/comment/46422776
score: 0
type: AnswerComment
type: Comment
has text: Oh wow. That already helped a lot. To the second block: To style the question'd have 2nd prio, as I could also edit this via the structure a bit. But the very last block: `$("#frage__1").slideToggle("slow", function () {}); $("#frage__2").slideToggle("slow", function () {});` is rather important to me. I now tried to use your hint like this for the first thing like that: `$(("li").parent().parent()).css.delay(1800).slideToggle("slow", function () {});` But it doesn't work out. Do I do something wrong with them brackets?
comment on: http://stackoverflow.com/a/29095837

http://stackoverflow.com/q/29135657
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46496482
has answer: http://stackoverflow.com/a/44852942
tagged with: regex
has title: taking unset() and rewriting this function in javascript
has body: I have a PHP function on my website as follows: $url = $_SERVER["REQUEST_URI"]; $x = $url; $parsed = parse_url($x); $query = $parsed['query']; parse_str($query, $params); unset($params['page']); $string = http_build_query($params); which removes the 'page' parameter from the current URL. What I need to do now however is write the same function but in javascript, to use in an onclick. I have searched and come up with the following solution: $('#localtab').click(function() { return location.href=location.href.replace(/&amp;?page=([^&amp;]$|[^&amp;]*)/i, ""); }); this is working but as this is the first ever time I've coded regex, am I doing this page reload in the best possible way? I don't wanna risk knocking off any other parameters, although there are none others containing the phrase 'page'. For example, is it best to check first if the page parameter is present in the URL (because sometimes it isn't in fact) and how would I do that? Thanks.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46496568
type: Question
has comment: http://stackoverflow.com/comment/46496449
has comment: http://stackoverflow.com/comment/46496793
has comment: http://stackoverflow.com/comment/46496493

http://stackoverflow.com/a/29122448
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29122244
has body: You can use this code to check if a checkbox is checked: if (document.getElementById('checkboxId').checked == true) //Code here... The DOM-attribute "checked" does not change when you click the checkbox, it's used to know how it should be initialised.

http://stackoverflow.com/comment/46555074
score: 0
type: Comment
has text: Do you have any plnkr/fiddle for this?
type: QuestionComment
comment on: http://stackoverflow.com/q/29120270

http://stackoverflow.com/q/29138035
accepted answer: http://stackoverflow.com/a/29138235
favorite count: 0
has comment: http://stackoverflow.com/comment/46500642
tagged with: frontend
has comment: http://stackoverflow.com/comment/46500407
upvote count: 1
has body: In the render function of a reactJS class, I have the following button, it triggers confirmRemove <%= image_tag("form/remove.png") %> In confirmRemove (it's coffee-script), a magnificPop is created: confirmRemove: (e) -> e.preventDefault() $.magnificPopup.open( { items: { type: 'inline', src: $( ' Do you really want to remove this entry from the playlist? No Yes ' ) }, type: 'inline', midClick: true } ) $('#test-popup-yes').click -> $.magnificPopup.close() $.ajax type: 'PUT' dataType: 'JSON' url: "/xxx/#{@props.xxxId}/remove_entry" data: '_method': 'PUT' 'xxx_id': @props.id beforeSend: => $.status_message 'Removing xxx', 0 @props.onDeleteStart() success: (data) => $.success_message 'Successfully removed xxx' @props.onDeleteCommit() error: (data) => $.error_message 'Error removing xxx' @props.onDeleteFailure() But on clicking the test-popup-yes button, I got detailed error: TypeError: this.props is undefined I think this is a scoping issue, any idea on accessing @props inside the on-click function.
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29138235
type: Question
tagged with: reactjs
answer count: 1
downvote count: 0
has title: Accessing @props from magnificPopup in ReactJS
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46363101
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29063490
has text: You'll need to remove the loop and code it completely recursive. Then you can easily use `setTimeout`
score: 0

http://stackoverflow.com/a/29103911
answers question: http://stackoverflow.com/q/29103808
score: 2
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46437754
has body: Try this instead: function scaleVideo() { var scale; //this is the change var windowHeight = $(window).height(); var windowWidth = $(window).width(); var videoNativeWidth = $('video#bgvideo')[0].videoWidth; var videoNativeHeight = $('video#bgvideo')[0].videoHeight; var heightScaleFactor = windowHeight / videoNativeHeight; var widthScaleFactor = windowWidth / videoNativeWidth; if (widthScaleFactor &gt;= heightScaleFactor) { scale = widthScaleFactor; //simply modify the value here } else { scale = heightScaleFactor; } var scaledVideoHeight = videoNativeHeight * scale; var scaledVideoWidth = videoNativeWidth * scale; $('video#bgvideo').height(scaledVideoHeight); $('video#bgvideo').width(scaledVideoWidth); }
accepted answer of: http://stackoverflow.com/q/29103808

http://stackoverflow.com/comment/46463686
type: Comment
score: 0
has text: thanks. Its worked in demo. but in live I have missed something.
type: AnswerComment
comment on: http://stackoverflow.com/a/29117720

http://stackoverflow.com/q/29204353
upvote count: 2
has answer: http://stackoverflow.com/a/29204432
has title: Make dropdown read-only
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
possible better answer: http://stackoverflow.com/a/29204432
favorite count: 0
has answer: http://stackoverflow.com/a/29204541
has comment: http://stackoverflow.com/comment/46619921
answer count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/368813
score: 1
has body: I am trying to write a code which will make HTML dropdowns readonly but not "disabled" because I want to capture the default values in current form that are coming from previous form. I have written the below code which is working perfectly fine in Chrome but not working in IE. What could be the possible solution to this. Below is the jquery code that I have written. $("#Q4Q25xP1_1, #Q4Q25xP1_2, #Q4Q25xP1_3, #Q4Q25xP1_4, #Q4Q25xP1_5").each(function(){ $(this).on("mousedown", function(e){ return false; }).on("change", function(){ $(this).find('option').each(function(i, opt) { opt.selected = opt.defaultSelected; }); }).css("background-color","grey"); });
has comment: http://stackoverflow.com/comment/46619895
has comment: http://stackoverflow.com/comment/46619923
type: Question
has answer: http://stackoverflow.com/a/29204809
accepted answer: http://stackoverflow.com/a/29204809
has comment: http://stackoverflow.com/comment/46620039
has answer: http://stackoverflow.com/a/29204436
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
has comment: http://stackoverflow.com/comment/46619934

http://stackoverflow.com/comment/46400652
type: Comment
has text: Well what does "1024" represent? Just use a label formatter to change it into whatever you want.
type: AnswerComment
comment on: http://stackoverflow.com/a/29066941
score: 0

phantomjs
tags question: http://stackoverflow.com/q/29092652
tags question: http://stackoverflow.com/q/29089467
type: Tag
tags question: http://stackoverflow.com/q/29173885
tags question: http://stackoverflow.com/q/29212345
tags question: http://stackoverflow.com/q/29140762
tags question: http://stackoverflow.com/q/29070041
tag name: phantomjs
tags question: http://stackoverflow.com/q/29108430
tags question: http://stackoverflow.com/q/29211158
tags question: http://stackoverflow.com/q/29089884
tags question: http://stackoverflow.com/q/29160446
tags question: http://stackoverflow.com/q/29115888
tags question: http://stackoverflow.com/q/29128318
tags question: http://stackoverflow.com/q/29213450
tags question: http://stackoverflow.com/q/29111171

http://stackoverflow.com/a/29114016
has comment: http://stackoverflow.com/comment/46457174
type: Answer
has comment: http://stackoverflow.com/comment/46457360
answers question: http://stackoverflow.com/q/29113855
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29113855
has comment: http://stackoverflow.com/comment/46482039
score: 0
has body: you can use jquery, it will help you alot. see this example: &lt;img id="button" data-product-id="XYZ" name="items" src="add.png"/&gt; &lt;script&gt; $("#button").toggle(function(){ //first functon here simpleCart.add({ name: $(this).attr("data-product-id"), price: .99 }); //we set src of image with jquery $(this).attr("src", "image/path/to_1.png"); },function(){ //second function here //simplecart remove function here, this isjust example, adjust with your code simpleCart.remove({ name: $(this).attr("data-product-id") }); $(this).attr("src", "image/path/to_2.png"); }); &lt;/script&gt;

http://stackoverflow.com/a/29175042
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29174805
has body: These two lines create NaN in each index of question/answer ARRAYs: question[i] = randNum + ops[operator] + randNum; answer[i] = randNum + ops[operator] + randNum; Because: ops[operator] is not a Number;

http://stackoverflow.com/q/29090294
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46413051
has comment: http://stackoverflow.com/comment/46413257
has comment: http://stackoverflow.com/comment/46413008
has comment: http://stackoverflow.com/comment/46413080
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46413225
favorite count: 0
has comment: http://stackoverflow.com/comment/46413193
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: So I want the user coming to my portfolio to enter their first name on the index.html page. Then I will welcome the user on the welcome page. How do I pass the information from the index.html to the welcome.html. I'm a novice at angular, your will be very grateful! index.html: Enter Your First Name: CLICKME {{user.name}} welcome.html: sfdvsdfvsdv {{data.message}} fsdv sdfvsdfv sdf fs vsdfv sdfvf f vsdfv sdfv sfdv dsv fdv app.js: (function(){ var myApp = angular.module('myApp', []); myApp.controller('UserName', function(){ this.product = name; }); var User = { name: "" } }); Here is the github: https://github.com/wiafe/Portfolio And here is the page: http://wiafe.github.io/Portfolio/ PS: The h1 that's being bind in index.html can be ignored I was just testing something.
has comment: http://stackoverflow.com/comment/46413283
has title: Angular Data Binding problems
upvote count: 1
has comment: http://stackoverflow.com/comment/46413251

http://stackoverflow.com/a/29124086
has comment: http://stackoverflow.com/comment/46499343
has body: OnGridComplete You may use bellow code: var firstRowId = $("tr:first","#request_list").attr("id"); $("#request_list").setSelection(firstRowId); Your overall code for OnGridComplete should look like this reqListGrid.gridComplete = function(){ var req_top_row = $("tr:first","#request_list").attr("id"); $("#request_list").setSelection(req_top_row); };
type: Answer
has comment: http://stackoverflow.com/comment/46474775
score: 0
answers question: http://stackoverflow.com/q/29124003

http://stackoverflow.com/q/29066271
favorite count: 0
has answer: http://stackoverflow.com/a/29066434
type: AnsweredQuestion
has body: Code: http://cssdeck.com/labs/xpwki4sy Is there any way to keep the main website on slide two when the lightbox is open? Currently the main slider page shifts when you flip images in the lightbox using the arrow keys, there is no problem is the arrows within the lightbox are used.
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29066434
tagged with: lightbox
downvote count: 0
tagged with: javascript
has title: How to keep sliding website on page while lightbox is open?
tagged with: slider
answer count: 1
score: 1

http://stackoverflow.com/comment/46641545
comment on: http://stackoverflow.com/q/29215967
score: 1
has text: You just have to copy the `form submit` code when clicking the image.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46595113
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29190059
has text: I guess you were trying to blur on change event in autocomplete? So when you click create new account, that text box value is already changed and is not focused as well. I guess jquery ui dialog probably tries to focus again on that element on close by default. Not exactly sure why, have to check source code.

http://stackoverflow.com/comment/46584437
comment on: http://stackoverflow.com/a/29175217
score: 0
type: AnswerComment
has text: As I said, I have a more complex example, where I need to render the chart to the canvas element. So the using of the jQuery is necessary. Maybe exists the way where I can force destoying and re-rendering of the template?
type: Comment

http://stackoverflow.com/q/29178900
score: 0
has title: how to close current window after href to a download link
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46574876
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
has body: I have HTML code is like this: &lt;script type="text/javascript"&gt; initPage(); // do someting location.href = "http://mail//download.php?lcaction=5" //download file link // window.open("http://mail//download.php?lcaction=5"); // to close current window, but can not work window.opener = null; window.open("", "_self"); window.close(); &lt;/script&gt; When I try to use window.open instead of href, it works in Chrome, but it fails in IE. What can I do to make this work properly?
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/46574924
type: Question
has comment: http://stackoverflow.com/comment/46575048
tagged with: javascript

http://stackoverflow.com/q/29205145
tagged with: php
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/29205586
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has title: CKeditor link not saved as it should be
answer count: 1
accepted answer: http://stackoverflow.com/a/29205586
has body: I'm using CKeditor on a website. When I'm trying to save some link in text I wrote to DB. It gets saved differently. For example : &lt;a href=\"http://example.com/images/somefolder/en.pdf\"&gt; is saved like that, even if I entered it like &lt;a href="http://example.com/images/somefolder/en.pdf"&gt; I'm not using any plugin or something like that. Haven't even changed anything, just downloaded it and that's it.

http://stackoverflow.com/q/29117416
tagged with: ajax
tagged with: ruby
has answer: http://stackoverflow.com/a/29117757
type: UnansweredQuestion
tagged with: ruby-on-rails
has title: Form has the wrong action when created by an ajax partial - Ruby
type: Question
has body: I have a form that gets loaded by an ajax partial. When it gets swapped in, the form that loads on that ajax partial is targeting the wrong controller/url. I attempted to target the correct controller in a variety of ways, but it was always over-written to the same, incorrect controller/url. Additionally, the form loads correctly if it is loaded on page refresh - only when it is loaded by ajax does it target the incorrect controller. Here is what the form html looks like when it loads incorrectly: &lt;form class="new_prediction" id="new_prediction" action="/predictions" accept-charset="UTF-8" data-remote="true" method="post"&gt;&lt;input name="utf8" type="hidden" value="✓"&gt; Here is what the form html should look like, and what it does look like after page refresh: &lt;form class="new_predictionend" id="new_predictionend" action="/predictionends" accept-charset="UTF-8" data-remote="true" method="post"&gt;&lt;input name="utf8" type="hidden" value="✓"&gt; My question is, why does the form target an incorrect controller "/predictions" when the form is loaded by ajax? The partial clearly shows that a new "Predictionend" model is the object for the form, and so should be targeting "/predictionends" like it does correctly when the page is refreshed. Here is the form partial that loads for both the page refresh and the ajax load: &lt;%= form_for(Predictionend.new, remote:true) do |f| %&gt; &lt;div class="sidebar-open-close-comment-div"&gt; &lt;%= f.text_area :comment, placeholder: "Make a closing comment", class: "close-comment-textarea" %&gt; &lt;/div&gt; &lt;div class="sidebar-close-button"&gt; &lt;%= f.submit "SUBMIT", class: "btn" %&gt; &lt;/div&gt; &lt;% end %&gt; This is the ajax file that loads the form: $('.stockpage-sidebar-prediction').first().html("&lt;%= j render partial: 'predictions/prediction_end', locals: {prediction: @prediction} %&gt;"); Controller that loads the ajax: class PredictionsController &lt; ApplicationController def create @prediction = @user…
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/q/29168689
has comment: http://stackoverflow.com/comment/46555768
score: 5
has comment: http://stackoverflow.com/comment/46555774
favorite count: 0
has comment: http://stackoverflow.com/comment/46556079
has answer: http://stackoverflow.com/a/29168767
has body: I have a few empty objects in my JSON request: FXP: "createdBy": {}, I would like to before the request is sent to the server convert these empty objects into following structure: "createdBy": null, How can I do it recursively in whole object please? Example: { "main": { "id": null, "archived": true, "createdBy": {}, "creationTime": null, "location": { "id": 79, "address": { "id": 79, "city": null, "latitude": 50.072613888888895, "longitude": 14.543111111111111, "street": null, "streetNumber": null, "district": null }, "bsc": "BSC123", "code": null, "indoorOutdoor": null, "siteId": "A0RST", "stationType": { "id": 1, "name": "Indoor solution" }, "shared": false, "sapSacIrnCode": "31049.0", "abloyLocation": "NA", "name": "A0RST" }, "actionName": {}, "orderType": {}, "project": { "id": 1, "cards": [], "color": null, "managerCustomer": null, "managerSuntel": null, "heliosSync": false, "name": "Vodafone Test", "parentProject": null, "team": null, "facility": { "id": 1, "code": 110, "name": "110_MANAGEMENT" }, "workers": [] }, "note": "", "orderNumber": "2626262" }, "milestoneSequence": {}, "milestones": [] }
upvote count: 6
answer count: 4
has answer: http://stackoverflow.com/a/29168889
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29168973
has answer: http://stackoverflow.com/a/65463230
downvote count: 1
has title: How to recursively set empty objects {} to null?
tagged with: javascript
type: Question

http://stackoverflow.com/a/29202563
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29202554
has body: You're firing an event, and to keep this code portable, it's best to do your actions on the event itself instead of a specific item. var fArray = event.currentTarget.files; will do what you're after.
answers question: http://stackoverflow.com/q/29202554
score: 0

http://stackoverflow.com/q/29179427
has answer: http://stackoverflow.com/a/29179730
tagged with: javascript
has answer: http://stackoverflow.com/a/29180242
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29180242
accepted answer: http://stackoverflow.com/a/29179730
linked to: http://stackoverflow.com/q/8240637
has title: A simple algorithm to find value from sequence for a Random number?
score: 0
has comment: http://stackoverflow.com/comment/46575858
tagged with: java
has body: I would like to create a general algorithm for the sequence (I am not storing the sequence anywhere).. if 1=A 2=B 3=C . . . 26=Z 27=AA 28=AB 29=AC 30=AD What should be the code to get the value of any random number ? e.g 333
duplicate of: http://stackoverflow.com/q/8240637
linked to: http://stackoverflow.com/q/12699030
has comment: http://stackoverflow.com/comment/46576162
answer count: 2
has comment: http://stackoverflow.com/comment/46576221
tagged with: algorithm

http://stackoverflow.com/comment/46425005
score: 1
comment on: http://stackoverflow.com/q/29097154
type: Comment
type: QuestionComment
has text: what do you mean by cycle , recursion or loop ? also what exactly you want to do ? can you show us what have you tried because writing function name does not count

http://stackoverflow.com/a/29101597
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46433475
has body: You have a few problems here, the first being that you do not use == when assigning variables, and the second being that you need to use var rather than string. So, your code should look like this: var mystring = "&lt;input class='success' type='button' id='Delegate_New_btn' value='New' onclick='location.href=\'+mylocation+\''/&gt;"; The only time that you need to use \' is if your single quotes are included in single quotes, like you have with the location.href part.
answers question: http://stackoverflow.com/q/29101238

http://stackoverflow.com/comment/46552668
has text: Yes, I saw it working. I end up with: ` ` Where the content that is supposed to be appended to the outer directive is empty.
comment on: http://stackoverflow.com/a/29154385
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46562722
has text: That documentation does not state support for jsonp or CORS so I would say that client side access is not supported.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29162699
type: Comment

http://stackoverflow.com/comment/46406981
comment on: http://stackoverflow.com/q/29086742
type: Comment
score: 0
has text: @MihaiP. I didn't know where to even start with this, Just needed someone to guide to the right direction. I was way off with this, I was trying to create a duplicate object and then using .is() to compare the both. There isn't anything helpful on the web regarding this.
type: QuestionComment

http://stackoverflow.com/comment/46547403
has text: @AsleG in a `foreach` loop you shouldn't need that — the loop behaves just like `with:` in that regard, because inside the loop, `$data` is already the right object. As a rule of thumb: when you can call the function directly, such as `toggleLike`, you're fine. When you have a dot somewhere, such as `myMessage.toggleLike`, you have to be careful.
type: AnswerComment
comment on: http://stackoverflow.com/a/29163526
score: 0
type: Comment

http://stackoverflow.com/a/29113234
type: Answer
answers question: http://stackoverflow.com/q/29113115
has body: var myRegex = /^[A-Za-z\-]+$/; myRegex.test('hello'); //true myRegex.test('asdasd-adasd'); //true myRegex.test('123as'); //false
score: 0
accepted answer of: http://stackoverflow.com/q/29113115
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46455539

http://stackoverflow.com/a/29076281
answers question: http://stackoverflow.com/q/29076217
score: 1
upvote count: 1
type: Answer
downvote count: 0
has body: You should execute it like that: var input = [{ 'FirstName': $('#txtFirstName').val() }]; Your jQuery expression should not be a string! The resulting JS four you should look like that: var input = [{ 'FirstName': $('#txtFirstName').val(), 'LastName': $('#txtLastName').val(), 'City': $('#txtCity').val(), 'EmailID': $('#txtEmailID').val() }]; input = JSON.stringify(input); Consider using jQuery formSerialize method to collect all the form data: $('#myFormId').formSerialize();

http://stackoverflow.com/q/29143417
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46510389
downvote count: 1
type: Question
has body: Why click circle image , div not toggle using javascript ? When i click gray square, it's will toggle ok. But Why toggle not work, when click circle image. How can i do for work. &lt;img src="http://images.wikia.com/gtawiki/images/archive/3/3e/20090730000919!PS3_Circle.png" style=" border: none;" id="image_test" onclick="showDivtest('div1')" /&gt; http://jsfiddle.net/a3MKG/40/ &lt;script&gt; function showDiv(id) { $("#div1").toggle(); } $(document).click(function(e) { if( !$('#image_test').is( e.target ) ) $("#div1").hide(); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46509882
has answer: http://stackoverflow.com/a/29144104
score: -1
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Why click circle image , div not toggle using javascript?

http://stackoverflow.com/q/29093396
possible better answer: http://stackoverflow.com/a/49510834
answer count: 10
has answer: http://stackoverflow.com/a/49510834
has answer: http://stackoverflow.com/a/29094018
has comment: http://stackoverflow.com/comment/96974520
downvote count: 1
has answer: http://stackoverflow.com/a/29094209
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/75769344
has body: In ECMAScript 6 the typeof of classes is, according to the specification, 'function'. However also according to the specification you are not allowed to call the object created via the class syntax as a normal function call. In other words, you must use the new keyword otherwise a TypeError is thrown. TypeError: Classes can’t be function-called So without using try catch, which would be very ugly and destroy performance, how can you check to see if a function came from the class syntax or from the function syntax?
has answer: http://stackoverflow.com/a/32235645
has comment: http://stackoverflow.com/comment/52358782
type: Question
has answer: http://stackoverflow.com/a/29093702
tagged with: ecmascript-6
upvote count: 43
tagged with: es6-class
has answer: http://stackoverflow.com/a/54044011
accepted answer: http://stackoverflow.com/a/29094209
tagged with: javascript
has answer: http://stackoverflow.com/a/71135668
score: 42
has title: How do you check the difference between an ECMAScript 6 class and function?
favorite count: 0
has answer: http://stackoverflow.com/a/32235930
has answer: http://stackoverflow.com/a/53648593

currency
tag name: currency
tags question: http://stackoverflow.com/q/29070448
type: Tag
tags question: http://stackoverflow.com/q/29114122

http://stackoverflow.com/q/29096573
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29096742
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/29096742
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: i have an example Plunker. Why binding onto count: 0 not working ? Here is code from *.js file: var app = angular.module("MyApp", []); app.controller("objectCtrl", function($scope, sharingData) { $scope.message = sharingData.message; }); app.controller("primitiveCtrl", function($scope, sharingData) { $scope.count = sharingData.message.count; }); app.controller("watchCtrl", function($scope, sharingData) { $scope.message = {}; $scope.$watch(function() { return sharingData.message.count; }, function(value) { $scope.message.count = value; }); }); app.factory('sharingData', function() { return { count: 0, message: { count: 0 } }; }); app.run(function($rootScope, sharingData) { $rootScope.Inc = function() { sharingData.message.count = ++sharingData.count; }; });
has title: Why angular binding don't work with service primitives

http://stackoverflow.com/a/29069370
upvote count: 1
answers question: http://stackoverflow.com/q/29069355
accepted answer of: http://stackoverflow.com/q/29069355
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: You could do this: function vanish(elementName) { var el = document.getElementById(elementName); if (el.style.display == "block") el.style.display = "none"; else el.style.display = "block"; } Function call: vanish('priceCheck1');

http://stackoverflow.com/q/29127006
has answer: http://stackoverflow.com/a/29127044
has answer: http://stackoverflow.com/a/29127040
possible better answer: http://stackoverflow.com/a/29127044
has body: I'm not sure how I can use the greater than (>) or less than (&lt;) with ranges. For example, if I have a variable x and I want to compare it to y - I want to say if x is less (or greater) than y by a given number. For instance, if x is 50 or further away from y. How can I represent this in code?
has title: How to use range with greater than and less than
has answer: http://stackoverflow.com/a/29127026
type: AnsweredQuestion
score: -5
downvote count: 5
accepted answer: http://stackoverflow.com/a/29127040
type: Question
upvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3

http://stackoverflow.com/q/29120141
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29120314
has title: Prevent Default Action with jQuery Autocomplete
possible better answer: http://stackoverflow.com/a/29120314
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29121564
upvote count: 1
downvote count: 1
type: Question
has body: I have a jQuery Autocomplete input field on a web page. Results are retrieved from a database, but in the case of no results being found, I actually have an option saying "No Results Found". Now, if a user selects "No Results Found" option, I want the field to display the previously selected value. Does anyone have an idea of how to do this?
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29121564

http://stackoverflow.com/comment/46500990
type: Comment
type: QuestionComment
has text: @squiroid it was a typo error dear. I was only planning to set the value of the property from false to true. This was achieved thankfully using the $index service :)
comment on: http://stackoverflow.com/q/29070639
score: 0

http://stackoverflow.com/a/29189384
has body: Each browser will show dates in the console like it wants. In your case, Firefox seems to use Date.prototype.toISOString under the hood: new Date("2014-12-01").toISOString(); // "2014-12-01T00:00:00.000Z" And Chrome seems to use Date.prototype.toString. In my case, on Chrome and in my timezone, I get new Date("2014-12-01"); // Mon Dec 01 2014 01:00:00 GMT+0100 (Hora estándar romance) new Date("2014-12-01").toString(); //"Mon Dec 01 2014 01:00:00 GMT+0100 (Hora estándar romance)" However, note that Chrome does not render it as a day before. It's just that it uses GMT-0600: Date.parse("Sun Nov 30 2014 18:00:00 GMT-0600 (CST)"); // 1417392000000 Date.parse("2014-12-01T00:00:00.000Z"); // 1417392000000
has comment: http://stackoverflow.com/comment/46593394
has comment: http://stackoverflow.com/comment/46593302
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46593538
type: Answer
accepted answer of: http://stackoverflow.com/q/29189347
score: 2
has comment: http://stackoverflow.com/comment/46593451
answers question: http://stackoverflow.com/q/29189347
downvote count: 0

http://stackoverflow.com/a/29204856
accepted answer of: http://stackoverflow.com/q/29204788
upvote count: 2
has body: You need to attach the click handler to $element not this. Inside add_bindings, this refers to the plugin object not the clicked element so this will not have a method named on(You should get an error like Uncaught TypeError: undefined is not a function in your console) plugin.add_bindings = function () { $element.click(function (e) { alert('a'); e.preventDefault() }) } Demo: Fiddle
answers question: http://stackoverflow.com/q/29204788
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29156078
type: Answer
downvote count: 0
score: 1
has body: There are two divs enclosing a tag with class close. So i guess it should be $('.close').click(function() { $(this).parent().parent().remove(); $("#sortable").sort(); });
answers question: http://stackoverflow.com/q/29155834
upvote count: 1

http://stackoverflow.com/comment/46540525
type: AnswerComment
comment on: http://stackoverflow.com/a/29160187
type: Comment
has text: Arun: I know aboutthe data attribute. Curious to know which one is a better option to use.
score: 0

http://stackoverflow.com/comment/46403732
has text: using the datepickers refresh at the end of the onSelect statement does not work.
comment on: http://stackoverflow.com/q/29085489
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46591573
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29188399
type: Comment
has text: You should explain the change you made (which was replacing the double quote with a single on the final string block)

http://stackoverflow.com/comment/46763174
type: Comment
has text: Obviously, the server returns strings. You could also use `.getJSON()` instead of `.get()`, which will parse the JSON (will apply `JSON.parse()`) before entering the `success()` method. You could also set the type of the data to receive using `dataType`. Read the documentation/search in Google... http://api.jquery.com/jquery.get/
type: AnswerComment
comment on: http://stackoverflow.com/a/29282516
score: 0

http://stackoverflow.com/a/29215521
score: 0
has body: Well if you format your code, you can see your problem. $(document).ready(function() { $("#catlist").change(function() { var vid = document.getElementById("catlist").value; $.getjson("ajax.php", { catid: vid }, function(result) { alert(result); } .error(function(xhr) { //&lt;-- error inside getJSON alert(xhr) });) //&lt;-- a random ) }) }) and You have an inline event onchange='getval(this);' but you do not have a function getval listed.
answers question: http://stackoverflow.com/q/29214977
type: Answer

http://stackoverflow.com/a/78979189
type: Answer
has body: **maybe this way,and I also added if the user from index.html to nex.html, and in nex.html the user added url # , ** var kembali = -1; var kembali2; var kembali3 = ""; window.addEventListener('popstate',function(event) { kembali--; if (kembali2 != "") { if (kembali2 == window.history.length) { kembali3 = "ya"; } } kembali2 = window.history.length; }); setInterval(function() { if(kembali3 == "ya") { window.history.back(); } },100); If you want to use the click back event, use this code history.go(kembali);
score: 0
answers question: http://stackoverflow.com/q/29125703

http://stackoverflow.com/comment/46447207
score: 0
has text: Glad to hear it! I'd be grateful if you could accept my answer!
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29105925

http://stackoverflow.com/a/29218970
has body: Since you are using jQuery try: $( document ).ready(function() { //console.log( "ready!" ); PDF1(); }); Also Note: You could use (not required): var source = $("body")[0]; Code page used to test fromHTML EX ASDSADASDASDSA don't print this to pdf print this to pdf
type: Answer
upvote count: 14
score: 13
downvote count: 1
answers question: http://stackoverflow.com/q/29217739
accepted answer of: http://stackoverflow.com/q/29217739
has comment: http://stackoverflow.com/comment/97107804
type: AcceptedAnswer

http://stackoverflow.com/comment/46415004
comment on: http://stackoverflow.com/q/29091197
score: 0
type: Comment
type: QuestionComment
has text: It should be the id of the project: ```{ project: { id: '123qwe', ... } }```. ```{{id}}``` renders fine in the template. Please advise if the approach I'm following can be improved.

http://stackoverflow.com/q/29115179
has title: Registering a controller at the config phase of the app
answer count: 1
tagged with: javascript
tagged with: controller
tagged with: angularjs
type: UnansweredQuestion
type: Question
has body: I am trying to use a same controller in two different apps. For that I need to register the controller at the config phase of both the apps. Right now, the code is like this: FILE: myController.js function myController() { . . . } app.controller('myController', myController); Now, as I want to use it in two different apps, I cannot register it in the myController.js file. How can I register it in the config phase of both the apps ? One way I tried was by creating a provider that function controllerRegister() { var self = this; self.$get = function () { return { app.controller('myController', myController); } }; } module.provider('controllerRegister', controllerRegister); Now, when I try to use this provider, it says myController function not found. How can I make it work. Or is there a better solution to use same controller in 2 apps ?
has answer: http://stackoverflow.com/a/29117960
score: 0

http://stackoverflow.com/comment/46560986
has text: @jQuery.PHP.Magento.com: Quoting the OP *"No white space inside the html."*
type: AnswerComment
comment on: http://stackoverflow.com/a/29171338
score: 0
type: Comment

http://stackoverflow.com/a/29122459
type: Answer
answers question: http://stackoverflow.com/q/29122322
has body: You are missing Open close bracket on first children control.children().each( function() { control.childre().each( function() { control.find("option:selected").each( function() {
score: 0

http://stackoverflow.com/a/29111301
answers question: http://stackoverflow.com/q/29111241
score: 1
upvote count: 1
has body: Try moving subGui outside the for loop and modifiy you code so that you don't reassign subGui varialbe. var subGui = new dat.GUI(); for(i = 0; i &lt; subObjArray.length; i ++) { var currObj = subObjArray[i]; subGui.addFolder(currObj['name']);// &lt;--- work on this line subGui.add(currObj, 'numVertices'); subGui.add(currObj, "ShowCoord"); } Otherwise it will always be redefined with the last iterated element of for loop Note: This is just a hint, I can't conclude more from your code.
has comment: http://stackoverflow.com/comment/46778251
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29111241

http://stackoverflow.com/comment/46583502
score: 0
type: Comment
has text: I haven't used Jekyll myself, sorry. But [this page](http://wolfslittlestore.be/2012/08/html-includes-with-jekyll/) looks promising.
type: AnswerComment
comment on: http://stackoverflow.com/a/29182957

http://stackoverflow.com/q/29194823
downvote count: 3
has answer: http://stackoverflow.com/a/29195028
has comment: http://stackoverflow.com/comment/46605210
tagged with: unityscript
type: Question
has title: UnityScript vs Javascript
answer count: 2
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/46602836
has comment: http://stackoverflow.com/comment/46602897
has body: I know there's a difference between the languages, such as classes etc. What I wonder is this: If UnityScript is different from Javascript, why does the Unity3D documentation give you the options to pick between C# and JS when you look through it? Shouldn't it be a choice between C# and US? Meanwhile, here on Stack Overflow, people generally make the effort to correct people who call it Javascript. Why is that?
has answer: http://stackoverflow.com/a/29196580
favorite count: 0
tagged with: unity-game-engine
upvote count: 7
has comment: http://stackoverflow.com/comment/46602800
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46606568
has comment: http://stackoverflow.com/comment/49198970
possible better answer: http://stackoverflow.com/a/29195028
accepted answer: http://stackoverflow.com/a/29196580

http://stackoverflow.com/comment/46539739
has text: that means ActiveXObject is found but you are facing some error before reaching the `console.log()` line. My guess is that your `Data Source='C:\TWP Alternate Press.accdb'` is not getting the database. Please try 1. copy the TWP Alternate Press.accdb in to your project root folder. 2. change the name to TWPAlternatePress.accdb for safety. 3. change this `adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\TWP Alternate Press.accdb'");` to `adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='/\TWPAlternatePress.accdb'");`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29159842

http://stackoverflow.com/comment/46580064
type: Comment
type: QuestionComment
has text: you need not click on the body but the mouse must be hovering over the body
score: 0
comment on: http://stackoverflow.com/q/29181789

http://stackoverflow.com/a/29143620
score: 3
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29143191
upvote count: 3
has body: The problem is that the HTML for that page is mostly built by your browser using JavaScript after the page has been downloaded. Using LWP::Simple::get will just retrieve the skeleton HTML and the JavaScript code. You can see that if you print $html instead of parsing it. The usual solution is to use WWW::Mechanize::Firefox which gets an installed Firefox to download and build the page which you can then query. It's a lot more complex than a simple get though, as you have to install Firefox if you don't already have it, as well as the Mozilla MozRepl addon which enables remote control. Even then you may still get problems with accessing the contents of the page before the browser has finished building it, so it's not for the faint of heart. Update For your interest, here is a solution using WWW::Mechanize::Firefox. use strict; use warnings; use WWW::Mechanize::Firefox; use HTML::TreeBuilder::XPath; my $url = 'http://www.lolking.net/leaderboards/#/na/1'; my $mech = WWW::Mechanize::Firefox-&gt;new; my $resp = $mech-&gt;get($url); die $resp-&gt;status_line unless $resp-&gt;is_success; my $tree = HTML::TreeBuilder::XPath-&gt;new_from_content($resp-&gt;content); for my $node ( $tree-&gt;findnodes('//tr[starts-with(@class, "lb_row_rank")]') ) { printf "Rank %2d: %s\n", $node-&gt;attr('class') =~ /(\d+)/, $node-&gt;attr('data-summonername'); } output Rank 1: Doublelift Rank 2: F5 Veritas Rank 3: Life Love Live Rank 4: MatLife TriHard Rank 5: TDK Kyle Rank 6: Liquid FeniX Rank 7: Liquid Inori TV Rank 8: dawoofsclaw Rank 9: who is he Rank 10: Ohhhq

http://stackoverflow.com/comment/46554204
score: 0
type: AnswerComment
type: Comment
has text: Thanks Canon, that looks very clean. May I assume this works faster due to not using any (or almost no) jquery functions?
comment on: http://stackoverflow.com/a/29167688

http://stackoverflow.com/a/29210807
downvote count: 0
has comment: http://stackoverflow.com/comment/46631247
has body: .push returns: The new length property of the object upon which the method was called So ["b"] you have an array. ["b"].push("a"), yes it is now ["b", "a"] but since you didn't assign it, you are left with the result of the push call which is its new length, 2. You can either assign it separately: var j = ["b"]; j.push("a"); console.log(j); Or use .concat returns a new array comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments. var j = ["b"].concat("a"); console.log(j);
type: Answer
upvote count: 7
has comment: http://stackoverflow.com/comment/46631484
accepted answer of: http://stackoverflow.com/q/29210769
answers question: http://stackoverflow.com/q/29210769
score: 7
type: AcceptedAnswer

http://stackoverflow.com/q/29119099
downvote count: 0
has answer: http://stackoverflow.com/a/29119133
accepted answer: http://stackoverflow.com/a/29119133
type: AnsweredQuestion
type: Question
score: 9
tagged with: canvas
answer count: 1
tagged with: javascript
favorite count: 0
has title: HTML5 canvas drawImage incorrect image size
tagged with: http://stackoverflow.com/tag/html
has body: Hello i have problem i try to drawing image on the canvas with drawImage function 50px x 50px on the 50px x 50px canvas, but i get smaller than i need. var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var img = new Image(); img.onload = function() { $("canvas").css("width", 50); $("canvas").css("height", 50); ctx.drawImage(img, 0, 0, 50, 50); //bad here why not drawing 50x50px image on the canvas? } img.src = 'http://www.w3schools.com/tags/planets.gif';
upvote count: 9

http://stackoverflow.com/comment/46525289
score: 0
type: QuestionComment
type: Comment
has text: This is intended to be a browser plugin so it might not always run in V8.
comment on: http://stackoverflow.com/q/29151863

http://stackoverflow.com/q/29165008
type: UnansweredQuestion
has body: I have a textarea and needed value is multiple string separated with newline. After success, only the last stringf is caught. Here is my code: var stringf; var lines = $('#bulk_string').val().split('\n'); for(var i = 0;i < lines.length;i++){ if(lines[i].length > 0){ stringf = lines[i]; $.ajax({ type: "POST", url: "ajaxuser.php", data: 'do=submit&info='+stringf, success: function(data) { $('#string_list').append(' '+stringf+' '+data '); } }); } }
score: 1
has answer: http://stackoverflow.com/a/29165402
type: Question
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Jquery ajax get string after success

http://stackoverflow.com/q/29203738
has comment: http://stackoverflow.com/comment/46660034
has comment: http://stackoverflow.com/comment/46626697
type: Question
has body: I need help to snap to fit the draggable elements in High charts. The "draggable-point.js" is used drag my line type object, but I need to snap fit draggable object to the near by y-axis. Here I attached the fiddle linek. Here they done dragging without snap to fit to y-axis. link : http://jsfiddle.net/highcharts/AyUbx/1914/ Thanks in advance. Highcharts.Chart.prototype.callbacks.push(function (chart) { interval = parseInt($("#scaleY").val()); snapFit = parseInt($("#snapsPerLine").val()); snapInterval = interval/snapFit; var container = chart.container, dragPoint, dragX, dragY, dragPlotX, dragPlotY; chart.redraw(); });
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
answer count: 0
type: UnansweredQuestion
has title: How to snap fit the line type in High charts using draggabe point js
has comment: http://stackoverflow.com/comment/46626407
tagged with: jquery-ui

http://stackoverflow.com/a/29201223
has comment: http://stackoverflow.com/comment/46615610
has body: you have many errors JSFiddel $(document).ready(function(){var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var x = 1; //initlal text box count add_button.click(function (e) { //on add input button click if ($(".containers").length < 11 ) { //max input box allowed x++; //text box increment wrapper.append(' 1 Remove ') //add input box } }); wrapper.on("click", ".remove_field", function (e) { //user click on remove text id = $(this).attr('data-id'); $("#container_" + x).remove(); x--;});});
has comment: http://stackoverflow.com/comment/46614844
has comment: http://stackoverflow.com/comment/46615567
has comment: http://stackoverflow.com/comment/46615471
type: Answer
answers question: http://stackoverflow.com/q/29201160
has comment: http://stackoverflow.com/comment/46614882
has comment: http://stackoverflow.com/comment/46615266
score: 0
has comment: http://stackoverflow.com/comment/46614883

http://stackoverflow.com/a/42305466
score: 5
has body: I have created this age calculator for my project using jQuery UI. and JavaScript function. you will get the exact result. It it will calculate age and display as human readable. create a date field with ID 'datepicker'and import jquery and jquery ui . After that Then just copy and paste the code to get the exact result. output // 28 years 7 months 7 days $(function () { $("#datepicker").datepicker({ changeMonth: true, changeYear: true, showAnim: 'slideDown', dateFormat: 'yy-mm-dd' }).on('change', function () { var age = getAge(this); /* $('#age').val(age);*/ console.log(age); alert(age); }); function getAge(dateVal) { var birthday = new Date(dateVal.value), today = new Date(), ageInMilliseconds = new Date(today - birthday), years = ageInMilliseconds / (24 * 60 * 60 * 1000 * 365.25 ), months = 12 * (years % 1), days = Math.floor(30 * (months % 1)); return Math.floor(years) + ' years ' + Math.floor(months) + ' months ' + days + ' days'; } });
has comment: http://stackoverflow.com/comment/71766325
has comment: http://stackoverflow.com/comment/71766622
answers question: http://stackoverflow.com/q/29137763
type: Answer
upvote count: 6
downvote count: 1

http://stackoverflow.com/comment/46526536
has text: see also [JavaScript check if variable exists (is defined/initialized) - Which method is better?](http://stackoverflow.com/q/5113374/1048572)
comment on: http://stackoverflow.com/q/29152142
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46417774
score: 0
comment on: http://stackoverflow.com/q/29092666
type: Comment
type: QuestionComment
has text: Vaibhav's comment is correct. I'd also recommend using [ember-simple-auth](https://github.com/simplabs/ember-simple-auth) with does exactly what you are doing but also comes with a bunch of nice things for free! I decided to use it after 6 months into my project and I wish I had found it earlier :)

http://stackoverflow.com/comment/46609502
type: Comment
has text: I think the problem is passing `arguments` to other functions, which requires all kinds of weird stuff (read the spec on arguments objects) that prevents optimisations. Because V8 cannot know that the called function (`slice`) doesn't use this weird stuff.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29198195

http://stackoverflow.com/q/29148936
answer count: 2
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/29149844
upvote count: 1
has title: I'm having trouble writing a for loop in react.js
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/29149962
tagged with: javascript
has comment: http://stackoverflow.com/comment/46520485
has body: I'm new to programming and I'm learning Facebook's react.js. I found a website that has a tutorial which builds a "shopping cart" using react. I tried to modify it to add more items using a for loop but it keeps giving me "unexpected token }" errors followed by this error: "Invariant Violation: FluxProduct.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object." I realize there is a similar question that was answered but it didn't help me. There is quite a bit of code in this project but the particular spot I'm having trouble with looks like this: render: function() { var rows = []; var ats = (this.props.selected.sku in this.props.cartitems) ? this.props.selected.inventory - this.props.cartitems[this.props.selected.sku].quantity : this.props.selected.inventory; for (var i=0; i<2; i++){ {this.props.product.name} {this.props.product.description} Price: ${this.props.selected.price} {this.props.product.variants.map(function(variant, index){ return ( {variant.type} ) })} 0 ? '' : 'disabled'}> {ats > 0 ? 'Add To Cart' : 'Sold Out'} } return ("flux-products-detail" ); }, }); If you want/need the original code and the rest of the project I'd be more than happy to provide it.

http://stackoverflow.com/comment/46481581
has text: Don't use breaks, but child div's instead.
score: 1
comment on: http://stackoverflow.com/q/29127744
type: Comment
type: QuestionComment

autologin
tags question: http://stackoverflow.com/q/29119393
tags question: http://stackoverflow.com/q/29139296
type: Tag
tag name: autologin

http://stackoverflow.com/comment/46412036
comment on: http://stackoverflow.com/q/29089503
score: 0
has text: @nevermind: that shouldn't be a problem
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29206890
downvote count: 3
tagged with: regex
has body: I want regex which will accept decimal numbers The decimal number like '12.12,123.23,09.90 or 2.78' i.e there should be 2 decimal places after decimal point and should accept 1,2 or 3 digits before decimal point i.e its optional for 1,2 or 3 digits before decimal point. I've added this but not works var validates=/^\d+\.\d{0,3}$/;
type: Question
type: AnsweredQuestion
score: -2
accepted answer: http://stackoverflow.com/a/29206922
tagged with: javascript
has title: Regex for accepting decimal numbers in javascript
upvote count: 1
has answer: http://stackoverflow.com/a/29206922
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46624361

http://stackoverflow.com/comment/46515152
type: Comment
type: QuestionComment
score: 0
has text: You'll need to use regEx `.test` method to see if the location.path is an exact match OR contained in the isCustom values
comment on: http://stackoverflow.com/q/29146220

http://stackoverflow.com/comment/46372465
comment on: http://stackoverflow.com/q/29064030
has text: Multiple copy of the same UserControl on the same WebPage also creates multiple copy of java script code on the web page. In your case, IsAccNumberValid() will be defined twice on your web page ans it will throw JavaScript error for that.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29187029
has title: Save multiple canvas as one image (make website like PicFrame)
has answer: http://stackoverflow.com/a/29187670
tagged with: http://stackoverflow.com/tag/html
has body: I try to make website like PicFrame app so I found this demo : http://jsfiddle.net/appsaloon/4jRLM/ I want to use multiple canvas in the demo and save it to one image. How to save all canvas to one images? Sorry for my english, Thanks! My HTML code is look like this: Save image
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29187670
type: Question
tagged with: javascript
tagged with: image
score: 0
tagged with: canvas
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/46408201
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29087369
has text: possible duplicate of [How do I detect "shift+enter" and generate a new line in Textarea?](http://stackoverflow.com/questions/6014702/how-do-i-detect-shiftenter-and-generate-a-new-line-in-textarea)

http://stackoverflow.com/comment/46608400
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29197327
has text: Good work / idea, it definitely may be useful in everyday usage for web design .
type: AnswerComment

http://stackoverflow.com/q/29214181
linked to: http://stackoverflow.com/q/19722920
has comment: http://stackoverflow.com/comment/46641542
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46638292
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29216061
has comment: http://stackoverflow.com/comment/46638246
has comment: http://stackoverflow.com/comment/46694256
score: 0
has comment: http://stackoverflow.com/comment/46637872
has answer: http://stackoverflow.com/a/29216061
type: AnsweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46641481
has title: Sending file through AJAX returns 'blob' error
has comment: http://stackoverflow.com/comment/46639910
type: Question
tagged with: blob
has body: I'm trying to make an AJAX request send a file towards my controller, which then should proceed to read out the sent file and return a sorted array back to the front-end, though it doesn't work as I'm stuck on a 'blob' not set error. I've searched about but didn't really find the answer I was looking for, thus why I'm creating this question. Currently I'm receiving the following TypeError: 'slice' called on an object that does not implement interface Blob. The data that I'm trying to send is as following: http://piclair.com/qk8ms (pic because I can't copy the data directly from my browser.) The javascript: // Click handler for file read $(document).on('click','#load-csv-btn',function(e){ e.preventDefault(); var file = $('#file_upload')[0].files; console.log(file); readCSV(file); }); function readCSV(file){ $.ajax({ type: "POST", url: "ajax/read.php", data: {file: file}, contentType: false }).success(function(data){ console.log(data); }).fail(function(){ console.log('error'); }); } The PHP handler, though I guess that part is kind of irrelevant for this problem: &lt;?php var_dump($_POST); I've found someone saying that setting processData: false and contentType: false would let the script ignore the blob requirment, but if I set those parameters my server just sends back an empty array, which I guess is no suprise as I'm not processing any data. So I'm hoping someone knows a solution to this problem and is able to help me out. EDIT: Just to make clear which method I've tried that returns an empty array, here is the alternate code: $(document).on('click','#load-csv-btn',function(e){ e.preventDefault(); var file = $('#file_upload')[0].files[0]; var fd = new FormData(); fd.append("csv",file); readCSV(fd); }); function readCSV(file){ $.ajax({ type: "POST", url: "ajax/read.php", data: {file: file}, contentType: false, processData: false }).success(function(data){ console.log(data); }).fail(function(){ console.log('error'); }); }
linked to: http://stackoverflow.com/q/2320069

http://stackoverflow.com/a/29083149
has body: This would do like the same as you mentioned in your question. ^s(?:ubstitute|ubstitut|ubstitu|ubstit|ubsti|ubst|ubs|ub|u)? The above regex will always try to match the large possible word. So at first it checks for substitute, if it finds any then it will do matching else it jumps to next pattern ie, substitut , likewise it goes on upto u. DEMO 1 DEMO 2
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/46399387
has comment: http://stackoverflow.com/comment/46399305
answers question: http://stackoverflow.com/q/29082909
type: Answer
score: 2

http://stackoverflow.com/a/29130890
score: 0
has comment: http://stackoverflow.com/comment/46493766
has comment: http://stackoverflow.com/comment/46493839
has comment: http://stackoverflow.com/comment/46488397
has comment: http://stackoverflow.com/comment/46493370
type: Answer
has body: The collapse-all method does not do what you are expecting: Indicates whether all sub-menus should be closed or only sub-menus below and including the menu that is or contains the target of the triggering event. So, it's just for opening/closing the sub-menus - not the entire menu structure. Instead, you can enclose each menu structure in a DIV and: (1) put overflow:hidden; on the containing div, and (2) use jQuery to animate the div's height Try this instead: $('container_DIV').animate({ height: '0px' },800); Here is a jsFiddle with a full demo: http://jsfiddle.net/73jgv60a/ In the fiddle, note that the menu vanishes off the screen when animation is completed. This is because both menu structures are floated left, and when the height of the first one becomes zero, the other one just moves into its place. To prevent this, if desired, wrap the outer container in another DIV that retains space on the page. The menu pages actually do open, but you cannot see them because the DIV is tight to the main menu, and has overflow:hidden;. At first, I planned to chain .css('overflow','hidden or visible') to each toggle function, but it turns out that overflow:hidden does not seem to be required. Revised jsFiddle Demo
answers question: http://stackoverflow.com/q/29129551
has comment: http://stackoverflow.com/comment/46490104

http://stackoverflow.com/a/29205001
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Here's a clean solution using a factory to keep the route in your app.js : // app.js io.on('connection', function(socket) { socket.on("helloword", require("./controllers/socket/helloworld")(socket)); // a bunch of other events }); // controllers/socket/helloworld.js module.exports = function(socket){ return function(data) { if (data) socket.emit('response', { lorem: "ipsum" }); } }
score: 2
accepted answer of: http://stackoverflow.com/q/29204968
answers question: http://stackoverflow.com/q/29204968
upvote count: 2

http://stackoverflow.com/a/29209321
type: Answer
has comment: http://stackoverflow.com/comment/46632169
answers question: http://stackoverflow.com/q/29168007
has comment: http://stackoverflow.com/comment/46647831
has comment: http://stackoverflow.com/comment/46629471
score: 0
has body: Assuming this is your code def tag_users authorize! :read, @family_tree @video = Video.find(params[:video_id]) @node = @video.node respond_to do |format| render format.html format.js end end And, by looking at output i can say that server is receiving HTML as format. Since, you want to execute script you must send datatype to script. Looking at html code, i think you have to pass data: {type: "script"} to simple_form function, so it will be &lt;div id="overlay"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="popup" id="add-video-step-4" data-step="4" data-intro="GETS TO UPLOADING"&gt; &lt;div class="titles clearfix"&gt; &lt;h2&gt;Upload a Video&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Step 1 of 3&lt;/i&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="content"&gt; &lt;% if @family_tree %&gt; &lt;%= simple_form_for([@family_tree, @video], :remote =&gt; true, data: {type: "script"} ) do |f| %&gt; &lt;div class="column"&gt; &lt;div class="f-row"&gt; &lt;%= f.input :title, label: "Title:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;%= f.input :description,label: "Description:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;%= f.input :circa, as: :datepicker, start_year: Date.today.year - 5, label: "Circa:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;label for="family"&gt;Family in this video:&lt;/label&gt; &lt;%= f.collection_select :user_ids, @family_tree.members.order(:first_name), :id, :first_name, {}, {multiple: true} %&gt; &lt;/div&gt; &lt;/div&gt; &lt;%= f.button :submit, "Add Video", id: "video-submit" %&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;!-- //content --&gt; &lt;/div&gt; &lt;!-- //popup --&gt; See here Why I need add &quot;data: {type: &quot;script&quot;}&quot; on remote link with rails / ajax

http://stackoverflow.com/comment/46603168
comment on: http://stackoverflow.com/q/29194507
type: Comment
type: QuestionComment
score: 1
has text: Tested your code [here](http://plnkr.co/edit/QHHxmBYPMOfW6frt5nFm?p=preview), it works. One thing I don't see in above is where you cast your csv string values into numeric values.

http://stackoverflow.com/a/47048543
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29114824
has comment: http://stackoverflow.com/comment/117869400
type: Answer
has body: This worked for me !! selectedDate = moment(selectedDate).add(moment(selectedDate).utcOffset(), 'm').utc().format()
has comment: http://stackoverflow.com/comment/94926434
score: 2

http://stackoverflow.com/comment/46365281
score: 0
type: Comment
has text: Of course, the library is already included
type: QuestionComment
comment on: http://stackoverflow.com/q/29064377

http://stackoverflow.com/comment/46584566
type: AnswerComment
type: Comment
has text: Hello Shaiful. Thanks a lot. Link you provided corrected my issue.
comment on: http://stackoverflow.com/a/29068583
score: 0

http://stackoverflow.com/a/29212998
downvote count: 0
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/46635558
has body: Localstorage stores everything as strings. So the true you input is actually saved as "true" and the false as "false". All non-empty strings in javascript evaluate to true.
answers question: http://stackoverflow.com/q/29212917
score: 6
has comment: http://stackoverflow.com/comment/46636108
has comment: http://stackoverflow.com/comment/46635669

http://stackoverflow.com/a/58955276
answers question: http://stackoverflow.com/q/29191339
upvote count: 1
has body: You can find the reason from this docs: https://www.npmjs.com/package/jquery#node For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as jsdom. This can be useful for testing purposes. But the setup code of the docs is out of date. The latest setup code is: var jsdom = require("jsdom"); const { JSDOM } = jsdom; const { window } = new JSDOM(); const { document } = new JSDOM("").window; global.document = document; var $ = require("jquery")(window); // test console.log("$.get:", typeof $.get); console.log("$.ajax:", typeof $.ajax); $.get("http://localhost:3000", data =&gt; { console.log(data); }); module.exports = $; Run this code, got: $.get: function $.ajax: function normal The normal text is the response from my local http server. Dependencies versions: "jsdom": "^15.2.1", "jquery": "^3.4.1",
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/46548017
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29139229
has text: I ended up broadcasting on rootScope. May be not the best approach!

http://stackoverflow.com/a/29214939
has comment: http://stackoverflow.com/comment/46639674
type: Answer
has body: Perhaps like this: var dataContainer = {}; // if you work with strings use '' $.ajax({ type: 'GET', url: 'localhost/webapi/api/data' }).done(function (data) { dataContainer = data; }); $('#nextButton').click(function() { if(dataContainer != {}){ // for strings != '' // use dataContainer } });
has comment: http://stackoverflow.com/comment/46639669
has comment: http://stackoverflow.com/comment/46640466
accepted answer of: http://stackoverflow.com/q/29214865
has comment: http://stackoverflow.com/comment/46639467
answers question: http://stackoverflow.com/q/29214865
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46639588
score: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/29099998
tag name: web-services
tags question: http://stackoverflow.com/q/29115804
tags question: http://stackoverflow.com/q/29125483

http://stackoverflow.com/q/29127261
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46504344
has answer: http://stackoverflow.com/a/29127624
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
has body: I have written a directive that allows you to bind a CSS property to the height of another m.directive('bindToHeight', function ($window) { return { restrict: 'A', link: function (scope, elem, attrs) { var attributes = scope.$eval(attrs['bindToHeight']); var targetElem = angular.element(document.querySelector(attributes[1])); // Watch for changes scope.$watch( function () { return targetElem.height(); }, function (newValue, oldValue) { if (newValue != oldValue) { elem.css(attributes[0], newValue); } }); } }; }); Usage: &lt;div bind-to-height="['bottom','#theContainer']"&gt; Now what I have noticed is that it only works once the contents of #theContainer is updated twice. The first time it seems to send a height of 0, the second time it gets the height properly. This div is updated from another angular controller and the height can change depending on what content is in there. The reason I wrote this was because something is stacked (position absolute) above it and needs to adjust its height to match. When I first run the page I get the following values OldValue: 287, NewValue: 287 OldValue: 287, NewValue: 0 Have I written the directive wrong or is there some better way to do this?
has comment: http://stackoverflow.com/comment/46481851
answer count: 1
has title: AngularJS directive for watching height change

http://stackoverflow.com/a/29207445
score: 0
has body: You simply need to set to the correct variable $scope.dropdwns={assetshow:false}; $scope.drpdwn=function(dat){ $scope.dropdwns.assetshow = !dat; // Here console.log($scope.dropdwns); };
has comment: http://stackoverflow.com/comment/46625333
has comment: http://stackoverflow.com/comment/46625428
type: Answer
answers question: http://stackoverflow.com/q/29207396

http://stackoverflow.com/comment/46436810
comment on: http://stackoverflow.com/q/29102854
has text: I recommend putting some `$log`s to find out when exactly things are happening. Put one before the `$http.get()` and one inside. Print timestamps in both and see how long this data access request takes.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/100144199
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/54731231
type: Comment
has text: Pretty much what i had to do. I was using this through VueJS so i had to call formSelect() anew to refresh the select.

web-console
tag name: web-console
type: Tag
tags question: http://stackoverflow.com/q/29130814

http://stackoverflow.com/comment/46620466
type: AnswerComment
has text: i am trying to write something like this, i wondering if there is more "anular" way to do it.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29145180

http://stackoverflow.com/comment/46553598
score: 1
comment on: http://stackoverflow.com/q/29167351
type: QuestionComment
type: Comment
has text: So what are you wondering about, that the response contains ` …`? Well that’s because your PHP script _outputs_ that … d’oh!

http://stackoverflow.com/comment/46403636
score: 0
comment on: http://stackoverflow.com/q/29084718
has text: I tried $('#btBusca').click(); Doesn't Worked...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46511899
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29139075
has text: replace underscore with lodash and fix possible errors) just wondering what are you going to reach by this replace?
type: Comment

http://stackoverflow.com/a/29080853
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29080289
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29080289
has comment: http://stackoverflow.com/comment/46395362
type: Answer
downvote count: 0
score: 1
has body: Here is a demo. You were really close. You just need to update your sAngle apropriately and your eAngle. if (angle == 0) { ctx2.beginPath(); sAngle = -0.001; } else if (angle == 90) { ctx2.beginPath(); sAngle = Math.PI * 0.501; } else if (angle == 180) { ctx2.beginPath(); sAngle = Math.PI-.001; } else if (angle == 270) { ctx2.beginPath(); sAngle = Math.PI * 1.501; } else if (angle == 360) { ctx2.beginPath(); sAngle = Math.PI * 1.999; } else { if (angle &gt; 0 &amp;&amp; angle &lt; 90) { ctx2.arc(200, 80, r, sAngle, eAngle+.02); ctx2.lineTo(200, 80); ctx2.fillStyle = "red"; ctx2.fill(); } else if (angle &gt; 90 &amp;&amp; angle &lt; 180) { ctx2.arc(200, 80, r, sAngle, eAngle+.02); ctx2.lineTo(200, 80); ctx2.fillStyle = "green"; ctx2.fill(); } else if (angle &gt; 180 &amp;&amp; angle &lt; 270) { ctx2.arc(200, 80, r, sAngle, eAngle+.02); ctx2.lineTo(200, 80); ctx2.fillStyle = "orange"; ctx2.fill(); } else if (angle &gt; 270 &amp;&amp; angle &lt; 360) { ctx2.arc(200, 80, r, sAngle, eAngle+.02); ctx2.lineTo(200, 80); ctx2.fillStyle = "blue"; ctx2.fill(); } else { clearInterval(interval2); } } Seems I can get it to render better. Working on it. EDIT: Better render here EDIT: Best render here

http://stackoverflow.com/q/29066127
has title: Filter ng-repeat with dropdown without duplicating the dropdown options
upvote count: 1
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46368641
tagged with: drop-down-menu
has answer: http://stackoverflow.com/a/29066662
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29066662
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29066668
has body: The same way, I can manually do filter: { category : 'Popular'} in ng-repeat, I'd like to be able to do the same thing with the dropdown. I was able to make the basics work. I have two problems: I don't want the categories to duplicate themselves in the dropdown, I'd like to be able to see everything categorized "Popular" when I select "Popular" in the dropdown. Here is my HTML: Select Category . {{ entry.title }} {{ entry.description }} Here is the controller: app.controller('SuperCtrl', ['$scope', '$http', function($scope,$http) { var url = 'https://spreadsheets.google.com/feeds/list/1lZWwacSVxTD_ciOsuNsrzeMTNAl0Dj8SOrbaMqPKM7U/od6/public/values?alt=json' var parse = function(entry) { var category = entry['gsx$category']['$t']; var description = entry['gsx$description']['$t']; var title = entry['gsx$title']['$t']; return { category: category, description: description, title: title }; } $http.get(url) .success(function(response) { var entries = response['feed']['entry']; $scope.parsedEntries = []; for (key in entries) { var content = entries[key]; $scope.parsedEntries.push(parse(content)); } }); }]);
has answer: http://stackoverflow.com/a/29066668
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/29122050
type: UnansweredQuestion
tagged with: iframe
tagged with: css
score: 2
has body: I have following code for iframe and following javascript code However, only the scrollbar for body changes and not of iframe? What am I doing wrong here.
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29122137
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29122197
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Unable to add custom scrollbar to iframe using jQuery custom content scroller?
has comment: http://stackoverflow.com/comment/51859879
upvote count: 2

http://stackoverflow.com/a/29095665
downvote count: 0
answers question: http://stackoverflow.com/q/29095586
score: 1
type: Answer
has body: You're replacing the string as a result but not changing what is displayed... what you need to do is to use the text() method to get and to set the data, here's an example : $('.pr-page-prev').text($('.pr-page-prev').text().replace("«", ''))
upvote count: 1

http://stackoverflow.com/comment/46425848
type: QuestionComment
comment on: http://stackoverflow.com/q/29097619
has text: there is normal body element inside of it multiple tables in html
score: 0
type: Comment

http://stackoverflow.com/comment/46468488
has text: sorry I cannot voteup because I still need 15 reputation for that
type: Comment
comment on: http://stackoverflow.com/a/29114212
score: 0
type: AnswerComment

http://stackoverflow.com/q/29083071
score: 0
answer count: 3
has title: How to remove all elements with the same key in JavaScript object
has comment: http://stackoverflow.com/comment/46399186
has comment: http://stackoverflow.com/comment/46399252
has comment: http://stackoverflow.com/comment/46402519
possible better answer: http://stackoverflow.com/a/29083367
has comment: http://stackoverflow.com/comment/46402261
has comment: http://stackoverflow.com/comment/46402916
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/29083218
has comment: http://stackoverflow.com/comment/46403960
has comment: http://stackoverflow.com/comment/46404628
tagged with: object
type: AnsweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/46399347
type: Question
has comment: http://stackoverflow.com/comment/46403897
accepted answer: http://stackoverflow.com/a/29083218
has comment: http://stackoverflow.com/comment/46402641
tagged with: javascript
has answer: http://stackoverflow.com/a/29083257
has answer: http://stackoverflow.com/a/29083367
has body: I am working with JSON data in a JavaScript object like this: var data = [ { "City" : "New York", "State" : "New York" }, { "City" : "Fargo", "State" : "North Dakota" }, { "City" : "Los Angeles", "State" : "California" } ]; And I want to remove state data so it ends up like this: var data = [ { "City" : "New York"}, { "City" : "Fargo"}, { "City" : "Los Angeles"} ]; Currently I'm looping through and removing it but is there a way to remove the city from the object without having to loop through? I found the "delete" operator ("The delete operator removes a property from an object.") but it seems to only work if there is just one item with that property, not globally as in the example object. delete object["State"] //doesn't work Edit: My bad. I copy/pasted and edited incorrectly. I have changed the original post to use correct format as supplied in Mr. Polywhirl's answer. Edit: I ended up using the map method as suggested by mccainz. Using map allows for pulling all of a certain key/value pair (like city) from one array into another. You can also pull multiple like newData = data .map(function(v){ return {City:v.City, State:v.State}; }); It will work for my purposes and is better since I'm keeping the minority of the key/value pairs. However, it doesn't appear that there are any solutions for performing the task in the original question. For example, if you had 100 different key/value pairs per array item, you'd have to add 99 to a new array instead of being able to just remove one from the existing.
has comment: http://stackoverflow.com/comment/46403248

http://stackoverflow.com/q/29064741
tagged with: angularjs
has answer: http://stackoverflow.com/a/29065007
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29065007
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/29066052
tagged with: javascript
tagged with: express
score: 0
answer count: 2
tagged with: mongoose
has title: Updating a subdocument with Mongoose
has body: I'm building a simple polls app with angular, express, and mongoose. My data looks like this:` var mongoose = require('mongoose'); var responseSchema = new mongoose.Schema({ responseText: String, votes: { type: Number, default: 0 } }) module.exports = mongoose.model('Responses', responseSchema); var pollsSchema = new mongoose.Schema({ question: String, responses: [responseSchema] }) module.exports = mongoose.model('Polls', pollsSchema);` So, I have a polls model which holds a subdocument responses model. When someone votes, I want to increase the vote count of the response. Here is the query that I'm working on but it's not right. router.post('/api/polls/:id/vote', function (req, res, next) { console.log("Poll ID : " + req.params.id); console.log("Option ID : " + req.body._id); Polls.findOneAndUpdate({ _id: req.params.id }, { $inc: { 'responses.id(req.body.id).votes': 1 } }, function (err, post) { if (err) return next(err); console.log(err); console.log(post); console.log(post.responses.id(req.body._id).votes); }); }) Edit: Updated Basically, I'm sending the Poll ID in the req params and the response id in the response body. I'm able to console.log the vote value, but I don't know how to write the query. Can anyone help? Thanks!
accepted answer: http://stackoverflow.com/a/29066052

http://stackoverflow.com/q/29146980
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
upvote count: 6
has answer: http://stackoverflow.com/a/29148257
has title: How to access a static function from a component instance in react?
score: 6
type: Question
has body: I have a component with a number of static functions defined for it(through the statics property in the component definition). I need to access one of these static functions in the lifecycle method componentDidMount. I tried the following this object has a statics property, but that seems to be null always this object also has a _owner, which in turn has a statics property. Again, that is always null Then I tried this.constructor.&lt;static_function&gt;. This worked for me. I just wanted to know whether this is the right way to access static functions defined for a component or is there something else that I am unaware of.
tagged with: javascript
has answer: http://stackoverflow.com/a/29147433
tagged with: reactjs

http://stackoverflow.com/q/29173956
has comment: http://stackoverflow.com/comment/46566848
type: Question
has answer: http://stackoverflow.com/a/29173995
has comment: http://stackoverflow.com/comment/46565809
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29173995
accepted answer: http://stackoverflow.com/a/29174054
tagged with: user-interface
has answer: http://stackoverflow.com/a/29174952
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/26696717
has answer: http://stackoverflow.com/a/29973747
has comment: http://stackoverflow.com/comment/46566668
has comment: http://stackoverflow.com/comment/46565782
has title: Start and stop loop in javascript with start and stop button
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46567126
score: 1
has body: I have a start button that when clicked runs a function that loops. How do I get a stopBTN.onClick to stop the running loop? https://jsfiddle.net/vduxbnkj/ startBTN.onClick = function(){ runLoop(); } function runLoop(){ while(condition true){ getFolderContentsLoop(); } } function getFolderContentsLoop(){ //loop through folders &amp; files looking for .txt file and if "finished" delete files and folders }
has answer: http://stackoverflow.com/a/29174054
duplicate of: http://stackoverflow.com/q/26696717
upvote count: 1

http://stackoverflow.com/comment/46465591
comment on: http://stackoverflow.com/q/29118745
has text: Yes each object only contains a few chunks of data, I am just writing some logic from your suggestion below. If it helps it is all UK based and so locations are very close together.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29131829
has title: Image inside transparent background-color without being affected
has answer: http://stackoverflow.com/a/29132045
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29132045
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29131927
tagged with: jquery
has comment: http://stackoverflow.com/comment/46489559
has answer: http://stackoverflow.com/a/29131927
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: What i want to do is to make a background-color (with opacity) inside a image, there's a way that i can achieve this without being affected by the background-color? The problem here is the background-color with opacity, it makes everything transparent, including the text and the image. Here's my code: CSS div.Image { background: url("http://fc07.deviantart.net/fs43/i/2009/141/e/e/Vista_orb_by_fediaFedia.png")center center no-repeat; background-size: 40px 40px; position: relative; background-position: 50% 0px; } div.trans-bg { background-color: #646464; opacity: 0.5; border-radius: 3px; border: 2px ridge #7AC3D1; position: absolute; } div.trans-bg p { text-shadow: 1px 2px 2px #000; margin: 5%; padding-top: 45px; width: 100px; color: #fff; text-align: center; } Windows 7 http://jsfiddle.net/c3ja7rjn/
tagged with: css
score: 0
answer count: 2

http://stackoverflow.com/comment/46615222
comment on: http://stackoverflow.com/q/29201480
type: Comment
has text: Working JSFiddle: http://jsfiddle.net/ohoxwLue/1/
score: 0
type: QuestionComment

header
type: Tag
tags question: http://stackoverflow.com/q/29147847
tag name: header
tags question: http://stackoverflow.com/q/29102667

http://stackoverflow.com/comment/46563058
has text: You're welcome. Note that there is no universally supported way to ensure that a popup comes up in a new window rather than a new tab (this is intentional - it is supposed to be determined by browser preferences set by the user). There are various techniques, like the one you found, that work in particular browsers, but they are not defined by the HTML spec and are thus not guaranteed to work in the long term.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29170547

http://stackoverflow.com/comment/48131196
comment on: http://stackoverflow.com/a/29212446
score: 0
type: AnswerComment
has text: then u use RPC method
type: Comment

http://stackoverflow.com/a/29127710
has body: try running your code on $(window).load(function() { }); instead of at the bottom of the page, chances are if you are working with larger slide images that not all of them are fully loaded before your calculations are applying. The new code would look like this... jQuery(window.load(function() { jQuery('.home-slider .slides li').each(function () { var imgSrc = jQuery(this).children('.slider-bg').attr('src'); jQuery(this).css('background', 'url("' + imgSrc + '")'); jQuery(this).children('.slider-bg').remove(); var slideHeight = jQuery(this).height(); var contentHeight = jQuery(this).children('.slide-content').height(); var padTop = (slideHeight / 2) - (contentHeight / 2); jQuery(this).children('.slide-content').css('padding-top', padTop); }); });
answers question: http://stackoverflow.com/q/29127576
score: 0
type: Answer

http://stackoverflow.com/comment/46513260
has text: can you quote an example with ENGLISH Letters ,because solution will remain the same.and by that question will be clear to all
comment on: http://stackoverflow.com/q/29144887
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29123136
accepted answer: http://stackoverflow.com/a/30704752
answer count: 2
has comment: http://stackoverflow.com/comment/46472697
tagged with: validation
has comment: http://stackoverflow.com/comment/46474349
has body: I need help writing a little Regular Expression to replace integers into a time format string in a text input field. In my form: I have a text input field where I'm supposed to write numbers. And when I write a number: I want a piece of JavaScript to convert it to a human-friendly, readable time when the input field loses focus. The thing that makes this "Clever" is that I want to be able to write as little as absolutely possible: And have it transform to the most appropriate time corresponding to my number. Let me give you a few examples. If I write: 7 it would resolve to 07:00 15 it would resolve to 15:00 93 it would resolve to 09:30 1945 it would resolve to 19:45 143 it would resolve to 14:30 ... And so on ... I want it to do this replacement after the input field loses focus (onblur-event) Also. I want to have a 0 prefix for night hours. Like this: 015 = 00:15 03 = 00:30 012 = 00:12 ... And so on ... I begun writing if statements to do this, but I stopped dead in my tracks because I realized it would take so many if statements, and would not be very reliable. I feel like Regular Expressions would be much smarter since it compacts my script and makes loading time quicker. I grasp the basics of Regular Expressions, but I don't know how to write a clever one for this purpose. This is what my code got to before I decided to drop it: var elem = document.getElementById("incidentHourStart-" + row); if (elem.value.length === 1) { // Must be a whole hour (0-9) } else if (elem.value.length === 2) { // Can be either two digits hour (10-23) or hour + whole minute (73: 07:30) if (parseInt(elem.value) &gt;= 10 &amp;&amp; parseInt(elem.value) &lt;= 23) { // Two digits, whole hour (10-23) } else { // First digit is hour, and last one is whole minute (10, 20, 30, 40, 50) } } else if (elem.value.length === 3) { // First digit must be an hour value, middle digit is also hour if it is lower than 23, last digit is then always whole minutes if (parseInt(elem.value) &gt;= 10 &amp;&amp…
favorite count: 0
has comment: http://stackoverflow.com/comment/46621873
has comment: http://stackoverflow.com/comment/46472943
has comment: http://stackoverflow.com/comment/46473413
has comment: http://stackoverflow.com/comment/46474271
tagged with: regex
has comment: http://stackoverflow.com/comment/46473281
has comment: http://stackoverflow.com/comment/46474047
score: 0
upvote count: 1
tagged with: formatting
has comment: http://stackoverflow.com/comment/46472809
downvote count: 1
has comment: http://stackoverflow.com/comment/46474175
has title: Clever time formatting with JavaScript
has comment: http://stackoverflow.com/comment/46474358
has answer: http://stackoverflow.com/a/29124826
type: Question
has comment: http://stackoverflow.com/comment/46474908
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46473083
has comment: http://stackoverflow.com/comment/46624477
has answer: http://stackoverflow.com/a/30704752
has comment: http://stackoverflow.com/comment/46473439
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29124826
tagged with: forms
has comment: http://stackoverflow.com/comment/46473988
has comment: http://stackoverflow.com/comment/46476144

http://stackoverflow.com/a/29198580
type: Answer
answers question: http://stackoverflow.com/q/29197410
has body: When you use ng-value instead of value in the option, the selected option is bind to the options set in the ng-model (user.deliverytime) Delivery Slot {{deliveryTime.time}} http://plnkr.co/edit/8hKIXwK5i35lczWEtuCw?p=preview
score: 0

http://stackoverflow.com/a/31243693
type: Answer
answers question: http://stackoverflow.com/q/29143908
score: 0
has body: Use and ng-init to call a function on the target element. Asuming a textarea needs to be added to transliteration scope. where addTrnsEngine() is a function which adds the element to the google transliterate api. you could send a send a unique id like in the example above or the tagName and search the document by the corresponding id or tagName. ( addTrnsEngine('tweet') ) example: var addTrnsEngine() = function( targetId ){ var elem = document.getElementById( targetId ); //add transliteration on elem here. }

http://stackoverflow.com/q/29185617
tagged with: javascript
has answer: http://stackoverflow.com/a/29185708
tagged with: jquery
tagged with: sorting
has body: Could someone please explain why the .append() method replaces table rows when sorting. Why doesn't it add the sorted rows to the end of the unsorted rows? Script Demo
score: 2
accepted answer: http://stackoverflow.com/a/29185708
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/29185702
upvote count: 2
has answer: http://stackoverflow.com/a/29185702
type: AnsweredQuestion
type: Question
answer count: 2
has title: Why does .append() replace table rows when sorting?

http://stackoverflow.com/q/29211201
tagged with: extendscript
has title: Access XML Attribute Names in Extendscript
tagged with: http://stackoverflow.com/tag/xml
tagged with: adobe-illustrator
downvote count: 0
score: 1
has body: I'm trying to parse an xml Object in extendscript and especially deal with the Attributes. I know i can access xml attributes by xmlObj.@attributename and xmlObj.attributes() returns a list of all attributes, but I also need the attribute names not just the values. Is there anyway to get something like and associative array/object with names and values? (I use extendscript for illustrator CS6) thank you, arno
type: Question
has answer: http://stackoverflow.com/a/29212119
tagged with: javascript
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29897845
tagged with: attributes
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29172777
has body: 1) You can set the class of an element to (also) be the text content at the time you are setting the text content. Then you can select by class. 2) You can get the text content of an element if you can apply a selector just for this very element: selection.text() See also: https://github.com/mbostock/d3/wiki/Selections#text 3) In most cases, you set the text dynamically with some data. If the data is bound to the element, you would use that with the standard callback function selection.filter( function (d,i) {...// filter based on d }).remove();
score: 0
accepted answer of: http://stackoverflow.com/q/29172170
type: Answer
answers question: http://stackoverflow.com/q/29172170
type: AcceptedAnswer

http://stackoverflow.com/comment/79804795
type: AnswerComment
score: 0
type: Comment
has text: Does it work in mobile? In my case, it works fine in desktop, yet not in mobile browser. In android chrome, it says `POST (destination url) net::ERR_ACCESS_DENIED`
comment on: http://stackoverflow.com/a/29097701

http://stackoverflow.com/comment/46380372
comment on: http://stackoverflow.com/q/29072992
score: 0
type: QuestionComment
type: Comment
has text: @ta-run you can see above, i have edited the question, adding that I have tried calling the $http in your proposed way and got the same behavior...

http://stackoverflow.com/comment/46520485
type: QuestionComment
comment on: http://stackoverflow.com/q/29148936
has text: As the error says, `render` has to return a React element, but you seem to return a string. Also, while JSX may seem magical it really is not. E.g. ` ` gets converted to something like `React.createElement('div')`, i.e. a normal function call. If you don't do anything with the result of that call, nothing will happen. I.e. you have to assign to something to be able to use it.
score: 1
type: Comment

http://stackoverflow.com/a/29100212
has comment: http://stackoverflow.com/comment/46485567
accepted answer of: http://stackoverflow.com/q/29088803
answers question: http://stackoverflow.com/q/29088803
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46448307
has comment: http://stackoverflow.com/comment/46445812
has comment: http://stackoverflow.com/comment/46480356
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46441800
score: 4
has body: There are three options that come to mind: 1) To achieve the 'effect' of stacking, actually stack it: use a dummy series with a color set to the background color that you want, and set with values to fill the gap from the actual data. Example: http://jsfiddle.net/jlbriggs/Zf8C7/5/ [[edit for questions The order of the series does not matter for this to work, and neither does the legendIndex. What does matter, if you are using multiple series, is the stack property for each series - http://api.highcharts.com/highcharts#series.stack Each group will need its own stack, and the dummy series and real series within each group need to be assigned to the same stack. In addition, you need to have one overall max value. Updated example: http://jsfiddle.net/jlbriggs/4d9tm6b8/4/ (keep in mind, there are much smoother methods to process and build your data - this is a quick and dirty example whose purpose is to show how to properly use the stack property to do what you need) ]] 2) plotBands, as mentioned above 3) using the alternateGridColor property and set your data to skip an x axis value between each point. Reference: - http://api.highcharts.com/highcharts#xAxis.alternateGridColor
has comment: http://stackoverflow.com/comment/46453503
type: Answer

http://stackoverflow.com/comment/46720506
has text: The tail shadow have two components, there is a front DIV with white color and it has a shadow. This shadow can be changed with the following line: iwBackground.children(':nth-child(3)').find('div').children().css({'z-index' : '1', 'box-shadow' : 'rgba(10, 84, 199, 0.32) 0px 1px 6px'}); You must change box-shadow values.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29224814

http://stackoverflow.com/a/29180743
has body: Change you option tag line like this : &lt;option value='&lt;%=rs.getString(1)+"#"+rs.getString(2)+"#"+rs.getString(3)+"#"+rs.getString(4)+"#"+rs.getString(5) %&gt;'&gt;&lt;%=rs.getString(2) %&gt;&lt;/option&gt; and in your javascript do like this : function populateWoodId(){ var selectBox = document.getElementById('woodType'); /* selected value of dropdown */ var woodProp = selectBox.options[selectBox.selectedIndex].value; /* selected value set to input field */ var splitVal=woodProp.split("#",5); document.getElementById('woodHeight').value = splitVal[0]; document.getElementById('woodHeight1').value = splitVal[1]; document.getElementById('woodHeight2').value = splitVal[2]; document.getElementById('woodHeight3').value = splitVal[3]; document.getElementById('woodHeight4').value = splitVal[4]; //five different textboxes }
accepted answer of: http://stackoverflow.com/q/29179967
answers question: http://stackoverflow.com/q/29179967
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29171062
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29198644
tagged with: web
has body: I have an java script object and i am attempting to bind the object to a widget at index 0 however i am unable to get binding to work for array objects. I do not wish to repeat the widget for each record in the array i would simply like to bind the widget only to the salary1 in the companyList at index 0. Array: data = new Stateful({ companyList:[{id:1, salary1:300.00, salary2:200.00, salary3:400.00}] }); HTML: &lt;span title="(a) Salary For Month One :" data-dojo-type="dijit/_WidgetBase" data-dojo-props="target:at(data,'companyList')"&gt; &lt;s:textfield type="text" name="salary1" required="true" id="Salary1Id" placeholder="Salary Month One (e.g. 1234.00)" trim="true" data-dojo-type="dijit/form/CurrencyTextBox" data-dojo-props="value:at('rel:','salary1'),uppercase:true ,constraints:{fractional:true}, currency:'USD'"/&gt; &lt;/span&gt;
has comment: http://stackoverflow.com/comment/46562950
has answer: http://stackoverflow.com/a/29198644
has comment: http://stackoverflow.com/comment/46560879
possible better answer: http://stackoverflow.com/a/29174152
tagged with: dojo
type: Question
type: AnsweredQuestion
has title: Dojo binding data at index 0 from array to widget
has answer: http://stackoverflow.com/a/29174152
tagged with: javascript

http://stackoverflow.com/q/29160446
score: 1
tagged with: yii2
has answer: http://stackoverflow.com/a/46214408
type: Question
answer count: 2
has body: am new to angular js &amp; phantomjs, am working in website with angular...i need to create download of that page, so am using phantomjs for this... on click of download button, am calling js function var downUrl = "index.php?r=route/download"; $.ajax({ method:'POST', data: {id: &lt;?php echo Yii::$app-&gt;request-&gt;get('id'); ?&gt; , url:"&lt;?php echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?&gt;"}, url: downUrl, }).done(function(data) { var response=$(data); var phantomPath = response.filter('#phanton_temp_file').val(); console.log(phantomPath); if(phantomPath){ window.top.location.href = phantomPath; } }); in controller function $fileName = strtotime(date('Y-m-d H:i:s')); $pdfUrl = \Yii::$app-&gt;request-&gt;BaseUrl."/phantomjs/create.php?filename=".$fileName.".png&amp;url=http://example.com/frontend/web/index.php?r=route/detail&amp;id=427"; echo "&lt;input type='hidden' value='".$pdfUrl."' name='phanton_temp_file' id='phanton_temp_file' /&gt;"; create php page is &lt;?php $name = time()."-".$_REQUEST['filename']; $tempFile = "../../temp/".$name; sleep(60); $result = shell_exec('phantomjs rasterize.js '.$_REQUEST['url'].' '.$tempFile); header("Content-Type: application/octet-stream"); header('Content-disposition: attachment; filename='.$name); header('Content-type: application/png'); readfile($tempFile); ?&gt; js file is var page = require('webpage').create(), system = require('system'), address, output, size; if (system.args.length &lt; 3 || system.args.length &gt; 5) { console.log('Usage: rasterize.js URL filename[paperwidth*paperheight|paperformat] [zoom]'); console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'); phantom.exit(1); } else { address = system.args[1]; output = system.args[2]; page.viewportSize = {width: 1380, height: 1024}; if (system.args.length &gt; 3 &amp;&amp; system.args[2].substr(-4) === ".png") { size = system.args[3].split('*'); page.paperSize = size.length === 2 ? { width: size[0], height: size[1],…
has answer: http://stackoverflow.com/a/67048856
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46540663
has title: angular data is not displaying properly with phantomjs
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46542991
upvote count: 1
tagged with: php
tagged with: phantomjs

http://stackoverflow.com/a/29181420
score: 7
upvote count: 7
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29181371
type: Answer
has body: add pointer-events:none to your css code #element1{ pointer-events:none; } read more here . check DEMO The CSS property pointer-events allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events. When this property is unspecified, the same characteristics of the visiblePainted value apply to SVG content. //Hihger Z-index element //Lower Z-index element
answers question: http://stackoverflow.com/q/29181371
downvote count: 0

http://stackoverflow.com/q/29188961
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29189188
possible better answer: http://stackoverflow.com/a/29189093
has answer: http://stackoverflow.com/a/29189093
accepted answer: http://stackoverflow.com/a/29188986
has answer: http://stackoverflow.com/a/29189138
answer count: 4
type: AnsweredQuestion
has title: Passing text to a javascript function
type: Question
has body: I'm just starting in on javascript and working on a problem that our instructor gave us. We have an html site with four buttons, each of the buttons has a color, and when you hit the button it changes the background/text color. Sample HTML and javascript below. HTML CSS document.getElementById("yellowButton").onclick = turnYellow; function turnYellow (){ document.getElementById("wrapper").style.backgroundColor = "yellow"; document.getElementById("wrapper").style.color = "orange"; } I got that to work fine, but I was trying to refactor so that my function was more generic: document.getElementById("grayButton").onclick = changeColor("gray", "white"); function changeColor(backColor, frontColor) { document.getElementById("wrapper").style.backgroundColor = backColor; document.getElementById("wrapper").style.color = frontColor; } and I can't figure out why that doesn't work. Any thoughts?
tagged with: javascript
has answer: http://stackoverflow.com/a/29188986
score: 0

http://stackoverflow.com/comment/46448809
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109625
has text: SO isn't a discussion forum where wit is appropriate in thread titles. Please edit your question title to something descriptive.
score: 0

http://stackoverflow.com/a/29228746
has comment: http://stackoverflow.com/comment/46705271
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46704866
has comment: http://stackoverflow.com/comment/46674408
upvote count: 1
has body: even though oncopy is a non standard event https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncopy and that there is no reliable way to prevent copying text, you can check out the following bin ensure the frame is loaded use iframe.contentDocument.body to attch the event
answers question: http://stackoverflow.com/q/29206774
type: Answer
has comment: http://stackoverflow.com/comment/46692213
has comment: http://stackoverflow.com/comment/46705850

http://stackoverflow.com/q/29148820
possible better answer: http://stackoverflow.com/a/64476120
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/64476120
favorite count: 0
type: Question
answer count: 2
score: 5
tagged with: javascript
tagged with: google-maps-api-3
accepted answer: http://stackoverflow.com/a/29156754
has answer: http://stackoverflow.com/a/29156754
upvote count: 5
downvote count: 0
tagged with: d3.js
has body: I'm trying to make a visualization on a Google Maps overlay in which I represent points by nodes and links between nodes by edges. These nodes and edges are generated using JavaScript's d3 library. Paths are generated based on a json file. What I now want to do is adding an arrowhead marker on the end of each path in order to indicate direction of the path. To this end I've used this example, and first instructed d3 to add the marker including its path in a defs element, and, during generation of the paths, instructued d3 to include the marker by using the "marker-end" attribute with the value refering to marker element by it's id using an url attribute. A snippet of the code in which the marker is defined and refered to in each path is shwon below. d3.json("./json/routes.json", function(route_data) { var defs = layerPaths.append("defs") /* here I generate the marker shape and assign it the "arrow" id */ defs.append("marker") .attr({ "id": "arrow", "viewBox": "0 -5 10 10", "refX": 5, "refY": 0, "markerWidth": 4, "markerHeight": 4, "orient": "auto" }) .append("path") .attr("d", "M 0 -5 L 10 0 L 0 5") .attr("class", "arrowHead"); /* here I start generating the paths */ var path = layerPaths.selectAll("path") .data(route_data) .each(setPathProperties) .enter() .append("path") .each(setPathProperties); // path properties are set by the setPathProperties function function setPathProperties(d) { /* I removed the complex functions that calculate path position as these are irrelevant for the question*/ /* select the current path element and add attributes*/ d3.select(this) .attr("class", "path") .attr("d", svgPen) .attr("stroke", "blue") .attr("stroke-width", 10) /* add the marker to the path by refering with a url statment to the marker element with the arrow id */ .attr("marker-end", "url(#arrow)"); } }) Upon loading the map, the nodes and the paths load, though the arrow heads do not appear. The marker-end attribute including its reference, however, is in every path elem…
has title: d3 - Adding Markers to Paths

http://stackoverflow.com/q/29208137
accepted answer: http://stackoverflow.com/a/29208515
tagged with: asset-pipeline
score: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29208617
has answer: http://stackoverflow.com/a/29208617
tagged with: ruby-on-rails
type: Question
has body: What is the best way to load a different Javascript file based on your environment (production or development) in Rails 3.2? I'm trying to create a global (yes, global) javascript variable which should vary based on environment. That variable is called by JQuery but is required by some other javascript files I've written. Is it best to generate an application.js.erb which is dynamic based on the environment we are running or am I missing something? Thanks
has title: Loading different Javascript files in Rails based on environment
has answer: http://stackoverflow.com/a/29208515
tagged with: erb
upvote count: 4
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29154225
downvote count: 0
has comment: http://stackoverflow.com/comment/46529756
type: Answer
answers question: http://stackoverflow.com/q/29153538
score: 2
has comment: http://stackoverflow.com/comment/46531713
upvote count: 2
has body: Are you sure you're thinking about this correctly? isUserLoggedIn: function() { // implies you're checking for the user var user = Meteor.user(); // if there's a user this returns true if(user) { // you're saying if there's a user ... return false; // return false } else{ // and if there isn't return true; // return true } } Basically you're saying "is the user logged in" and if yes "return false" which is making you double think. Instead, reverse your logic. isUserLoggedOut: function() { // implies you're checking for the user var user = Meteor.user(); // if there's a user this returns true if(user) { // there is a user return false; // so isUserLoggedOut == false } else{ // and if there isn't a user return true; // isUserLoggedOut == true } } Now your template becomes easy {{#if isUserLoggedOut}} {{&gt;loggedOutTemplate}} {{/if}}

http://stackoverflow.com/a/29112805
score: 1
answers question: http://stackoverflow.com/q/29112542
has body: What you tried don't work because you are trying to load controllers as module dependency. You can split the files like this and add all of them in your index.html // index.js angular .module("homeIndex", ["ngRoute"]); //route.js angular .module("homeIndex") .config(config); function config($routeProvider) { $routeProvider .when("/", { templateUrl: "/ng-templates/homeView.html", controller: "homeController", controllerAs: "vm" }) .when("/about", { templateUrl: "/ng-templates/aboutView.html", controller: "aboutController", controllerAs: "vm" }) .otherwise({ redirectTo: "/" }); }; // homeController.js angular .module("homeIndex") .controller("homeController", homeController) function homeController() { var vm = this; vm.title = "Home Page"; }; // aboutController.js angular .module("homeIndex") .controller("aboutController", aboutController); function aboutController() { var vm = this; vm.title = "About Us"; };
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29112542
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46454769
upvote count: 1

http://stackoverflow.com/q/29132729
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29132957
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46491330
tagged with: events
has title: Recognize which JS script is performing the event
type: Question
tagged with: logging
has comment: http://stackoverflow.com/comment/46491383
has body: I don't know if there is a way to recognize which JS script is performing the action which is in progress in a page?! For example, when we click on a button, it's doing something using javascript. But how to know which script and even which line of the script are involved in this event?!

http://stackoverflow.com/comment/46543997
score: 0
type: AnswerComment
has text: That's not what I want. I don't know what style attributes will be passed in.
type: Comment
comment on: http://stackoverflow.com/a/29162218

http://stackoverflow.com/q/29215900
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/45908643
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am working on an offline calendar app, but I encounter difficulty with displaying the dates. What's the simplest way of doing it? I'm not allowed to use existing frameworks though. Also what element is best to use form or table? JS: var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var dayPerMonth = ["31", "" + FebNumberOfDays + "", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"] var now = new Date(); var day = now.getDate(); var month = now.getMonth(); var year = now.getFullYear(); function getMonthDays(month, year) { var days; if (month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12) days = 31; else if (month === 4 || month === 6 || month === 9 || month === 11) days = 30; else if (month === 2) { if (isLeapYear(year)) { days = 29; } else { days = 28; } } return (days); } function isLeapYear(Year) { if (((Year % 4) === 0) &amp;&amp; ((Year % 100) !== 0) || ((Year % 400) === 0)) { return (true); } else { return (false); } } function calendarDisplay(month, year) { var i = 0; var days = getMonthDays(month + 1, year); var firstDay = new Date(year, month, 1); var startDay = firstDay.getDay(); days += startDay; } function today() { var now = new Date(); var day = now.getDate(); var month = now.getMonth(); var year = now.getFullYear(); calendarDisplay(month, year); } function setPreviousMonth() { var now = new Date(); var year = now.getFullYear(); var day = 0; var month = now.getMonth() - 1; if (month === 0) { month = 11; if (year &gt; 1000) { year--; } } else { month--; } calendarDisplay(month, year); } function setNextMonth() { var now = new Date(); var year = now.getFullYear(); var day = 0; var month = now.getMonth() + 1; if (month === 11) { month = 0; year++; } else { month++; } calendarDisplay(month, year); } HTML: &lt;ht…
has title: How do I display the dates for a calendar in JavaScript?
has answer: http://stackoverflow.com/a/29216220

http://stackoverflow.com/q/29169649
has title: JSON & Dynamic jQuery Mobile Listview
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery
tagged with: listview
score: 0
answer count: 1
has body: I have a JSON file that contains an array of 3 objects. When I want to display an object's attribute it display the name of it, for instance if I have an object car that has an attribute called name and has the value "FIAT" when I write car.name it displays " CAR.NAME " on the the listview instead of FIAT. Here's my code. $.getJSON("res/jsonFile/produits.json", function(products) { $('#productList').empty(); $.each(products, function(i, product) { $('#productList').append(productLink(product)); }); $('#productList').listview('refresh'); }); function productLink(product) { var link=" " + " " + "" + " product.name " + " product.desc " + " product.price " + " "; return link; } and here's my JSON file [ { "name": "Coca Cola", "desc": "Coca Cola", "price": 10, "qty": 100, "pic": "img/coca cola.jpg" }, { "name": "Fanta", "desc": "Fanta mini", "price": 10, "qty": 100, "pic": "img/fanta.jpg" }, { "name": "Salade niçoise", "desc": "Salade", "price": 15, "qty": 100, "pic": "img/nicoise.jpg" } ]
has comment: http://stackoverflow.com/comment/46558491
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29169964
accepted answer: http://stackoverflow.com/a/29169964

http://stackoverflow.com/comment/46560478
comment on: http://stackoverflow.com/q/29171133
score: 0
type: Comment
type: QuestionComment
has text: Please provide a **complete** example. It's not clear when your `if` statement is executed.

http://stackoverflow.com/q/29185458
score: 0
answer count: 1
has title: How to update a tab view from child page in Angular.JS
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46588218
has body: So I'm trying to update a list view in a parent tab window using Angular.js with the Ionic Framework, but I can't quite seem to figure out how to do it. Here is the code for the child window: $scope.currentUsername = Parse.User.current().get("username"); $scope.saveChanges = function saveChanges(user){ var currentUser = Parse.User.current(); var newUserName = user.newUsername; currentUser.set("username", newUserName); currentUser.save(null, { success: function(currentUser){ alert("Changes successfully made!"); } }); $state.go('tab.more'); } $scope.cancelChanges = function cancelChanges(){ $state.go('tab.more'); } And I am trying to take the data once it's sent to Parse back to the parent view but I don't know how to refresh the page after the script is run. In my function cancelChanges() I simply used $state.go to go back to the parent view because why update the view when there is not data to be updated. Here is the code for my parent window: $scope.currentUser = Parse.User.current().get("username"); $scope.editProfile = function editProfile(){ $state.go('tab.more-editusername'); } $scope.logOut = function logOut(){ Parse.User.logOut(); alert("Logout successful!"); $state.go('login'); }
has answer: http://stackoverflow.com/a/29200403
type: Question
tagged with: javascript
tagged with: ionic-framework

http://stackoverflow.com/comment/46567323
type: QuestionComment
has text: in the console, are you getting prompted for class names? Or, is it not getting that far.
comment on: http://stackoverflow.com/q/29174622
score: 0
type: Comment

http://stackoverflow.com/q/29198714
tagged with: reactjs
answer count: 1
has comment: http://stackoverflow.com/comment/46610743
tagged with: javascript
has comment: http://stackoverflow.com/comment/46610808
score: 0
tagged with: browserify
has title: React and Browserify Register Component Error
has body: I am using browserify, gulp and reactjs together, I have the following app.js contains my other scripts; var React = window.React = require('react'); var Signup = require('./ui/Signup'); var Login = require('./ui/Login'); `Signup.js`` var React = require('react'); var signupNode = document.getElementById('signup'); var SignupApp = React.createClass({ render: function(){ return (<Signup/>) } }); var Signup = React.createClass({ render: function(){ return ( Üye Ol <SignupForm/> ) } }); var SignupForm = React.createClass({ render: function(){ return ( hede ) } }); React.renderComponent(<SignupApp/>, signupNode); module.exports = Signup; and Login.js /** @jsx React.DOM */ var React = require('react'); var loginNode = document.getElementById("login"); var LoginApp = React.createClass({ render: function(){ return ( ) } }); var Login = React.createClass({ render: function(){ return ( Giriş Yap <LoginForm/> ) } }); var LoginForm = React.createClass({ render: function(){ return ( hede ) } }); React.renderComponent(<LoginApp/>, loginNode); module.exports = Login I want those modules to be ready according to their dom elements for different templates which i am both including app.js, But I am having Invalid Violation Register Component Target container is not a DOM element. error because Login Modal can not find signup id on DOM. Any ideas?
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46610914
has answer: http://stackoverflow.com/a/29330098

http://stackoverflow.com/a/29186512
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46588681
has comment: http://stackoverflow.com/comment/78795815
accepted answer of: http://stackoverflow.com/q/29186363
downvote count: 0
has comment: http://stackoverflow.com/comment/46588572
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46588495
answers question: http://stackoverflow.com/q/29186363
type: Answer
has body: Its the problem of closure, the this inside the c.click handler doesn't represent myObj. Declare a variable var that=this; inside the constructor myObj like below function myObj() { var that = this; this.g = s.group(); this.drawIt = function() { var a = s.rect(0, 0, 50, 50, 0, 0).attr({'fill':'#E82941'}), b = s.rect(20, 20, 50, 50, 0, 0).attr({'fill':'#FF6E00'}), c = s.rect(40, 40, 50, 50, 0, 0).attr({'fill':'#00C049'}); this.g.append(a, b, c); a.click(function(e){this.attr({'fill':'#000'});}); c.click(function(e){that.killIt()}); } this.killIt = function() { this.g.remove(); } } var obj = new myObj(); obj.drawIt(); If you declare a function inside another function, the this variable will not be the same as that of parent function. in this case, it will be pointed to the cobject, In the case of a.click, as the this is pointed to a, it worked.

http://stackoverflow.com/q/29132252
has title: Prevent multiple form submits. Is there a simple solution
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29132349
has answer: http://stackoverflow.com/a/29132384
has answer: http://stackoverflow.com/a/29132349
has answer: http://stackoverflow.com/a/29132402
has comment: http://stackoverflow.com/comment/46490601
has comment: http://stackoverflow.com/comment/46490453
upvote count: 1
type: AnsweredQuestion
has body: I do not know how to prevent multiple form submits in ajax. What I have seen on the Web by now are either non working solutions or real behemoths (tons of curvy code for such a microscopic task. what for?). What I have now is this code: $('#btn').click(function(){ $('#form').submit(function(e){ var postData = $(this).serializeArray(), formURL = $(this).attr('action'); $.ajax({ url:formURL, type:'POST', data:postData, success:function(data, textStatus, jqXHR){ }, error:function(jqXHR, textStatus, errorThrown){ } }); e.preventDefault(); }); }); I wish there was a one-stroke elegant solution, like some mysterious property or a function call.
score: 1
accepted answer: http://stackoverflow.com/a/29132402
type: Question
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46553162
score: 0
has text: what error are you getting? try another PHP , maybe your php isnt returning anything?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29166070

http://stackoverflow.com/q/29098289
tagged with: promise
upvote count: 1
has answer: http://stackoverflow.com/a/29098855
type: AnsweredQuestion
has title: In Q promises, why is fcall called immediatelly?
score: 1
has body: Having this code var Q = require('q'); var first = Q.fcall(function() { console.log('This will be output before actual resolution?'); return "This is the result."; }); setTimeout(function() { console.log('Gonna resolve.'); first.then(function(r) { console.log(r); }); }, 3000); Why the result is This will be output before actual resolution? Gonna resolve. This is the result. Instead of Gonna resolve. This will be output before actual resolution? This is the result. And how do I make the function be called only after then was called?
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
linked to: http://stackoverflow.com/q/21957187
accepted answer: http://stackoverflow.com/a/29098855
has comment: http://stackoverflow.com/comment/46428090
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/46422501
has text: Which version of jsPDF you are using? and have you reference any jspdf plugin. This [How to properly use jsPDF library](http://stackoverflow.com/questions/16858954/how-to-properly-use-jspdf-library) might help you.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29095688

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/29197247
type: Tag

http://stackoverflow.com/comment/46380810
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29073294
has text: this goes onto sharepoint (only IE8 support); the click event is in there in my code sample

http://stackoverflow.com/a/29110510
score: 1
accepted answer of: http://stackoverflow.com/q/29110480
has body: Update for clarity You have 2 options here. If you're going with an inline event handler, then you can pass an event object to your click handler and access the image that was clicked using event.target, like so: &lt;img onclick="addbeat(event)" name="item1" src="button.png"/&gt; &lt;script&gt; function addbeat(event) { simpleCart.add({ name: event.target.name, price: .99 }); } &lt;/script&gt; A preferable option (as pointed out in surrounding discussion) would be to programmatically attach your click handler- at which point you could use either event.target or this. &lt;img id="anImage" onclick="addbeat(event)" name="item1" src="button.png"/&gt; &lt;script&gt; function addbeat() { simpleCart.add({ name: this.name, price: .99 }); } document.getElementById('anImage').onclick = addbeat; &lt;/script&gt;
answers question: http://stackoverflow.com/q/29110480
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46450508
has comment: http://stackoverflow.com/comment/46450443
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46450486

http://stackoverflow.com/a/29063848
has body: There is no need to send full HTML via AJAX, but only the data needed to modify the existing DOM because the response gets dropped right after the callback functions are done. So, if you only need that value (1 in your case), you can send it only, so the full response of your AJAX call would simply be: 1 and then your data variable would have the value of 1, of course. You can also use JSON (especially, if you're sending more data), like: { "value": 1, "somethingElse": "some value here" } etc.
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29063391
answers question: http://stackoverflow.com/q/29063391
upvote count: 1

http://stackoverflow.com/comment/46612838
comment on: http://stackoverflow.com/a/29200185
has text: I seem to have a new problem now. I'll append it to my question
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46383324
type: QuestionComment
has text: I wrote a little bit complex solution: http://jsfiddle.net/n43g7e9o/
comment on: http://stackoverflow.com/q/29074077
score: 0
type: Comment

http://stackoverflow.com/a/29137363
downvote count: 0
has comment: http://stackoverflow.com/comment/46499259
score: 1
answers question: http://stackoverflow.com/q/29137178
upvote count: 1
type: AcceptedAnswer
has body: It seems you want to create another scoped variable and set it equal to someService, and then place a watch on someSome element. You can then handle the condition in the watch function. I've done this to watch service variables $scope.validElements = [ // set default here { "id": "One", } // ... ]; $scope.someService = someService; $scope.$watch('someService.someElement', function(newValue, oldValue) { // or a switch statment if(newValue == 'ABC'){ $scope.validElements = [ { "id": "One", }, { "id": "Three", } ]; }else{ // handle else condition $scope.validElements = [ { "id": "One", }, { "id": "Two", }, { "id": "Three", }, { "id": "Four", } ]; } }); Hope this helps! good luck
type: Answer
accepted answer of: http://stackoverflow.com/q/29137178

http://stackoverflow.com/a/59639301
has body: The previous solutions didn't quite work for me, but this did: .wizard &gt; .actions &gt; ul &gt; li.disabled &gt; a { background: white; }
type: Answer
answers question: http://stackoverflow.com/q/29190567
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29158270
has title: jQuery Slideshow Issues - Slideshow Not Working
has answer: http://stackoverflow.com/a/29158380
type: UnansweredQuestion
has body: I am trying to create a webpage which goes through all contents in a folder, and presents its contents in the form of a slideshow. Below is my basic code where I try to get the results from glob() and display all the .jpg files within the folder pictures/. <?php $folder = 'pictures/'; $filetype = '*.jpg'; $files = glob($folder.$filetype); $count = count($files); for ($i = 0; $i < $count; $i++) { echo '"'; echo ' '; echo '"'; } ?>
tagged with: jquery-cycle2
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/46603515
comment on: http://stackoverflow.com/q/29195348
has text: The error is generated because you cannot break strings with newlines like that.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29072174
score: 1
possible better answer: http://stackoverflow.com/a/29072242
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29076413
accepted answer: http://stackoverflow.com/a/29076413
has title: How to convert string date to GMT in java script?
tagged with: javascript
has body: This is my string date value "2015-03-16T00:00:00" date.date = 2015-03-16T00:00:00 I need to convert it into the following format Mon Mar 16 2015 00:00:00 GMT+0400 (Arabian Standard Time) How i can do that? p.s. i'm very new to java script. thanks
answer count: 2
has answer: http://stackoverflow.com/a/29072242
downvote count: 0
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/comment/46483419
type: AnswerComment
type: Comment
has text: I'm upvoting this because it will probably work and it's a well formatted answer but Juan Pablo's answer hit me first and it worked for me so I'm accepting his.
score: 1
comment on: http://stackoverflow.com/a/29128594

http://stackoverflow.com/comment/138164072
type: Comment
comment on: http://stackoverflow.com/a/45513932
score: 0
type: AnswerComment
has text: I'm looking for same charts in flutter/dart language. Anyone ?

http://stackoverflow.com/a/29116849
has comment: http://stackoverflow.com/comment/46463754
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46463523
upvote count: 1
has body: Not that your code is wrong, per se, but I would change it to something like: &lt;a href="#" class="myLinkClass" data-value="&lt;?=$obj-&gt;code?&gt;"&gt;Demo&lt;/a&gt; and the script: $( document ).ready(function() { $('body').on('click', '.myLinkClass', function() { var clickedEle = $(this); $.ajax({ type: "GET", url: "demo.php?code=" + clickedEle.attr('data-value'), datatype: "html", success: function(data) { $('#cart_update').html(data); } }); }); }); This is to make sure that the script is initialized before the call is bound, and it's easier to maintain Passing data to the click can be done in several ways of course - I just picked a "data-" attribute.
answers question: http://stackoverflow.com/q/29116304
downvote count: 0

http://stackoverflow.com/q/29139701
has comment: http://stackoverflow.com/comment/46503401
has body: i Have html code like this Button One Button Two Button Three URL I need Get event if any button click i was tried use : $(":button").click(function() { alert("button click"); }); Thanks For Help
type: Question
score: -2
tagged with: javascript
tagged with: jquery
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/46503342
possible better answer: http://stackoverflow.com/a/29139716
favorite count: 0
has answer: http://stackoverflow.com/a/29139716
has title: Javascript or Jquery get event any Button Click
has comment: http://stackoverflow.com/comment/46503353
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29139807
accepted answer: http://stackoverflow.com/a/29139807
has answer: http://stackoverflow.com/a/29139751

http://stackoverflow.com/comment/46366679
type: Comment
has text: The short answer is **no**: Google will mostly only crawl the static markup of your page. That mens that you will have to provide the microtags in the markup that is eother static or rendered server side. If you make usage of a heavy javaScript Framework like Backbone, Angular, Ember and so on, you have the ability to let all of your pages be rendered by a service and be saved under the same URL, but with a #! (hashbang). Google, Bing and Yahoo (and some other) will try and index the hashbang URLS instead of the original ones then.
score: 2
comment on: http://stackoverflow.com/q/29064209
type: QuestionComment

http://stackoverflow.com/comment/46362285
comment on: http://stackoverflow.com/a/29062768
score: 0
type: AnswerComment
has text: Yes, I did so , but didn't work . Do I have to make any changes in mainapp.py ?
type: Comment

http://stackoverflow.com/q/29213757
tagged with: css
has title: Create JS function that copies text and surrounds it in a paragraph
favorite count: 0
has answer: http://stackoverflow.com/a/29213923
type: UnansweredQuestion
has body: I need to create a Javascript funciton that adds a paragraph tag around the text, and tranforms outputs it as i were (with code) I've gotten: function texttransfer() { var newParagraph = document.createElement('p'); newParagraph.textContent = document.getElementById("source").innerHTML; document.getElementById("destination").appendChild(newParagraph); } document.getElementById("a").onclick = texttransfer; now all of the &lt;br/&gt; tags show up as plain text... how do i remove this?
upvote count: 1
score: 1
type: Question
has answer: http://stackoverflow.com/a/29213860
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29213817
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46519881
type: QuestionComment
has text: My point was `.bind()` is IE9 and higher
comment on: http://stackoverflow.com/q/29148370
score: 0
type: Comment

http://stackoverflow.com/q/29200527
has body: Below is my code for a modal window/page. When I click the submit button, however, I want to navigate to the index.html page. I am however, not able to do that although I have made a form and set the action attribute to the page. I also tried navigating to some other links but it does not work. I am using jquery.leanModal.min.js which I found online after some searching. How can I navigate upon clicking the submit button? Moi modal page Login to website ! User Login Username: Password:
type: Question
has comment: http://stackoverflow.com/comment/46613246
has comment: http://stackoverflow.com/comment/46614921
tagged with: modal-dialog
tagged with: javascript
tagged with: jquery
score: 0
tagged with: simplemodal
has title: unable to redirect from modal popup
answer count: 0
has comment: http://stackoverflow.com/comment/46614973
type: UnansweredQuestion
tagged with: http-redirect

http://stackoverflow.com/comment/46510616
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29143185
score: 0
has text: Strange, if you remove the code above ... your page is not redirect?

http://stackoverflow.com/comment/46408806
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29065982
has text: @Dylan, The real problem is that after submit, the outer control needs to clean this input, besides it cleans the model object, the input file is not cleared. Here is a jsfiddle simulating it: http://jsfiddle.net/714erk89/ I had to add an reference in the parent scope because i don't know another to access the child scopes. The ng-file-upload gives me the same problem after the refresh.
score: 0

http://stackoverflow.com/comment/46616867
type: AnswerComment
has text: that is the div you are going to fill the data after the ajax call. so put it where you want to display data and please mark the answer if it helps you.
type: Comment
comment on: http://stackoverflow.com/a/29197528
score: 0

http://stackoverflow.com/q/29143304
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: wijmo
tagged with: angularjs
type: UnansweredQuestion
has title: How to filter dates in flexgrid from Wijmo
has answer: http://stackoverflow.com/a/29160291
has body: Is anyone here familiar with Wijmo? I am new to it and currently using it's free version, the Wijmo 5. I want to filter the Flexgrid every time a change event occurs on my datepicker. A FlexGrid is similar to the JQuery plugin DataTable, but I am required to work on Wijmo. Can anyone help me?

http://stackoverflow.com/q/29184633
answer count: 1
downvote count: 1
favorite count: 0
has title: Javascript - how to define class factory as Extjs style?
type: AnsweredQuestion
tagged with: oop
has body: I am trying to create a Extjs style object-oriented UI library for my project, but didn't know how to declare the class structure. I need to create instance of the UI object in following style: var Corejs = {}; // the top object of my library, // var Corejs = function() {}; // or maybe should put it this way, window.$C = Corejs; // here should define a `Panel` class, that belong to Corejs in some format, var aPanel = $C.create('Corejs.Panel', {width: '200px', height:'100px'}); Can anyone help me to add the lines that define the Panel class, so that I could create its instance in the way shows above.
type: Question
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29184704
tagged with: extjs
accepted answer: http://stackoverflow.com/a/29184704
score: 0

http://stackoverflow.com/comment/46484627
comment on: http://stackoverflow.com/a/29128879
type: Comment
score: 0
has text: The entire point of AMD or any other moduling system is to *prevent* the need for using global variables. -1.
type: AnswerComment

http://stackoverflow.com/q/29152369
has comment: http://stackoverflow.com/comment/46526456
has body: After I make the ajax call and get a result. I want to set the attribute to be retrievable by the next jquery console.log method. Unfortunately this does not work. var other_month = $('#prev-month').attr('data-cur-month', "" + other_month); $.post('../wp-content/custom/events/index.php', { month: month, year: year }, function(data){ // refactor this so we can do this on the right side. $('.event-wrapper-left').html($('.event-wrapper').html()); $('.event-wrapper').html($('.event-wrapper-right').html()); $('.event-wrapper-right').html(data); $(self).html( monthNames[d.getMonth()]+ " " + d.getFullYear() + '&lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;'); $(self).attr('data-cur-month', "" + new_month); $(self).attr('data-cur-year', "" + year); $('#prev-month').html( '&lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;' + monthNames[other_date.getMonth()]+ " " + other_date.getFullYear()); console.log(other_month); $('#prev-month').attr('data-cur-month', other_month); // this come out as zero console.log($('#prev-month').attr('data-cur-month')); $('#prev-month').attr('data-cur-year', other_year); HTML: &lt;a class="pull-left month-left month-changer" href="#" data-cur-year="&lt;?= date('Y', strtotime('-1 month')) ?&gt;" data-cur-month="&lt;?= date('m', strtotime('-1 month')) ?&gt;" id="prev-month"&gt;&lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;&lt;?= date('F Y', strtotime('-1 month')) ?&gt;&lt;/a&gt; &lt;a class="pull-right month-right month-changer" href="#" data-cur-year="&lt;?= date('Y', strtotime('+3 month')) ?&gt;" data-cur-month="&lt;?= date('m', strtotime('+3 month')) ?&gt;" id="next-month"&gt;&lt;?= date('F Y', strtotime('+3 month')) ?&gt;&lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;&lt;/a&gt;
has comment: http://stackoverflow.com/comment/46526660
score: 0
has title: attribute is not retrievable after being set by the ajax call
has comment: http://stackoverflow.com/comment/46526946
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46526188
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29157410
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/46527473
has comment: http://stackoverflow.com/comment/46526692
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46526180

http://stackoverflow.com/comment/46706590
comment on: http://stackoverflow.com/a/29214010
score: 1
has text: Well I have no control over what chart is used and it's nearly impossible to convince the customer to just not use pie charts ;)
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29097364
answer count: 1
has title: Can't read cookie set by javascript in php
tagged with: php
has answer: http://stackoverflow.com/a/29097468
type: AnsweredQuestion
tagged with: cookies
type: Question
linked to: http://stackoverflow.com/q/5045053
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29097468
duplicate of: http://stackoverflow.com/q/5045053
has body: This is my code for my setting of cookie in javascript and reading of cookie in php. jsglobalset.html: &lt;script&gt; var values = "poppy" document.cookie = "textout=" + values + "; path=/"; &lt;/script&gt; phpglobalread.php: &lt;?php $messsage = $_COOKIE["textout"]; if($message != "") { echo $message; } else { echo "Fail to read."; } ?&gt; output of phpglobalread.html: Fail to read. I tried reading the cookie in javascript and it works, but I can't read in php. Any ideas? Thanks.
score: 0

http://stackoverflow.com/comment/46585360
type: QuestionComment
has text: @AmitJoki ha ha no, I am in no sense a mathematician. I had to convince myself that the "position" sum really would be the integral, and I'm still only partially sure :) Also I had to test the `Math.pow()` thing in the console.
score: 0
comment on: http://stackoverflow.com/q/29184696
type: Comment

http://stackoverflow.com/q/29116598
has answer: http://stackoverflow.com/a/29116727
upvote count: 1
has answer: http://stackoverflow.com/a/29116729
type: AnsweredQuestion
has body: I have a similar situation as described here but I use a $http call to get my data to build a infinite scrolling table, and get: Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: i in items, Duplicate key: string:b, Duplicate value: b source code is here this is the source code that i followed and it worked i need help in this situation! thanks
score: 1
has title: Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed
type: Question
has answer: http://stackoverflow.com/a/29116830
accepted answer: http://stackoverflow.com/a/29116729
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/16296670
possible better answer: http://stackoverflow.com/a/29116830
answer count: 3
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/29165191
upvote count: 2
linked to: http://stackoverflow.com/q/33576691
tagged with: angular-ui
tagged with: angular-ui-grid
has comment: http://stackoverflow.com/comment/46554676
has title: UI Grid AngularJS - How to update the column headers in ui-grid?
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38600696
has answer: http://stackoverflow.com/a/29166493
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46586212
favorite count: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46642884
tagged with: javascript
tagged with: ng-grid
has body: I'm working on a data driven application where the columns(table headers) are dynamically updated based on the user click. I'm loading the data from a JSON File. It works when I use a normal table with ng-repeat="heading in gridHeaders">{{ heading }}, but when I include ui-grid and the view is updated with a different set of data, the grid cells becomes empty and the columns headers remain static. How can I update my column definition in ui-grid? Here is the JSFiddle http://jsfiddle.net/masoom/svcxh6hu/7/ controllers.js $scope.gridOptions = { data: 'grid', columnDefs : '' /* not sure how to use the <ng-repeat="heading in gridHeaders"> {{ heading}} here*/ }; /* Watch for the change in the Tree's current node. When user clicks on a node, $scope.currentNode will update */ $scope.$watch(function () { return $scope.currentNode; }, function () { $scope.displayGrid(angular.fromJson($scope.currentNode.json)); }); /* Sets the Grid's data model. The view will update when this is called. */ $scope.displayGrid = function (data) { $scope.grid = data; $scope.gridHeaders = new Array(); if (typeof data != 'undefined') { for (var key in data[0]) { $scope.gridHeaders.push(key); } } } index.html 0" > {{ heading }} {{ obj[heading] }} 0" >
has comment: http://stackoverflow.com/comment/46550658

http://stackoverflow.com/a/29075184
has comment: http://stackoverflow.com/comment/46417155
has comment: http://stackoverflow.com/comment/46387248
has comment: http://stackoverflow.com/comment/46427759
type: Answer
has body: While you are loading your CSV in your javascript variable, that variable is a string. You have to extract your csv into a JSON array and you have to cast each variable accordingly. Code: $.ajax({ type: "GET", url: "sample.csv", success: function (data) { loadData(data); } }); /*var data = 'date,name,value\n\ 01/01/1991,xyz,14.4\n\ 01/01/1992,abc,20.5\n\ 01/02/1980,xy,60.8'; loadData(data);*/ function loadData(data1){ console.log(data1); var dataPoints = data1.split(/\r\n|\n/); //console.log(lines); var headers = dataPoints[0].split(','); // if you have header var lines = []; console.log(headers); console.log(dataPoints.length); for (var i = 1; i &lt; dataPoints.length; i++) { //console.log(i); var point = dataPoints[i].split(','); //console.log(point); if (point.length == headers.length) { var json= {}; for (var j = 0; j &lt; headers.length; j++) { if(headers[j]=='date'){ json[headers[j]] = new Date(point[j]); }else if(headers[j]=='value'){ //console.log(point[j]); json[headers[j]] = Number(point[j]); }else{ json[headers[j]] = point[j]; } } lines.push(json); console.log(json); } } console.log(lines); } Sample CSV: date,name,value 01/01/1991,xyz,14.4 01/01/1992,abc,20.5 01/02/1980,xy,60.8 Modified Code
has comment: http://stackoverflow.com/comment/46432078
has comment: http://stackoverflow.com/comment/46389160
has comment: http://stackoverflow.com/comment/46389617
has comment: http://stackoverflow.com/comment/46415450
score: 1
has comment: http://stackoverflow.com/comment/46458466
upvote count: 1
answers question: http://stackoverflow.com/q/29074689
has comment: http://stackoverflow.com/comment/46427699
downvote count: 0
has comment: http://stackoverflow.com/comment/46385518
has comment: http://stackoverflow.com/comment/46392108

http://stackoverflow.com/q/29210175
type: UnansweredQuestion
tagged with: python
score: 2
has answer: http://stackoverflow.com/a/48225574
upvote count: 2
has answer: http://stackoverflow.com/a/29945127
has answer: http://stackoverflow.com/a/29212446
type: Question
tagged with: openerp-8
tagged with: odoo
tagged with: odoo-8
tagged with: javascript
has body: I have created a new module in Odoo v8 and I want to call a python function defined in the controllers folder of the module from a JavaScript file defined in static/src/js. I have tried the following: 1. function openerp_pos_models(instance){ var myModel = new instance.web.Model('my.model'); //code to call python method }); But on loading the page it shows instance is not defined. 2. var Users = new openerp.web.Model('res.users'); but this shows Uncaught TypeError: Cannot read property 'Model' of undefined.
answer count: 3
downvote count: 0
has title: How do I call a python function from Javascript file in Odoo v8 in a newly created module?
favorite count: 0

python
tags question: http://stackoverflow.com/q/29135569
tags question: http://stackoverflow.com/q/29188736
tags question: http://stackoverflow.com/q/29179583
tags question: http://stackoverflow.com/q/29102501
tags question: http://stackoverflow.com/q/29212854
tags question: http://stackoverflow.com/q/29213893
tag name: python
tags question: http://stackoverflow.com/q/29183808
tags question: http://stackoverflow.com/q/29067725
tags question: http://stackoverflow.com/q/29067453
tags question: http://stackoverflow.com/q/29167649
tags question: http://stackoverflow.com/q/29152732
tags question: http://stackoverflow.com/q/29137305
tags question: http://stackoverflow.com/q/29155153
tags question: http://stackoverflow.com/q/29163395
tags question: http://stackoverflow.com/q/29106586
tags question: http://stackoverflow.com/q/29136916
tags question: http://stackoverflow.com/q/29062563
type: Tag
tags question: http://stackoverflow.com/q/29214389
tags question: http://stackoverflow.com/q/29123083
tags question: http://stackoverflow.com/q/29124435
tags question: http://stackoverflow.com/q/29165599
tags question: http://stackoverflow.com/q/29175519
tags question: http://stackoverflow.com/q/29214698
tags question: http://stackoverflow.com/q/29196352
tags question: http://stackoverflow.com/q/29210175
tags question: http://stackoverflow.com/q/29091312
tags question: http://stackoverflow.com/q/29104480
tags question: http://stackoverflow.com/q/29136362

http://stackoverflow.com/a/29123748
type: Answer
has comment: http://stackoverflow.com/comment/46473906
downvote count: 0
has comment: http://stackoverflow.com/comment/46474874
has comment: http://stackoverflow.com/comment/46474634
score: 1
has comment: http://stackoverflow.com/comment/46474176
has comment: http://stackoverflow.com/comment/46474338
answers question: http://stackoverflow.com/q/29123425
has body: In short: google chrome doesn't like local cross calls. More found here: Cross origin requests are only supported for HTTP but it&#39;s not cross-domain . It's Googles privacy and security policy: they try to avoid as much risks as possible, and local file calling seems to be one of them. Read more on cross origin requests and how they're handled in Google Chrome here: https://developer.chrome.com/extensions/xhr If you don't want to use those console commands, you might want to look for a webserver to host it (or a local webserver).
has comment: http://stackoverflow.com/comment/46474269
has comment: http://stackoverflow.com/comment/46473859
has comment: http://stackoverflow.com/comment/46474541
upvote count: 1
has comment: http://stackoverflow.com/comment/46474311

http://stackoverflow.com/comment/46379712
type: Comment
score: 3
comment on: http://stackoverflow.com/a/29072650
type: AnswerComment
has text: @RexAdrivan Not necessarily.

http://stackoverflow.com/comment/46477474
score: 0
type: AnswerComment
has text: The problem with this solution is that it doesn't work exactly in sync with the css animation. So it's still not smooth.
type: Comment
comment on: http://stackoverflow.com/a/29125570

http://stackoverflow.com/comment/46410637
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29088777
has text: @FelixKling Ok, but how do I declare it to behave like both? I tried this: http://jsfiddle.net/okd0b851/ but I got "$.test is not a function"
score: 0

http://stackoverflow.com/comment/46503903
type: Comment
has text: Perhaps you should edit your question to clarify it.
type: QuestionComment
comment on: http://stackoverflow.com/q/29139920
score: 0

http://stackoverflow.com/q/29178002
has body: I realize that placeholder is html 5 i believe. Is there an alternative for placeholder? I have to use xhtml strict 1.0 it's a requirement.
possible better answer: http://stackoverflow.com/a/29178131
has answer: http://stackoverflow.com/a/29178199
has answer: http://stackoverflow.com/a/29178131
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/32597340
tagged with: css
type: AnsweredQuestion
score: 0
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46573624
has answer: http://stackoverflow.com/a/32597340
answer count: 3
has title: getting an error there is no attribute "placeholder" in xhtml strict 1.0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46573405
favorite count: 0

http://stackoverflow.com/comment/46583431
comment on: http://stackoverflow.com/q/29183688
score: 0
type: Comment
has text: @T.J.Crowder isn't multiple object people call it array?
type: QuestionComment

http://stackoverflow.com/comment/46628689
type: Comment
comment on: http://stackoverflow.com/a/29209372
has text: Em and how it supposed to help? As I see in your example, it add new values and not removes them (also - how to do this in array?). Also, doit it update original array or what?
type: AnswerComment
score: 0

http://stackoverflow.com/a/29134477
has comment: http://stackoverflow.com/comment/90543656
has comment: http://stackoverflow.com/comment/67951672
score: 24
upvote count: 24
answers question: http://stackoverflow.com/q/29133563
has body: The JS SDK goes through your document once when it is initialized, to look for such elements to parse into social plugins. If you want it to also parse content that you add to the document later, you need to call FB.XFBML.parse(). https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/
has comment: http://stackoverflow.com/comment/115277040
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29133563
type: Answer

http://stackoverflow.com/comment/46596143
has text: I have updated the question. I think req.url is just get something like `/submit/idea`; not the identifier of the uploaded image.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29190397

http://stackoverflow.com/q/29206210
tagged with: time
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29268334
type: Question
has comment: http://stackoverflow.com/comment/46623104
has comment: http://stackoverflow.com/comment/46623163
has title: Enable HTML button by time
has answer: http://stackoverflow.com/a/29206390
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46623459
has body: I have an HTML button on my website: &lt;button id="upload" style="display:none;"&gt; SIGN IN &lt;/button&gt; I am needing to disable the button except for between the minutes of 25 and 35 and 55 and 05 each hour. If anyone can please help I would be most grateful as I can only find javascript for between two times and it only disable the button once a day, not twice each and every hour. Many thanks.
tagged with: button
tagged with: javascript

function
tags question: http://stackoverflow.com/q/29138096
tags question: http://stackoverflow.com/q/29080295
tags question: http://stackoverflow.com/q/29205348
tag name: function
tags question: http://stackoverflow.com/q/29193909
tags question: http://stackoverflow.com/q/29148057
tags question: http://stackoverflow.com/q/29172446
tags question: http://stackoverflow.com/q/29213692
tags question: http://stackoverflow.com/q/29165732
tags question: http://stackoverflow.com/q/29212452
tags question: http://stackoverflow.com/q/29205269
tags question: http://stackoverflow.com/q/29196265
tags question: http://stackoverflow.com/q/29175553
tags question: http://stackoverflow.com/q/29169055
tags question: http://stackoverflow.com/q/29157943
tags question: http://stackoverflow.com/q/29174566
tags question: http://stackoverflow.com/q/29210354
tags question: http://stackoverflow.com/q/29116289
tags question: http://stackoverflow.com/q/29208727
tags question: http://stackoverflow.com/q/29070203
tags question: http://stackoverflow.com/q/29149567
tags question: http://stackoverflow.com/q/29104144
tags question: http://stackoverflow.com/q/29129765
tags question: http://stackoverflow.com/q/29158660
tags question: http://stackoverflow.com/q/29165712
tags question: http://stackoverflow.com/q/29110480
tags question: http://stackoverflow.com/q/29197245
tags question: http://stackoverflow.com/q/29113855
tags question: http://stackoverflow.com/q/29121111
tags question: http://stackoverflow.com/q/29102684
type: Tag
tags question: http://stackoverflow.com/q/29188406
tags question: http://stackoverflow.com/q/29118267
tags question: http://stackoverflow.com/q/29187436
tags question: http://stackoverflow.com/q/29205597
tags question: http://stackoverflow.com/q/29209676
tags question: http://stackoverflow.com/q/29139498
tags question: http://stackoverflow.com/q/29071921
tags question: http://stackoverflow.com/q/29156592
tags question: http://stackoverflow.com/q/29162944
tags question: http://stackoverflow.com/q/29112540
tags question: http://stackoverflow.com/q/29146469
tags question: http://stackoverflow.com/q/29175994
tags question: http://stackoverflow.com/q/29177331
tags question: http://stackoverflow.com/q/29198250

http://stackoverflow.com/q/29182244
has answer: http://stackoverflow.com/a/58765869
has answer: http://stackoverflow.com/a/44139173
has answer: http://stackoverflow.com/a/76729499
score: 232
has comment: http://stackoverflow.com/comment/130883817
has answer: http://stackoverflow.com/a/29182787
has comment: http://stackoverflow.com/comment/111293469
upvote count: 232
has answer: http://stackoverflow.com/a/71801207
tagged with: eval
has answer: http://stackoverflow.com/a/38289823
downvote count: 0
has answer: http://stackoverflow.com/a/40960883
accepted answer: http://stackoverflow.com/a/29182787
linked to: http://stackoverflow.com/q/44272282
tagged with: template-strings
has comment: http://stackoverflow.com/comment/51903220
has answer: http://stackoverflow.com/a/41015840
answer count: 23
has answer: http://stackoverflow.com/a/70365827
favorite count: 0
has answer: http://stackoverflow.com/a/71814647
linked to: http://stackoverflow.com/q/54896541
has comment: http://stackoverflow.com/comment/121736537
has answer: http://stackoverflow.com/a/33970626
has answer: http://stackoverflow.com/a/31999948
has comment: http://stackoverflow.com/comment/119882558
has answer: http://stackoverflow.com/a/41700401
possible better answer: http://stackoverflow.com/a/41015840
has comment: http://stackoverflow.com/comment/101594725
linked to: http://stackoverflow.com/q/22607806
has answer: http://stackoverflow.com/a/48294208
has answer: http://stackoverflow.com/a/47358102
has answer: http://stackoverflow.com/a/41972664
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/41515470
has comment: http://stackoverflow.com/comment/119882529
has answer: http://stackoverflow.com/a/59084440
has answer: http://stackoverflow.com/a/74949645
has answer: http://stackoverflow.com/a/51296088
linked to: http://stackoverflow.com/q/57565794
type: Question
has answer: http://stackoverflow.com/a/29201948
has body: Is it possible to create a template string as a usual string, let a = "b:${b}"; and then convert it into a template string, let b = 10; console.log(a.template()); // b:10 without eval, new Function and other means of dynamic code generation?
tagged with: ecmascript-6
linked to: http://stackoverflow.com/q/6393943
has title: Convert a string to a template string
has comment: http://stackoverflow.com/comment/69881952
has answer: http://stackoverflow.com/a/41540381
has answer: http://stackoverflow.com/a/44462193
tagged with: javascript

http://stackoverflow.com/a/29215684
has comment: http://stackoverflow.com/comment/67096327
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/29215600
accepted answer of: http://stackoverflow.com/q/29215600
upvote count: 1
has body: Either use .next() if it is the exact following node var thisShape = $(this).next().addBack(); or use .siblings() if they share the same parent but might have other elements in the DOM between them var thisShape = $(this).siblings('[class^="shapeRight"]').addBack(); In both cases you alse need to add the .addBack() at the end, to include the current element in the selection (the this in your case) Demo at https://jsfiddle.net/gaby/qukkwvL1/3/

http://stackoverflow.com/q/29153107
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29153169
accepted answer: http://stackoverflow.com/a/29153169
tagged with: google-chrome
type: Question
answer count: 1
tagged with: javascript
has title: Getting rid of a favicon completely
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has body: I am a webdev that has a website but it displays a white file as a favicon (in chrome and maybe other browsers too) however I would like to completely get rid of the favicon, how could I do this?
favorite count: 0
has comment: http://stackoverflow.com/comment/46527427
tagged with: favicon
type: AnsweredQuestion

http://stackoverflow.com/a/40725695
upvote count: 5
answers question: http://stackoverflow.com/q/29168433
has comment: http://stackoverflow.com/comment/101001430
has comment: http://stackoverflow.com/comment/101001642
type: Answer
has body: I less like this syntax, but it work: instead of writing import memberName from "path" + "fileName"; // this will not work!, since "path" + "fileName" need to be string literal use this syntax: let memberName = require("path" + "fileName");
score: 2
downvote count: 3
has comment: http://stackoverflow.com/comment/101004529

http://stackoverflow.com/comment/46501617
has text: Haha yeah I am football :|
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29135296

http://stackoverflow.com/q/29185892
upvote count: 1
has answer: http://stackoverflow.com/a/29186360
has title: Update a database record simultaneously with different values by different users
type: Question
tagged with: javascript
answer count: 3
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I have designed a Web based project. I am using Mysql database. I will perform all persistence logic in java using hibernate. All the client side actions will be done in javascript. Here my problem is, If two users are trying to update same record simultaneously at different places. Initially User-1 updates by giving full information related to a single object and called save information method. At the other end User-2 updates same record by giving partial information and called save information method. If User-1 information is saved first User-2 information will overwrite first given information. Hence some information might loss which user-1 given but he doesn't know some thing is loosed. Please give some suggestions to overcome this problem.
has answer: http://stackoverflow.com/a/29185971
score: 1
tagged with: java
tagged with: hibernate
has answer: http://stackoverflow.com/a/29186133
tagged with: mysql

http://stackoverflow.com/comment/46637256
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29213545
has text: Have you fulfilled the CSS requirements? "Add position:relative or absolute to the scroll container (the wrapper). That alone usually solves most of the problems with wrongly calculated wrapper dimensions."

http://stackoverflow.com/comment/46518176
comment on: http://stackoverflow.com/q/29147847
type: QuestionComment
has text: Google "if current page php".
type: Comment
score: 3

http://stackoverflow.com/q/29189181
has body: I am trying to create a regular expression for parsing and validation of time ranges in Javascript. Keep in mind that I am simply looking to parse correctly structured strings of characters. The validation logic regarding the time ranges is made afterward Requirements: Time elements are expressed always in 24 hour and should be of (HH:mm) format. Time range is defined as 2 time elements separated by a dash String should at least have one timerange or more separated by comma Matching pattern should tolerate spaces between elements The validated string should either match as a whole or completely fail to match What I came up is the following: /((?:[01]\d:[0-5][0-9]|2[0-3]:[0-5][0-9])(?:\s?)-(?:\s?)(?:[01]\d:[0-5][0-9]|2[0-3]:[0-5][0-9])(?:\s?,\s?)?)/g which seems to satisfy all the rules apart from rule 5. ie. if incorrect characters exist they simply not match but the expression does not fail as a whole is there any way to embed rule 5 inside this regex?
has comment: http://stackoverflow.com/comment/46593224
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29189210
has comment: http://stackoverflow.com/comment/46593046
upvote count: 1
accepted answer: http://stackoverflow.com/a/29189210
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46592968
has title: Regexp matching time ranges
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46593128

http://stackoverflow.com/comment/46623020
has text: what if I have multiple tag? select 1 by 1?
comment on: http://stackoverflow.com/a/29206149
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29140345
has answer: http://stackoverflow.com/a/29140532
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29140439
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I have try to focus while onblur Event. it works on chrome not on firefox. how to sort out. function a() { $("#login").focus(); } $(document).ready(function() { $("#login").focus(); }); &lt;input id="login" onblur="a()"&gt;&lt;/input&gt; Please help.
has comment: http://stackoverflow.com/comment/46504585
type: Question
has title: input forced to focus while onblur event
has answer: http://stackoverflow.com/a/29140720
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29140720
has comment: http://stackoverflow.com/comment/46504500
answer count: 3
has comment: http://stackoverflow.com/comment/46504468
upvote count: 1
linked to: http://stackoverflow.com/q/8141239
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29140439

http://stackoverflow.com/a/29189758
has comment: http://stackoverflow.com/comment/46713518
score: 0
has body: Would something like this work instead? angular.module("main", ["ui.bootstrap"]) .controller("MyController", ["$scope", function($scope) { $scope.notes = [{Content: "Lorem Ipsum"},{Content: "Sit amet"}]; $scope.func=function() { alert("function executed")}; $scope.title="Title"; }]) .directive("tabGroupResponsive", function () { return { restrict: 'EA', template: function (element, attr) { children = element.children(); var html = ""; html += " "; html += " "; html += " "; for (var i = 0; i < children.length; i++) { var child = children[i]; html += " "; html += child.innerHTML; html += " "; } html += " "; html += " "; html += " "; html += " "; for (var i = 0; i < children.length; i++) { var child = children[i]; html += " "; html += child.innerHTML; html += " "; } html += " "; html += " "; html += " "; return html; } } }); http://plnkr.co/edit/DHTcQD12DvBqP1hhVotb?p=preview I'm not that experienced with this so I'm sure that there may be some downsides to doing it with 'template' just like this, but the end result appears to be good enough, wouldn't you say? ;)
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29153274
type: Answer
answers question: http://stackoverflow.com/q/29153274

html2canvas
tags question: http://stackoverflow.com/q/29212325
tags question: http://stackoverflow.com/q/29105249
type: Tag
tag name: html2canvas

http://stackoverflow.com/a/29120395
upvote count: 2
answers question: http://stackoverflow.com/q/29120283
has body: You could use the hasClass() method: if (!$(this).hasClass('cloned')) {}
type: Answer
score: 2
downvote count: 0

pubnub
tags question: http://stackoverflow.com/q/29074806
type: Tag
tag name: pubnub

http://stackoverflow.com/q/29107582
has answer: http://stackoverflow.com/a/29158558
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29158558
has answer: http://stackoverflow.com/a/29452585
type: Question
tagged with: reactjs
tagged with: javascript
has body: I am doing React.js tutorial and here is my code: //Comment box var CommentBox = React.createClass({ loadCommentsFromServer: function() { $.ajax({ url: this.props.url, dataType: 'json', success: function(data) { this.setState({data: data}); console.log('Data has obtained... Refresh state') }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }); }, handleCommentSubmit: function(comment) { var comments = this.state.data; var newComments = comments.concat([comment]); this.setState({data: newComments}); $.ajax({ url: this.props.url, dataType: 'json', type: 'POST', data: comment, success: function(data) { this.setState({data: data}); }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }) }, getInitialState: function() { return {data: []}; }, componentDidMount: function() { this.loadCommentsFromServer(); setInterval(this.loadCommentsFromServer, this.props.pollInterval); }, render: function() { return ( Comments <CommentList data={this.state.data} /> <CommentForm onCommentSubmit={this.handleCommentSubmit} /> ); } }); //Comment list var CommentList = React.createClass({ render: function() { var commentNodes = this.props.data.map(function(comment) { return ( {comment.text} ); }); return ( {commentNodes} ); } }); //Comment form var CommentForm = React.createClass({ handleSubmit: function(e) { e.preventDefault(); var author = React.findDOMNode(this.refs.author).value.trim(); var text = React.findDOMNode(this.refs.text).value.trim(); if (!text || !author) { return; } this.props.onCommentSubmit({author: author, text: text}); //TODO: send request to the server React.findDOMNode(this.refs.author).value = ''; React.findDOMNode(this.refs.text).value = ''; }, render: function() { return ( ); } }); //Comment var converter = new Showdown.converter(); var Comment = React.createClass({ render: function() { var rawMarkup = converter.makeHtml(this.props.childr…
score: 0
possible better answer: http://stackoverflow.com/a/29759288
answer count: 3
has answer: http://stackoverflow.com/a/29759288
has comment: http://stackoverflow.com/comment/46472008
has title: React.js tutorial: comments don't append in the list
has comment: http://stackoverflow.com/comment/46444989

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/29120036
type: Tag

http://stackoverflow.com/q/29171033
upvote count: 2
has answer: http://stackoverflow.com/a/32608212
answer count: 3
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/29864010
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29175047
has body: Is it possible to check users role on Sign in, and than if user is in role "admin" to display one page, and if is it in role "basic-user" to display another page ( go to another route).
score: 2
type: Question
has title: meteor-useraccounts and alanning meteor-roles - Check role on sign-in
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29120856
type: Answer
has body: Your two options contradict each other. At the same time you require that there are trailing commas with "requireTrailingComma": true and forbid the trailing comma with "disallowTrailingComma": true. To get the warning for trailing commas, remove the "requireTrailingComma": true option and at the same time keep "disallowTrailingComma": true. UPDATE I removed the following options that generated errors in console and it worked for your slightly modified example code, that only the trailing comma warning is displayed: var x ={ prop1 : 10, prop2 : 20, }; I removed the following lines (shown together with their errors) "disallowSpaceAfterLineComment": false because of AssertionError: disallowSpaceAfterLineComment option requires the value true and "safeContextKeyword": true because AssertionError: safeContextKeyword option requires string or array value and "requireTrailingComma": true because of the contradiction described above.
accepted answer of: http://stackoverflow.com/q/29120520
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46468360
has comment: http://stackoverflow.com/comment/46469729
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29120520

http://stackoverflow.com/q/29120841
tagged with: javascript
upvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Angular material, when adding a ripple it will fill instead of disappearing
has body: I'm developing a framework on top of angular material for easy usage. I want to know if there is a fill version of the md-ink-ripple directive so that the ripple is an actual fill color when it is been set. // so in an active state this will fill "myDiv" with color and stay fully sized
tagged with: css
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/31366730
tagged with: angular-material
type: Question
tagged with: sass
answer count: 1

http://stackoverflow.com/a/29205946
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29205691
has body: As the keys of the object is not same, you can't just iterate it. May be you can do it in this way: DEMO &lt;div ng-repeat="object in myobjects"&gt;{{getValue(object,'id') }} {{getValue(object,'name')}} &lt;/div&gt; In your controller: $scope.getValue = function(value,field) { var key = Object.keys(value).filter(function(val) { return val != "$$hashKey" })[0]; return value[key][field]; }

http://stackoverflow.com/a/29147077
score: 0
answers question: http://stackoverflow.com/q/29146951
type: Answer
has body: Change dataTable to DataTable. I answer my own question because I spent a hour with this bug, so I hope I can help others. var tableComputerAndDevice = $('#tableComputerAndDevices').DataTable({

http://stackoverflow.com/comment/46419419
comment on: http://stackoverflow.com/q/29094000
has text: I had similar issue before. If I recall well karma will only load JS files so it's probably trying to process your file as something else generating the error message. I know it's not practical but could always use a string or a mock service which return the XML to be parsed.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29136780
type: Question
tagged with: javascript
score: 0
has body: I had a curious issue today where the Facebook API code that was dispensed from developers.facebook.com wouldn't work at all in modern browsers. (It worked in IE 8, and Opera 12). I assumed it was Javascript related, and fiddled, tried other FB code (like Facepile etc) and it just. didn't. work. What I was trying to embed was the Like Box, but I tried the simple like button too. What irritated me the most about this was that all the help on the internet suggested that I "just change the sdk.js to all.js and your problems will magically go away" - which in this case, wasn't true.
accepted answer: http://stackoverflow.com/a/29136781
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: web
tagged with: facebook
type: AnsweredQuestion
has title: Facebook API Social plugins wont load on 3rd party website
has answer: http://stackoverflow.com/a/29136781

http://stackoverflow.com/a/29096279
has body: You can obfuscate your data, but you cannot encrypt it with the objective to preserve confidentiality. When the client browser receives the encrypted data, the browser will have to have a way to decrypt the data so that the maps API can consume the data. For this to work the key will also need to be present on the client. So the user will be able to decrypt it with enough effort (not brute-force, but combining the data). If the data can be decrypted then this is simply an obfuscation technique. This can only work with symmetric ciphers such as AES. You can use for example CryptoJS.
accepted answer of: http://stackoverflow.com/q/29094418
downvote count: 0
has comment: http://stackoverflow.com/comment/46423943
score: 1
type: AcceptedAnswer
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29094418

http://stackoverflow.com/comment/46390336
has text: maybe you can just used the data.. I mean your source of data that you fill in the dataTable.. I'm not sure..
comment on: http://stackoverflow.com/q/29077902
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29115987
has body: If you right-click and look at the source, there are plenty of hints that the graph is drawn using three.js. three.js is a 3D drawing library that simplifies coding WebGL scenes. If you look at the source further, you can find that all the graphics is drawn in a javascript file called threejsgraph-(some_big_random_hash).js. Paste it into a pretty printer (google "javascript pretty printer") to make it more readable. Basically the code creates a lot of random sprites with lines (path) connecting them then animate the camera based on mouse movement.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29114773
accepted answer of: http://stackoverflow.com/q/29114773
type: Answer
score: 0

http://stackoverflow.com/comment/46405612
has text: ok so after changing the redirect, you are still having issues? can you describe a bit more clearly what you are seeing, as opposed to what we are seeing in the working plunkr?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29085366

http://stackoverflow.com/a/29185985
type: Answer
answers question: http://stackoverflow.com/q/29185858
has body: Make a div any where inside your html-body: &lt;div id="javascriptTextHere"&gt;&lt;/div&gt; Then make a script tag inside the html-head tag: &lt;script&gt; //Load your javascript variable string here //Suppose your string here is in var abc=.... document.getElementById("javascriptTextHere").innerText=abc; &lt;/script&gt;
score: 0

http://stackoverflow.com/comment/46497379
has text: @Louis: Where is the string with the backslash coming from? Most ways of getting a string won't interpret escape sequences; for example, if you enter `\d` into a text field and read the contents, you'll get a string with a literal backslash and a d in it.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29136165

http://stackoverflow.com/comment/46468590
has text: Right, how about the answers below? Do they help?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29120582

http://stackoverflow.com/comment/46546905
comment on: http://stackoverflow.com/q/29163852
has text: Where exactly did you get this error? Did you include jquery?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29182220
type: Question
has title: Why isn't this jquery effect working?
answer count: 1
accepted answer: http://stackoverflow.com/a/29182261
upvote count: 1
has comment: http://stackoverflow.com/comment/46580650
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I was working through this course on Codecademy and once I finished and ran the code.. it worked just fine, but what I like to do is take the code from codecademy and set copy/paste it into my own jquery folder for reference/practice. The goal for this project was to get the krypton to bounce 3 times in 500ms, and the script.js works in codecademy but not when I set it up locally.. does anybody know why? index.html: main.css: body { background-image: url('http://bit.ly/UpQgJ6'); } div { height: 100px; width: 100px; border-radius: 100%; background-color: #008800; background-image: -webkit-gradient(linear, 100% 0%, 0% 100%, from(#003500), to(#008800)); background-image: -webkit-linear-gradient(left, #003500, #008800); background-image: -moz-linear-gradient(left, #003500, #008800); background-image: -ms-linear-gradient(left, #003500, #008800); background-image: -o-linear-gradient(left, #003500, #008800); } script.js: $(document).ready(function() { $('div').click(function() { $(this).effect('bounce', {times:3}, 500); }); }); Thank you for reading
has comment: http://stackoverflow.com/comment/46580635
has comment: http://stackoverflow.com/comment/46580630
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29182261
favorite count: 0

http://stackoverflow.com/a/29112395
score: 0
has comment: http://stackoverflow.com/comment/46453810
type: Answer
answers question: http://stackoverflow.com/q/29112321
has comment: http://stackoverflow.com/comment/46453946
has comment: http://stackoverflow.com/comment/46453890
has body: Email: You can add it in form's onsubmit
has comment: http://stackoverflow.com/comment/46454146

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/29129514

http://stackoverflow.com/comment/46370300
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29067342
type: Comment
has text: @dandavis I don't have any code - I have absolutely no idea how to do this, and so far I can't find anything. Even a description of how restoring the cursor along with anchorNode would be much appreciated.

http://stackoverflow.com/q/29157483
type: Question
has body: I have a table in my database that holds events. The events have a start time and end time. But when they are inserted into the database the time the user inputed is converted to UTC time. So for me, my time offset is -4 hours from UTC time and if I input the start time as 7pm (19:00:00) that is converted to 23:00:00 (UTC) when added to the database. The Problem I want the user to be able to select all events at and after 7pm until the end of the day, but If I do the query: WHERE time &gt; 23:00:00 it will only retrieve event where the start time is between 7:00pm and 7:59pm. At 8:00pm the UTC time in the database is 00:00:00 which is less than 23:00:00. The field type that the start time is stored in is time I use javascript to get the time-offset and input, and php for mySQL. Any ideas on how to solve this using those languages or SQL?
tagged with: javascript
tagged with: sql
has answer: http://stackoverflow.com/a/29157635
answer count: 1
accepted answer: http://stackoverflow.com/a/29157635
downvote count: 0
has comment: http://stackoverflow.com/comment/46535743
favorite count: 0
tagged with: php
has title: Retrieve rows from SQL database after certain time
type: AnsweredQuestion
score: 1
tagged with: mysql
upvote count: 1

http://stackoverflow.com/comment/46564446
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29154385
type: Comment
has text: Ok, got it. I'll write another answer related to bootstrap

http://stackoverflow.com/comment/46428725
type: Comment
has text: Unless you post your whole JS code and HTML or post a fiddle (replicating the issue), I think it will not be possible for anyone to identify
score: 0
comment on: http://stackoverflow.com/q/29098571
type: QuestionComment

http://stackoverflow.com/comment/46596426
type: QuestionComment
comment on: http://stackoverflow.com/q/29164404
has text: A word of caution that you should not be storing Google passwords without a very very good and specific reason. If this is just a project for yourself it's not so bad but you really shouldn't do it for other users.
score: 0
type: Comment

http://stackoverflow.com/comment/46609691
type: AnswerComment
comment on: http://stackoverflow.com/a/29198520
type: Comment
has text: I am looking. All the example reveals is that the named argument variable **is identical** to the item in `arguments`. How does that answer the question of why v8 is unable to optimise such function?
score: 0

http://stackoverflow.com/a/53945499
answers question: http://stackoverflow.com/q/29150480
type: Answer
has comment: http://stackoverflow.com/comment/94729971
score: 3
upvote count: 3
has body: $('#mytable').DataTable().destroy(); $('#mytable').html('');
downvote count: 0

http://stackoverflow.com/comment/112381048
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29141833
has text: There's some great explanations on decorators vs presenters here: https://stackoverflow.com/questions/7860301/ruby-on-rails-patterns-decorator-vs-presenter
type: Comment

http://stackoverflow.com/comment/46459055
type: QuestionComment
comment on: http://stackoverflow.com/q/29112677
score: 0
has text: I think there's no way around calling `sync()` after either `reset()` or `set()`
type: Comment

http://stackoverflow.com/comment/46603228
has text: Great it worked for you. Also I think you should add image_id to mysql inside if(preloaded_file.is_valid())){ ....here....}
type: Comment
comment on: http://stackoverflow.com/a/29192923
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46523278
score: 1
has text: Not happy with the first example, but +1 for `Number.MAX_SAFE_INTEGER`.
type: AnswerComment
comment on: http://stackoverflow.com/a/29150649
type: Comment

http://stackoverflow.com/a/29166110
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29148195
upvote count: 2
type: Answer
has body: What you can do is wrapping another div around the elements. You are able to use the CSS Selector "element element" to define the style. .whatever div { padding: 0; width: 40px; height: 40px; background: purple; } .whatever div div { padding: 0; width: 30px; height: 30px; background: beige; }

http://stackoverflow.com/q/29102120
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46438604
has comment: http://stackoverflow.com/comment/46435359
tagged with: modernizr
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46436243
type: Question
has comment: http://stackoverflow.com/comment/46434295
tagged with: javascript
has comment: http://stackoverflow.com/comment/46434810
has body: I'm using ie10 and have had wrong values returned from modernizr from my site, it is an internal site. It is running and to simplify things, I have it just checking the value of hsla. There are a lot of other features that we want to see, but to debug I have stripped it down to just look at hsla. If I go to different sample sites, "hsla" is shown as an option. If I go to our site ex, http://www.example.com/test.htm, "no-hsla" is shown. I have switched out the modernizr file we are using to use one from ajax.cdnjs.com and I get the same result. I have generated a new download modernizr with just hsla in it and same result "no-hsla". I can copy the same exact files to a server that I hit with IP http://x.x.x.x/test.htm and it works fine and show "hsla" this is all I have in test.htm &lt;!doctype html&gt; &lt;html lang="en" class="no-js" xmlns:og="http://opengraphprotocol.org/schema/"&gt; &lt;head&gt; &lt;script type="text/javascript" src="moderntest.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Any thoughts on this?
has title: Modernizer won't show the correct values
upvote count: 1

http://stackoverflow.com/q/29111249
has title: HTML5 drag and drop image offset on drop
type: UnansweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/67753322
score: 1
has comment: http://stackoverflow.com/comment/46453430
has comment: http://stackoverflow.com/comment/46453444
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46453490
favorite count: 0
tagged with: drag-and-drop
tagged with: http://stackoverflow.com/tag/html
has body: I have a draggable="true" element which I am dropping into a drop zone. The event gives me back a few properties which I can use to determine it's position and create a new element where it got dropped. It seems to only give the mouse position. But it doesn't seem to contain the offset of where the image was in relation to the mouse. Where would I get that information? A picture to help explain, the mouse is at the yellow dot. The drop event returns event.x and event.y where the mouse is.... But I need to know where the blue dot is, or the offset (red lines)

http://stackoverflow.com/comment/46438945
type: QuestionComment
comment on: http://stackoverflow.com/q/29101166
has text: looks like this (in coffeescript): https://gist.github.com/anonymous/1d3814bd45fc1a6fc56a . Its in my current project, I'm not providing the values as needed. I don't know if this is a recommended way if you're using Ember-data.
score: 0
type: Comment

http://stackoverflow.com/q/29134963
answer count: 2
has body: I would like to be able to create a class that looks like the object that was passed to it, and add new methods to this object. Here is what i have so far: Node = function(data) { Node = data; Node.constructor.prototype = new data.constructor(); Node.constructor.prototype.testProp = "Hello!"; return Node; }; node = Node('abc'); console.log(node); // abc console.log(node.testProp); // Hello! var testArray = []; testArray.push(node); console.log(testArray); // ['abc'] Whats the problem with this implementation? The Node class looks like a String in this sample but every string now has a testProp property. console.log(node.testProp) // 'Hello!' console.log("something".testProp) // 'Hello!' My question: How i should implement a class that would behave like the object that was passed in the constructor without affecting all the other objects of the same class? Why? The reason why i am asking this is that i want the element data (String, Number, Array, Object, etc) to be accessible without using any methods or props for example console.log(Node.value);, instead i just want to use console.log(Node); Thanks!
has comment: http://stackoverflow.com/comment/46800074
has comment: http://stackoverflow.com/comment/46497142
has comment: http://stackoverflow.com/comment/46495379
downvote count: 0
linked to: http://stackoverflow.com/q/22834047
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/46496277
has comment: http://stackoverflow.com/comment/46880372
tagged with: prototype
has title: oop Class that behaves like the constructor parameter type
possible better answer: http://stackoverflow.com/a/29141477
has answer: http://stackoverflow.com/a/29263642
has comment: http://stackoverflow.com/comment/46498701
has comment: http://stackoverflow.com/comment/46496302
has answer: http://stackoverflow.com/a/29141477
linked to: http://stackoverflow.com/q/27989285
favorite count: 0
has comment: http://stackoverflow.com/comment/46496713
has comment: http://stackoverflow.com/comment/46498963
tagged with: constructor
has comment: http://stackoverflow.com/comment/46495527
has comment: http://stackoverflow.com/comment/46497137
has comment: http://stackoverflow.com/comment/46495504
has comment: http://stackoverflow.com/comment/46511620
has comment: http://stackoverflow.com/comment/46817644
has comment: http://stackoverflow.com/comment/46495549
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46499112
tagged with: oop
accepted answer: http://stackoverflow.com/a/29263642
has comment: http://stackoverflow.com/comment/46496691
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/46448899
type: QuestionComment
has text: Yes it does the job and it works: http://jsfiddle.net/ejs1d3zb/2/
score: 0
comment on: http://stackoverflow.com/q/29109400
type: Comment

http://stackoverflow.com/comment/46452893
comment on: http://stackoverflow.com/q/29111867
has text: not much. hue, saturation and other intra-pixel adjustments only.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46639829
has text: What do you mean "jquery related css"? Any other CSS *could* be affecting the calendar. It all depends on what you have.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29215071
type: Comment

http://stackoverflow.com/comment/46641485
has text: Fastest way is to request the spec to add second parameter to the constructor that becomes the fill value. Right now the fill value is always `0` but that's wasteful
comment on: http://stackoverflow.com/q/29200787
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29213563
type: Answer
has body: You could first of all bind your strings to an array by default, rather than each individually. var quotes = ["The road to riches is paved with homework.", "Ignore your previous fortune.", "Avoid taking unnecessary gambles.", "You love peace.", "A friend asks only for your time and not your money."]; Then you'll want to create an array, loop through (I set the number at &lt; 6, so 0,1,2,3,4,5) a set of numbers, and then push items into the array. // Get random lucky numbers var numbers = []; for(i = 0; i &lt; 6; i++) { numbers.push(Math.floor(Math.random() * 60 + 1)); }
answers question: http://stackoverflow.com/q/29213323
score: 0

http://stackoverflow.com/comment/46647263
comment on: http://stackoverflow.com/q/29212824
has text: I don't see how `this.game.fireEvent('levelComplete')` is any less coupled than `this.game.levelCompleteCallback()`. You would still have to provide a way to *listen* to the events being fired.
score: 0
type: Comment
type: QuestionComment

jquery-validate
tags question: http://stackoverflow.com/q/29215522
tags question: http://stackoverflow.com/q/29108966
type: Tag
tags question: http://stackoverflow.com/q/29170476
tag name: jquery-validate
tags question: http://stackoverflow.com/q/29182566
tags question: http://stackoverflow.com/q/29172381

http://stackoverflow.com/comment/46426890
score: 0
comment on: http://stackoverflow.com/q/29098263
has text: Please post some HTML. This is definitely a problem with missing styles or wrong CSS classes.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46518300
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29147731
type: QuestionComment
has text: To email it, you probably need server side. To download it, iOS Safari tries not to download anything. It tries to open it in a new window even if the server tells it to download.

http://stackoverflow.com/q/29093192
tagged with: javascript
has answer: http://stackoverflow.com/a/29118035
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46428615
tagged with: extjs
possible better answer: http://stackoverflow.com/a/29116191
has answer: http://stackoverflow.com/a/29116191
has comment: http://stackoverflow.com/comment/46460355
accepted answer: http://stackoverflow.com/a/29118035
tagged with: http://stackoverflow.com/tag/html
tagged with: extjs5
tagged with: css
type: AnsweredQuestion
has title: ExtJS 5 grid with grouping feature: Selected row with box shadow
upvote count: 1
type: Question
has body: I'd like to add a box shadow to the selected row in a grid which also uses the grouping feature. Initially I just applied the box shadow to the table element of the selected row: .x-grid-item-selected { box-shadow: 0 0 6px 2px rgb(119, 119, 119) inset; } Unfortunately, the table element of the first row in a group also contains the group header which gave me this result when I selected the first row in a group: Also I can't apply the box shadow to the tr element of the grid row (.x-grid-item-selected .x-grid-row) since chrome doesn't support box shadows on tr elements (at least not without setting their display property to block which would break the layout completely). Applying the box shadow to each cell (.x-grid-item-selected .x-grid-cell) obviously doesn't give me the desired look neither: Here's how I'd like the selected row to actually look like (just for the sake of completeness): In ExtJS 4 I was able to accomplish this by using the RowWrap feature which was removed with ExtJS 5. I'd really appreciate if someone could give me some help with this! Here's a fiddle to play around with: https://fiddle.sencha.com/#fiddle/jkv Thanks &amp; best regards Ps.: I've also asked this question on the Sencha Forums

http://stackoverflow.com/a/29200595
answers question: http://stackoverflow.com/q/29200120
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46613711
score: 2
has body: You may do the following in jQuery. $('input:checkbox').change(function() { $(this).attr({ 'name': 'my-list-item&lt;' + $(this).data("index") + '&gt;' }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;form&gt; &lt;input type="checkbox" class="item" value="value" data-index="0" /&gt;My Item&lt;br/&gt; &lt;input type="checkbox" class="item" value="value" data-index="1" /&gt;My Item&lt;br/&gt; &lt;input type="checkbox" class="item" value="value" data-index="2" /&gt;My Item&lt;br/&gt; &lt;input type="checkbox" class="item" value="value" data-index="3" /&gt;My Item&lt;br/&gt; &lt;/form&gt;

http://stackoverflow.com/q/29074159
tagged with: angularjs
answer count: 5
has comment: http://stackoverflow.com/comment/46382243
has answer: http://stackoverflow.com/a/29074222
has answer: http://stackoverflow.com/a/37410123
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/29074390
type: Question
has body: i got a little bit confusion about ng-repeat and collection-repeat ng-repeat ... collection-repeat ... the above both lines are doing well and same. Please let me know if any difference there. also i have 1000 items, so which one is better for this scenario? and how's the rendering speed and what about the performance status ?
possible better answer: http://stackoverflow.com/a/29074222
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29074390
has answer: http://stackoverflow.com/a/29074316
has title: Difference between ng-repeat and collection-repeat in angularjs?
favorite count: 0
has answer: http://stackoverflow.com/a/43441481

http://stackoverflow.com/q/29170350
has comment: http://stackoverflow.com/comment/46559081
type: Question
has answer: http://stackoverflow.com/a/29236372
has comment: http://stackoverflow.com/comment/46559176
tagged with: highcharts
has comment: http://stackoverflow.com/comment/46559501
tagged with: javascript
has body: rows[ {0: c:[{0: {v:'2013'}, 1: {v: 'apple'},2: {v: '200'}}]}, {1: c:[{0: {v:'2014'}, 1: {v: 'apple'},2: {v: '1000'}}]}, {2: c:[{0: {v:'2013'}, 1: {v: 'orange'},2: {v: '200'}}]}, {3: c:[{0: {v:'2014'}, 1: {v: 'orange'},2: {v: '1000'}}]} ] I am trying to reshape it into something like this: [apple: {2013: '200', 2014: '1000'}, orange: {2013: '200', 2014: '1000'}] OR [ apple: { 2013: {year: '2013', amount: '200'}, 2014: {year: '2014', amount: '1000'} }, orange: { 2013: {year: '2013', amount: '200'}, 2014: {year: '2014', amount: '1000'} }] OR apple: [{year:2013, amount:200},{year:2014,amount:1000}] I have tried playing with lodash's .map,.uniq,.reduce,.zipObject but I am still unable to figure it out.
score: 0
has title: Shaping json object
answer count: 1
has comment: http://stackoverflow.com/comment/46559183
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29236372
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/46584843
type: QuestionComment
type: Comment
has text: I'm not sure. Something like this perhaps? http://jsfiddle.net/rxz5st8u/
comment on: http://stackoverflow.com/q/29183817
score: 0

http://stackoverflow.com/a/29165631
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29162715
answers question: http://stackoverflow.com/q/29162715
has body: You can access shadow-dom elements from the "outside" like this: First: Give your paper-button an id-Attribute: &lt;paper-button id="paper-button-id" ...&gt; var button = document.querySelector("core-pages") .shadowRoot .querySelector("#paper-button-id"); There is no polymer required for this code. Be aware, that the 'shadowRoot' and 'querySelector' methods may not work in every browser. There may be better solutions, using polymer-methods.
type: AcceptedAnswer

http://stackoverflow.com/comment/46581696
comment on: http://stackoverflow.com/a/29182807
score: 0
has text: Main problem as far as I understand is that placeholder was showing ●●●●● instead of ●●●●●
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29134379
tagged with: javascript
has comment: http://stackoverflow.com/comment/46494242
has comment: http://stackoverflow.com/comment/46494395
has comment: http://stackoverflow.com/comment/46494426
has comment: http://stackoverflow.com/comment/46494415
score: 0
has comment: http://stackoverflow.com/comment/46494325
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46494492
tagged with: ajax
has comment: http://stackoverflow.com/comment/46494237
type: UnansweredQuestion
has title: Why is my Jquery.ajax call triggering error event?
has body: When I call the following jquery.ajax it always returns a fail. When I look further into the response it shows an ok status and 200 response. Why is it throwing a "fail" event? $.ajax({ url: "myurl", type: "POST", contentType: "application/json; charset=utf-8", data: mydata, dataType: "json" }).done(function (data) { alert("success" + data.slice(0, 100)); }) .fail(function (v) { console.log(v); }) .always(function (v) { alert("complete"+v); }); The data is reaching my backend url correctly.
has comment: http://stackoverflow.com/comment/46494365
has comment: http://stackoverflow.com/comment/46494229
has answer: http://stackoverflow.com/a/29136788
has comment: http://stackoverflow.com/comment/46494252
has comment: http://stackoverflow.com/comment/46494755
type: Question

http://stackoverflow.com/q/29111096
tagged with: javascript
has answer: http://stackoverflow.com/a/29114710
has comment: http://stackoverflow.com/comment/46451650
has comment: http://stackoverflow.com/comment/46451526
answer count: 3
has body: I'm going through Scotch.io's MEAN Machine book, and I'm nearly done. Problem is I can't get my Angular code to run correctly——even when I'm literally copying the code from their Github. Whenever I open my app on localhost, ngRoute fails to load (or be injected or whatever) correctly. Here is my code: App.js angular.module('userApp', ['ngAnimate', 'app.routes', 'authService', 'mainCtrl', 'userCtrl', 'userService']) ]); App.routes angular.module('app.routes', ['ngRoute']) .config(function($routeProvider, $locationProvider) { $routeProvider //home page route .when('/', { templateUrl : 'app/views/pages/home.html' }) //route for the login page .when('/login', { templateUrl : 'app/views/pages/login.html', controller : 'mainController', controllerAs : 'login' }); //get rid of the hash in the URL (url prettification) $locationProvider.html5Mode(true); }); mainCtrl.js angular.module('mainCtrl', []) .controller('mainController', function($rootScope, $location, Auth) { var vm = this; //get user info if logged in vm.loggedIn = Auth.isLoggedIn(); //check to see if user is logged in ON EVERY REQUEST $rootScope.$on('$routeChangeStart', function() { vm.loggedIn = Auth.isLoggedIn(); //get user information on route change Auth.getUser() .success(function(data) { vm.user = data; }); }); //this function handles the login form vm.doLogin = function() { vm.processing = true; //call the Auth.login() function Auth.login(vm.loginData.userName, vm.loginData.password) .success(function(data) { vm.processing = false; //if user is logged in, redirect to user page $location.path('/users'); }); }; //function to handle logging out vm.doLogout = function() { Auth.logout(); //reset ALL user info vm.user = {}; $location.path('/login'); }; }); index.html User CRM User CRM Users Login Hello {{ main.user.username }}! Logout This is the exact error I'm receiving: https://docs.angularjs.org/error/$injector/modulerr?p0=userApp&p1=Error: [$injector:nomod] http://errors.angularjs.org/1.3.8/$injector/nomod?p…
has comment: http://stackoverflow.com/comment/46451706
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/35154884
upvote count: 1
has comment: http://stackoverflow.com/comment/46451573
score: 1
has answer: http://stackoverflow.com/a/29146595
has comment: http://stackoverflow.com/comment/46451477
type: Question
has comment: http://stackoverflow.com/comment/46451854
has comment: http://stackoverflow.com/comment/46451749
has title: NgRoute not loading (modulerr error)
downvote count: 0

http://stackoverflow.com/q/29147312
has answer: http://stackoverflow.com/a/29147417
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29147477
has title: Multiple Controllers in AngularApp not working
possible better answer: http://stackoverflow.com/a/29147392
has answer: http://stackoverflow.com/a/29147392
favorite count: 0
has body: I've got two controllers within the same app, yet it seems only one is being registered: var app = angular.module('MyModule', []); app.controller('FruitCtrl', function($scope) { $scope.fruits = ['apples', 'oranges', 'bananas']; }); app.controller('VegetableCtrl', function($scope) { $scope.vegetables = ['potato', 'beans', 'onions']; }); My template: {{fruit}} {{vegetable}} Only the "fruits" section is being rendered. See also the JS fiddle http://jsfiddle.net/doque/9wfhsgqf/2/
tagged with: angularjs
answer count: 5
has answer: http://stackoverflow.com/a/29147409
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29147477
score: -1
has answer: http://stackoverflow.com/a/29147394
tagged with: angularjs-scope
type: Question
upvote count: 0

http://stackoverflow.com/comment/46578302
score: 0
type: Comment
has text: Are you using maven or adding depending manually?
type: QuestionComment
comment on: http://stackoverflow.com/q/29180583

http://stackoverflow.com/comment/46464666
score: 0
type: AnswerComment
type: Comment
has text: Let me know if you have if you update your JSFiddle and I will mark as the answer, thanks to all who helped :)
comment on: http://stackoverflow.com/a/29116663

http://stackoverflow.com/q/29165732
answer count: 1
has body: I'm doing something simple: read a file, replace a character, and output the modified content: #!/usr/bin/env node var fs = require('fs') , filename = process.argv[2] if (process.argv.length &lt; 3) { console.log('Usage: node ' + process.argv[1] + ' FILENAME') process.exit(1) } function replaceCharacters(data) { data = data .replace(/"(?=\b|\*|')/g, '“') console.log(data) } function saveHtml(data) { fs.writeFile("untitled.html", data, function(err) { if (err) console.log(err) else console.log(data) }) } fs.readFile(filename, 'utf8', function(err, data) { if (err) throw err replaceCharacters(data) saveHtml(data) }) The problem is, replaceCharacters is not affecting the final output. Instead of curly opening quotes, I'm still getting the straight ones. What am I doing wrong? (The quotes do replace if a move the content from replaceCharacters into fs.readFile). EDIT: The value does change inside the function console.log(data) outputs the data with curly quotes.
accepted answer: http://stackoverflow.com/a/29165757
has comment: http://stackoverflow.com/comment/46550200
has comment: http://stackoverflow.com/comment/46550178
has comment: http://stackoverflow.com/comment/46550114
type: AnsweredQuestion
has title: Why isn't this function modifying the final output?
type: Question
has answer: http://stackoverflow.com/a/29165757
tagged with: javascript
score: 0
tagged with: function

http://stackoverflow.com/a/29109997
upvote count: 1
type: Answer
has body: Use template helpers to interpret whether first, second, etc are true or false. Template.layout.helpers({ first: function() { return Session.get('first'); }, second: function() { return Session.get('second'); } });
answers question: http://stackoverflow.com/q/29108711
downvote count: 0
score: 1

http://stackoverflow.com/comment/46601491
type: QuestionComment
has text: Just an update, I just confirm that this is issue just on mac version, windows version works fine.
score: 0
comment on: http://stackoverflow.com/q/29113787
type: Comment

http://stackoverflow.com/a/29186670
accepted answer of: http://stackoverflow.com/q/29186475
has comment: http://stackoverflow.com/comment/46588424
answers question: http://stackoverflow.com/q/29186475
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: That is one way to do it but I usually use bower in conjunction with other build tools, like grunt or gulp. Then you can use a task, like grunt-bower-task, to copy only the necessary files to a directory of your choosing. If you are feeling really ambitious, you could leverage the bower api to roll your own build solution that extracts the "main" files into your project. Another thing to be aware of, is that not every dependency you will want to include will implement bower's configuration properly (example: missing main attribute or bower.json file). There will also be those projects that require you to include assets (fonts, images, etc.), which bower doesn't currently solve for. In these cases, you will need to come up with a way to move the files around. I always end up having to use something like grunt-contrib-copy to get everything in it's place.
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/46588394

http://stackoverflow.com/q/29204968
has title: Separating socket.io events into different files
tagged with: javascript
has body: I'm having a trouble while trying separate socket.io events into different files instead of placing everything into a single file i.e app.js; // app.js io.on('connection', function(socket) { socket.on("helloword", require("./controllers/socket/helloworld")); // a bunch of other events }); // controllers/socket/helloworld.js module.exports = function(data) { if (data) socket.emit('response', { lorem: "ipsum" }); } The issue is that socket.io doesn't pass the "socket" variable to the required function so i'm unable to send a response back to the user and so i have come to this workaround; // app.js io.on("connection", function(socket) { // socket.io("helloworld", require("./controllers/socket/helloworld")(socket)); // although the code above prints successfully console.log(socket) invoked at // the required file but as soon as its printed socket.io throws " TypeError: // listener must be a function. require("./controller/socket/helloworld")(socket); // a bunch of other events }); // controllers/socket/helloworld.js module.exports = function(socket) { socket.on("helloworld", function(data) { if (data) socket.emit('response', { lorem: "ipsum" }); } // others events regarding the same subject by the file. } I still don't think this is a good practice or the most reliable. I also could't find a way to solve my issue looking through socket.io documentation and neither found a related issue which helped me develop through my issue. PS: This question has basically come to use the same tactic which doing now.
accepted answer: http://stackoverflow.com/a/29205001
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/24815106
tagged with: node.js
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29205001
upvote count: 1
tagged with: socket.io
type: Question

http://stackoverflow.com/comment/46482292
has text: @EliasSoares Haha, well depends on how you look at it. Is the glass half full or half empty :)...
comment on: http://stackoverflow.com/a/29110405
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29152305
has comment: http://stackoverflow.com/comment/46526027
favorite count: 0
type: UnansweredQuestion
has title: Passing dropdownlist value to google map javascript
has comment: http://stackoverflow.com/comment/46586049
type: Question
has comment: http://stackoverflow.com/comment/46526596
tagged with: javascript
has body: I have a javascript code which when fired gives me the latitude and the longitude depending upon the address that i enter in the text boxes &amp; dropdowns.The problem lies in dropdowns because when i replace the dropdowns(i.e ddlState &amp; ddlCity) the code works fine.I guess i am not able to pull out the selected value from the dropdowns.Here is my javascript : &lt;td class="unmaintable1"&gt;Street Address :&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;td class="mergedunmaintable23" colspan="2"&gt;&lt;asp:TextBox ID="txtStreetAddress" runat="server" Width="576px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;td class="unmaintable1"&gt;Landmark :&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;td class="mergedunmaintable23" colspan="2"&gt;&lt;asp:TextBox ID="txtLandmark" runat="server" Width="576px"&gt;Optional&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;td class="unmaintable1"&gt;State :&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;td class="mergedunmaintable23" colspan="2"&gt; &lt;asp:UpdatePanel runat="server"&gt; &lt;ContentTemplate&gt; &lt;table cellpadding="0" cellspacing="0" class="updatepaneltable"&gt; &lt;tr&gt; &lt;td class="unmaintable2"&gt;&lt;asp:DropDownList ID="ddlState" runat="server" AutoPostBack="True" DataTextField="StateName" DataValueField="StateId" OnSelectedIndexChanged="ddlState_SelectedIndexChanged" Width="160px"&gt; &lt;/asp:DropDownList&gt;&lt;/td&gt; &lt;td class="unmaintable3"&gt; City : &lt;asp:DropDownList ID="ddlCity" runat="server" Width="160px"&gt; &lt;/asp:DropDownList&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;/td&gt; &lt;td class="unmaintable1"&gt;Zip Code :&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;td class="unmaintable2"&gt; &lt;asp:TextBox ID="txtZipCode" runat="server" Width="154px"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;td class="unmaintable3"&gt;&lt;span class="auto-style33"&gt;Country&amp;nbsp;:&lt;/span&gt; &lt;asp:DropDownList ID="ddlCountry" runat="server" Width="160px"&gt; &lt;asp:ListItem&gt;India&lt;/asp:ListIt…
has comment: http://stackoverflow.com/comment/46527137
score: 0
tagged with: google-maps
upvote count: 1
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29153041
tagged with: latitude-longitude

http://stackoverflow.com/comment/46482271
type: Comment
type: QuestionComment
has text: wow. that was quick and an easy fix. I am trying to do this for name2 which i renamed with a typo to return false. thanks.
comment on: http://stackoverflow.com/q/29128108
score: 0

http://stackoverflow.com/q/29202910
type: Question
has title: How to display twemoji icon as cheat sheet in texbox?
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm using twemoji (https://github.com/twitter/twemoji) to insert icon in textarea comment. Here is my code when user select icon and insert to textarea. $(document).on('click', '.emoji-list li img', function (e) { var icon = this.alt; $("#contentCmt").val(icon); twemoji.parse(document.getElementById('contentCmt')); }); But when I'm selected icon smiley, the textarea is display as , I wanna to display as :smile: in cheat sheet. So how to do that?
type: UnansweredQuestion
score: 3
answer count: 0
upvote count: 3

http://stackoverflow.com/a/29171964
score: -1
upvote count: 0
has body: Here is JQuery command that removes all bindings from the element: $("#book_container").unbind(); //to flush previously bound actions
type: Answer
answers question: http://stackoverflow.com/q/29171458
has comment: http://stackoverflow.com/comment/46562218
downvote count: 1

http://stackoverflow.com/comment/46397859
has text: Thanks @zbnrg for your quick response. Unfortunately, placing the everyMinutes() method does not work for me. What this produces is a series of time-driven minute triggers when I look at my Project's Triggers, to be precise, every minute a new trigger is added so basically the trigger is duplicated every minute but still does not set a random number in the first random row in Column _E_. I even tried using _.openByUrl()_ instead of using _getActiveSheet_ but this does not trigger my function at all. Does this have to do with my code structure? Many thanks!!
comment on: http://stackoverflow.com/a/29082072
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/64390616
score: 1
has comment: http://stackoverflow.com/comment/113860519
upvote count: 1
answers question: http://stackoverflow.com/q/29106462
type: Answer
has body: There is an upcoming API that could provide a seamless way to reading/writing to local files: Native File System API. But currently only Chrome supports that (by a special flag).
downvote count: 0

http://stackoverflow.com/comment/46453544
has text: In my datepicker fields I just delete the date. Is there something else you wanted?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109398
score: 0

http://stackoverflow.com/q/29137521
has comment: http://stackoverflow.com/comment/46500054
answer count: 2
score: 0
has answer: http://stackoverflow.com/a/29137776
has title: angularJS $http.get communicating with API
tagged with: javascript
type: UnansweredQuestion
has body: I am new to AngularJS and I am trying to understand it by studying sample codes. Here I have one about $http.get, from the following link: http://www.w3schools.com/angular/tryit.asp?filename=try_ng_customers_json I just replaced url with one of my own but it did not work, and I am really confused, please help, thanks! ========================= second edit: thanks to the answers, double ng-app is a mistake, but it is not the main reason for this problem. I think it has something to do with cross-site blocking, but I have turn it off on my API (I use codeigniter REST API and I set $config['csrf_protection'] = FALSE; ), I am not sure how to configure it. {{names}} {{names}}
linked to: http://stackoverflow.com/q/667519
has answer: http://stackoverflow.com/a/29137988
tagged with: api
has comment: http://stackoverflow.com/comment/46499636
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/46458248
has text: It actually varies depending on what you need. I always suggest my team to devote their efforts to create the most simple and concise HTML structure for the products we build. It simplify the process when we need to manipulate DOM objects and events. There is no such thing as "one solution fits all", and the best you can do is to annotate those possibilities and implement them case by case (always keeping in mind that simplicity pays off as the project progresses).
type: Comment
comment on: http://stackoverflow.com/a/29114574
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46609774
type: Comment
comment on: http://stackoverflow.com/q/29198319
score: 0
has text: veksen still the same result but now I noticed something that might help to diagnose this. When the page is loaded in Google Chrome and when I click the circular reload page icon the page reloads and the tabs stay stable. Now on the other hand if I place my cursor at the end of the URL in the browser navigation window and press enter on my keyboard as the page refreshes the CSS for the tabs breaks for a split second.
type: QuestionComment

http://stackoverflow.com/q/29204741
tagged with: node.js
has body: I have 2 methods var variable_to_be_passed; // setting this does not seem to work A.prototype.beforeEach = function(callback) { variable_to_be_passed = 5; ParentA.prototype.beforeEach.call(this, test, function() { callback(); }); A.prototype.afterEach = function(variable_to_be_passed, callback) { console.log(variable_to_be_passed) //prints undefined ParentA.prototype.afterEach.call(this, test, function() { callback(); }); I want to access variable_to_be_passed in A.prototype.aftereach. Could someone suggest how this should be done? Thanks
answer count: 0
type: UnansweredQuestion
has title: Passing local variables between methods (Node js, prototype)
has comment: http://stackoverflow.com/comment/46638842
tagged with: prototype
type: Question
has comment: http://stackoverflow.com/comment/46638187
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/46583819
comment on: http://stackoverflow.com/a/29183907
score: 0
type: Comment
has text: I had already tried this...it did not work. Maybe I should add that even using the `errors` array does not popup the alert
type: AnswerComment

http://stackoverflow.com/q/29137333
tagged with: for-loop
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46499279
has comment: http://stackoverflow.com/comment/46499287
has comment: http://stackoverflow.com/comment/46499193
has body: Lets say that I want to turn the paragraph elements red when I mouseover the corresponding link elements. Why would the following code not work and what is the simplest alternative? for (i = 0; i &lt; 100; i++) { $("a").eq(i).mouseover(function(){ $("p").eq(i).css({"color":"red"}) }) } Need simple explanation.
has title: jQuery function inside a for loop
has answer: http://stackoverflow.com/a/29137361
tagged with: loops
accepted answer: http://stackoverflow.com/a/29137361
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/46499236
type: Question
score: 0

http://stackoverflow.com/q/29114098
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/47586676
has answer: http://stackoverflow.com/a/68625439
tagged with: protractor
accepted answer: http://stackoverflow.com/a/29114132
upvote count: 8
type: Question
possible better answer: http://stackoverflow.com/a/39797785
has answer: http://stackoverflow.com/a/29114132
tagged with: javascript
has answer: http://stackoverflow.com/a/39797785
tagged with: end-to-end
has body: I am new to ProtractorJS. What I am trying to do is trying to get the value of a disabled input element. This input element is bound to a model. Initially this input element is empty; then after some action the model value is updated (and thus displayed in input element). I need to get that value, how can I do that ? My input element is: &lt;input class="form-control ng-pristine ng-valid" style="font-size: 11px;" disabled="disabled" type="text" ng-model="Promotion.PrometricID"&gt; I am trying to fetch value by: element(by.model("Promotion.PrometricID")).getAttribute('value'); But whenever I write the value in console it gives me "[object] [object]". Can anyone please tell me how to find value in this text box or in model ?
answer count: 4
favorite count: 0
score: 8
tagged with: selenium-webdriver
has title: Protractor Get Model Value
downvote count: 0
tagged with: selenium

http://stackoverflow.com/a/29186270
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29186098
answers question: http://stackoverflow.com/q/29186098
has comment: http://stackoverflow.com/comment/46587871
score: 4
has body: The custom binding in knockout.js is only created once, so this means that if you store some local variable it will be re-used for every element where the binding is used. If this is not an issue for you below is one way how to achieve that. Knockout binding requires that you return an object that has methods init and update. You can use object literal as you showed in your sample, but you can use other patterns, for example revealing module pattern: // instead of using object literal, use IIFE (immediately invoked function expression: ko.bindingHandlers.someBinding = (function(){ // define your local variables, functions and anything else you need // keep in mind that the same variables will be re-used for EVERY //element where the binding is used var yourVariable = 0, // declare init and update methods init = function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { alert(yourVariable); // displays 0 yourVariable += 1; }, update = function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { alert(yourVariable); // displays 1 }; // return object literal with methods init and update return { init: init, update: update }; }()); // execute the function
has comment: http://stackoverflow.com/comment/46587915
type: AcceptedAnswer
type: Answer
upvote count: 4

http://stackoverflow.com/q/29197577
has answer: http://stackoverflow.com/a/29197836
accepted answer: http://stackoverflow.com/a/29197836
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46608084
possible better answer: http://stackoverflow.com/a/29197806
type: Question
tagged with: java
has answer: http://stackoverflow.com/a/29197806
upvote count: 2
answer count: 2
downvote count: 0
tagged with: jsp
tagged with: javascript
has title: How to pass java string variable to the javascript function by jsp expression tag?
favorite count: 0
has body: I want to passing a java String variable to the javascript function parameter using jsp expression tag.Below is my jsp page. First.jsp &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt; &lt;title&gt;Insert title here&lt;/title&gt; &lt;script&gt; function stringGenerate(str){ var x = document.getElementsByTagName("input"); x[0].value = str; } function numberGenerate(num){ var x = document.getElementsByTagName("input"); x[1].value = num; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;% String num ="1234567890"; String str = "abcdefghij"; %&gt; &lt;input type="text" name="string" readonly="readonly"/&gt; &amp;nbsp;&amp;nbsp; &lt;input type="text" name="number" readonly="readonly"/&gt;&lt;br/&gt;&lt;br/&gt; &lt;input type="button" value="String Generate" onclick= "stringGenerate(&lt;%=str %&gt;)" /&gt; &amp;nbsp;&amp;nbsp; &lt;input type="button" value="Number Generate" onclick= "numberGenerate(&lt;%=num %&gt;)" /&gt; &lt;/body&gt; &lt;/html&gt; When I click on the button with value "Number Generate",then the num variable value(1234567890) will display on the textbox(name="number") but when I click on the button with value "String Generate",then there is nothing display on the corresponding text box(name="string").Here both num and str are string type varible but why only num variable value is displayed on textbox and why not str variable value is displayed?

http://stackoverflow.com/comment/46490674
type: AnswerComment
comment on: http://stackoverflow.com/a/29131909
has text: Examples are good but explanations are better. This does not address the issue that the OP wants an `id -> content` mapping at all. Right now your answer is just what I said in the comments expressed as code.
type: Comment
score: 0

http://stackoverflow.com/comment/46516719
type: QuestionComment
comment on: http://stackoverflow.com/q/29146893
score: 0
has text: [Hungarian notation](http://en.wikipedia.org/wiki/Hungarian_notation) why people only use it for jQuery object drives me mad.
type: Comment

http://stackoverflow.com/q/29156665
tagged with: javascript
tagged with: resize
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46534096
has title: dynamically change value on resize and window scroll
type: UnansweredQuestion
tagged with: scroll
upvote count: 1
has body: I have a fixed header function like below. I would like to change dynamically "100" value while window resizing. I was trying to wrap everything in sth like "if (screen.width >= 1200)" or "jQuery(window).on('resize', function ()" but this kind of stuff is working only with page refresh. jQuery(document).ready(function($) { var $window = $(window), $stickyEl = $('.tabsmenu &gt; ul'), elTop = $stickyEl.offset().top - 100; $window.scroll(function() { if ($window.scrollTop() &lt; 900) { $stickyEl.toggleClass('sticky', $window.scrollTop() &gt; elTop); } else { $stickyEl.removeClass('sticky'); } }); }); Any tips?
has answer: http://stackoverflow.com/a/29156791
score: 1
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/46514179
has text: @user3520363 no do not put quotes `"` around it.
comment on: http://stackoverflow.com/a/29145309
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29091568
has comment: http://stackoverflow.com/comment/46415216
has body: You have passing the recipient.id parameter in your ng-click function but you did't retrieve the parameter in your js function you need to retrieve the parameter $scope.select = function(**id**) { var selectedId=id;//you can check here Comment.get() .success(function(data) { $scope.comments = data; $scope.loading = false; }); }
answers question: http://stackoverflow.com/q/29091310
has comment: http://stackoverflow.com/comment/46415233
score: 0
type: Answer

http://stackoverflow.com/q/29091891
type: Question
has comment: http://stackoverflow.com/comment/46416045
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29091962
linked to: http://stackoverflow.com/q/1133770
tagged with: types
answer count: 1
has title: JAVASCRIPT: Getting values inside an array
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29091962
tagged with: input
has comment: http://stackoverflow.com/comment/46416086
type: AnsweredQuestion
tagged with: numbers
has comment: http://stackoverflow.com/comment/46415964
has body: I'm having a problem in calling the values I entered in the numberbox (I don't know what should I call it... if there's a textbox, there should be a numberbox. lol). If I enter "123456", the value of sum should be "21", but what happens is that the value of sum is "0123456". &lt;input type="number" name="user" id="input" maxlength="6" size="6" required&gt; &lt;input type="button" onClick="Calculate()" value="Calculate"&gt; &lt;script type="text/javascript"&gt; function Calculate(){ var user = []; user=document.getElementById("input").value; if(user.length==6){ var sum=0; for (i=0;i&lt;user.length;i++){ sum=sum+user[i]; } var ave=sum/6; window.alert("Sum is: "+sum); window.alert("Average is: "+ave); } else window.alert("Please input EXACTLY 6 numbers."); } &lt;/script&gt;
score: 1
upvote count: 1

http://stackoverflow.com/comment/46433907
comment on: http://stackoverflow.com/q/29101857
score: 0
has text: @Baszz the `false` says otherwise... It is synchronous
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29125500
score: 0
has comment: http://stackoverflow.com/comment/46477357
has comment: http://stackoverflow.com/comment/46477200
type: Answer
has body: You can do it with .htaccess file : RewriteEngine on RewriteCond %{HTTP_HOST} ^myshop-123.com$ RewriteRule ^(.*)$ http://eu.myshop.com/$1 [QSA,L]
answers question: http://stackoverflow.com/q/29125097

http://stackoverflow.com/q/29133030
type: Question
has title: Rewrite jquerys .toggle() into a .click() function
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
duplicate of: http://stackoverflow.com/q/14301935
accepted answer: http://stackoverflow.com/a/29133070
has body: When "add.png" image with class "button" is clicked it will add item to cart and transform into "remove.png" When it is clicked again it will remove the item from cart and transform back into its original "add.png" This works with Jquery 1.7 and below but the .toggle() feature has been removed from newer versions of Jquery. The desired outcome is to preform the same exact task but with .click() instead of .toggle() &lt;img class="button" data-product-id="Item1" src="add.png" /&gt; &lt;script&gt; $(".button").toggle(function(){ //first functon here simpleCart.add({ name: $(this).attr("data-product-id"), price: .99, quantity: 1 }); //we set src of image with jquery $(this).attr("src", "remove.png"); },function(){ //second function here //simplecart remove function here, this isjust example, adjust with your code simpleCart.add({ name: $(this).attr("data-product-id"), price: .99, quantity: -1 }); $(this).attr("src", "add.png"); }); &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: url-rewriting
upvote count: 1
tagged with: toggle
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14301935
score: 1
has answer: http://stackoverflow.com/a/29133070

http://stackoverflow.com/comment/46603270
type: AnswerComment
has text: Thanks! It's working as I asked the question. But I just realise, that there should not go out more than 640 chars: truly there should not be sent more than 5 messages! (or a limiter/counter for every encoding type)
type: Comment
comment on: http://stackoverflow.com/a/29194818
score: 0

http://stackoverflow.com/comment/46412024
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29089705
has text: realized after I posted and revisited .type docs that this was not what I needed. In place of .is in my code I had .type and passed in a variable filled like such: var b = form.find(":button"). Needless to say this won't work.
score: 0

http://stackoverflow.com/comment/46635870
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29212871
has text: If you just want to submit variables to an API and get *arbitrary content* (not a page) back, you can use XHR/fetch (or jQuery's wrappers around them like $.post and $.ajax) and listen for the response in a callback. On the server side for API endpoints like this, you would pass the content you want to respond with as a string to `res.send()`, or an arbitrary value to `res.json()`, instead of using `res.render()`.
score: 0

http://stackoverflow.com/comment/46603798
score: 0
type: AnswerComment
has text: @TechLife What is the raw input ? with \n or without ? you **can't** pass rawinput with linebreaks without `\\`
type: Comment
comment on: http://stackoverflow.com/a/29195360

http://stackoverflow.com/q/29099297
score: 4
has body: I need to add inline style to multiple html elements using the inline style option in the ckeditor. I have added the following code in the styles.js file. { name: 'Red italics', element: 'p', styles: {'font-style' : 'italic', 'color' : '#632423'} }, I need to add the styling to multiple html tags , something like the below { name: 'Red italics', element: 'p, div, li', styles: {'font-style' : 'italic', 'color' : '#632423'} }, but this does not work. Can anyone please tell me how can I do the above. Thanks in advance. Regards, Neha
accepted answer: http://stackoverflow.com/a/29099464
answer count: 1
has title: Adding inline styles to multiple elements in ckeditor
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
upvote count: 4
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29099464
type: Question
tagged with: php

http://stackoverflow.com/comment/46482081
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29127856
has text: Thanks for the reply, Unfortunately I have no way of changing the data within .box, which would make things so much easier. Your nodes idea sounds ideal, something I didn't think of Thank you very much

junit
type: Tag
tags question: http://stackoverflow.com/q/29211573
tag name: junit

http://stackoverflow.com/a/29209467
type: Answer
answers question: http://stackoverflow.com/q/29143652
has comment: http://stackoverflow.com/comment/46677093
has comment: http://stackoverflow.com/comment/46640421
has comment: http://stackoverflow.com/comment/46680117
has comment: http://stackoverflow.com/comment/46676979
score: 0
has comment: http://stackoverflow.com/comment/46642287
has body: The trouble is that getFriend().name and the like wont evaluate to anything because getFriend() has no return now and can not be made to return the results of an asynchronous ajax call synchronously. Instead, you can pass getFriend() a callback so it is in scope for the ajax success function, like so (jsfiddle): self.getFriend = function(id, cb){ var getString = 'http://rest.learncode.academy/api/johnbob/friends/' + id; $.ajax({ type: 'GET', url: getString, success: function(data) { console.log("from getFriend", data); //returns friend id#1 console.dir(data); cb(data); } }); ... Sammy(function() { this.get('#:friendId', function() { self.getFriend(this.params.friendId, self.chosenFriend); }); }).run();

http://stackoverflow.com/comment/46592277
type: QuestionComment
has text: perhaps changing the name to something else might work
type: Comment
comment on: http://stackoverflow.com/q/29188167
score: 0

http://stackoverflow.com/comment/46520656
type: AnswerComment
has text: @robue-a7119895 it works fine if you only have one `.message` element in the page. (*added full example*)
type: Comment
comment on: http://stackoverflow.com/a/29149258
score: 0

http://stackoverflow.com/q/29062679
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/46361477
has comment: http://stackoverflow.com/comment/46361690
type: Question
has body: I'm using the underscore.js template function _.template(). I have code like this: $('#content').append(_.template(superTemplate)); $('#elementFromTemplate').doFancyStuff(); Now I want to access an element via jQuery which is in rendered in the template. But since this is happen async it is not available to this moment. Is there any way to wait for finish rendering the template?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46361733
has title: underscore.js: Access element from template
has comment: http://stackoverflow.com/comment/46362277
tagged with: templates
has comment: http://stackoverflow.com/comment/46362207
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46361635
has comment: http://stackoverflow.com/comment/46364517
answer count: 0

http://stackoverflow.com/q/29131588
has comment: http://stackoverflow.com/comment/46488903
has body: I am trying to display a spinning image while ajax call is being completed. I am using the following jsp and jquery code yet it is not working. Any help will be appreciated jsp: Please enter dataset URL or absolute file location (e.g: c:\data\dbpedia.rdf) ** ** and here is the jquery code $(document).ready(function() { $("#presult").hide(); $("#btnAnalyseFile").click( function(e) { **$("#loadingImage").show();** $.ajax({ url : 'CreatePatternServlet', type : 'POST', dataType : 'json', data : $("#formCreatePattern").serialize(), success : function(data) { if(data.analyseResult==true){ var predicates = {}; var objectList = {}; var ddlSubject = $('#ddlSubject'); var ddlPredicate = $('#ddlPredicate'); var ddlObject = $('#ddlObject'); var ddlClass = $('#ddlClass'); $.each(data.Subjects, function(key, value) { ddlSubject.append($(' ') .val(value).html(key)); }); $.each(data.Classes, function(key, value) { ddlClass.append($(' ') .val(value).html(key)); }); $.each(data.Predicates, function(key, value) { ddlPredicate.append($(' ') .val(value).html(key)); }); $.each(data.Objects, function(key, value) { ddlObject.append($(' ') .val(value).html(key)); }); $('#ddlSubject').filterByText( $('#txtSearchSubject')); $('#ddlPredicate').filterByText( $('#txtSearchPredicate')); $('#ddlObject').filterByText( $('#txtSearchObject')); $('#ddlClass').filterByText( $('#txtSearchClass')); $("#presult").html("Data uploaded successfully"); $("#presult").css("color","green"); $("#presult").fadeIn(500); } else{ $("#presult").html("Upload failed, please check file path or URL. Server returned error: "+data.result); $("#presult").css("color","red"); $("#presult").fadeIn(500); } } }); **$('#loadingImage').hide();** return false; }); });
has comment: http://stackoverflow.com/comment/46488957
type: AnsweredQuestion
has title: display loading image with jquery/ajax
type: Question
answer count: 2
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/29131747
accepted answer: http://stackoverflow.com/a/29131747
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29131615
tagged with: ajax
has comment: http://stackoverflow.com/comment/46489033
score: 0
has answer: http://stackoverflow.com/a/29131615

http://stackoverflow.com/comment/46526954
comment on: http://stackoverflow.com/a/29152550
type: Comment
score: 0
type: AnswerComment
has text: Same error :-( --> [info] Executing: |storeValue | javascript{storedVars['quantity'].replace(',','')} | quantity | [error] Element 1000 not found

http://stackoverflow.com/q/29111330
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29111434
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
has title: Is it possible to make the background of FullCalendar calendar events transparent?
type: Question
tagged with: javascript
tagged with: fullcalendar
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29111434
favorite count: 0
has body: I'm relatively new with web and I am using FullCalendar on a personal project and am trying to accomplish what I would think would be relatively easy. I may have to change some code around as I don't think what I want is available out of the box. Here is a screenshot of my version of the FullCalendar I am using: As you can see, I have several "events", well essentially they're a group of events and instead you just see the number of events for that day. So for Today, there are 10 events essentially, I just group them up. The problem is, you have to click above the event in order for the cell to select. I am trying to make it so that the event or the count text IS essentially the background without the rectangle, etc. See the screenshot below for what I am going for: Making the eventColor transparent just makes the entire event disappear which is not what I want. I've also tried changing the background and border colors. The rectanglular shape is still present. Any ideas or possible suggestions regarding this? Thanks in advance for your help!

http://stackoverflow.com/q/29090152
answer count: 2
has answer: http://stackoverflow.com/a/29090205
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29090557
has title: How to trim 0 in day but not in month with format(yyyy-dd-mm) in angular/javascript?
score: 0
has comment: http://stackoverflow.com/comment/46413317
has body: How do I trim javascript date object. I have a date which format is (yyyy-d-m). The date value is 2015-03-03 and I want to trim the first 0 in days but not in months. Example: When I input: 2015-03-03 it will returned 2015-3-03 I tried the following code but it's also trim the 0 in months. $scope.date = { "start": "2015-01-26", "end": "2015-04-03" }; `var from = $scope.date.from.replace(/\b0(?=\d)/g, ''); var to = $scope.date.to.replace(/\b0(?=\d)/g, ''); console.log(to); //output 2015-1-26 and 2015-4-3` What should I do?
has answer: http://stackoverflow.com/a/29090557
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29090205
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/29201191
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29201841
answer count: 1
has comment: http://stackoverflow.com/comment/46614495
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/46615092
type: UnansweredQuestion
has title: How to add decimal point from a string into a numerical value
downvote count: 1
tagged with: onclick
has comment: http://stackoverflow.com/comment/46614482
has body: I want to be able to have a decimal point when I enter my numbers through this code and what the code does is that is it just displays numbers when you enter them like if i clicked 5 twice it would be 55 but what if I wanted 5.5, how would I do that? var number = ''; var number1 = ''; var number2 = ''; function selectNum(num) { number += num; number = parseInt(number); document.getElementById("outputbox").innerHTML = number; } 7 8 9 4 5 6 1 2 3 0 .
type: Question
tagged with: decimal
upvote count: 0
has comment: http://stackoverflow.com/comment/46615052
tagged with: javascript

browser-cache
tags question: http://stackoverflow.com/q/29204064
type: Tag
tags question: http://stackoverflow.com/q/29123973
tag name: browser-cache

http://stackoverflow.com/comment/46579960
score: 0
has text: ASP code is not going to help us here. Please post the generated HTML.
comment on: http://stackoverflow.com/q/29181812
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29105715
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29107022
has body: The following set-up works fine as long as the content in each section doesn't exceed the section height. When it does, as you can see in the example, the content falls out of the containing section. Addressing the issue by adding "display: table" or "overflow: hidden" to the section solves this problem but messes the active state behaviour of the menu. I also tried setting sections height to auto instead of 100% but that messes up the entire layout as sections start overlapping each other. I'm in desperate need of help as the the entire layout of this project depends on getting this right. Any suggestions would be highly appreciated. Thanks. JSFiddle HTML Section One Section Two Section Three Section Four Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, s…
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/29107022
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29107222
has title: Active menu Issue with sections height
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29107222
score: 0
answer count: 2

http://stackoverflow.com/a/29288471
has body: After searching, this solution seems to works fine on ChromeiOS and Safari. I found it on this post How to open Blob URL on Chrome iOS. This solved my problem: //isbContentType i.e. 'text/plain' //isbFilename i.e. 'This is a title' var reader = new FileReader(); reader.onload = function(e) { var bdata = btoa(reader.result); var datauri = 'data:' + isbContentType + ';base64,' + bdata; window.open(datauri); newWindow = setTimeout(function() { newWindow.document.title = isbFilename; }, 10); }; reader.readAsBinaryString(iobBLOB); I believed there was a way to download the blob file, but it wasn't. Thanks anyway
has comment: http://stackoverflow.com/comment/119742571
type: Answer
answers question: http://stackoverflow.com/q/29134418
accepted answer of: http://stackoverflow.com/q/29134418
downvote count: 1
score: 3
upvote count: 4
has comment: http://stackoverflow.com/comment/118891615
type: AcceptedAnswer

http://stackoverflow.com/comment/46624823
comment on: http://stackoverflow.com/a/29207004
has text: I see! I didn't know those listeners were 'added', I just thought they 'existed'. Thanks!!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29207156
has comment: http://stackoverflow.com/comment/46635678
has comment: http://stackoverflow.com/comment/46627963
downvote count: 0
score: 1
upvote count: 1
has body: Use text() instead of html() var re = /(\d{4})-(\d{2})-(\d{2})/g; $('.container td').each(function() { var tdText = $(this).text; //Only repleace the match element if(tdText.match(re)){ $(this).text(tdText.replace(re, '$3-$2-$1')); } });
answers question: http://stackoverflow.com/q/29206623
type: Answer

http://stackoverflow.com/a/29086575
has comment: http://stackoverflow.com/comment/46406124
has comment: http://stackoverflow.com/comment/46406260
has comment: http://stackoverflow.com/comment/46406107
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46406080
has comment: http://stackoverflow.com/comment/46406290
answers question: http://stackoverflow.com/q/29086481
has body: Where's the time being spent? I assume you could break up this big synchronous action into a couple of async hopes. (Every couple of while-iterations, you could store your index and set-timeout before resuming. This way you don't lock the UI thread.
has comment: http://stackoverflow.com/comment/46406129

http://stackoverflow.com/a/29143185
has comment: http://stackoverflow.com/comment/46510728
upvote count: 1
has comment: http://stackoverflow.com/comment/46509647
has comment: http://stackoverflow.com/comment/46510439
downvote count: 0
has comment: http://stackoverflow.com/comment/46510616
has body: Wait for your site load completely and only then load your iframe. $(document).ready(function(){ $("#myframe").src="http://www.espncricinfo.com/" }); UPDATE Try this: &lt;script&gt; document.addEventListener('DOMContentLoaded', function () { setTimeout(function () { document.getElementById('myframe').src = "//www.dinamalar.com/"; }, 2000); }, false); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46510867
type: Answer
answers question: http://stackoverflow.com/q/29143045
has comment: http://stackoverflow.com/comment/46510258
score: 1

http://stackoverflow.com/q/29120215
has comment: http://stackoverflow.com/comment/46467541
possible better answer: http://stackoverflow.com/a/29120505
has answer: http://stackoverflow.com/a/29120505
type: AnsweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29277600
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46467779
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Bind JSON containing a dataset, to dropdownlist using JQUERY
accepted answer: http://stackoverflow.com/a/29277600
tagged with: wcf
has body: I have a JSON string returned by a WCF service, which contains two tables in Data, as a string in it: JSON { "GetYearsResult": { "Data": "{"Table":[{"holiday_date":null},{"holiday_date":1900}, {"holiday_date":2011},{"holiday_date":2012},{"holiday_date":2013}, {"holiday_date":2014},{"holiday_date":2015},{"holiday_date":2016}, {"holiday_date":2017},{"holiday_date":2018},{"holiday_date":2019}, {"holiday_date":2020},{"holiday_date":2021},{"holiday_date":2022}, {"holiday_date":2023},{"holiday_date":2024},{"holiday_date":2025}] ,"Table1":[{"holiday_day":1}]}", "Metadata": { "Response": 1000, "ResponseCode": 1000, "ResponseMessage": "Success", "ResponseTime": "18-Mar-2015 15:29:55" } } } I've tried to bind it using JavaScript as below: function ConsumeData(data) { var response = $.parseJSON(data); $('#ddlYears').empty(); //code to bind data to ddl var ddl = D.getElementById('ddlYears'); var opt = D.createElement("option"); opt.text = '--Select--'; opt.value = 0; ddl.options.add(opt); for (i = 0; i &lt; response.Table.length; i++) { opt = D.createElement("option"); opt.text = response.Table[i]['holiday_date']; opt.value = response.Table[i]['holiday_date']; ddl.options.add(opt); } } How can I achieve the same with JQUERY? Thank You!

http://stackoverflow.com/comment/46600599
score: 0
comment on: http://stackoverflow.com/a/29193295
type: AnswerComment
type: Comment
has text: Check this [fiddle](http://jsfiddle.net/yes6se8j/). If you see the text `Link num visible` is printed every second without a pause.

http://stackoverflow.com/comment/46612673
comment on: http://stackoverflow.com/q/29200177
has text: You've made at least 6 different *kinds* of errors in that code. You need to step back and start small. Deal with getting the code to do one thing at a time (from scratch). Use the debugging tools built into your browser. The question is far too broad as it stands.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46406902
type: QuestionComment
has text: I'm just playing around at the minute seeing what I can do with it. I was wondering if I could do it out of the box. I'll have a play with the array of object or even making a new object. It's walking dead time at the minute. Thanks guys.
comment on: http://stackoverflow.com/q/29086785
score: 0
type: Comment

http://stackoverflow.com/comment/46643782
comment on: http://stackoverflow.com/q/29185790
type: Comment
type: QuestionComment
has text: It does not do anything, it returns an error - "Cannot handle the request because a modal dialogue is active". You can use w1.close();, but you will have the same error. When you call a function attached to a window it will assume there is a window (even if you close it ) and stop some of the functions. I had a similar problem before and have to change script completely completely
score: 0

http://stackoverflow.com/comment/46517253
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29147094
has text: Thanks for the quick responses. These solutions seem very possible, unfortunately, this may end up being commercial at some point and I may want to have this layout be used in future, potentially commercial, projects. I will however, take a deeper look into the links that both of you have provided. Thanks!
score: 0

http://stackoverflow.com/a/29196031
type: Answer
has body: Add request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); after request.open('POST', url, true); It should be like this: request.open('POST', url, true); request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); request.send('South='+South+'&amp;North='+North+'&amp;West='+West+'&amp;East='+East); And replace if (request.readyState == 4) { with if (request.readyState == 4 &amp;&amp; request.status == 200) { Then it will work.
answers question: http://stackoverflow.com/q/29195890
score: 0

http://stackoverflow.com/comment/46505507
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29099290
has text: hi errand, this is pretty interesting, but I still don't see the output string being printed in that fiddle. I have tried breakpointing it and it doesn't seem to fire events once you focus the ddl.
score: 0

http://stackoverflow.com/a/29174880
has comment: http://stackoverflow.com/comment/46567742
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29174687
score: 1
answers question: http://stackoverflow.com/q/29174687
upvote count: 1
type: AcceptedAnswer
has body: The most simple solution is the slice method. The first parameter specifies where to start the selection, the second specifies the end the selection from end of string if it's negative. So, your code should be: var bkImg = window.getComputedStyle(sourceimg,null).getPropertyValue("background-image"); var bkImgUrl = bkImg.slice(4, -1);

http://stackoverflow.com/q/29081856
score: 0
has body: Im brand new to javascript, and relatively new to programming as a whole. I've been understanding the mechanics of javascript, but im stumped however in a situation like the following: var dataTypes = { string1: "Test", string2: "Test", number1: 4, }; console.log(typeof dataTypes.number1); console.log(" "); for (var x in dataTypes) { console.log(typeof x); if ((typeof x) === "string") { console.log(dataTypes[x]); } else { // } } And when I run this, my console displays the following: number string Test string Test string 4 I'm so confused how dataTypes.number1 went from being a number data type to a string. If anyone could take the time to elaborate what i have done wrong, and explain, that would be wonderful.
type: Question
tagged with: javascript
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29081888
has title: Changing Data Types in Javascript

http://stackoverflow.com/q/29106494
has answer: http://stackoverflow.com/a/29107068
has body: See this link.. My HTML page contains a similar multiple select drop down. Something like this - In this select drop down, I'm trying to print by making an Ajax request and showing the success data there. When I used a simple without using the chosen style, I can see the options there. But when I use the chosen style near the select (multiple selection) then is doesn't shows the options. document.getElementById("box").innerHTML = data; I am doing something like this.Please, help why it doesn't show me when I used that chosen effect.? $(document).ready(function(){ $('#customer').change(function(){ var Id = $(this).val(); $.ajax({ type: "GET", url: '../folder/page1.php', data: "mid="+Id, success: function( data ) { alert(data); document.getElementById("box").innerHTML = data; } }); }); });
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46443550
linked to: http://stackoverflow.com/q/13746889
type: Question
has comment: http://stackoverflow.com/comment/46443244
has comment: http://stackoverflow.com/comment/46443491
tagged with: javascript
has answer: http://stackoverflow.com/a/29106887
has comment: http://stackoverflow.com/comment/46443352
score: 0
answer count: 2
has title: Make ajax request and success data show in id part
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46602631
comment on: http://stackoverflow.com/a/29194674
has text: It's not working :( I did this now: ` {{content}} `
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29129581
has comment: http://stackoverflow.com/comment/46485479
type: Answer
has comment: http://stackoverflow.com/comment/46484960
score: 2
downvote count: 0
has body: Other answers work, but there are a lot of pitfalls with the current structure of your HTML. I prefer using an approach like this. 1 2 3 Content 1 Content 2 Content 3 http://jsfiddle.net/3fjehk7e/1/
has comment: http://stackoverflow.com/comment/46485276
upvote count: 2
has comment: http://stackoverflow.com/comment/46485150
answers question: http://stackoverflow.com/q/29129046
has comment: http://stackoverflow.com/comment/46485115

http://stackoverflow.com/q/29152002
has comment: http://stackoverflow.com/comment/46527934
has comment: http://stackoverflow.com/comment/46537974
has comment: http://stackoverflow.com/comment/46530572
type: Question
tagged with: reactjs
has body: I'm trying to use React to create ul components that are supposed to be accordions. I had it working before I was using React but when I use it, the foundation accordion is not working. The accordion content just stays hidden when I click on them. var pairingLi = React.createClass({ return ( { this.props.data.map(function (pairingData) { var id = "pairing_" + pairingData.pairingID; var contentId = "content_" + pairingData.pairingID; console.log(parseFloat(pairingData.pairingRate) * 100); var fill = parseInt(parseFloat(pairingData.pairingRate) * 100); var link = '#' + contentId; return ( {pairingData.itemName} to {pairingData.secondaryItemName} Pairing Success Rate: {pairingData.formattedRate} Number of prompts: {pairingData.pairingPrompts} Number of times user said yes to pairing prompt: {pairingData.promptsYes} Number of times user said no to pairing prompt: {pairingData.promptsNo} Total revenue generated from pairing: {pairingData.formattedUpsale} ); }) } ); }); I have lifecycle methods in there but everything is commented out.
score: 2
downvote count: 0
answer count: 1
tagged with: javascript
has title: Does ReactJS not work with Zurb Foundation Accordions?
favorite count: 0
has comment: http://stackoverflow.com/comment/46529720
has comment: http://stackoverflow.com/comment/46530618
tagged with: zurb-foundation
has answer: http://stackoverflow.com/a/29155598
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/29091271
has comment: http://stackoverflow.com/comment/46429556
has answer: http://stackoverflow.com/a/29098370
score: 2
has title: Why can't I pass a json array as data when doing GET request with jquery ajax?
type: Question
upvote count: 2
answer count: 2
has body: If I run a get request like this: $.ajax({ url: 'http://localhost:8000/api/points/', contentType:"application/json", dataType: "json", data: JSON.stringify({"content_type":content_type,"object_id":object_id}), type: 'GET', }).error(function(r){ $(output).text('error') }) .success(function(r){ $(output).text(r.count); }) Its request goes to: http://localhost:8000/api/points/?{%22content_type%22:8,%22object_id%22:40} Obviously that's bad. It works okay if I don't do JSON.stringify(), but why is that? Curiously if I do a POST request it's the opposite! I have to stringify the data or it won't work. So why the difference?
has answer: http://stackoverflow.com/a/29091860
tagged with: javascript
tagged with: jquery
tagged with: ajax
favorite count: 0
has comment: http://stackoverflow.com/comment/46414815
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29171045
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29170869
has body: No. You cannot relax the default CSP of Chrome Apps to allow eval, and you can't get localStorage to work, it is disabled and chrome.storage is asynchronous, therefore you can't make a polyfill. Unless Processing makes a version that's compatible with Chrome Apps platform, or you make extensive modifications to it, it's not possible to work around.
answers question: http://stackoverflow.com/q/29170869
score: 1
has comment: http://stackoverflow.com/comment/49714179
upvote count: 1

http://stackoverflow.com/q/29169765
tagged with: asp.net-mvc
answer count: 2
has comment: http://stackoverflow.com/comment/46558644
tagged with: javascript
has answer: http://stackoverflow.com/a/29186067
has comment: http://stackoverflow.com/comment/46557882
score: 0
has answer: http://stackoverflow.com/a/29172596
has body: I have an array of about 200 complex Javascript objects. I am trying to stringify this data to use in an AJAX post request. On the serverside I am using ASP.NET MVC. How can I stringify this data to send it to the server? When I try to do JSON.Stringify the browser locks up. In my controller: [HttpPost] public void SaveAs(SaveAsInputModel input)
type: UnansweredQuestion
has title: Stringifying large Array of JSON?
type: Question

formfield
type: Tag
tag name: formfield
tags question: http://stackoverflow.com/q/29081789

http://stackoverflow.com/comment/46643465
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29215921
has text: Yeah, if that `svg` selection contains the right stuff then I can't think of a reason not to. It's more efficient. Of course just be mindful in case there are multiple svgs in that selection and you only want to address a single one of them.
type: Comment

http://stackoverflow.com/a/30064146
has body: You shouldn't need TodoActions.todoItemsChanged(). How it should work is you just call TodoActions.addTodoItem(todo). So, no todoItemsChanged action. The Store listens to the Action. The Component listens to the Store. The Component calls Actions. So, Action->Store->Component->Action and so on. The store listens to the Action and does stuff, and then triggers a change: var TodoStore = Reflux.createStore({ init: function(){ this.listenTo(TodoActions.addTodoItem,this.addTodoItem); this.listenTo(TodoActions.removeItem,this.removeTodoItem); }, getInitialState() { this.todos = []; // or whatever return this.todos; }, addTodoItem(todo) { API.addTodoItem(todo); // There are no hard and fast rules here, // you can do this however you want this.update([todo].concat(this.todos)); }, removeTodoItem() { // Similar to the above }, // The docs do use this method // but you can call this.trigger from the liteners update(todos) { this.todos = todos; this.trigger(todos); }, }); You might need to adjust your API to fit this format. The Store should store the actual todos and call out to the API. The method above updates the local state without checking to see if the API succeeds. I call out to my api and use callbacks like this (Api uses superagent behind the scenes): // Actual code I pulled for a project I'm working on onAddNote(id, note) { Api.createNote(id, note, (err, res) =&gt; { let lead = JSON.parse(res.text).lead; this.updateLead(lead); }) }, Components listen to changes on the store (and call Actions, which you already have): var TodoStore = require('/path/to/TodoStore'); var Reflux = require('reflux'); var TodoHead = React.createClass({ mixins: [Reflux.connect(TodoStore, 'todos')], // **insert the rest of your component** // this will add the current value of // of the todos onto the state, you // access it at this.state.todos Every time the store calls this.trigger(this.todos), the state of your component will be updated thanks the the Mixin. There are other ways to connec…
upvote count: 1
answers question: http://stackoverflow.com/q/29064743
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46617275
has text: this [jsfiddle](http://jsfiddle.net/h7jjh16s/) is working using the code above
comment on: http://stackoverflow.com/q/29202720
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46525783
score: 0
type: QuestionComment
type: Comment
has text: Isn't it `'#icon-container'` ? And yikes, if you have a live version I can look at, I can try and debug it, but otherwise, not sure I can help =(
comment on: http://stackoverflow.com/q/29149174

http://stackoverflow.com/comment/46564214
score: 0
has text: Can you please add more information to your question. Can you share the make up of the "xml sheet". And what you mean by using java script? Marklogic 8 has server side javascript is that what you are talking about or do you mean client side? And what do you mean by retrieve the same? does this mean you need to retrieve the update xml document?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29122317

http://stackoverflow.com/comment/46507795
has text: The radius is being set correctly. On further checking I found out that when I comment `force.start()`, `x` and `y` are being set to proper values. However, they are set to NaN when the line is un-commented.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29141926

http://stackoverflow.com/q/29110287
tagged with: bing-maps
has title: Onclick infobox - bing map api
has answer: http://stackoverflow.com/a/29115386
score: 0
has body: I'm having trouble getting the infoboxes for the bing API to open on click from outside the map. Here is the show infobox function and the function to create the pin/infobox itself: function displayInfobox(e) { pinInfobox.setOptions({ title: e.target.Title, description: e.target.Description, visible: true, offset: new Microsoft.Maps.Point(0, 25) }); pinInfobox.setLocation(e.target.getLocation()); } function hideInfobox(e) { pinInfobox.setOptions({ visible: false }); } function displayPinsOnMap(results) { // Creates a collection to store multiple pins var pins = new Microsoft.Maps.EntityCollection(); //Create the info box for pushpin var infoboxOptions = {width: 260, height:160}; pinInfobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), infoboxOptions); infoboxLayer.push(pinInfobox); // Create Pins for (var i = 0; i &lt; results.length; i++) { //pushpin location var position = new Microsoft.Maps.Location(results[i]["Lat"], results[i]["Lon"]); //Create the pin if(results[i]["DNC"] == 'DNC') { var sppins = {htmlContent:"&lt;img src='badsp.png' height='32px'&gt; " }; } else { var sppins = {htmlContent:"&lt;img src='sppin.png' height='32px'&gt; " }; } var pin = new Microsoft.Maps.Pushpin(position, sppins); pin.Title = results[i]["Business Name"]; pin.Description =results[i]["Address"] + "&lt;br&gt;" + results[i]["City"] + ", " + results[i]["StateListing"] + "&lt;br&gt;" + results[i]["Phone"] + "&lt;br&gt;Fax: " + results[i]["Fax"] + "&lt;br&gt;Email: " + results[i]["Email"]; Microsoft.Maps.Events.addHandler(pin, 'click', displayInfobox); function pinclick(i) { Microsoft.Maps.Events.addHandler(results[i], 'click'); } //Add pin to the map map.entities.push(pin); } //hide box on map move Microsoft.Maps.Events.addHandler(map, 'viewchange', hideInfobox); //add pins/infobox map.entities.push(pinInfobox); } I have a list of items pulled from a JSON file and displayed on the map. Each item creates a pin and info box as well as in a table off to the side of the m…
type: AnsweredQuestion
tagged with: hta
accepted answer: http://stackoverflow.com/a/29115386
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29074543
has comment: http://stackoverflow.com/comment/46382909
has answer: http://stackoverflow.com/a/29075263
has title: Edit CSS using JavaScript
has answer: http://stackoverflow.com/a/29074617
has body: I have the following (simplified) HTML: Contact Us Information Venue Details Registration & Payment Agenda Home and the following CSS: .navigation { width:100%; background-color:#3171B7; border-bottom:1px solid #ffffff; margin:0; text-transform:uppercase; font-size:16px; height:40%; padding-top:10px; } #navMenu{ display:none; } and the following JavaScript: function fnResponsiveMenu() { var oNavMenu = document.getElementById('navMenu'); var oDisplay = oNavMenu.style.display; if(oDisplay=="none") { oDisplay.style.display = ""; } } The problem is that the div with id="navMenu" is not being set to visible when I click. From looking at the DOM explorer, I can see the element is set to display:none, but when calling the JavaScript function, the display is coming back as "". I have searched the internet, but as far as I can see I am implementing everything correctly. Is this something to do with the CSS? Do I have an obvious error that I cant see, or is there something missing in the functionality?
has comment: http://stackoverflow.com/comment/46382899
type: Question
has answer: http://stackoverflow.com/a/29074714
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46383116
has answer: http://stackoverflow.com/a/29074606
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29074828
answer count: 5
type: UnansweredQuestion

http://stackoverflow.com/q/29158470
has comment: http://stackoverflow.com/comment/46537367
has answer: http://stackoverflow.com/a/29159121
has body: Getting Started With PubNub HotelName: In this the onclick='publish()' is not getting executed. The error shown is Uncaught ReferenceError: publish is not defined. Although I have already defined the publish function. The publish function should get the value of the text box and add it the JSON that I am sending to the publish function.
has comment: http://stackoverflow.com/comment/46537370
type: Question
score: 0
answer count: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/46537830
has answer: http://stackoverflow.com/a/29159171
has comment: http://stackoverflow.com/comment/46537545
has title: Not able to call a javascript function using onclick event
has comment: http://stackoverflow.com/comment/46537314
has answer: http://stackoverflow.com/a/29159094
has comment: http://stackoverflow.com/comment/46537357
has comment: http://stackoverflow.com/comment/46537331
type: UnansweredQuestion

http://stackoverflow.com/a/29197429
downvote count: 0
has comment: http://stackoverflow.com/comment/46610849
has body: Hey you can translate the group containing the pie chart by using attr('transform', 'translate(x, y)'. There is no other way to position the pie chart in d3.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29196664

http://stackoverflow.com/q/29063226
has body: I have a table that look like that : And a javascript/jQuery function : function getnextmedia(current) { var res = current.split("/"); rowId = "#" + res[5]; $(".jp-play-me").each(function() { if (this.id == rowId) { alert(this.data); alert($(this).next(".jp-play-me").attr("data")); } }); } rowid is an id Im looking for in the table. I use the class jp-play-me to find all tags and then compare id to get the good tag. That works fine. The next step is to get the following tag in the table so the function can read the data attribute. For exemple, if rowId is equal to secondTAG then I need to get the value foobar, which is the value of the following data tag attribute. I tried to use the next() method but I guess I do it the wrong way. Let me know if you need more informations.
type: Question
downvote count: 2
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Next tag in table
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29063313
accepted answer: http://stackoverflow.com/a/29063313
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46362570
score: -1

http://stackoverflow.com/comment/46617451
score: 0
has text: If I had to guess as to why you're getting downvoted, I would posit that it's because the question is very broad, you're using jQuery 1.11, and your attempt doesn't really show any effort nor knowledge of CSS positioning or transitions. Start with `position:absolute` or `position:fixed` in your CSS and see if you can get someplace from there. If not, update your post with your latest attempts; someone might be more likely to help if they have more of an idea of what you've tried and what you want, especially if you're using up-to-date code libraries. No guarantees, of course, but it's a start.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29202164

http://stackoverflow.com/q/29064809
type: Question
tagged with: autocomplete
accepted answer: http://stackoverflow.com/a/29065093
tagged with: javascript
tagged with: jquery
has body: I have two inputs - #postal and #name. #name input has a jQuery autocomplete function enabled. Suggestions for autocomplete are shown only when I start typing something into #name input. I need to show suggestions of #name input even if I type something into #postal input too. I was trying: $('#postal').keyup( function () { var postal = $('#postal').val(); $('#name').autocomplete( "option", "source", getFilteredSuggestionsJson(suggestionsJson, postal)); $('#name').autocomplete("search"); }); I also tried: $('#name').trigger('keydown.autocomplete'); but none of that worked for me. Keyup event is triggering correctly, but can't get that suggestions visible. What could I do? I just found out it works only when I first bring autosuggestions by typing something into #name input and hide it when focus from #name is lost. Only after that I can show autosuggestions by typing into #postal input.
score: 0
has title: Show autocomplete suggestions on another event
answer count: 1
tagged with: events
tagged with: show
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29065093

http://stackoverflow.com/a/29132182
answers question: http://stackoverflow.com/q/29127168
downvote count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/51435883
has body: Possible reason for not working $scope.$watch might be property overriding in child scope. If you set $watch on controller scope, but checkbox with ng-model binding is created inside some child scope of the controller, child scope might create its own mail property and controller $scope.$watch will not be able to detect changes in that property. Here is jsfiddle that demonstrates this problem: link. To avoid this problem you should not use primitive values on the scope for ng-model bindings. Instead you should bind to properties of objects on the scope, for example ng-model="formData.mail" where formData is some object in the controller's scope. To watch for object property changes you also use dot syntax: $scope.$watch('formData.mail', function(){...}) Hope this helps.
has comment: http://stackoverflow.com/comment/46546724
type: AcceptedAnswer
score: 8
type: Answer
accepted answer of: http://stackoverflow.com/q/29127168

http://stackoverflow.com/comment/46508748
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29142713
has text: @Europeuser: In what format? Format it as a string, ensure that that string is encoded for use within both double and single quotes (`htmlspecialchars` may help), ...
score: 0

internet-explorer-8
tags question: http://stackoverflow.com/q/29100133
tags question: http://stackoverflow.com/q/29144318
type: Tag
tag name: internet-explorer-8
tags question: http://stackoverflow.com/q/29119285
tags question: http://stackoverflow.com/q/29065419
tags question: http://stackoverflow.com/q/29171276
tags question: http://stackoverflow.com/q/29070839
tags question: http://stackoverflow.com/q/29141274
tags question: http://stackoverflow.com/q/29169037
tags question: http://stackoverflow.com/q/29077458

http://stackoverflow.com/comment/46614970
type: Comment
comment on: http://stackoverflow.com/a/29201334
score: 0
type: AnswerComment
has text: `Log` button does nothing - apart from showing you the changes in the model. ) Tap it after changing checkboxes' values, then check the console.

http://stackoverflow.com/comment/46584248
type: AnswerComment
comment on: http://stackoverflow.com/a/29183907
score: 0
type: Comment
has text: Yes, I got the alert. Just in case I am using firefox.

http://stackoverflow.com/comment/46437654
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29103458
has text: See: http://jsfiddle.net/g0b1ge2t/3/ you're sharing the copy over the loop, instead of making a fresh copy ever time.
score: 0

http://stackoverflow.com/comment/46380041
type: AnswerComment
type: Comment
has text: Thanks for the answer. Actually I want to show that value on the same page but to be dynamic. So, when I click "add" button, this value to be changed automatically
comment on: http://stackoverflow.com/a/29072881
score: 0

http://stackoverflow.com/q/29147691
tagged with: http://stackoverflow.com/tag/svg
score: 0
has comment: http://stackoverflow.com/comment/46520798
type: Question
tagged with: vivagraphjs
has answer: http://stackoverflow.com/a/29248172
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29248172
has body: im using vivagraph to embed a svg into a div (as a background) it works fine, but vivagraph offers interaction (scroll zoom) is there anyway to remove that kind of interaction with the svg? I tried to tie up an eventlistner to the svg and disable it through there. Is there not an easy way to just say "dont interact with svg just scroll down"? Thanks
has title: no interaction with SVG
type: AnsweredQuestion

http://stackoverflow.com/comment/46489555
comment on: http://stackoverflow.com/q/29131466
score: 0
type: Comment
type: QuestionComment
has text: @old_school - I see what you mean, probably not the best idea now that you mention it.

http://stackoverflow.com/q/29091562
score: 0
tagged with: css
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31706516
has body: This question was already asked here Angular ng-grid row height but that are all not satisfy my requirement if we use CSS to fix problem it affect page responsiveness and ng-grid's header functionalities like sort,etc . .ngCell { display : table-cell; height: auto !important; overflow:visible; position: static; } .ngRow { display : table-row; height: auto !important; position: static; } .ngCellText{ height: auto !important; white-space: normal; overflow:visible; } there is any solution for this without affecting page responsiveness and have to solve by pure java script / angularjs/css
tagged with: row-height
type: Question
has title: Dynamically increase ng-grid row height depending on content without additional plugins and jquery
linked to: http://stackoverflow.com/q/19094723
answer count: 1
tagged with: javascript
tagged with: ng-grid

popup
tags question: http://stackoverflow.com/q/29092799
type: Tag
tag name: popup
tags question: http://stackoverflow.com/q/29185895
tags question: http://stackoverflow.com/q/29193331
tags question: http://stackoverflow.com/q/29188943

http://stackoverflow.com/comment/46457657
comment on: http://stackoverflow.com/q/29114436
has text: Can include `html` at stacksnippets ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29143474
has body: There is some sort of jquery conflict that I can't get my head around. I have a script that's working by itself here: http://www.pitestiretailpark.ro/working.html When the same script is inserted into a Joomla page (along with html/css code), the dropdown menus don't work. http://www.pitestiretailpark.ro/test/ I am not a programmer, I know my HTML but have little knowledge of jquery. The standalone script has been copied from another page, stripped bare (but working!) and when I try to insert into Joomla, it stops working.
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29143618
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/29143615
has answer: http://stackoverflow.com/a/29143618
has answer: http://stackoverflow.com/a/29143615
has title: Troubleshoot jquery error with dropdown menu
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/46526596
type: QuestionComment
comment on: http://stackoverflow.com/q/29152305
score: 0
has text: Edited the above code.
type: Comment

http://stackoverflow.com/comment/46702742
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29195486
has text: It is not working because you don't have to scroll on the window but on the shadow-dom element that contains the contents. Just go down the tree to find the proper element.
score: 0

http://stackoverflow.com/a/37245985
score: 2
type: AcceptedAnswer
downvote count: 0
has body: Sharing answer from gkatsev answered here https://github.com/videojs/video.js/issues/2124 Quoting from there. showing - the text track is visible and updating and firing events disabled - the track track isn't visible and isn't firing events hidden - the track track isn't visible but it is firing events. So, to hide a track, you can do: player.textTracks()[0].mode = 'disabled';
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29107407
accepted answer of: http://stackoverflow.com/q/29107407

http://stackoverflow.com/a/29118530
answers question: http://stackoverflow.com/q/29118178
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/80582734
has comment: http://stackoverflow.com/comment/117760143
has comment: http://stackoverflow.com/comment/97627616
has comment: http://stackoverflow.com/comment/76760145
score: 152
type: Answer
has comment: http://stackoverflow.com/comment/80572078
has comment: http://stackoverflow.com/comment/127718744
has comment: http://stackoverflow.com/comment/80098780
has body: The simplest way is to save the original value using data() when the element gets focus. Here is a really basic example: JSFiddle: http://jsfiddle.net/TrueBlueAussie/e4ovx435/ $('input').on('focusin', function(){ console.log("Saving value " + $(this).val()); $(this).data('val', $(this).val()); }); $('input').on('change', function(){ var prev = $(this).data('val'); var current = $(this).val(); console.log("Prev value " + prev); console.log("New value " + current); }); Better to use Delegated Event Handlers Note: it is generally more efficient to use a delegated event handler when there can be multiple matching elements. This way only a single handler is added (smaller overhead and faster initialisation) and any speed difference at event time is negligible. Here is the same example using delegated events connected to document: $(document).on('focusin', 'input', function(){ console.log("Saving value " + $(this).val()); $(this).data('val', $(this).val()); }).on('change','input', function(){ var prev = $(this).data('val'); var current = $(this).val(); console.log("Prev value " + prev); console.log("New value " + current); }); JsFiddle: http://jsfiddle.net/TrueBlueAussie/e4ovx435/65/ Delegated events work by listening for an event (focusin, change etc) on an ancestor element (document* in this case), then applying the jQuery filter (input) to only the elements in the bubble chain then applying the function to only those matching elements that caused the event. *Note: A a general rule, use document as the default for delegated events and not body. body has a bug, to do with styling, that can cause it to not get bubbled mouse events. Also document always exists so you can attach to it outside of a DOM ready handler :)
upvote count: 152
has comment: http://stackoverflow.com/comment/76695527
has comment: http://stackoverflow.com/comment/79875002
accepted answer of: http://stackoverflow.com/q/29118178

http://stackoverflow.com/comment/46500306
type: Comment
has text: I seriously doubt that the only age problem is the minus value. For example new Date("31/12/2014") = 12 Jul 2016 ... read the answer (edited, had a problem last time) :).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29137763

openlayers
tags question: http://stackoverflow.com/q/29099984
tags question: http://stackoverflow.com/q/29133612
tags question: http://stackoverflow.com/q/29175058
type: Tag
tags question: http://stackoverflow.com/q/29117867
tag name: openlayers

http://stackoverflow.com/q/29106223
type: Question
tagged with: javascript
tagged with: jquery
has title: Show chart if button clicked, close it if clicked again
accepted answer: http://stackoverflow.com/a/29106293
downvote count: 0
answer count: 1
has body: I have this code from a plugin to display a chart and I want to only show this chart if a button is clicked, and close it again and if the button is clicked again. the code for the chart is this: $(function(){ $("#doughnutChart").drawDoughnutChart([ { title: "Tokyo", value : 100, color: "#2C3E50" }, { title: "San Francisco", value: 80, color: "#FC4349" }, { title: "New York", value: 70, color: "#6DBCDB" }, { title: "London", value : 50, color: "#F7E248" }, { title: "Sydney", value : 40, color: "#D7DADB" }, { title: "Berlin", value : 20, color: "#FFF" } ]); }); HTML &lt;div id="doughnutChart" class="chart"&gt;&lt;/div&gt;
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29106293

http://stackoverflow.com/comment/46598695
comment on: http://stackoverflow.com/q/29192278
score: 0
has text: i think instead of `var j=[hash, JSON.stringify(e, null, "")];` you should have `var j = JSON.stringify(e)`. The next problem is that you need to take the list of messages from `e.payload` and make a iteration `for` each message and insert it.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46437913
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29103884
has text: @Scottie no he doesn't, because `container` holds a jQuery collection (albeit empty in this case).
type: Comment

http://stackoverflow.com/comment/46553028
has text: Hi and welcome to SO. Please visit the [help] to see how to ask a question here
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29167184

http://stackoverflow.com/comment/46792572
type: AnswerComment
comment on: http://stackoverflow.com/a/29216537
type: Comment
has text: Ah thanks. Well I was hoping for it to output an actual description of the job so it's readable for the casual user.
score: 0

http://stackoverflow.com/comment/46661399
type: Comment
comment on: http://stackoverflow.com/q/29168007
type: QuestionComment
has text: and the `_upload_video.html.erb` and `upload.js.erb`
score: 0

http://stackoverflow.com/a/29165511
has comment: http://stackoverflow.com/comment/46551039
has comment: http://stackoverflow.com/comment/46552018
has comment: http://stackoverflow.com/comment/46550153
has comment: http://stackoverflow.com/comment/46551991
has comment: http://stackoverflow.com/comment/46550410
has comment: http://stackoverflow.com/comment/46551493
score: 0
answers question: http://stackoverflow.com/q/29165399
type: Answer
has body: I'm afraid you'll have to write your own code to do this. What you could do is add the event "blur" to your input, and when it triggers (which means it loses focus), you check the value to see if it is allowed or not. $("#tags").on("blur", function(){ if (availableTags.indexOf($(this).val()) == -1) { //Not allowed: $(this).val(""); //You could also put a warning here or something. } });

http://stackoverflow.com/comment/46427816
type: AnswerComment
has text: Not a problem @harcos - we'll agree to disagree :-)
type: Comment
comment on: http://stackoverflow.com/a/29098161
score: 0

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/29151810
type: Tag

http://stackoverflow.com/a/29127301
has body: @dfsq's solution is a nice straight forward one, but in the interest of learning :) To try and understand regexes, I would advice looking at the flow-chart-alike visualisation that Debuggex gives you, and experiment with substitution on Regex101. (links contain the regex unaltered from your question) I would make some small modifications: The . doesn't match new-lines, one way to do that is to match [\s\S] in stead, which matches absolutely every character This: [^\s]+\s\s* can be untangled and optimized to \S+\s+, but I would turn it around and make it \s*\S+ so that the ... comes after the last word without a space in between. Which would result in this: ((\s*\S+){40})([\s\S]*) Regex101 substitution in action
type: Answer
answers question: http://stackoverflow.com/q/29126888
accepted answer of: http://stackoverflow.com/q/29126888
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4

http://stackoverflow.com/a/29133363
has body: i made a slight change to the html so you could tell which input field you are looking at. Inside the change function of the asset_type option I get the fields div that is closest. I use that reference to filter which div you want to show HTML Machinery Equipment Property # machinery input field # equipment input field # property input field Machinery Equipment Property # machinery input field # equipment input field # property input field JQuery $(function() { $(document).on('nested:fieldAdded', function(event){ $(".property").hide(); $(".equipment").hide(); $(".machinery").hide(); }); }); $(function() { $('.asset_type').on('change', function () { var foo = $(this).closest(".fields"); $( "select option:selected").each(function(){ if($(this).attr("value")=="Property"){ $(foo).children(".Property").show(); $(foo).children(".Equipment").hide(); $(foo).children(".Machinery").hide(); } if($(this).attr("value")=="Machinery"){ $(foo).children(".Property").hide(); $(foo).children(".Equipment").hide(); $(foo).children(".Machinery").show(); } if($(this).attr("value")=="Equipment"){ $(foo).children(".Property").hide(); $(foo).children(".Equipment").show(); $(foo).children(".Machinery").hide(); } }); }).change(); });
has comment: http://stackoverflow.com/comment/46566507
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29130645
has comment: http://stackoverflow.com/comment/46584065
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46626639
has text: It was on ES6 / ES7, I watched it a week or so ago. It just came to mind and there was a bunch of already existing functionality discussed as well. Thanks Andreas - will look into it.
comment on: http://stackoverflow.com/q/29208181
score: 0
type: Comment
type: QuestionComment

slick.js
tag name: slick.js
type: Tag
tags question: http://stackoverflow.com/q/29128331

http://stackoverflow.com/q/29136262
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29136667
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
has body: Im newbie to Angular and trying to setup angular phonecat application. I have downloaded the code from here https://docs.angularjs.org/tutorial/ and installed a nodejs. Now, I'm not sure how to map the angular application to run with nodejs. From other links, I see everyone run a webserver.js file but I don't see anything under the scripts directory. scripts]$ tree . . ├── private │ ├── old │ │ ├── format-json.sh │ │ ├── goto_step.bat │ │ ├── goto_step.sh │ │ ├── README.md │ │ ├── ScrapeData.js │ │ └── snapshot.sh │ ├── push-to-github.sh │ ├── README.md │ ├── retag.sh │ ├── test-all.sh │ └── update-gh-pages.sh └── update-repo.sh How can I run the application in nodejs.
has title: Setting up Angular phonecat application on node

http://stackoverflow.com/q/29151537
has comment: http://stackoverflow.com/comment/46524850
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/46528940
tagged with: javascript
has comment: http://stackoverflow.com/comment/46527989
score: 0
has comment: http://stackoverflow.com/comment/46524686
tagged with: css
has comment: http://stackoverflow.com/comment/46524943
has comment: http://stackoverflow.com/comment/46524659
answer count: 0
type: UnansweredQuestion
has title: Grunt css-min paths
has body: I have the following setup in my Grunt file for css cssmin: { options: { rebase: true, }, concat: { files: { 'dist/app.css': [ 'tmp/*.css', 'app/theme/css/vendors/fontello.css', 'app/theme/js/vendors/revolution/css/settings.css', 'app/theme/css/styles.css', 'app/theme/css/media-queries.css', 'app/app.css' ] } }, min: { files: [{ src: 'dist/app.css', dest: 'dist/app.css' }] } }, It works great except one tiny issue. The paths are rebased to start with 'app/theme/...' or 'app/images/...' however all my files are moved into a dist folder for uploading to production. Instead I want it to generate paths such as '/theme/...' or '/images/...'
has comment: http://stackoverflow.com/comment/46524738
tagged with: grunt-contrib-cssmin
type: Question
has comment: http://stackoverflow.com/comment/46525032

http://stackoverflow.com/comment/46629956
has text: You could use regex instead.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29210072

http://stackoverflow.com/q/29182476
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46581765
tagged with: css
score: 0
answer count: 1
has title: Optimizing CSS/JS imports for Static website using common a JS document
has answer: http://stackoverflow.com/a/29182957
has comment: http://stackoverflow.com/comment/46581823
tagged with: javascript
type: AnsweredQuestion
tagged with: web
accepted answer: http://stackoverflow.com/a/29182957
has body: Coming from a server side programming background, this might be a noob question. Currently I have css laid out like below and also JS in a similar fashion. But I have around some 40-50 html pages remaining to be coded and dropped in and all pages share the same CSS/JS more or less.So, how do I avoid this boilerplate typing.Can I just do like below var navBar = [' ', 'Home', 'Tools', 'Blog', 'About Me', ' '].join('\n') I mean using the same logic to print out and tags?If so, does it have any disadvantages or is there a better way to do it.
type: Question

http://stackoverflow.com/comment/68789242
type: AnswerComment
has text: this did not work for me. I got "autosize not defined".
type: Comment
score: 1
comment on: http://stackoverflow.com/a/34833377

http://stackoverflow.com/comment/46498354
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29136800
type: QuestionComment
has text: That code does work and I am using firefox

http://stackoverflow.com/a/47346423
has body: You need run code after DOM onload: window['twttr'].widgets.load(); - for twitter window['instgrm'].Embeds.process({hidecaption:false}); - insta if it is cordova app then should add "http://" to src in index.html
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29203999
downvote count: 1
score: -1

http://stackoverflow.com/a/29150590
has body: You have float:right in your CSS? Remove it. aside {background-color:#fff; float:right; }
type: Answer
accepted answer of: http://stackoverflow.com/q/29150428
answers question: http://stackoverflow.com/q/29150428
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/29354030
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29062821
type: Answer
has comment: http://stackoverflow.com/comment/49769366
accepted answer of: http://stackoverflow.com/q/29062821
has body: Youtube no longer supports "tag" functionality with it's API.
score: 0

http://stackoverflow.com/a/49510834
has body: Since the existing answers address this problem from an ES5-environment perspective I thought it might be worth offering an answer from an ES2015+ perspective; the original question doesn’t specify and today many people no longer need to transpile classes, which alters the situation a bit. In particular I wanted to note that it is possible to definitively answer the question "can this value be constructed?" Admittedly, that’s not usually useful on its own; the same fundamental problems continue to exist if you need to know if a value can be called. Is something constructable? To start I think we need to clarify some terminology because asking whether a value is a constructor can mean more than one thing: Literally, does this value have a construct slot? If it does, it is constructable. If it does not, it is not constructable. Was this function intended to be constructed? We can produce some negatives: functions that cannot be constructed were not intended to be constructed. But we can’t also say (without resorting to heuristic checks) whether a function which is constructable wasn’t meant to used as a constructor. What makes 2 unanswerable is that functions created with the function keyword alone are both constructable and callable, but such functions are often intended for only one of these purposes. As some others have mentioned, 2 is also a fishy question — it is akin to asking "what was the author thinking when they wrote this?" I don’t think AI is there yet :) While in a perfect world perhaps all authors would reserve PascalCase for constructors (see balupton’s isConventionalClass function), in practice it would not be unusual to encounter false positives/negatives with this test. Regarding the first version of this question, yes, we can know if a function is constructable. The obvious thing to do is to try constructing it. This isn’t really acceptable though because we don’t know if doing so would have side effects — it seems like a given that we don’t kno…
answers question: http://stackoverflow.com/q/29093396
score: 20
downvote count: 0
has comment: http://stackoverflow.com/comment/98843548
has comment: http://stackoverflow.com/comment/98739907
has comment: http://stackoverflow.com/comment/98722119
has comment: http://stackoverflow.com/comment/87198789
type: Answer
upvote count: 20

http://stackoverflow.com/comment/46511085
type: Comment
has text: ok ok.. I understood ur problem, Since u generated the markup dynamically , u have to use .on function or .live(jquery <= 1.7)
score: 0
comment on: http://stackoverflow.com/a/29143894
type: AnswerComment

http://stackoverflow.com/comment/46405208
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29084392
has text: One-liners are better as comments. It looks like the right code; explain a little on what it does and you'll be good.
score: 0

http://stackoverflow.com/comment/46615471
type: AnswerComment
score: 0
type: Comment
has text: mmmm, did you copy it for jsfiddel? it works there. do you have something else you dont show it to me???
comment on: http://stackoverflow.com/a/29201223

http://stackoverflow.com/q/29075814
tagged with: appium
downvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29086066
has comment: http://stackoverflow.com/comment/46477742
type: AnsweredQuestion
has title: how to set $interval instead of timeout in Protractor Tests
upvote count: 1
accepted answer: http://stackoverflow.com/a/29086066
type: Question
tagged with: protractor
has body: I am working on iOS Hybrid app automation using appium and Protractor. I am using the timeout in my config.js file but getting the errors: Below are my config.js and spec.js file. Kindly advise on how to use $interval instead of timeout. Config.js: exports.config = { allScriptsTimeout: 30000 , getPageTimeout: 30000 , ignoreSynchronization: true , seleniumAddress: 'http://localhost:4723/wd/hub', specs: ['PageObjectSpec.js'], capabilities: { browserName: 'iOS' , 'appium-version':'1.3.4', platformName:'iOS' , platformVersion: 7.1 , deviceName:'iPhone' , autoWebview:true , }, baseUrl: 'http://localhost:8000', jasmineNodeOpts: {showColors: true, defaultTimeoutInterval:60000} , onPrepare: function() { browser.manage().timeouts().setScriptTimeout(60000); }, }; Spec.js file:: 'use strict'; describe('Abbvie app test', function() { var userName = browser.element(by.model('credentials.username')); var passwd = browser.element(by.model('credentials.password')); var signin = browser.element(by.buttonText('Sign In')); it('Login Page test', function() { userName.click(); //userName.sendKeys(name) passwd.click(); //passwd.sendKeys(pass) signin.click(); }, 60000); }); **Protractor Log:**Using the selenium server at http://localhost:4723/wd/hub [launcher] Running 1 instances of WebDriver A Jasmine spec timed out. Resetting the WebDriver Control Flow. The last active task was: Protractor.waitForAngular() at [object Object].webdriver.WebDriver.schedule (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:345:15) at [object Object].Protractor.executeAsyncScript_ (/usr/local/lib/node_modules/protractor/lib/protractor.js:251:26) at [object Object].Protractor.waitForAngular (/usr/local/lib/node_modules/protractor/lib/protractor.js:274:15) at [object Object].getWebElements (/usr/local/lib/node_modules/protractor/lib/element.js:136:19) at [object Object].getWebElements (/usr/local/lib/node_modules/protractor/lib/element.js:669:31) at [object Obje…

http://stackoverflow.com/a/29107222
has comment: http://stackoverflow.com/comment/46447733
type: Answer
answers question: http://stackoverflow.com/q/29105715
accepted answer of: http://stackoverflow.com/q/29105715
downvote count: 0
has body: Or you can use the CSS way to fix the floats without editing the markup. section:after { display: table; content: ""; clear: both; }
has comment: http://stackoverflow.com/comment/46447481
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46447997
has comment: http://stackoverflow.com/comment/46446387

http://stackoverflow.com/q/29142736
has title: Testing input type created by Form Helper
has answer: http://stackoverflow.com/a/29161369
type: Question
has body: Is there a way for me to test what kind of input the Form Helper will create before actually creating it. I want to know if the Form Helper will create a select or multi-select, for instance, before the page are loaded.
tagged with: cakephp
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/29160877
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29160665
score: 1
has body: set the min and max date. $('#date1').datepicker({ dateFormat: 'dd-mm-yyyy', minDate: -2, maxDate: 0, }); Hop this helps. Demo

http://stackoverflow.com/comment/46440481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29104997
has text: @Louis You have wrong understanding of optional parameters in functions. It doesn't assume passing `undefined` values. It assume **omitting** parameters.
score: 1

http://stackoverflow.com/a/29113158
score: 2
upvote count: 2
has body: So, node.js is just javascript pulled out of the browser and has a few APIs attached to it. How exactly they did that, is another discussion. Node.js in short, is Chrome's V8 engine used to run your Javascript pulled outside of the Chrome browser and left to run as a stand-alone program. Some people, use it to run a web-server, other use it to run some scripts, and pretty much any other normal thing you can run with other languages (not that different from what you can do with python installed on your computer). The advantage is that you can now run JavaScript on both your browser and outside of it. Instead of learning Python/PHP/Ruby etc to run your web-server, you now just learn JavaScript. To be a full-stack JS dev means you can now code both server and front-end in JavaScript. Side note, if you are just starting out as a beginner in JavaScript, please learn it as it is without worrying about node.js or whatnot. Just understand the main ideas around JS before getting ahead of yourself.
downvote count: 0
has comment: http://stackoverflow.com/comment/46456180
answers question: http://stackoverflow.com/q/29113069
type: Answer
has comment: http://stackoverflow.com/comment/46458172

http://stackoverflow.com/comment/46456325
has text: your duplicate logic seems to be way more complicated than it is required... can you share the html also
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29113698

http://stackoverflow.com/comment/46387959
type: QuestionComment
has text: An alternative to `eval` is the [`Function` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
type: Comment
comment on: http://stackoverflow.com/q/29077278
score: 0

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/29216399
type: Tag

http://stackoverflow.com/q/29083780
has comment: http://stackoverflow.com/comment/46401509
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46400795
score: 0
has comment: http://stackoverflow.com/comment/46400802
has body: I previously attempted to interact with PHP using AJAX (1st time using Javascript to any significant degree) and had no success, so I tried to start with the basics using a Mozilla Developer Network example as a test: Example - https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started That isn't working either even though I copy-pasted it straight from the site with only one change (setting the url to my test page, running on XAMPP). When I click the button to run the MDN script, the resulting output is the alert "There was a problem with the request". I'm using Firebug to check the result, and it shows a "200 OK" code for Status. If I understand the script correctly, shouldn't that not lead to an error message? Here is the code from the example (along with the code from the Foundation framework I was using, in case that's somehow the issue): Foundation | Welcome Make a request And here is the code for the test HTML page that I made: Untitled Document Test Where am I going wrong? EDIT - Adding the original PHP script being referenced. I originally tried to use an altered version of the MDN script on this but likewise couldn't get it to work: <?php require ('includes/config.inc.php'); require (MYSQL); $u = NULL; $P = NULL; $u = mysqli_real_escape_string ($dbc, $_GET['username']); $p = mysqli_real_escape_string ($dbc, $_GET['password']); $q = "SELECT user_id FROM users WHERE (username='$u' AND password=SHA1('$p')) AND active IS NULL"; $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n MySQL Error: " . mysqli_error($dbc)); if (@mysqli_num_rows($r) == 1) { // A match was made. $a = 'True'; print json_encode($a); } else { // No match was made. $a = 'False'; print json_encode($a); } ?> 2ND EDIT - Thanks for the suggestion about the console log, that did it. All I needed to do was enable CORS and now it works fine.
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46401419
answer count: 0
has title: Not getting a response on MDN AJAX example
has comment: http://stackoverflow.com/comment/46400953
type: Question

http://stackoverflow.com/q/29079118
has body: I'm having a really weird behaviour on a form. There is a number of text fields with in-line validation, showing an error message below the field if the content is invalid. The validation is triggered on blur. At the bottom of the page there is a "Next" button. On click, a validation is performed and, if everything is ok, the form is submitted. Now, if a mandatory, empty field has focus when I click the button the following happens: onBlur is triggered and in-line validation is performed the error message is displayed the rest of the page is "pushed down" to show the error text the onClick action on the button is NOT triggered I initially thought that onBlur was somehow preventing onClick. Then I've noticed that when the page moves down, the mouse pointer is no more ON the button as this is pushed down. If I click on the button in a low enough position, such that after the "moving" the pointer is still on the button, onClick is triggered. I replaced the onClick with onMouseDown and the problem is fixed, but I am really puzzled by the reason this happens.
tagged with: gwt
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: onclick
accepted answer: http://stackoverflow.com/a/29090109
type: Question
tagged with: onmousedown
has title: GWT - onClick not triggered
tagged with: javascript
has answer: http://stackoverflow.com/a/29090109
upvote count: 3
answer count: 1
favorite count: 0
tagged with: onblur

http://stackoverflow.com/a/29184947
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29184820
has body: That's because $routeProvider .when('/contacts',{ controller: 'ListController', templateUrl: 'list.html' }); expects the http://localhost:8888/contacts location, not the http://localhost:8000/angular-contacts/contats location. You should add the prefix in your route declaration, or even better, conifgure the virtual host, so you'll be able to use a real domain, rather than the localhost's sub-catalogue.

http://stackoverflow.com/a/29098161
type: Answer
has body: function toggleMe(a){ var e=document.getElementById(a); if(!e)return true; if(e.style.display=="none"){ e.style.display="block" document.getElementById("toggle").value = "Read Less" } else{ e.style.display="none" document.getElementById("toggle").value = "Read More" } return true; } Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
has comment: http://stackoverflow.com/comment/46427737
has comment: http://stackoverflow.com/comment/46426999
has comment: http://stackoverflow.com/comment/46426950
score: 1
has comment: http://stackoverflow.com/comment/46426864
downvote count: 1
has comment: http://stackoverflow.com/comment/46427816
has comment: http://stackoverflow.com/comment/46427412
has comment: http://stackoverflow.com/comment/46427149
has comment: http://stackoverflow.com/comment/46426876
has comment: http://stackoverflow.com/comment/46427154
has comment: http://stackoverflow.com/comment/46427325
has comment: http://stackoverflow.com/comment/46427535
has comment: http://stackoverflow.com/comment/46427102
answers question: http://stackoverflow.com/q/29098051
upvote count: 2
has comment: http://stackoverflow.com/comment/46427017
has comment: http://stackoverflow.com/comment/46427339
has comment: http://stackoverflow.com/comment/46427787

http://stackoverflow.com/comment/46587001
has text: I use Babel to transpile ES6 to ES5 for a Chrome Extension just fine using Grunt tasks. The only thing I haven't got working is loading modules asynchronously - I've had to merge them into one file. Although I can't provide a more complete answer because I don't use Yeoman
score: 1
comment on: http://stackoverflow.com/q/29185601
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29189797
score: 0
has comment: http://stackoverflow.com/comment/46594159
type: Answer
has comment: http://stackoverflow.com/comment/46594528
has comment: http://stackoverflow.com/comment/46594496
has comment: http://stackoverflow.com/comment/46594375
has body: In the content script you could do something like this to load the js file function inject(url, exteral) { // 1. Build the absolute URL // 2. Create a script tag and set src attribute // 3. Append script tag to thw window if (!external){ url = chrome.extension.getURL(url); } var scriptElement = document.createElement('script'); scriptElement.src = url; (document.body || document.head || document.documentElement).appendChild(scriptElement); } If the js file is packged with the extension, it must be placed in the manifest.json under web_accesible_resources. othwerwise it need to have the same protocol that the page it is injected in (http | https) Since the content script is not allowed to call the window functions, you could call window.postMessage to send data from the actual window to content script.
answers question: http://stackoverflow.com/q/29189641
has comment: http://stackoverflow.com/comment/46594264

http://stackoverflow.com/comment/46467664
has text: Honestly thanks a million for that, there is no way I wouldve been able to achieve that result just by myself, so your answer is greatly appreciated.
type: Comment
comment on: http://stackoverflow.com/a/29120153
score: 1
type: AnswerComment

http://stackoverflow.com/a/29204091
answers question: http://stackoverflow.com/q/29203698
type: Answer
score: 2
upvote count: 2
has body: Try this if( !navigator.userAgent.match(/Android/i) &amp;&amp; !navigator.userAgent.match(/webOS/i) &amp;&amp; !navigator.userAgent.match(/iPhone/i) &amp;&amp; !navigator.userAgent.match(/iPod/i) &amp;&amp; !navigator.userAgent.match(/BlackBerry/i) ) { you code goes here for samll device like iphone, androide. }
downvote count: 0

http://stackoverflow.com/comment/46363309
score: 0
type: AnswerComment
has text: `name` is not a reserved keyword. The problem is that the property `"name"` of `window` has a getter and setter, which stores the stringified value of the function instead of the function itself.
type: Comment
comment on: http://stackoverflow.com/a/29063474

http://stackoverflow.com/a/29157932
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29155190
answers question: http://stackoverflow.com/q/29155190
has body: Unfortunately, Xrm.Page.getAttribute("new_field") is not very robust and it can, indeed, return null sometimes. So, as a good practice, you could check for nulls like this: var value = Xrm.Page.getAttribute("new_field") ? Xrm.Page.getAttribute("new_field").getValue() : null; We even put helper methods like that in a separate .js file we reuse everywhere. Hope this helps!
has comment: http://stackoverflow.com/comment/46569190
has comment: http://stackoverflow.com/comment/46556384
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46524772
score: 0
type: AnswerComment
type: Comment
has text: thanks for your anwer, I discovered in the meantime that my real problem was that elements with display:none cannot be scrolled to position without showing them on the page. The only way to scroll them is to use "visibility:hidden" then show them after the scroll
comment on: http://stackoverflow.com/a/29148045

http://stackoverflow.com/q/29126213
type: Question
tagged with: get
answer count: 2
has comment: http://stackoverflow.com/comment/46478921
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29127343
favorite count: 0
tagged with: angularjs
tagged with: php
linked to: http://stackoverflow.com/q/20655877
downvote count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23663326
score: 1
tagged with: content-management-system
linked to: http://stackoverflow.com/q/11534710
has answer: http://stackoverflow.com/a/29128897
has body: i am trying to make a dynamic website/cms with angularjs. So i also want to add a way to fetch blogs inside a persific page, normally i would do this with get requests and just get it like that. but now it seems that angular doesn't really like when you do this and so everything gets messed up. So basicly the thing i am looking for is a way to do: http://example.com/#/news/[BLOGPOST_ID] (where news is content/news.php (see code). my current reroute: var app = angular.module('app', [ 'ngRoute' ]); app.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/welkom', {templateUrl: 'content/welkom.php'}). when('/lidworden', {templateUrl: 'content/lidworden.html'}). when('/news', {templateUrl: 'content/news.php'}). when('/signup', {templateUrl: 'content/signup.php'}). when('/login', {templateUrl: 'content/login.html'}). otherwise({redirectTo: '/welkom'}); }]); sorry if this has already been asked, i just don't know how to correctly put this question. EDIT: 'https://stackoverflow.com/a/23663579/3216211 found something here that works fine out of the box, thanks anyways.' Solved.
has title: angularjs GET requests in url for CMS

http://stackoverflow.com/comment/46488028
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29131038
has text: Yes, excuse me. `.show` takes parameters, but not the way that the asker wants to pass them.
type: Comment

http://stackoverflow.com/comment/46482347
type: Comment
type: QuestionComment
has text: ya confirmation.aspx
comment on: http://stackoverflow.com/q/29128085
score: 0

http://stackoverflow.com/q/29182566
has body: I use mainSubmitHandler for multiple pages, and am willing to define it as a global variable if necessary. mainSubmitHandler, however, requires some tweaking, and I am handling this by using subSubmitHandler. Instead of having subSubmitHandler as another global variable, how can I pass it as an agrument to mainSubmitHandler? var mainSubmitHandler=function(form) { //do a bunch of stuff subSubmitHandler(form); }; var subSubmitHandler=function(form) { //do some stuff }; // uses jQuery validation plugin var validator=$("#form1").validate({ rules: {}, messages: {}, submitHandler: mainSubmitHandler });
has title: Pass function to submitHandler callback
has answer: http://stackoverflow.com/a/29182664
accepted answer: http://stackoverflow.com/a/29182664
favorite count: 0
possible better answer: http://stackoverflow.com/a/29182615
has answer: http://stackoverflow.com/a/29182615
has comment: http://stackoverflow.com/comment/46581264
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46581375
type: Question
answer count: 2
tagged with: anonymous-function
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
upvote count: 1

http://stackoverflow.com/comment/46543880
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29161946
type: Comment
has text: It is not a directive.

http://stackoverflow.com/comment/47070722
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29174167
has text: solution is to use third canvas :) http://jsfiddle.net/wasikuss/v8app/858/
score: 0

http://stackoverflow.com/a/29114310
upvote count: 2
has comment: http://stackoverflow.com/comment/46458300
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46457652
has body: From a performance perspective I honestly don't think it matters unless you are generating hundreds/thousands of these elements in a short period of time. I think the more important consideration is maintainability. If you are building a lot of HTML from code it is strongly suggested that you use a template library for maintainability. This will allow you to separate out your UI from the code and generate components using a simple Model/View approach. A few great JavaScript template libraries that I have used in the past include: https://github.com/janl/mustache.js http://handlebarsjs.com/ https://code.google.com/p/kite/ If you can't use a template library then it is honestly up to your team to make the call on what format they prefer. I personally would prefer the jQuery approach because it makes it easier to modify in the future while minimizing the risk of making some, hard to locate, HTML syntax error that could come back to haunt you later.
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29114232
downvote count: 0
answers question: http://stackoverflow.com/q/29114232

http://stackoverflow.com/comment/46448805
score: 0
type: Comment
has text: @TimLewis: Yes, the question is to identify the source of the `'missing ; before statement'` error. Of course there are many other things to be corrected :-)
comment on: http://stackoverflow.com/a/29109483
type: AnswerComment

http://stackoverflow.com/comment/46594444
type: Comment
has text: `document.getElementById('weddata').reset();`
comment on: http://stackoverflow.com/a/29189861
score: 0
type: AnswerComment

http://stackoverflow.com/a/29101382
accepted answer of: http://stackoverflow.com/q/29101155
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46433359
type: Answer
has comment: http://stackoverflow.com/comment/46433013
has comment: http://stackoverflow.com/comment/46432905
downvote count: 0
score: 7
has body: You are having a tipical problem with turbolinks, turbolinks make that DOM doesn't change when you navigate through a links, for this reason, the ready event from jQuery is never fired, you can solve this in three ways. You can try something like: document.addEventListener('page:load', function(){ $("#ghost_logo").hide(); }); or if this doesn't work either, try navigate with out turbolinks change a parameter of link: &lt;%= link_to 'Main', root_path ,{ :'data-no-turbolink' =&gt; "true" } %&gt; or if you want you can use this jQuery-turbolinks gem is a gem provided for solving this kind of issues. For more information refer to turbolinks repository on github
answers question: http://stackoverflow.com/q/29101155

http://stackoverflow.com/comment/46626640
type: QuestionComment
comment on: http://stackoverflow.com/q/29171725
score: 0
has text: The code under lib folder is ran both on client and server. You cant publish on client if you understand. Please separte the logic to ```server``` and ```client```. Put publications under server/publications and subs only under client folder or at least use ```if (Meteor.isServer) {//YOUR PUBLISH}```
type: Comment

http://stackoverflow.com/a/29198943
answers question: http://stackoverflow.com/q/29198903
downvote count: 0
has comment: http://stackoverflow.com/comment/46610314
score: 4
type: Answer
upvote count: 4
has body: Change your function name to something other than "write()" because that's already an existing javascript method.

http://stackoverflow.com/a/29100786
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29096060
has body: You may use p:ajax with query event, basically the query event is the same exact request of the actual query, in that way you can call the oncomplete, making sure that the query has executed completely: &lt;p:ajax event="query" oncomplete="insertRow()" /&gt;
upvote count: 1
score: 1

http://stackoverflow.com/q/29087369
type: Question
has body: I'm trying to create a note system. Whatever you type into the form gets put into a div. When the user hits Enter, they submit the note. However I want to make it so when they hit Shift + Enter it creates a line break a the point where they're typing (like skype). Here's my code: $('#inputpnote').keypress(function(event){ var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode=='13' &amp;&amp; event.shiftKey){ $("inputpnote").append("&lt;br&gt;"); } else if(keycode == '13'){ var $pnote = document.getElementById("inputpnote").value; if ($pnote.length &gt; 0) { $("#pnotes-list").append("&lt;div class='pnote-list'&gt;&lt;li&gt;" + $pnote + "&lt;/li&gt;&lt;/div&gt;"); $('#inputpnote').val(''); } } }); #inputpnote is the form where the user enters their note and #pnotes-list is the place where the notes are being appended to. Thank you in advance!
has comment: http://stackoverflow.com/comment/46438289
has answer: http://stackoverflow.com/a/29087462
tagged with: javascript
has title: How do I detect the "enter" key and "shift" key at the same time to insert a line break
score: 0
has comment: http://stackoverflow.com/comment/46408201
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46410158
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6014702

http://stackoverflow.com/a/29119766
has body: You should use jQuery's .stop() to prevent new animations from being added to the queue all the time. You can either use .stop(true,true) or .stop(true,false) depending on your need: if you only want to clear the animation queue and let it animate to completion by itself, use .stop(true,false) if you want to clear the animation queue and force the animation to jump to its end state immediately, use .stop(true,true) Here's your improved code: $(".icon").on("mouseenter", function(){ $(this) .closest(".slideli") .find(".hide") .stop(true,true) .show("slide", {direction: 'right'}) .animate({duration: 500, easing: "swing", queue: false}); }); $(".icon").on("mouseleave", function(){ $(this) .closest(".slideli") .find(".hide") .stop(true,true) .hide("slide", {direction: 'right'}) .animate({duration: 500, easing: "swing", queue: false}); }); You may also use .finish(), but since your animation is rather simple (you are not chaining consecutive animations in any instances), .stop() can do the same job, too. p/s: A shameless plug to a quick article on handling jQuery animations I published some time ago: How to .stop() writing bad jQuery animations
has comment: http://stackoverflow.com/comment/46466704
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29119647

http://stackoverflow.com/comment/46568451
comment on: http://stackoverflow.com/q/29175284
score: 0
type: Comment
type: QuestionComment
has text: Ah I see. So how would i upload the files that the user selects through the dialog

http://stackoverflow.com/comment/46427524
type: AnswerComment
comment on: http://stackoverflow.com/a/29098474
has text: Thanks for the help. i got the same output u getting now but i just dont understand why it cant pick the attributes automatically like the hard coded ones. i have tried everything i know am adding my html so take a look at that too. thank you very much
type: Comment
score: 0

http://stackoverflow.com/comment/46563344
score: 0
type: QuestionComment
has text: Can you add some images or create a fiddle so i can see what your talking about? bluring images has nothing to do with positioning as far as i iknow.
type: Comment
comment on: http://stackoverflow.com/q/29167949

http://stackoverflow.com/comment/46559562
comment on: http://stackoverflow.com/a/29169912
type: AnswerComment
score: 0
type: Comment
has text: thanks darshan ...i done this...and also done insert code...but thanks for reply...

http://stackoverflow.com/q/29115053
favorite count: 0
has body: I want to disable 'falls through' checker of jshint in mt .jshintrc file. However, the checker seems to be enabled by default. http://jshint.com/docs/#options By default JSHint warns when you omit break or return statements within switch statements: switch (cond) { case "one": doSomething(); // JSHint will warn about missing 'break' here. case "two": doSomethingElse(); } I couldn't find out the checker id from the official web site so I cannot update the .jshintrc file. Could you let me know how I can disable 'falls through' checker and where I can find out the full checker list provided by jshint. Thanks for your help in advance.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33128375
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jshint
has answer: http://stackoverflow.com/a/29115609
answer count: 2
upvote count: 1
has title: How can I disable 'falls through' checker of jshint in .jshintrc?

apache
tag name: apache
tags question: http://stackoverflow.com/q/29075515
type: Tag

http://stackoverflow.com/q/29096060
has body: I'm using primefaces p:autocomplete and need to modify the table of suggestions on clientside (insert a row if there are exactly X suggestions). To do so, I'd like to call a JS function like: function insertRow(){ $('.autoCompletePanel tr:nth-child(X)').append(' my tr '); } Since the table of suggestions changes when typing, I need to call the function after every ajax request, after the autocomplete panel is (re-)rendered. How can I achive this? I could not find any oncomplete event which refers to the ajax request for retrieving the suggestions.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29100786
downvote count: 0
tagged with: primefaces
score: 1
type: Question
tagged with: autocomplete
tagged with: javascript
has comment: http://stackoverflow.com/comment/46423339
has title: How to call JS function when autocomplete is updated
tagged with: ajax
upvote count: 1
has comment: http://stackoverflow.com/comment/46427097
answer count: 1
has comment: http://stackoverflow.com/comment/46427782
favorite count: 0

http://stackoverflow.com/a/29217831
answers question: http://stackoverflow.com/q/29217770
downvote count: 0
has comment: http://stackoverflow.com/comment/46644752
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/46644826
has comment: http://stackoverflow.com/comment/46644840
upvote count: 3
has comment: http://stackoverflow.com/comment/46644688
has body: Just add a class to all of them &lt;div class="myClass" id="transbox1"&gt;&lt;/div&gt; $( ".myClass" ).on( "mouseenter", function() { $( this ).css( "width", "+=200" ); $( this ).css( "height", "+=200" ); }); $( ".myClass" ).on( "mouseleave", function() { $( this ).css( "width", "-=200" ); $( this ).css( "height", "-=200" ); });

user-controls
tags question: http://stackoverflow.com/q/29069760
tag name: user-controls
type: Tag

http://stackoverflow.com/comment/46504041
comment on: http://stackoverflow.com/q/29139316
type: Comment
has text: [Something like this should do it](http://jsfiddle.net/lollero/a5kqLs5n/)
type: QuestionComment
score: 0

http://stackoverflow.com/a/29203367
downvote count: 0
type: Answer
has body: replace this line $('#slider img').css('left', ''); with this $('#slider').css('left', '0'); fiddle here : https://jsfiddle.net/nu5j2dyr/ another fiddle for sliding anmation: https://jsfiddle.net/88u56y9h/1/
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29203022
accepted answer of: http://stackoverflow.com/q/29203022
type: AcceptedAnswer

http://stackoverflow.com/a/29164284
has comment: http://stackoverflow.com/comment/46554188
answers question: http://stackoverflow.com/q/29163866
type: Answer
score: 1
has body: You can call state in the directive: angular.module('c2gyoApp') .directive('timeInputForm', ['state', function(state) { return { restrict: 'E', templateUrl: 'scripts/directives/timeInputForm.html', controller: function($scope) { ... $scope.clear = function() { var now = new moment().startOf('hour').add(1, 'h'); state.rental = $scope.rental = { tab: $scope.rental.tab, startDate: now.clone(), endDate: now.clone(), distance: 0, timeMinutes: 0, timeHours: 0, timeDays: 0, timeWeeks: 0, timeStanding: 0, airport: false }; angular.copy($scope.rental); }; } }; }]);
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/46623214
type: QuestionComment
comment on: http://stackoverflow.com/q/29206230
has text: That solved the problem. TQ
score: 0
type: Comment

http://stackoverflow.com/a/29099677
has comment: http://stackoverflow.com/comment/46430853
answers question: http://stackoverflow.com/q/29099625
score: 0
has comment: http://stackoverflow.com/comment/46431062
type: Answer
has comment: http://stackoverflow.com/comment/46430464
has comment: http://stackoverflow.com/comment/46430294
has body: You could try something like this: for(var i = 0; i &lt; obj.children.length; i++) { var parentIDString = parentid + ".0"; for(var j = 0; j &lt; i; j++) { parentIDString += ".0"; } obj.children[i]['id'] = parentIDString; }
has comment: http://stackoverflow.com/comment/46430178

http://stackoverflow.com/comment/46380470
has text: Hi I can disable the user..this is just a test user which I am testing...so no worries kindly help with the issue ..Thanks.
score: 0
comment on: http://stackoverflow.com/q/29073068
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46389021
type: QuestionComment
has text: Do you have any javascript errors in addition to the fact you have multiple ready handlers? Just by looking at it, it looks like you've opened up a number of brackets that haven't been closed, though I could be wrong due to the nature of the formating
score: 1
comment on: http://stackoverflow.com/q/29077792
type: Comment

http://stackoverflow.com/a/29104794
score: 1
upvote count: 1
has body: A simple solution that ive used before is to merge all searchable keys/text keys into one long searchable text and use that to do all your searching. A bit simplified version is below. http://jsfiddle.net/rainerpl/v2krqev5/2/ function ViewModel(){ var self = this, x, i, suits; self.filterText = ko.observable(""); // Text from search field // Collection of testsuites self.testsuites = ko.observableArray([ { name: "Register User", description: "Bla bla bla", etc: "Many more fields..." }, { name: "Delete User", description: "some description", etc: "Many more fields" }, { name: "Send Money", description: "na-na-na bat man", etc: "Many more fields" } ]); suits = self.testsuites(); for ( i = 0; i &lt; suits.length; i++) { suits[i]["search_content"] = "&gt;"; for ( x in suits[i] ) { if ( !suits[i].hasOwnProperty(x) || x == "search_content" || typeof suits[i][x] !== "string") {continue;} suits[i]["search_content"] += suits[i][x].toUpperCase(); } } // Collection of testsuites after going through search filter self.filteredTestsuites = ko.computed(function () { var reg; // If many white spaces in a row, replace with only one white space fText = self.filterText().replace(/\s+/gi, '|'); fText = fText.replace(/\|\s*$/gi, ''); console.log("regex:", fText); reg = new RegExp(fText, "gi"); // If there is anything in the search box, filter for this // As of now this does not divide the filterText and only searches the Name field var filteredCollection = ko.utils.arrayFilter(self.testsuites(), function(test) { if(fText.length) return test.search_content.match(reg); else return 1; }); return filteredCollection; }, self); } $(document).ready( function(){ var vm = new ViewModel(); ko.applyBindings(vm); } );
answers question: http://stackoverflow.com/q/29103501
accepted answer of: http://stackoverflow.com/q/29103501
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29103997
type: Answer
score: 1
has body: container might not exist when you try to append something to it. When you do var container = $('#container'); This does not mean that container will always point at any item that has the container id. Rather, it looks for such container, and if it doesn't exist, your container variable is "empty", even if you create a div like that later. What you want to do is first create the container, and then create the variable, or reassign the correct object to the variable. Bonus tip, developer usually prefix variables with $ whenever they are jQuery objects, so that they remember that they don't have to wrap them anymore with $().
answers question: http://stackoverflow.com/q/29103884
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29108462
tagged with: javascript
tagged with: caching
score: 0
has body: I have a huge audio file that I'd like to just load once on a web page, but I'm instantiating 2 audio tag objects in javascript: var audioTag1 = new Audio(); var audioTag2 = new Audio(); audio1.src = 'hugeFile.mp3'; audio1.src = 'hugeFile.mp3'; How do I make the browser just make 1 request? I know that files are cached, but I doubt that the browser knows to cache any of the 2 requests since the response headers for the first request have not arrived at the time of issuing the seconds request. That means that the pragma and cache control headers have not been read by the browser. Is there any way to tell the browser "Request this data once, and make 2 audio tags out it?" instead of issuing 2 requests? I imagine that I could create a blob of one audio and then construct object URLs? Maybe that's too much overhead for this simple task?
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
type: AnsweredQuestion
tagged with: audio
has comment: http://stackoverflow.com/comment/46446588
type: Question
has answer: http://stackoverflow.com/a/29108865
accepted answer: http://stackoverflow.com/a/29108865
has title: How can I make 2 audio elements in succession, but make just 1 request for the audio?

http://stackoverflow.com/a/29101064
has comment: http://stackoverflow.com/comment/46453288
has body: you already have the target, so all you need to do now is pass in the complete callback function to the animate method: $('html,body').animate({ scrollTop: target.offset().top }, { duration: 500, complete: function () { // add a new class to trigger multiple style attributes of the selector target.className = "new-color"; } });
has comment: http://stackoverflow.com/comment/46471925
has comment: http://stackoverflow.com/comment/46433158
score: 0
upvote count: 1
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29100875

http://stackoverflow.com/a/29065800
score: 3
has body: In your cambiaOrigen handler, this refers to a node not a jQuery object, what you would want is $(this) instead. Also to set the selected option of a select tag you can simply set its value this.value = anterior; http://jsfiddle.net/mowglisanu/w7c4o4cd/2/ $("body").on('change',"#destino_1", function(){ $("#origen_2").trigger("cambiaOrigen"); }); $('body').on('cambiaOrigen', '.origen', function() { var nombre=this.id; var numero=parseInt(nombre.slice(-1)); //alert("Mooooo " + nombre); if (numero > 1) { var anterior = $("#destino_" + (numero - 1)).val(); //alert("Meeeept " + anterior); //alert (this); this.value = anterior; //this.val(anterior); } }); AAA BBB CCC DDD Arena AAA BBB CCC DDD Arena
downvote count: 0
answers question: http://stackoverflow.com/q/29065725
type: Answer
upvote count: 3

http://stackoverflow.com/comment/82401964
type: Comment
has text: This has been patched, but if you are experiencing problems, please file a new bug at http://crbug.com/new. Be sure to set the component field to "Blink>WebAudio", if you can.
comment on: http://stackoverflow.com/a/29522556
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46624624
score: 0
type: QuestionComment
type: Comment
has text: Post full code.. Only javascript doesn't say anything.. + only use preventDefault, if it needs to be, so first check if checks fail, then prevent, else just pass..
comment on: http://stackoverflow.com/q/29207074

http://stackoverflow.com/comment/46559501
has text: I have separated out unique apple and orange, now I want to merge it with two years with different amounts. Believe me I have tried almost 3-4 days playing with lodash's function. I am kind of new to javascript. Please try it and let me know if its really that easy.
comment on: http://stackoverflow.com/q/29170350
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29153981
downvote count: 0
answer count: 1
tagged with: javascript
has body: I try to assign a background-image from existing SVG object based on an example at http://codepen.io/progers/pen/CAEks // Short script to encode our SVG in base64 // This can be reversed using window.atob('base64') var code = document.getElementById('code'); var demo = document.getElementById('demo'); var svg = document.getElementsByTagName('svg')[0]; // Convert the SVG node to HTML. var div = document.createElement('div'); div.appendChild(svg.cloneNode(true)); // Encode the SVG as base64 var b64 = 'data:image/svg+xml;base64,'+window.btoa(div.innerHTML); var url = 'url("' + b64 + '")'; code.innerHTML = 'Base64 CSS (for cross-browser compatibility)\n\nbackground-image: ' + url + ';'; demo.style.backgroundImage = url; I created this http://jsfiddle.net/bj0e063q/1/ jsfiddle. The difference is that at codepen a static svg is used while I want to create it dynamic by code. Why does my example not work?
favorite count: 0
has title: How to assign css background image from existing svg object?
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: background-image
type: Question
has answer: http://stackoverflow.com/a/29156260

http://stackoverflow.com/q/29079669
answer count: 0
has title: Sencha list paging plugin doesn´t work properly
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46409157
tagged with: extjs
tagged with: sencha-touch
type: Question
has comment: http://stackoverflow.com/comment/46418675
score: 0
has body: I am trying to implement a feature with the "ListPaging" Sencha plugin, and its working correctly but with the next case I am having an exception. Server sents the total count of rows, for example 10, but if I have the pagesize property configurated with 11 rows, plugin doesn´t work. Here a little piece of code with the store implementation: store = Ext.create('Cicero.store.activity.Activities', { storeId: storeId, pageSize: 10, autoLoad: false, clearOnPageLoad: false }); This is the plugin implementation in the view: //LISTPAGING { xclass: 'Ext.plugin.ListPaging', autoPaging: true, loadMoreText : 'Loading more activities', noMoreRecordsText : 'All Activities loaded' } ], scrollable: true, onItemDisclosure: true, emptyText: 'No activities found', Mainly the problem is: All is working correct but when the number of records returned is less than the page size, the plugin doesn´t work.. Any clue?

http://stackoverflow.com/comment/46471306
comment on: http://stackoverflow.com/a/29122123
has text: To be sure, add names: <a id="poll" name="p1" for two buttons.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29092320
score: 0
type: Answer
has body: You have not add the form code here so lets assume your form have two fields name and address. Actually you need to put the serialize() function under the event. Like $('form').on('submit', function(event) { event.preventDefault(); var data = $(this).serialize(); $.post('server.php', {id: data}, function(data) { $('#data').append('&lt;p&gt;' + data + '&lt;/p&gt;'); }); }); Now on your server.php file if you print the following line: $id = $_POST['id']; echo $id; this will show you the results like: name=iffi&amp;address=UK I hope this will help you more.
answers question: http://stackoverflow.com/q/29090846

http://stackoverflow.com/comment/46511509
type: AnswerComment
score: 0
type: Comment
has text: Sharepoint executes the Javascript and I see a empty warning message. But the warning should display the h1 content ("Heading 1" as example).
comment on: http://stackoverflow.com/a/29141071

http://stackoverflow.com/comment/46556950
score: 0
type: AnswerComment
has text: @TheZenCoder, so the answer is that there is no answer short of forking Angular?
type: Comment
comment on: http://stackoverflow.com/a/29156621

http://stackoverflow.com/comment/46381259
score: 0
type: QuestionComment
type: Comment
has text: are the file names correct? In the downloaded zip, they're called `sweet-alert.min.js` and `sweet-alert.css` (look at the example file)
comment on: http://stackoverflow.com/q/29073418

http://stackoverflow.com/comment/46496988
score: 0
type: Comment
has text: should that be `slice.call(allSpans)`?
comment on: http://stackoverflow.com/a/29135919
type: AnswerComment

http://stackoverflow.com/comment/46431884
type: AnswerComment
comment on: http://stackoverflow.com/a/29100793
type: Comment
has text: @JamesThorpe - Yes, a pretty big one actually, I just did it inside to be more 1337 !
score: 0

http://stackoverflow.com/a/29147745
accepted answer of: http://stackoverflow.com/q/29147671
answers question: http://stackoverflow.com/q/29147671
type: Answer
has body: You're setting sth to the element's value: var sth = document.getElementById("haha").value; so sth is a string. Then, you try to get the (non-existent) value property of that string: var t = document.createTextNode("Hello" + sth.value); Instead, set sth to the element itself: var sth = document.getElementById("haha"); var sth = document.getElementById("haha"); function myFunction() { var h = document.createElement("p"); var t = document.createTextNode("Hello " + sth.value); h.appendChild(t); document.body.appendChild(h); } Try it
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/29207650
has body: i'm trying to write a few s with javascript, the problem is: my javascript doesn't. somehow it execute the function 'till the end of it. It just stops the function and goes on with the code. the jscript code: function Bedrijf(index) { var ind = index; var t = (ind + 1).toString(); var id = "id" + t; var body = document.getElementsByTagName('body'); body.innerHTML(' ' + ' ' + ' ' + ' Keer terug ' ); var lijst = document.getElementById('lijst'); lijst.innerHTML(' bedrijf' + ind + ' ' ); } function Load( ) { window.alert("ok"); for (var i = 0; i < 5; i++) { Bedrijf(i); }; window.alert("gelukt"); } html code: ijzerwaren Pierard Rosa's sweet corner at the end of the index file:
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29207929
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29207929
has answer: http://stackoverflow.com/a/29207807
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46625763
has title: javascript won't write html
accepted answer: http://stackoverflow.com/a/29207807

http://stackoverflow.com/q/29093883
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Google PageSpeed Insights says 'remove render blocking js file'
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29094111
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29094056
has body: This is my site: http://vani.valse.com.my/pixel I tested in https://developers.google.com/speed/pagespeed/insights. It asks to remove render blocking js file which is "js/jquery-1.7.1.min.js". But I don't have this file anywhere in my site and all js files are compressed and placed at the footer. I even defer the page from loading but nothing works. Below is my defer code: Can anyone advise why does the error shown even when the file is nowhere to be found?Many thanks. HTML (index.php) Pixel Marketing - Home <?php include('inc/menu.php'); ?>
has comment: http://stackoverflow.com/comment/46419384
has comment: http://stackoverflow.com/comment/46419233
score: 1
upvote count: 1

http://stackoverflow.com/comment/46570413
score: 0
type: AnswerComment
type: Comment
has text: How can I test whether my image has an alpha channel?
comment on: http://stackoverflow.com/a/29176135

http://stackoverflow.com/a/29131277
has comment: http://stackoverflow.com/comment/46504325
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46791315
score: 1
answers question: http://stackoverflow.com/q/29127408
accepted answer of: http://stackoverflow.com/q/29127408
has body: You can add your fragment to the view by calling view.addDependent(fragment). In this case models known to the view will be available in the fragment.
upvote count: 1
has comment: http://stackoverflow.com/comment/46646448
type: AcceptedAnswer

http://stackoverflow.com/q/29156441
has comment: http://stackoverflow.com/comment/46558007
has title: D3: How to detect the end of the .each()
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29156600
downvote count: 0
score: 1
type: Question
tagged with: dynamic-arrays
tagged with: arrays
has answer: http://stackoverflow.com/a/29156583
has comment: http://stackoverflow.com/comment/46533492
tagged with: javascript
answer count: 3
upvote count: 1
accepted answer: http://stackoverflow.com/a/29156489
favorite count: 0
tagged with: d3.js
has body: In D3.js, I am traversing through data using the following method: elem.allDataRows.each(function(d, i) { elem.checkboxMemory[i] = { id: d.key, isChecked: d.isChecked }; }); Since this process is asynchronous, I need to be able to determine when the loop process is complete. Is their any way in D3 that can I detect the end of the .each()? Not for every interval, but the entire process. Just for the record, elem.allDataRows is an array. Thank you!
possible better answer: http://stackoverflow.com/a/29156583
has answer: http://stackoverflow.com/a/29156489

http://stackoverflow.com/q/29118835
tagged with: node.js
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29128700
tagged with: bluebird
score: 9
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46522028
upvote count: 9
has answer: http://stackoverflow.com/a/32534211
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29128700
linked to: http://stackoverflow.com/q/23771853
has answer: http://stackoverflow.com/a/32999618
downvote count: 0
has body: So there are a few other queries around this subject such as: How can I promisify the MongoDB native Javascript driver using bluebird? However it does not seem to address the latest version of the driver, which seems to have issues when trying to promisify. Currently I can get the MongoClient working by doing: Promise.promisifyAll(mongodb.MongoClient); // Using .Prototype here fails to promisify However no matter what I try the Collections do not seem to operate using the *async calls, it may invoke them but they never get resolved or rejected so they just hang in limbo. Historically in the previous versions you would just Promise.promisifyAll(mongodb) and you were done, but I am unsure as to how to correctly handle this in the new driver. Here is an example output of a collection which has been created using the mongo direct promisification connectAsync then getting the collection from the returned db. Once I try to do anything on the collection it just hangs and promises dont return from it: { s: { pkFactory: { [Function: ObjectID] index: 14727641, createPk: [Function: createPk], createFromTime: [Function: createFromTime], createFromHexString: [Function: createFromHexString], isValid: [Function: isValid], ObjectID: [Circular], ObjectId: [Circular], createPkAsync: [Object], createFromTimeAsync: [Object], createFromHexStringAsync: [Object], isValidAsync: [Object], bindAsync: [Object], toStringAsync: [Object], callAsync: [Object], applyAsync: [Object], lazyAsync: [Object], throttleAsync: [Object], debounceAsync: [Object], delayAsync: [Object], everyAsync: [Object], cancelAsync: [Object], afterAsync: [Object], onceAsync: [Object], fillAsync: [Object] }, db: { domain: [Object], _events: {}, _maxListeners: undefined, s: [Object], serverConfig: [Getter], bufferMaxEntries: [Getter], databaseName: [Getter], options: [Getter], native_parser: [Getter], slaveOk: [Getter], writeConcern: [Getter] }, topology: { domain: [Object], _events: [Object], _maxListeners: undefined, conn…
favorite count: 0
tagged with: promise
possible better answer: http://stackoverflow.com/a/32999618
has title: Mongodb node driver 2.0.* with Bluebird 2.9.* promisification
has answer: http://stackoverflow.com/a/39542704

http://stackoverflow.com/a/29084816
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29084060
answers question: http://stackoverflow.com/q/29084060
type: AcceptedAnswer
has body: The problem is caused by your selector inside the click function, instead of adding the text of the clicked element to the search box, you are writing all elements' texts to the search box sequentially, thus only the last .link text remains in the search box. Try this instead: jQuery(' .link ').on('click', function(event) { jQuery('input[name="search"]').val($(this).text().trim()); jQuery('input[name="search"]').keyup(); }); Here's a Fiddle, see if that's what you were looking for.
downvote count: 0
type: Answer

http://stackoverflow.com/q/29120459
type: Question
has body: What is the best way to store data that aren't just high score type data? For instance if I have several different types of units, I want to the store information of these units (E.g. Damage, health, texture, etc.). In a relational database I would have a table 'Units'. So what is the best database equivalent for cocos2d js? Is it fine to use cc.sys.localstorage for this amount of data? I read that cc.sys.localstorage uses SQLLite, is this true? If localstorage is a valid option, I was thinking of using JSON as the value of the key/value pair? Thanks
has comment: http://stackoverflow.com/comment/46588436
tagged with: database
tagged with: javascript
has comment: http://stackoverflow.com/comment/46514297
has title: Cocos2d JS Data Storage
type: UnansweredQuestion
tagged with: storage
has comment: http://stackoverflow.com/comment/46543526
answer count: 0
score: 0
tagged with: cocos2d-js
tagged with: local-storage

http://stackoverflow.com/a/29090423
score: 2
downvote count: 0
has body: If I was correct in my question above then add this CSS div.awp_box.awp_box_inner:nth-last-child(1) { width: 100%; } Source: TutsPlus
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46413346
answers question: http://stackoverflow.com/q/29090343

http://stackoverflow.com/q/29177444
has answer: http://stackoverflow.com/a/29179353
tagged with: javascript
score: 0
tagged with: reactjs
has comment: http://stackoverflow.com/comment/46572646
answer count: 1
has comment: http://stackoverflow.com/comment/46572630
tagged with: jquery
favorite count: 0
has title: Never reaching my function call - ReactJs 0.12.0
accepted answer: http://stackoverflow.com/a/29179353
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has body: I have a jsbin that throws no console errors aside from some show down get request that fails. Aside from that, specific to my code there is no errors, yet it never reaches a specific point. The following Jsbin has an issue. The code works, for all intents and purposes but it doesn't at the same time. If you look at: Please note The following, as far as I can tell, is valid reactjs code. /** * A component to display the individual post. */ var DisplayPosts = React.createClass({ render: function() { if (this.props.posts === null) { return ( ); } var markDown = new Showdown.converter(); var post = this.props.posts.slice(0, 4).map(function(post) { var content = markDown.makeHtml(post.content) return ( {post.title} {post.comments.length} ); }); return ( {post} ) } }); And place a console.log inside the this.props.posts.slice(0, 4).map(function(post) { you will never reach there. Place one out side, you reach there. Place one after the block, you reach there. Place one inside - you never reach there. What is going on?

http://stackoverflow.com/q/29074418
has answer: http://stackoverflow.com/a/29074674
possible better answer: http://stackoverflow.com/a/29074562
has answer: http://stackoverflow.com/a/29074471
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29074471
answer count: 3
type: AnsweredQuestion
has title: Execute If statement, only if element is existed
has answer: http://stackoverflow.com/a/29074562
score: 0
has comment: http://stackoverflow.com/comment/46382815
has body: if($("#Prefix").val().trim()=="" &amp;&amp; $("#Infix").val().trim()==""){ return false; } In the above code, when the element id Prefix or Infix does not exist, it's throwing undefined error TypeError: $(...).val(...) is undefined I know, this can be avoided by checking its length $("#Prefix").lenght&gt;0 and $("#Infix").lenght&gt;0. My question here is, how can we do both checks inside single if statement itself.
type: Question

http://stackoverflow.com/comment/96345044
score: 1
type: AnswerComment
type: Comment
has text: Do you know then why they don't accept it as part of the CSS rules?
comment on: http://stackoverflow.com/a/44036596

http://stackoverflow.com/comment/46594497
type: QuestionComment
comment on: http://stackoverflow.com/q/29186099
score: 0
has text: Maybe this will help: http://stackoverflow.com/a/16063711/1641941
type: Comment

http://stackoverflow.com/comment/46582203
comment on: http://stackoverflow.com/a/29182802
type: AnswerComment
score: 0
type: Comment
has text: that's right but the http://plnkr.co/edit/gKQ9bc?p=preview is not working. It is just showing "Product list!"

http://stackoverflow.com/q/29111582
possible better answer: http://stackoverflow.com/a/29111866
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29111947
accepted answer: http://stackoverflow.com/a/29111947
tagged with: php
has comment: http://stackoverflow.com/comment/46453463
type: Question
has comment: http://stackoverflow.com/comment/46453338
has title: Performing calculations on form inputs
tagged with: mysql
has comment: http://stackoverflow.com/comment/46455391
has answer: http://stackoverflow.com/a/29111866
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46452306
has body: I have designed a food menu webpage with checkboxes and radio boxes. I use PHP to retrieve results from a MySQL database table. The code below shows an example of how things are set up currently: PHP includes to connect to database: &lt;?php include('includes/fruits.php');?&gt; &lt;?php include('includes/cheese.php');?&gt; &lt;?php include('includes/desert.php');?&gt; An example of one of the PHP includes: $host="localhost"; // Host name $username="root"; // Mysql username enter code here $password="admin2"; // Mysql password enter code here $db_name="food"; // Database name enter code here $tbl_name="fruits"; // Table name mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name"; $result_fruits=mysql_query($sql); The input boxes on main page that return the table data (each category is in it's own MySQL table): &lt;?php while($rows=mysql_fetch_array($result_fruits)){ ?&gt; &lt;input type="radio" name="fruits[]" id="&lt;? echo $rows['itemname']; ?&gt;" value="&lt;? echo $rows['label']; ?&gt;" class="green-border-fruits" /&gt; &lt;?php while($rows=mysql_fetch_array($result_cheese)){ ?&gt; &lt;input type="radio" name="cheese[]" id="&lt;? echo $rows['itemname']; ?&gt;" value="&lt;? echo $rows['label']; ?&gt;" class="green-border-cheese" /&gt; &lt;?php while($rows=mysql_fetch_array($result_desert)){ ?&gt; &lt;input type="radio" name="desert[]" id="&lt;? echo $rows['itemname']; ?&gt;" value="&lt;? echo $rows['label']; ?&gt;" class="green-border-desert" /&gt; So, for example, the above code would return: apple $2&lt;br&gt; orange $1&lt;br&gt; grapes $2 &lt;td&gt; swiss $3&lt;br&gt;&lt;/td&gt; blue cheese $1.50&lt;br&gt; feta $2.20 cake $5&lt;br&gt; pie $4&lt;br&gt; cookies $3.50 I need the total of all CHECKED items to be displayed in a textbox. EX: this would be the amount displayed if (apple, orange, blue cheese, and pie were checked) TOTAL - $8.50 Any assistance would…
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29129637
answers question: http://stackoverflow.com/q/29129432
has comment: http://stackoverflow.com/comment/46485309
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29129432
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46485291
has body: Given your revised question in the comments, you should use something like this: &gt; var testArray= ["juice", "cow", "foo", "pig", "cat"] &gt; testArray.slice(testArray.indexOf("foo"), testArray.indexOf("cat") + 1) Array [ "foo", "pig", "cat" ] This assumes a number of things: You know in advance which of the two elements occurs first You know that both elements definitely exist If your starting point is a string "foo-cat", you can use "foo-cat".split("-") to obtain the two word separately.

http://stackoverflow.com/comment/46546466
comment on: http://stackoverflow.com/a/29126699
score: 0
type: AnswerComment
has text: In the example it`s working but in my code the score still is 0 :-/ product.score = '25'; does not seem to work. When I console.log(JSON.stringify(product )); directly after the product.score = '25' I can see that the score is still 0... and I added $scope.$apply... this is really stange...
type: Comment

http://stackoverflow.com/q/29124893
has answer: http://stackoverflow.com/a/29124993
type: Question
has title: Extracting paragraphs containing a particular string from a group of paragraph having all paragraphs with same start and end
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: regex
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I need to Extract paragraphs containing a particular string from a group of paragraph having all paragraphs with same start and end for example: In the below text, all the paragraphs' first line starts with "Thread" and last line starts with "Breadcrumb", Now I want to extract only those paragraphs which contains "string_to_be_searched" Thread 1398 (Thread name) data... Breadcrumb: some alpha numeric data Thread 1398 (Thread name) data... string_to_be_searched Breadcrumb: some alpha numeric data Thread 1398 (Thread name) data... Breadcrumb: some alpha numeric data Thread 1398 (Thread name) data... string_to_be_searched Breadcrumb: some alpha numeric data Thread 1398 (Thread name) data... Breadcrumb: some alpha numeric data I have tried it using a regular expression but when I try it without g option it gives me first two threads and when I do it with g it gives me first 4 threads, instead it should give me only 2nd and 3rd thread. var re = /(Thread[\s\S]*?sys_mlock[\s\S]*?Bread.*)/m; Problem Demo: https://regex101.com/r/nR3qG9/2
score: 1

http://stackoverflow.com/comment/46419218
has text: The ES6 creators decided to throw a syntax error if you attempt to call the function, not check it. Say you are building a library that will receive function objects and decide to execute them or store them in some class database (just a random idea). You have no way to know what kind of object you have received right now it seems. So without executing, how can you check if it can be executed or not?
type: Comment
comment on: http://stackoverflow.com/a/29093702
score: 0
type: AnswerComment

http://stackoverflow.com/a/29163991
has body: The thing is Test.SubTest does not exist SubTest is a property defined in the constructor function Test That mean that the only way to access this function is to define an object var t = new Test(); t.SubTest(); The function GetFunction("Test.SubTest") would work if the function was static, like : function Test() {} Test.SubTest = function(){}
accepted answer of: http://stackoverflow.com/q/29162944
answers question: http://stackoverflow.com/q/29162944
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29202017
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has body: Is there a way to animate each DIVs with a delay and only animate when it's on the viewport using WOW.js or any JS plugin that would do the trick?. What WOW.js does right now is it animates everything on it's line of view. I would want it to work as how this JSFiddle example shows http://jsfiddle.net/maniator/VS8tQ/3/ var delay = 0; $('.block-item:lt(16)').each(function(){ $(this).delay(delay).animate({ opacity:0 },500); delay += 500; }); But with a WOW.js effect where it will only animate when I scroll down and see the divs. PS: It would really be awesome if someone could show me a code or make me one that works very well with Velocity.js &amp; Waypoint.js (optional)
tagged with: javascript
has title: Animate each DIVs for each child element with WOW.js
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46489106
type: QuestionComment
has text: I see - well I will have access to some other devices in a bit, I'll take a look again later today
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29129930

http://stackoverflow.com/q/29102606
possible better answer: http://stackoverflow.com/a/29102782
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29103046
has body: I am trying to make navigation bar for my website by using HTML, CSS,and jQuery but the problem I am getting is when I hover on an element which has dropdown list It will get disappear before my selection. Here is my complete code. jsFiddle HTML Home `` About Contact Tell Contact Contact Tell Contact Tell Contact `` CSS body{ margin:0px; padding:0px; } .selected{ background:#CCC; } #menu{ width:500px; height:70px; margin:40px auto; border:1px solid black; border-radius:5px; } #menu ul{ list-style:none; position:relative; } #menu ul li{ float:left; position:relative; width:100px; text-align:center; } #menu ul li a{ text-decoration:none; display:block; background:black; color:white; padding:10px 30px; line-height:30px; } #menu ul li ul{ display:none; visibility:hidden; opacity:0; position:absolute; top:50px; left:0px; padding:0; width:150px; } #menu ul li a:hover, #menu ul li .selected{ background:gray; color:white; } #menu ul li ul li{ list-style:none; width:100%; text-align:left; position:relative; } #menu ul li:hover ul { visibility:visible; display:block; opacity:1; width:150px; } jQuery $(document).ready(function(e) { $("#menu ul li a").click(function(e){ $("#menu ul li a").removeClass("selected"); }).click (function(){ $(this).addClass("selected"); }); $("#menu ul li a").mouseenter(function(){ $("#menu ul li ul").slideToggle("fast"); }); });
type: Question
tagged with: javascript
has title: drop down menu disappear when I trying to select options
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29103046
has answer: http://stackoverflow.com/a/29102782
tagged with: jquery

http://stackoverflow.com/q/29202900
type: Question
has body: I know there's an easy solution here, but I've tried to run through a few tutorials and failed in applying them to my code. I've created an elevation chart by plotting a separate area for each segment of 3-5 data points. So, I have quite a few plots happening on the same graph. Because of this I've tried zooming techniques that zoom on the svg element, but have been coming up empty. Here's my latest attempt. Hopefully you guys can help. Currently, when I try to zoom, it resets the x and y scales to [0,1] and fills the entire area with the fill color. Here's a Plunk // ***************************** // // Set Up // // ***************************** // // *** MAP VARIABLES *** L.mapbox.accessToken = 'pk.eyJ1Ijoid2lsbGlhbWx1Y2UiLCJhIjoiNE1zU0xMNCJ9.X9y-S0ubezlH-aefwUZslA'; var map = L.mapbox.map('map', 'examples.map-i86nkdio') // *** CHART VARIABLES *** var margin = {top: 10, right: 20, bottom: 30, left: 100}, width = 1100 - margin.left - margin.right, height = 150 - margin.top - margin.bottom; // Map colors to limits var color = d3.scale.ordinal() .domain([-10,-5,0,5,10]) .range(['#a1d99b','#c7e9c0','#fdd0a2','#fdae6b','#fd8d3c','#e6550d']); // Set up the size of the chart relative to the div var x = d3.scale.linear().range([0, width]); var y = d3.scale.linear().range([height, 0]); // Define the look of the axis var xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(5); var yAxis = d3.svg.axis().scale(y).orient("left").ticks(5); // Define an area. Areas are filled with color. var area = d3.svg.area() .x(function(d) { return x(d.distance); }) .y0(height) .y1(function(d) { return y(d.elevation); }); // Define the line var valueline = d3.svg.line() .interpolate("linear") .x(function(d) { return x(d.distance); }) .y(function(d) { return y(d.elevation); }) // Set up the SVG element var svg = d3.select("#chart-container") .append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "t…
tagged with: javascript
tagged with: zooming
has comment: http://stackoverflow.com/comment/46679278
has answer: http://stackoverflow.com/a/29242492
answer count: 1
downvote count: 0
has title: D3 Zooming not working
favorite count: 0
accepted answer: http://stackoverflow.com/a/29242492
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46679203

http://stackoverflow.com/comment/46381175
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29073456
has text: Thank you for the reply but this is not working. At least my column data are not in the exported file :(
score: 0

http://stackoverflow.com/q/29190927
downvote count: 1
has comment: http://stackoverflow.com/comment/46596141
has comment: http://stackoverflow.com/comment/46596225
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46596095
tagged with: mouseover
has comment: http://stackoverflow.com/comment/46596200
has comment: http://stackoverflow.com/comment/46596130
has comment: http://stackoverflow.com/comment/46597300
has comment: http://stackoverflow.com/comment/46596105
has title: Mouseover and Mouseout not behaving as expected
has comment: http://stackoverflow.com/comment/46595996
has answer: http://stackoverflow.com/a/29191002
type: UnansweredQuestion
tagged with: mouseout
has body: Trying to use these jQuery methods to show a description on hover of the image it describes.... It will sort of work if I dont set description display to none, in which case the doc starts with all descriptions showing, but then will show and hide them (all of them) as I mouseover and mouseout. But I want the descriptions to be hidden until the first mouseover. I'm also having an issue matching the image/description hovers to each instance. I am new at OOP, but I think that would come in handy here. Anyway, any tips are appreciated! Here's my code: $('.image').mouseover(function() { $('.description').show(); }) $('.image').mouseout(function() { $('.description').hide(); }) .col-lg-3 h2 { font-size: 1.1em; color: black; font-family: 'Arial'; margin-left: .1em; font-weight: 500; display: none; } .col-lg-3 p { font-size: .9em; margin-left: .2em; margin-top: -.3em; font-weight: 400; display: none; &lt;div class="col-lg-3 project1"&gt; &lt;a class = "image" href="" target="_blank"&gt; &lt;img width="100%" height="100%" src="" alt=""&gt;&lt;/a&gt; &lt;div class = "description"&gt; &lt;h2&gt; &lt;/h2&gt; &lt;p&gt; &lt;/p&gt; &lt;/div&gt; If I want this to only work on the instances of image/description pairs, I should probably add some .this stuff too, no?
has comment: http://stackoverflow.com/comment/46596059
has answer: http://stackoverflow.com/a/29191057
tagged with: mouseevent
type: Question
score: 0
answer count: 2
upvote count: 1

http://stackoverflow.com/q/29063490
tagged with: javascript
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46366602
has comment: http://stackoverflow.com/comment/46365188
has comment: http://stackoverflow.com/comment/46368870
tagged with: recursion
answer count: 0
has comment: http://stackoverflow.com/comment/46366638
has comment: http://stackoverflow.com/comment/46363101
has body: I'm new here so sorry if dublicate. I'm trying to write a sudoku solver using backtracking method to make it pass all data dynamically into the document with its each recursion. When I tried to use setInterval() or setTimeout() it doesn't work the way I want it to work. What I need should be similar to this Here's the code: function backtrack(position) { if (position === 81) { return true; } if (sudokuArray[position] &gt; 0) { backtrack(position + 1); } else { for (var x = 1; x &lt;= 9; x++) { if (isValid(x, parseInt(position / 9), position % 9) === true) { sudokuArray[position] = x; //some code that invokes putSudokuArrayBack function with a small delay //everytime backtrack function is invoked if (backtrack(position + 1) === true) { return true; } } } sudokuArray[position] = 0; return false; } } function putSudokuArrayBack() { for (var i = 0; i &lt;= 81; i++) { var indexString = '#val-' + parseInt(i / 9) + '-' + i % 9; $(indexString).val(sudokuArray[i]); } } Any ideas(if it's even possible)? Thanks in advance!
type: Question
has title: How to create a pause in recursion function loop
linked to: http://stackoverflow.com/q/11665484

http://stackoverflow.com/comment/46451526
has text: Just running it off of nodemon thru the terminal. Updating with exact error now.
comment on: http://stackoverflow.com/q/29111096
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46567367
score: 0
has text: Thx for the additional css alternative. I'm afraid I cant rely on the content property.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29167688

http://stackoverflow.com/a/29158602
accepted answer of: http://stackoverflow.com/q/29158566
answers question: http://stackoverflow.com/q/29158566
type: AcceptedAnswer
has body: If you mean the top level domain of the site that is including the script, it should be available as: document.location.host
score: 0
type: Answer

http://stackoverflow.com/comment/46415261
has text: @RE01, jsfiddle is missing jquery like Bala said.
comment on: http://stackoverflow.com/a/29091508
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29172783
has body: I am trying to run some javascript after the data from JSON has successfully loaded so I can then manipulate my dom elements, but having trouble accomplishing this as when I run my javascript, the elements are not loaded yet. app.controller('portfolioController', function($scope, $route, $http) { $scope.contents = null; $http.get("js/json/portfolio.json").success(function(data) { $scope.contents = data; alert('alert this after all elements are loaded on dom'); }); }); &lt;ul class="projects basic" &gt; &lt;li ng-repeat="content in contents"&gt; &lt;img src="img/projects/{{ content.image }} " &gt; &lt;a class="hover" &gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;
answer count: 1
tagged with: angularjs
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29173256
accepted answer: http://stackoverflow.com/a/29173256
type: Question
has title: Run Javascript after JSON load
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/46388471
has text: `scope: {changedFlag: '='},` but you're not declaring in the HTML any `changed-flag` attribute.
score: 2
type: Comment
comment on: http://stackoverflow.com/q/29077413
type: QuestionComment

http://stackoverflow.com/q/29178474
has comment: http://stackoverflow.com/comment/46574266
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46574243
has comment: http://stackoverflow.com/comment/46574296
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46574226
has title: Why does the id of the datalist option return empty value?
has body: I've been stuck on this datalist for hours now and can't figure out why it returns empty when alerting the selected object (4000 Islands, Laos for example). Basically I want to return the 'id' attribute of the selected option in the list. jQuery: $K2 = jQuery.noConflict(); $K2('#submit').on('click',function(){ var g=$K2('#to-selected').val(); var id = $K2('#to').find('option').attr('id'); alert(id); return false; }); HTML: Test I have a feeling it has something to do with the 'All' option as after removal it works fine. Any help would be greatly appreciated! My JSFiddle can be found here. http://jsfiddle.net/x7oa7wk4/1/ Thanks guys!
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/46574325
has answer: http://stackoverflow.com/a/29178513

http://stackoverflow.com/a/29183235
has body: function getName() { var fullPath = document.getElementById("img1").src; var index = fullPath.lastIndexOf("/"); var filename = fullPath; if(index !== -1) { filename = fullPath.substring(index+1,fullPath.length); } document.getElementById("result").value = filename; }
type: Answer
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/29182283

http://stackoverflow.com/comment/46537856
has text: can you just post the content of searchData as well ?
score: 0
comment on: http://stackoverflow.com/q/29158723
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/100060965
has text: This is as bad as @MigMar answer. Undocumented. Do not use.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/31898753
type: Comment

http://stackoverflow.com/comment/46542681
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29144207
has text: hi @arkoak thanks for replying i just need to show information and have grids with pagination feature there is no updation in data is fetching from beck-end and just needed to render at front end with pagination,is there any other solution you can provide i would really appreciate that thanks allot

http://stackoverflow.com/q/29083451
has title: Submit form thru javascript
type: Question
has comment: http://stackoverflow.com/comment/46400520
tagged with: javascript
has comment: http://stackoverflow.com/comment/46400790
score: 0
has comment: http://stackoverflow.com/comment/46400196
has body: How can i submit a form when picking a date? im trying to call it on field change but its not working, maybe i have to do this in the javascript part. I have this Data Especifica: how can i do this? thanks
has comment: http://stackoverflow.com/comment/46399919
answer count: 0
has comment: http://stackoverflow.com/comment/46435825
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46400353

http://stackoverflow.com/comment/46623910
comment on: http://stackoverflow.com/q/29206632
score: 0
type: Comment
type: QuestionComment
has text: and examples for input and expected matches.

http://stackoverflow.com/q/29085210
upvote count: 1
has title: Tricky sprite movement control with JavaScript/jQuery
has body: I'm currently trying to figure out how to animate the sprite properly without the help of extra libraries other than jQuery. This is the live demo of what I have right now. Controls: A for left, D for right, Space for jump, left mouse click to fire. Here's the problem: if I press the left and right keys really fast, the animation gets screwed up, try it yourself since It's kind of hard to describe the mess... My code is very scrappy right now because I'm playing around with many methods, so please bear with me for now. Here's the JavaScript code. If you want to see the html and css, they are in the same directory. $('#obj') is the object of the sprite.
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/29085431
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: animation
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/29164962
accepted answer of: http://stackoverflow.com/q/29164577
type: Answer
has comment: http://stackoverflow.com/comment/46549318
score: 2
has comment: http://stackoverflow.com/comment/46548900
upvote count: 2
answers question: http://stackoverflow.com/q/29164577
has comment: http://stackoverflow.com/comment/46549028
has body: I think the best way is to use data attributes for both. You have one data attribute with the formatted date and one data attribute with the date you want for the backend. When a user clicks the date you simply put the formatted date into a normal input and use the value you need for the backend into a hidden field. jsfiddle HTML 13 14 15 Javascript/jQuery var date = $('.date'); var inputD = $('#dateD'); var inputF = $('#dateF'); date.on('click', function(){ var valueD = $(this).data('value'); var valueF = $(this).data('formatted'); inputD.val(valueD); inputF.val(valueF); console.log(valueD); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46549196
downvote count: 0

http://stackoverflow.com/a/29100699
has body: With jquery you want to get the value of your hidden field and set it with return value of the function that is getting the byte array like $("#string").val(functionThatReturnTheByteArray()) then you want to submit the form with the hidden field $("form[name='formName']").submit() this will submit the form with the hidden field containing your byte array. Summary $("#string").val(functionThatReturnTheByteArray()) $("form[name='formName']").submit()
score: 0
answers question: http://stackoverflow.com/q/29100559
type: Answer

http://stackoverflow.com/a/29193365
has body: See below simple solution setInterval(function(){ jQuery('.advertcont:visible:eq(0)').fadeOut(); }, 15000); Spsonsord Links Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29193123
has comment: http://stackoverflow.com/comment/46625405
downvote count: 0

http://stackoverflow.com/a/29167578
has comment: http://stackoverflow.com/comment/46560884
has comment: http://stackoverflow.com/comment/46557491
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/46557457
has body: Remove all the html on your .php file, as its role is not to be printed directly in a browser, but to treat data server-side. So, the remaining part would be : <?php echo $_POST["YTParam"]; // Will be returned to your JS if($_POST["YTParam"]) { $YTParam = $_POST["YTParam"]; echo $YTParam; // Will be returned to your JS } ?> Everything you'll echo will be returned in response, in your JS ajax call. Edit Your data is not in the $_POST array, because your angular JS contentType is set to application/json by default, and PHP expects application/x-www-form-urlencoded for a POST request. Quoting from docs : $httpProvider.defaults.headers.post: (header defaults for POST requests) Content-Type: application/json To change this, either change this value in your config : yourApp.config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; }]); Or at the time you send your request : $http({ url: 'http://myURL.com/api/', method: "POST", headers: { 'Content-Type': "application/x-www-form-urlencoded" }, data: { 'YTParam' : 'test' } }) You can set contentType directly as a property, but I'm not 100% sure of this.
upvote count: 4
answers question: http://stackoverflow.com/q/29167351
downvote count: 0

http://stackoverflow.com/q/29178661
has title: Jquery mobile script conflicting on bootstrap 3
upvote count: 1
type: Question
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/46595487
has body: Is there a way for me to use jquery mobile script without conflicting it on my bootstrap 3? My issue are my links is not working when I used Jquery mobile script but whenever I remove the script my links are working fine. I use Jquery mobile for my pop up feature. I'm a newbie on jquery and bootstrap web development, I apologize if my question seems too newbie.. Any help in my case is highly appreciated. My Page Home Contact Me Profile Web Author About
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46575766
answer count: 0
score: 1

http://stackoverflow.com/a/29199693
answers question: http://stackoverflow.com/q/29197386
type: Answer
has body: Question 1, you need to override the default option autoplay : false: $('#sb-slider').slicebox({ autoplay : true }); Question 2 is ambiguous since there is no option for this within the scope of slicebox (perhaps consider using an alternative slider framework) as this does not support IE at all:
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46615569
accepted answer of: http://stackoverflow.com/q/29197386

http://stackoverflow.com/comment/46610956
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29196193
has text: I've just constructed 3 gauges and resized them so the result looks like the one in the picture above, however that way the mouse-over is lost for all but the gauge on top...

http://stackoverflow.com/q/29098307
has body: When i try to get value from json data i getting undefined $.get( baseURL + 'vacation/show/' + name_surname, function( data ) { alert(data); // return [{"id":"1","title":"Testas","start":"2015-03-04","end":"2015-03-04"}] alert(data.start); // return undefined (should be here 2015-03-04) }); I need get only start value from data, how can i fix this?
has answer: http://stackoverflow.com/a/29098540
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46426893
type: Question
has comment: http://stackoverflow.com/comment/46426879
has comment: http://stackoverflow.com/comment/126052590
has answer: http://stackoverflow.com/a/29102409
has comment: http://stackoverflow.com/comment/46427197
tagged with: javascript
tagged with: jquery
has title: Jquery get data from JSON (undefined)
has answer: http://stackoverflow.com/a/29098402
score: 0
has answer: http://stackoverflow.com/a/29098672
has answer: http://stackoverflow.com/a/29098459
answer count: 5
type: UnansweredQuestion

http://stackoverflow.com/comment/46368921
has text: What have you tried? I'm not sure what you're trying to count. bookarrays.length will give you the elements in the array.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29066590

http://stackoverflow.com/comment/46557523
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29168634
has text: O. Sorry. You are right indeed! You can do: data: {data: collection} -> As long as your string doesn't break the JSON format...

http://stackoverflow.com/q/29106141
accepted answer: http://stackoverflow.com/a/29127770
has comment: http://stackoverflow.com/comment/46443904
answer count: 1
score: 1
has comment: http://stackoverflow.com/comment/46442552
favorite count: 0
has comment: http://stackoverflow.com/comment/46443196
has title: Problems retriving the data from tinymce textarea
upvote count: 1
has comment: http://stackoverflow.com/comment/46445628
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29127770
has comment: http://stackoverflow.com/comment/46450528
linked to: http://stackoverflow.com/q/4551834
type: Question
has body: I asked a previous question and attempted to follow the solution suggested, tinyMCE.get('.content').getContent(); but still won't retrive my data. now I have quadruple-checked my script for unwanted or misplaced charaters but all seems alright. here is my code: tinymce.init({ selector: ".content" }); var content = $('.content').val(); if(checkReady == true){ $.ajax({ type: "POST", url: "postproject.php", data: { content: content } }) .done(function( msg ) { alert( "Information, \r\n" + msg ); }); } Can anyone help me to find my lost content?
tagged with: textarea
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: tinymce

http://stackoverflow.com/a/29072889
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29072178
answers question: http://stackoverflow.com/q/29072178
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/46547163
score: 2
has comment: http://stackoverflow.com/comment/46396686
has body: You can do something like this: var data = {}, dir = __dirname + '/FILES/'; fs.readdirSync(dir).forEach(function (file) { data[file.replace(/\.json$/, '')] = require(dir + file); }); Then for example you can access a json file named config.json with data.config. You can also use require-dir module like this to do the same: var requireDir = require('require-dir'); var data = requireDir(__dirname + '/FILES/');

http://stackoverflow.com/comment/46470064
has text: add code to the question, there could be many possible solutions, some code would help
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29121784
type: Comment

http://stackoverflow.com/q/29123928
type: Question
tagged with: c#
type: AnsweredQuestion
tagged with: visualsvn
has title: Is it possible to use Windows VisualSVN repository with a MAC Client
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29141328
accepted answer: http://stackoverflow.com/a/29141328
has body: I have set up a windows VsiualSVN reporitory on my windows server. I connect to the repository using TortoiseSVN on my Windows client However a collegue has a MAC, is there a MAC SVN client that i can use to connect to the Windows VisualSVN?
tagged with: tortoisesvn

http://stackoverflow.com/q/29185270
answer count: 1
has title: Set submit button to another when clicking enter
has comment: http://stackoverflow.com/comment/46587030
tagged with: asp.net
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46586447
has comment: http://stackoverflow.com/comment/46586118
has answer: http://stackoverflow.com/a/29185503
type: Question
has comment: http://stackoverflow.com/comment/46586149
tagged with: c#
has comment: http://stackoverflow.com/comment/46586356
tagged with: javascript
score: 0
has body: I'm trying to set the submit button in an ASP.NET website to another submit button when clicking enter key on the keyboard. I've so far accomplished to do so, but problem is it still sends the second submit button too. I tried returning false in the onkeypress event in the input elements, but then it won't let me write anything to the text input boxes.. This is my javascript function: function button_click() { if (window.event.keyCode == 13) { document.getElementById("msSend").focus(); document.getElementById("msSend").click(); } } And a sample text input box: &lt;input type="text" id="msname" name="msname" runat="server" onkeypress="button_click()" /&gt;&lt;/td&gt; Any suggestions?

http://stackoverflow.com/comment/46480658
comment on: http://stackoverflow.com/a/29101488
has text: Sure you can. However, there is/was no attempt in your posted code to do that. And adding that at this point changes the question.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46464679
type: Comment
comment on: http://stackoverflow.com/a/29107139
has text: Your script works well but it does not solve the issue to get the data. I tried 'var myform = document.getElementById("formid"); var fd = new FormData(myform );' and then the $.ajax. How can I call and show the vars in the success: ?
score: 0
type: AnswerComment

http://stackoverflow.com/a/29130243
answers question: http://stackoverflow.com/q/29128518
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46504150
has comment: http://stackoverflow.com/comment/46495569
has comment: http://stackoverflow.com/comment/46488480
has body: JavaScript get (notice you have to input the file name with the extension (.txt): just change the value to val(): $(".url-input").change(function() { getText($(".url-input").val()); }); jQuery get: replace all the javascript with these few lines: $(".url-input").change(function() { $.get($(this).val(), function( data ) { $('.output').html(data); }); }); This is much better option, because the Ajax Get is an asynchronous call, so you want to update the output value on the callback. By the way, you should do some validation on that use input before you make the Ajax call. Also, to remove the need to add the ".txt" in the input change it to: $(".url-input").change(function() { $.get($(this).val()+'.txt', function( data ) { $('.output').html(data); }); });
has comment: http://stackoverflow.com/comment/46488575

http://stackoverflow.com/comment/46522920
score: 0
comment on: http://stackoverflow.com/q/29148057
type: Comment
type: QuestionComment
has text: So from your code you seem to be expecting an ajax response, but don't seem to be doing anything with it. What are you expecting to happen? What response are you getting from the server?

http://stackoverflow.com/q/29187574
has comment: http://stackoverflow.com/comment/46591596
has comment: http://stackoverflow.com/comment/46607733
type: Question
linked to: http://stackoverflow.com/q/845021
has comment: http://stackoverflow.com/comment/46610668
has comment: http://stackoverflow.com/comment/46590465
tagged with: javascript
has comment: http://stackoverflow.com/comment/46605552
accepted answer: http://stackoverflow.com/a/29208535
score: 0
has comment: http://stackoverflow.com/comment/46610281
has comment: http://stackoverflow.com/comment/46591089
has comment: http://stackoverflow.com/comment/46610502
has title: Building a webapplication: Data from my AngularJS file won't display in my HTML document
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46627133
has comment: http://stackoverflow.com/comment/46612200
has comment: http://stackoverflow.com/comment/46607158
has comment: http://stackoverflow.com/comment/46609553
has answer: http://stackoverflow.com/a/29208535
has comment: http://stackoverflow.com/comment/46608330
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46609930
has comment: http://stackoverflow.com/comment/46607872
has comment: http://stackoverflow.com/comment/46605597
has body: please help me, this code is a crucial part of a project I have to hand in and I just can't find the problem. Here is the link to the files on GitHub. https://github.com/PouncingPoodle/LibApp This application worked perfectly a few days ago on my computer at University, but when I got home, I changed only the paths that HAS to change, but now the app doesn't work anymore. Please help! So what I'm doing is: I want to show some details from the items in the database in my html document by using angularJS. It shows the "Test before" text but not the "Test after" so there must be a problem onward from the div with the ng-repeat. I checked the "book" / "books" / "info" all those names to be correct and all paths are correct. This is my html code Test before {{book.id}} {{book.genre}} {{book.title}} Test after scripts/dbcon.php Connect to the database, get the information and add to an array $results[] $app->get('/book', function () { // these details is correct on my computer $bookDBconnect = mysqli_connect("localhost","root","","lib_db"); if (mysqli_connect_errno()) { echo "Failed to connect to". mysqli_connect_error(); } $result = mysqli_query($bookDBconnect,"SELECT * FROM books"); $results = array(); while ($row = mysqli_fetch_array($result)) { $mybook = new Book; $mybook->id = $row['id']; //more fields // this echo shows the correct details //echo json_encode($mybook); $results[] = $mybook; } echo json_encode($results); mysqli_close($bookDBconnect); }); $app->run(); scripts/app.js Get all the data from the database and send it to my "info" to show in my html (function(){ var app = angular.module('lib', []); app.controller('BooksController', ["$http", function($http) { var storage = this; //this path is correct on my computer $http.get("http://localhost/OW/idvProject6/scripts/dbcon.php/book").success(function(data) { storage.info = data; }); }]); })(); Thank you guys
tagged with: web-applications
tagged with: php
linked to: http://stackoverflow.com/q/24355740
has comment: http://stackoverflow.com/comment/46609080
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46599951

http://stackoverflow.com/comment/46556798
score: 0
comment on: http://stackoverflow.com/q/29168452
has text: @JamieBarker I agree. 1 question does not define a man. He told me skills were "junior." Oh well. Thanks.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29079616
accepted answer of: http://stackoverflow.com/q/29076542
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29076542
has body: While it's not exactly a best practice, it should work for this example. The .ui-wrapper element has some CSS written directly onto it by the jQuery UI library, which sets its overflow to hidden. To allow your handle to be seen outside of the size of the canvas element, add: .ui-wrapper { overflow: visible !important; } You can see it working here: http://jsfiddle.net/ceyzbjwd/3/

http://stackoverflow.com/comment/46415849
score: 1
comment on: http://stackoverflow.com/a/29091846
type: AnswerComment
type: Comment
has text: Sorry, wrote the answer on my phone, I'll edit it now to a more complete example. Also, good to hear that helped. As for the other problem, I'm not quite sure. I'll think about it.

http://stackoverflow.com/a/29107825
answers question: http://stackoverflow.com/q/29107655
type: Answer
score: 1
has body: You could iterate through the selected items like so: &lt;script type="text/javascript"&gt; function newComic(){ var elem = document.querySelector("#genreList").selectedOptions; var arr = []; for(var x=0; x&lt;elem.length; x++){ // for the TEXT value //arr.push(elem[x].text); // for the value arr.push(elem[x].value); } var genres = arr.join(', '); window.alert(genres); } &lt;/script&gt;
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/46502833
has text: Actually i have no idea about client and server side. I have just switched from C++ . I am just added a html page and run it in browser. But could u please let me know Ho to make it work. I have to read a file and store its contnt in arrays. Is it poasible how to do that.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29139345

size
type: Tag
tags question: http://stackoverflow.com/q/29214698
tag name: size

http://stackoverflow.com/comment/46672566
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29216777
has text: i tried by placing it in custom.tpl, but no go. Here I can get success message in after posting the values from ajax / javascript, but not able to get the posted values from php side.
score: 0

http://stackoverflow.com/a/29184500
accepted answer of: http://stackoverflow.com/q/29184454
answers question: http://stackoverflow.com/q/29184454
score: 3
has body: You need to use double replace function. > var str = " foo bar " undefined > str.replace(/<\w[^>]*>/, "").replace(/<\/[^>]+>/, " ") 'foo bar ' OR Use single replace function which uses a capturing group based regex. > var str = " foo bar " > str.replace(/<(\w+\b)[^>]*>([^<>]*)<\/\1>/, '$2 ') 'foo bar ' We must back-reference (\1) to the first capturing group instead of second because the 1st itself contain the tag-name.
has comment: http://stackoverflow.com/comment/46584983
has comment: http://stackoverflow.com/comment/46584837
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46584808
has comment: http://stackoverflow.com/comment/46584870
type: Answer
has comment: http://stackoverflow.com/comment/46584858
has comment: http://stackoverflow.com/comment/114046114
upvote count: 3

http://stackoverflow.com/a/29078209
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29069259
score: 1
has body: Requested groups will fall into one of the following categories: Players who did not request a group, and (maybe) groups of size 1 (which can be treated as if they had not requested a group). Groups of size 2. Groups of size 3. Groups of size 4. Groups of size 5 or greater: these cannot be accommodated, and you will have to make a policy decision about how to deal with them. I will ignore them from here on out. The groups of size 4 can, of course, be left as-is. The groups of size 2 can be paired off with each other - if there are an odd number of such groups, you would have one group left over at the end. Groups of size 3 can be paired off with unassigned players. After this step you will have either some surplus size-3 groups or some surplus unassigned players, but not both. If you have surplus size-3 groups, you will have to just leave them as-is. If you have surplus unassigned players (and possibly one surplus size-2 group), you can collect them into groups of 4 relatively easily. In pseudocode: Count the number of players who requested each group name. This can be done in linear time by iterating over the players list and updating a dictionary/hashtable. Convert the hashtable to an array and sort it by group size. Starting at the end of the array, remove size-4 groups, which do not need to be modified. Continuing backwards through the array, for each size-3 group you find, assign its group name to an unassigned player from the beginning of the array (if one exists) and remove both from the array. If unassigned players are exhausted and there are surplus size-3 groups, remove them (they will have to be left as-is). Continuing backwards through the array, for each pair of size-2 groups you find, assign them the same group name and remove them from the array. You will now have at most one size-2 group and possibly more unassigned players. Collect them into groups of 4.
upvote count: 1

http://stackoverflow.com/comment/46632403
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29176521
type: Comment
has text: Sorry for my english. But basically the same code on Google Closure Compiler works

http://stackoverflow.com/comment/46682692
has text: I hope you are not expecting it to work in Chrome - it works fine for me in IE11 with JAWS 14
comment on: http://stackoverflow.com/a/29168723
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46578777
score: 0
comment on: http://stackoverflow.com/q/29181017
type: Comment
type: QuestionComment
has text: What is your folder structure?

http://stackoverflow.com/q/29069704
tagged with: asp.net-mvc
linked to: http://stackoverflow.com/q/8318428
has body: I'm using jquery form plugin to pass a image to my action method. I can't seem to be able to set the httppostedfilebase in the action method on my controller to the correct type of data. $('#imageform').submit(function () { var id = $('#selectedFile').data('id'); //var filename = $('#selectedFile').val(); //.files[0]; //var filename = document.getElementById('selectedFile').files[0]; //var filename = input.files[0]; var filename = $('#selectedFile').prop('files'); var options = { target: '#output', enctype: 'multipart/form-data', beforeSubmit: showRequest, success: showResponse, url: '/ManageSpaces/UploadImage', data: { id: id, image: filename[0] }, type: 'post' }; $('#imageform').ajaxSubmit(options); return false; }); Here is my controller's action method. [HttpPost] public ActionResult UploadImage(int id, HttpPostedFileBase image) { //do some stuff here return Json("Saved"); } html form data &lt;form id="imageform" enctype="multipart/form-data"&gt; &lt;input type="file" id="selectedFile" name="selectedFile" style="display: none;" data-id='@Model.YogaSpaceId' /&gt; &lt;input type="button" value="Add Photos" class="btn" id="pictureupload" /&gt; &lt;/form&gt;
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46374554
has comment: http://stackoverflow.com/comment/46374545
has answer: http://stackoverflow.com/a/29069913
has title: I can't pass my file to httppostedfilebase in action method
type: Question
has comment: http://stackoverflow.com/comment/46374719

http://stackoverflow.com/q/29150863
upvote count: 2
score: 0
has body: I am new to javacripting and Yii2 Framework. Can anyone please help me just to display a set of field values depending on the dropdown selection. For example, I have in dropdown "If you are a student or not?": Yes No If user selects Yes then display a div containing other fields to be answered. I could find answers regarding doing it in general but specifically using Yii 2 I am having problems. Thank you in advance.
has comment: http://stackoverflow.com/comment/46523916
answer count: 1
tagged with: javascript
tagged with: show
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29151334
favorite count: 0
has title: Display field set based on dropdown selection yii 2
tagged with: php
has answer: http://stackoverflow.com/a/29151334
type: AnsweredQuestion
downvote count: 2
type: Question
tagged with: yii2

http://stackoverflow.com/a/29085583
has body: You have to listen the event "bounds_changed" and then save the results on cookies. When you reeload you use those values as default for zoom and center google.maps.event.addListener(map, 'bounds_changed', (function () { var centerTobeSavedOnCookie = map.getCenter(); var zoomTobeSavedOnCookie = map.getZoom(); // save values to cookies setCookie("gmapDefaultZoom", zoomTobeSavedOnCookie, 1); setCookie("gmapDefaultCenter", centerTobeSavedOnCookie , 1); }())); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return ""; }
score: 0
has comment: http://stackoverflow.com/comment/46406173
type: Answer
answers question: http://stackoverflow.com/q/29085461

http://stackoverflow.com/a/29110818
has body: Note: Debugging Script with the Developer Tools: MSDN To enable script debugging for all instances of Internet Explorer, on the Internet Options menu, click the Advanced tab. Then, under the Browsing category, uncheck the Disable script debugging (Internet Explorer) option, and then click OK. For the changes to take effect, close all instances of Internet Explorer then reopen them again.
type: Answer
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29110663
score: 1

http://stackoverflow.com/comment/46676179
comment on: http://stackoverflow.com/a/29187413
type: Comment
has text: Thanks for the response, in my local application i have added require(['dojo/_base/lang', 'dojo/dom', 'dojo/aspect', 'dojo/domReady!']); but still its not working as expected, throwing the error : TypeError: Cannot read property 'after' of undefined. @Richard Ayotte
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46444311
comment on: http://stackoverflow.com/q/29106953
score: 0
type: Comment
has text: @JustinMaat I assume you mean in reference to ```p = p.then()``` ? Rather than ```p.then().then()```? I had problems with the latter example, the former seems to work for me? It might be pertinent to point out that promises work throughout the app as above, but not for this async function. If you think I've done something fundamentally wrong, please say! ;)
type: QuestionComment

http://stackoverflow.com/q/29136742
has title: modifying res object in express.js
has answer: http://stackoverflow.com/a/29137508
has comment: http://stackoverflow.com/comment/46499278
tagged with: middleware
answer count: 2
has comment: http://stackoverflow.com/comment/46520783
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
accepted answer: http://stackoverflow.com/a/29137508
has comment: http://stackoverflow.com/comment/46498467
has comment: http://stackoverflow.com/comment/46499296
tagged with: node.js
has answer: http://stackoverflow.com/a/29136855
has comment: http://stackoverflow.com/comment/46498367
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46520211
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/29136855
has body: I had this idea for a backend design for my SPA-website. I would implement it so that routes starting with "/api/" would return only the relevant data in JSON. all other routes would lead to a full-page load. Now my idea is to do this in middleware, as such: app.use(function(req, res, next() ){ if(req.path.split("/")[0]=="api"){ res.send = res.json; //or other custom response-function, I see many possibilities here! }else{ ... } }); app.use(routes); now, my question is, does this modify the res object globally, or just for the current request (this instance of res)? My understanding is just the current one gets modified, and as far as I can tell thats true, but node is blazingly fast, so it's kinda hard to test on my own ( one can only refresh so many tabs in a millisecond! ) anyone know for sure? Edit: A lot of the people answering my question have asked why I would want to do this. The point is to abstract what the server does for requests coming from clients with the front-end loaded, and clients who need the full page. I'm also considering the possibility of adding a route for loading partial templates, using this same method. by modifying res.send my controllers can worry about getting the data and send it of, res.send will already know if there needs to be some rendering involved. On second thought though res.send is really useful on its own, I might modify res to have res.answer or similar instead.(makes for less confusion too!)
has comment: http://stackoverflow.com/comment/46526416
type: Question
has comment: http://stackoverflow.com/comment/46517856

http://stackoverflow.com/q/29148308
tagged with: highcharts
downvote count: 0
answer count: 1
tagged with: javascript
has title: Real time chars using highcharts, JSON, REST and Spring MVC
favorite count: 0
has body: I am writing a web application to gather real time data from database(Oracle database) to plot a chart using Highcharts.js library. I am using Spring 3.0 framework to fetch the data from database. I want the charts to be updated after every 5 seconds. So this is what I have decided till now: Spring will fetch the data --> convert to JSON object --> send the JSON object to browser via REST services --> client side Highchart.js will plot the data on the chart I have written the spring mvc part which fetches data from the database but I am clueless about how to work with REST services and Highcharts. After looking online I found something called @RequestBody and @ResponseBody but no proper tutorial on how to use these. Could someone guide me with some good examples to attain my objective? This is the code currently: AdminController package com.rtc.controller; import java.util.Random; import org.json.JSONException; import org.json.JSONObject; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class AdminController { @RequestMapping("/chart") public String navigateToCharts(){ System.out.println("redirecting to real time charts"); return "rtc"; } @Async @RequestMapping(value = "/getData", method = RequestMethod.GET) public @ResponseBody String generateData(){ JSONObject jsonObject = new JSONObject(); Random random = new Random(); // sends a random value, which I will later replace from DB int value = random.nextInt(10); try { jsonObject.put("data", value); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("value sent is ="+value); return jsonObject.toString(); } } rtc.jsp (the page where i want to display my highchart) <%@ page language="java" contentType="text/h…
type: UnansweredQuestion
upvote count: 1
tagged with: spring
has comment: http://stackoverflow.com/comment/46623948
type: Question
tagged with: spring-mvc
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29165493

http://stackoverflow.com/comment/46516344
type: Comment
comment on: http://stackoverflow.com/a/29146790
has text: Good point, changed the answer, so this is just basic solution, bootstrapping could be done more nicely
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46522581
has text: I'd say unobstrusive js is the way to go. I'd prefer to see a lot of querySelectrAll in the js instead of a lot of js inside the html. It makes much more readable
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29150323
type: Comment

http://stackoverflow.com/comment/63222427
has text: Ah wow, that's way more simple! I haven't used firebase since I originally made the post, but it's good to know that for the future. Thank you!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/31439873
type: AnswerComment

http://stackoverflow.com/comment/46624828
comment on: http://stackoverflow.com/q/29206583
type: Comment
has text: Not only that u also require jQuery,jQueryUI (with datepicker and slider wigits),Timepicker widjets
score: 0
type: QuestionComment

http://stackoverflow.com/a/29211022
score: 1
has body: Try this: onEachFeature: function (feature, layer) { var popupContent = " Object's name: " + feature.properties.name; if(typeof(feature.properties.description) !== 'undefined'){ popupContent += " Object's description: " + feature.properties.description+" " } layer.bindPopup(popupContent); }
answers question: http://stackoverflow.com/q/29210828
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29210828
has comment: http://stackoverflow.com/comment/46634151
type: Answer
upvote count: 1

http://stackoverflow.com/q/29190180
answer count: 1
has title: Will recursive Javascript Objects lead to any problems (memory leaks)?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: We pass our model entities via JSON through the API and inflate them later client-side so that we can use our objects in much the same way on client and server side. The entities have the standard Hibernate bi-directional relationships. When viewing an object in the console, as you dig deeper into the object you notice that because of those relationships, you can actually just keep expanding the properties further and further seemingly without end. For example: $get.OrderItem {validations: Object, metaData: Object, $$getFormattedValue: function, data: Object, modifiedData: Object…} The above Orderitem has an Order object in its data which in turn has an Orderitem object, and on and on. Does this have real world implications (are these things much bigger than they should be or are they memory leaks), or does the object representation in the console, simply keep expanding and has the representation of each entity separately? Is it simply an illusion caused by the console?
type: Question
has answer: http://stackoverflow.com/a/29190265
tagged with: performance
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29190265
score: 0

http://stackoverflow.com/comment/46478557
type: QuestionComment
has text: And what happens if the user opens 2 or 3 different webbrowsers or with different devices? you can't control it with pure javascript. Use something like persistent websokets and check if the user is already connectet to that websocket or not.
comment on: http://stackoverflow.com/q/29125928
score: 1
type: Comment

http://stackoverflow.com/q/29163757
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46550222
has body: Watch live code http://jsfiddle.net/fo3660xe/ Code fully and upon another option I can change the text before redirect can be different from the rest of the text-button can be added and hide all the pages and shown only on the last page that immediately prior to redirect لقد تم دعوتك للدخول فى تحدى مع احد ابطالنا 1 1 1 1 لقد تم دعوتك للدخول فى تحدى مع احد ابطالنا 1 1 1 1 and jquery $("#slider1next").click(function() { var $next = $(".text:visible").hide().next('p'); $next.length ? $next.show() : window.location.replace('start.html'); });
has comment: http://stackoverflow.com/comment/46549841
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29163903
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: -1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46546881
has title: I want to make the button goes to a new page when last radio
tagged with: http-redirect
accepted answer: http://stackoverflow.com/a/29163903

http://stackoverflow.com/q/29126277
has comment: http://stackoverflow.com/comment/46479083
has body: I have the following code. function stop() { $("#login_form").submit(function(e) { return false; }); } function login() { var username = $("input[name=username]").val(); var password = $("input[name=password]").val(); if (username.length < 1) { alert("Please enter your username or email address."); stop(); } else if (username.length > 0 && username.length < 3) { alert("Your username or email is incorrect."); stop(); } else if (password.length < 1) { alert("Please enter your password."); stop(); } else if (password.length > 0 && password.length < 6) { alert("Your password is incorrect."); stop(); } else if (username.length > 2 && password.length > 5) { $("#login_form").submit(function(e) { return true; }); } } The form submits fine if I enter the correct values initially. However if "return false" is called only once then it won't submit. How can I fix this? Calling "return true" doesn't work. EDIT My html form: Username or Email Password Remember me
has comment: http://stackoverflow.com/comment/46479002
answer count: 2
has comment: http://stackoverflow.com/comment/46478794
upvote count: 0
has comment: http://stackoverflow.com/comment/46478917
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46479012
has answer: http://stackoverflow.com/a/29130713
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29126789
has comment: http://stackoverflow.com/comment/46478762
has title: Form submit doesn't work after calling return false
tagged with: forms
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46479116
has comment: http://stackoverflow.com/comment/46479076
has comment: http://stackoverflow.com/comment/46479023
has comment: http://stackoverflow.com/comment/46478863
tagged with: javascript
score: -1

http://stackoverflow.com/a/29098370
score: 0
type: Answer
has body: Urahara's answer contains some useful suggestions, but does not seem to address your question. Well, it seems that your server side code is expecting to find a json object in the body of the POST request. Why would that be? Because you specify that the content type be "application/json". So in the case of a PUT case, when you use JSON.stringify your data in the $.ajax call is a string that happens to represent a JSON object. This is passed as is and so this works. You end up sending something like {"content_type":8, "object_id":40} as the body of your POST request and your server side code is happy to process this. Not sure exactly what your server-side technology is, but presumably it also binds content_type to 8 and object_id to 40, which makes you happy :-) But when you do not use JSON.stringify to turn the object into a JSON string, you end up passing the object itself to $.ajax having it turn it into a string in the way it knows how. Well, it only knows only one: the good old url-encoding way. So the server, would still be expecting a JSON object but would instead be getting content_type=8&amp;object_id=40 as the body of the PUT request. It will not be happy. This is not a JSON object like your content-type promised! :-) Now, moving on to the case of a GET request. Here the content-type is pretty much irrelevant as the message body will be empty. If you use JSON.stringify what you pass as the request data is a weird JSON-object representing string and the monstrosity that you get as a URL http://localhost:8000/api/points/?{%22content_type%22:8,%22object_id%22:40} is as you 'd expect not very well received by the server. What the server is happy with is something like http://localhost:8000/api/points/?content_type=8&amp;object_id=40 Which is exactly what $.ajax produces when you do not use JSON.stringify but rather pass it a nice pair of attribute-value pairs. It just url-encodes them, exactly like it did in the PUT case, and the server is happy. So $.ajax alway…
answers question: http://stackoverflow.com/q/29091271

http://stackoverflow.com/comment/46551487
type: Comment
comment on: http://stackoverflow.com/q/29166367
score: 0
has text: sorry typo error..but same error in case of POST too.
type: QuestionComment

http://stackoverflow.com/a/41588813
has body: I found a workaround by using JavaScript to add/remove a class (in my case, .sr-only) instead of relying on CSS' :hover mechanism. visit root_path selector = '#jump_to_navigation' expect(page.evaluate_script('document.activeElement.id')).to eq '' # Make sure the link isn't focused yet # Initial (hidden) position expect(page.evaluate_script("$('#{selector}')[0].className")).to eq 'sr-only' # Make sure the link has sr-only class # Set focus page.evaluate_script("$('#{selector}').focus()") expect('#' + page.evaluate_script('document.activeElement.id')).to eq selector # Make sure the link is focused now # Displayed position expect(page.evaluate_script("$('#{selector}')[0].className")).to eq '' # Make sure the link doesn't have sr-only class # Remove focus page.evaluate_script("$('#{selector}').blur()") expect(page.evaluate_script('document.activeElement.id')).to eq '' # Make sure the link is focused now # Hidden position again expect(page.evaluate_script("$('#{selector}')[0].className")).to eq 'sr-only' # Make sure the link has sr-only class This seems to work. I didn't check whether this way also CSS changes are recognised by Capybara, but for my case, it's enough. Important: By the way, you should use execute_script instead of evaluate_script, as the latter one has a huge performance impact!
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29211158
type: Answer
answers question: http://stackoverflow.com/q/29211158
score: 2
downvote count: 0

http://stackoverflow.com/comment/46533816
type: QuestionComment
type: Comment
has text: Yes that is what I want to do. but i am stuck ....
comment on: http://stackoverflow.com/q/29156492
score: 0

http://stackoverflow.com/q/29208803
tagged with: inheritance
has title: JavaScript inheritance: Uncaught RangeError: Maximum call stack size exceeded
tagged with: prototype
answer count: 1
has body: In trying to port a Java app to JavaScript, I'm attempting the following inheritance technique: var grandchild = new Grandchild(); Function.prototype.extend = function(parent) { var parentPrototype = parent.prototype; this.prototype = Object.create(parentPrototype); this.prototype.superPrototype = parentPrototype; this.prototype.superConstructor = parent; this.prototype.constructor = this; } ; function Parent(){ this.doStuff(); } Parent.prototype.doStuff = function() { } ; Child.extend(Parent); function Child(){ this.superConstructor.call(this); } Child.prototype.doStuff = function() { this.superPrototype.doStuff.call(this); } Grandchild.extend(Child); function Grandchild(){ this.superConstructor.call(this); } Grandchild.prototype.doStuff = function() { this.superPrototype.doStuff.call(this); } It works to one level of inheritance (i.e. var child = new Child()) but with new Grandchild() it throws an Uncaught RangeError: Maximum call stack size exceeded because it gets stuck in infinite recursion on function Child(). What exactly is happening and why? How can I tweak this technique so it allows me to call this.superConstructor.call(this) and this.superPrototype.doStuff.call(this) as shown without hitting the infinite recursion on the immediate parent? It works when I specify the super class in the calls as follows, but I would prefer not to have to do this: function Child(){ Parent.call(this); } Child.prototype.doStuff = function() { Parent.prototype.doStuff.call(this); } function Grandchild(){ Child.call(this); } Grandchild.prototype.doStuff = function() { Child.prototype.doStuff.call(this); }
downvote count: 0
has comment: http://stackoverflow.com/comment/46627647
favorite count: 0
linked to: http://stackoverflow.com/q/20463145
has comment: http://stackoverflow.com/comment/46628207
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24699276
tagged with: prototypal-inheritance
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46627908
has answer: http://stackoverflow.com/a/42715132
tagged with: javascript

http://stackoverflow.com/comment/46387248
type: Comment
has text: Edit `dataType` to `application/csv` or remove this attribute and look for any errors in the console.
comment on: http://stackoverflow.com/a/29075184
type: AnswerComment
score: 0

http://stackoverflow.com/q/29162944
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29163877
has body: I learned I can call functions by a string representing the function name. Example here: http://www.sitepoint.com/call-javascript-function-string-without-using-eval/ My question is, how can I call the SubTest function in this case: function Test() { this.SubTest = function() { } } var functionString = 'Test.SubTest'; It doesn't work with window[functionString]. I even tried this (it's basic; just for testing) but it returns false: function GetFunction(functionName) { var functions = functionName.split('.'); if ( functions.length === 1 ) { var functionObj = window[functions[0]]; if ( typeof functionObj === 'function' ) return functionObj; return false; } else if ( functions.length &gt; 1 ) { var functionObj = window[functions[0]]; for ( var i = 1; i &lt; functions.length; i++ ) { functionObj = functionObj[functions[i]]; } if ( typeof functionObj === 'function' ) return functionObj; return false; } return false; } var functionName = 'Test.SubTest'; // from the above code example var functionObj = GetFunction(functionName); // returns false Update: Found this: How to turn a String into a javascript function call? but the getFunctionFromString still doesn't work.
type: Question
has title: JavaScript string of sub functions to actual functions
has comment: http://stackoverflow.com/comment/46545544
tagged with: function
tagged with: javascript
has answer: http://stackoverflow.com/a/29163991
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46545447
tagged with: string
possible better answer: http://stackoverflow.com/a/29163303
accepted answer: http://stackoverflow.com/a/29163991
linked to: http://stackoverflow.com/q/912596
has answer: http://stackoverflow.com/a/29163303

http://stackoverflow.com/comment/46524951
score: 1
comment on: http://stackoverflow.com/a/29151475
type: AnswerComment
has text: Well i wasn't expecting that lol, incredibly detailed, thank you
type: Comment

http://stackoverflow.com/q/29178109
type: Question
has comment: http://stackoverflow.com/comment/46573629
has body: I want to convert pure javascript to jquery, this code is about all lines containing your specified search text will be removed. Here my code: my code on jsfiddle: http://jsfiddle.net/v306rzhg/4 Search lines for: Sometimes to understand a word's meaning you need more than a definition. At Your Dictionary we try to give you all of the tools you need to really understand what the word means. Seeing the word in a sentence can provide more context and relevance.
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
score: -2
has title: Convert pure javascript to jquery
has answer: http://stackoverflow.com/a/29178139
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46573596
has comment: http://stackoverflow.com/comment/46574080
has comment: http://stackoverflow.com/comment/46573951
downvote count: 3

http://stackoverflow.com/comment/46549610
type: AnswerComment
has text: It should fail if you change your machine time/settings.
type: Comment
comment on: http://stackoverflow.com/a/29165129
score: 0

http://stackoverflow.com/comment/46583806
type: AnswerComment
comment on: http://stackoverflow.com/a/29183907
has text: I think it produce `undefined` error. `"{{ graphs }}"` should be needed.
type: Comment
score: 0

http://stackoverflow.com/a/29129670
answers question: http://stackoverflow.com/q/29124407
has body: When my app had a similar issue, I fixed it by setting the proxy's limitParam to the empty string, "", which is what the docs recommend if you don't want to send a limit parameter. It could also be a result of the store's pageSize.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46504782
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29124407
score: 1

http://stackoverflow.com/q/29183618
has comment: http://stackoverflow.com/comment/46586634
has comment: http://stackoverflow.com/comment/54041678
has comment: http://stackoverflow.com/comment/54057651
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46588362
has comment: http://stackoverflow.com/comment/53730757
upvote count: 4
linked to: http://stackoverflow.com/q/21120909
has title: How to get the full URL from a Kendo UI DataSource?
has body: I'm using Kendo UI Grid in my Javascript project. And I need to export my data in excel format, and what I need is getting the same URL which is made by dataSource object and add ?format=excel to it. Sometimes I must export to excel without the grid at all so I want to use the DataSource object to generate the URL and avoiding build it in kendo way manually. But the problem is that I'm not able to get the full URL with sort and filter params from dataSource object.
has comment: http://stackoverflow.com/comment/46585977
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
tagged with: kendo-ui
has comment: http://stackoverflow.com/comment/46588151
has comment: http://stackoverflow.com/comment/46586712

http://stackoverflow.com/q/29103001
has comment: http://stackoverflow.com/comment/46437115
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46437233
linked to: http://stackoverflow.com/q/18488385
has body: I am a newbie to d3js and I am currently plotting some multiple line chart graphs. One thing I want to do is to add a legend for each line. I figured out that I can add some text and I can also give the text some color, which is same as the line's color. However, I would like to add some line representation in front of the text. For example, Legend in Multi line chart - d3 as we can see here, the legend starts with a colored rectangle + text, and I want it a line (dashed line for example) rather than rectangle in front of the text. Is there anyone can help me with this? Thanks a lot!
has comment: http://stackoverflow.com/comment/46436827
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46436463
has title: d3 legend (text + line representation)
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46450112
tagged with: javascript

http://stackoverflow.com/a/29066272
answers question: http://stackoverflow.com/q/29063666
type: Answer
has body: $time is a PHP variable, but you're trying to use it in a Javascript context. You need to indicate that you want $time to be evaluated on the server side by PHP, so you have to wrap it in PHP tags. This is how your line would look like: var timejson = &lt;?php echo $time ?&gt;;
score: 0

http://stackoverflow.com/a/30609041
type: Answer
has body: how's this for a handlebars template? then the js would use the slider name to identify it to the backend: $('[data-slider]').on('change', function (event) { var element = this;//could use `event.target` instead of `this`. var $element = $(element); var name = $element.data('slider'); var sliderIndex = $('[data-slider="' + name + '"]').index(element);//in case multiple sliders have the same name // use name, sliderIndex, and $element.val() as you wish });
answers question: http://stackoverflow.com/q/29179839
score: 0

http://stackoverflow.com/comment/46461666
has text: Please show your server side thml data... i think your problem in server side
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29115726

http://stackoverflow.com/q/29203622
linked to: http://stackoverflow.com/q/14227331
has body: I have been using Google Analytics for basic analytics for my web app - just tracking page impressions using javascript calls like this: ga('create', 'UA-XXXXXXXXX-1', 'mydomain.com');ga('send', 'pageview') This approach has always frustrated me because I couldn't reliably capture some server-side events. I have just discovered I can use Measurement Protocol to record events server-side. Recording the events on my server looks easy, except regarding the cid (clientid) parameter... What I understand is that on the browser, with the javascript I currently have the cid gets randomly created and then stored in the _ga cookie. I also understand that I should share that clientid/cid value between client ('page view') and server (other events) calls for the same client so that they are correlated together. This StackOverflow link was a helpful reference for me. Question is: should I Create a clientid on the server and then share it with the client; or Should I let the javascript on the client create the clientid and then try to share it with my server? (I suspect this is the better answer) For (1), what I was thinking I could do is: Store a UUID in the session on the server (which is google app engine) Directly use that UUID when I use Measurement Protocol to create events directly server-side Use the same UUID when I create a ga object on a page using jsp: ga('create', 'UA-XXXXXXXXX-1', 'mydomain.com', {'clientId': '&lt;%=[value from the session]%&gt;'}); The thing that worries me about this approach is that the ID will only persist across the session on the server. I think the intent of the clientId (cid) is that it persists for the client over an extended period... So I think I will lose track of who is new versus returning user? For (2), frankly I don't know how to do this... I know from the above StackOverflow link that I can get the cid out of the clientId parameters in the ga object. I don't know how I would then send it back to my server (this is probably a simple …
downvote count: 0
has title: Sharing Google Analytics ClientID between javascript client and java server
type: Question
tagged with: google-analytics
type: AnsweredQuestion
score: 7
tagged with: java
has answer: http://stackoverflow.com/a/33545732
accepted answer: http://stackoverflow.com/a/33545732
tagged with: measurement-protocol
upvote count: 7
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/46522028
comment on: http://stackoverflow.com/q/29118835
score: 0
type: Comment
type: QuestionComment
has text: For anyone else looking at this, in Mongo 2.* they seem to change what is returned from certain methods, like findAsync now seems to return some huge models rather than the documents which I was getting before, so this issue is a half way house between having to migrate logic and having to promisify it correctly.

http://stackoverflow.com/q/29088374
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46409782
has comment: http://stackoverflow.com/comment/46409659
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46409795
score: -2
has comment: http://stackoverflow.com/comment/46409849
downvote count: 2
has comment: http://stackoverflow.com/comment/46411771
has body: I have some html code like this, &lt;form action="abc.html" method="post"&gt; &lt;div id = "result"&gt; &lt;input type="hidden" value="1" name="banner"&gt; &lt;/div&gt; &lt;/form&gt; Then I get some Jquery code to replace the content in this div, var temp = "&lt;input type='hidden' value='1' name='banner'&gt;" $(".result").html(temp); Then I submit the form and I find there are two values in form.banner, form.banner=1,1 Do I wrong? Or I have to use something to clear the data first then use html()? Thanks a lot!
has answer: http://stackoverflow.com/a/29088468
has comment: http://stackoverflow.com/comment/46409623
type: Question
has title: Does html() really replace html code?
has comment: http://stackoverflow.com/comment/46409608
has answer: http://stackoverflow.com/a/29088433
has comment: http://stackoverflow.com/comment/46444752
has comment: http://stackoverflow.com/comment/46409755
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46409684
has comment: http://stackoverflow.com/comment/46418892

http://stackoverflow.com/comment/46642953
score: 4
type: QuestionComment
type: Comment
has text: Don't trigger the init on page load?
comment on: http://stackoverflow.com/q/29216868

http://stackoverflow.com/a/29149784
has comment: http://stackoverflow.com/comment/46556443
has comment: http://stackoverflow.com/comment/46521681
has comment: http://stackoverflow.com/comment/46554532
has comment: http://stackoverflow.com/comment/46527761
has comment: http://stackoverflow.com/comment/46525169
has body: You can use also both apply and call when binding to the button func.call(null, 5); '5 is just an example, give whatever param you want or func.apply(null, [5]); By 'binding' i mean onclick="func[3].call(...)" in html or $(someobject).click(function(){ func[3].call(...) }). A fiddle especially for my good buddy Lye Fish http://jsfiddle.net/d96ev3c8/8/ who's going to argue some more.
has comment: http://stackoverflow.com/comment/46525351
score: -1
has comment: http://stackoverflow.com/comment/46525454
has comment: http://stackoverflow.com/comment/46524423
answers question: http://stackoverflow.com/q/29149632
has comment: http://stackoverflow.com/comment/46526139
has comment: http://stackoverflow.com/comment/46523118
upvote count: 0
has comment: http://stackoverflow.com/comment/46527806
has comment: http://stackoverflow.com/comment/46522014
has comment: http://stackoverflow.com/comment/46525744
has comment: http://stackoverflow.com/comment/46542986
has comment: http://stackoverflow.com/comment/46527905
type: Answer
has comment: http://stackoverflow.com/comment/46521715
has comment: http://stackoverflow.com/comment/46527706
has comment: http://stackoverflow.com/comment/46521801
has comment: http://stackoverflow.com/comment/46525419
has comment: http://stackoverflow.com/comment/46527863
has comment: http://stackoverflow.com/comment/46525022
has comment: http://stackoverflow.com/comment/46524611
has comment: http://stackoverflow.com/comment/46522112
downvote count: 1

http://stackoverflow.com/a/29077197
answers question: http://stackoverflow.com/q/29076748
has body: Try this formData = { param1: $("#param1").val(), param2: $("#param2").val() } $.ajax({ type: "POST", url: "http://example.com/create.php", data: formData, dataType: "json", success: function(data) { alert("Add success"); }, error: function() { alert("Add failure"); } });
type: Answer
score: 0

http://stackoverflow.com/comment/46478258
comment on: http://stackoverflow.com/q/29125741
score: 0
type: Comment
type: QuestionComment
has text: Check your javascript console, see what's actually being send to your php script. Does $_POST['id'] have a value? Is the query returning anything with that value?

http://stackoverflow.com/comment/46425948
comment on: http://stackoverflow.com/a/29097261
type: Comment
has text: It's not about having an answer 'marked better', but I was just asking genuine questions (and am not the downvoter of your answer, by the way). Because he has posted a snippet of his HTML structure and not the full page, you can assume he does not have more `.single-sz` elements that are outside of the ` ` container. Also, in case you revenge down-voted my answer, I'd be grateful of some explanation.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29128003
has comment: http://stackoverflow.com/comment/46482296
has comment: http://stackoverflow.com/comment/46483023
has title: Reference Error: function is not defined (javascript/html)
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46484481
has comment: http://stackoverflow.com/comment/46487829
type: Question
has comment: http://stackoverflow.com/comment/46487432
has comment: http://stackoverflow.com/comment/46482020
has body: Edit: Ok, here's an update, I don't what I just did but for some reason it now works on my website. Right now my website has a total of 5 html files, all sharing the same javascript file. Can anyone explain why some pages include the script and some don't? I don't know what the exact problem is but it appears that in some cases, the javascript code will only work on 2 of the 5 pages. I have been trying to find a solution to this problem to the point where I nearly changed the structure of my javascript code and now I'm frustrated. I have tried so many methods to best of my knowledge and it just won't budge. Maybe I missed something but I'm sure that the syntax is correct, but it's still showing this error when I execute the script on the website. Here's are pieces of the code, the button is on the bottom of the HTML code. function validate() { var firstName = document.getElementById("fname").value; if (firstName.length === 0) { alert("You must fill out this field: First Name"); throw new Error("You must fill out this field: First Name"); } else if (!firstName.match(/\s*[A-Za-z]+[-]*[A-Za-z]*/)) { alert("Invalid format"); throw new Error("Invalid format"); } } Rent Online User Registration Home Owners Tenants Rent User Registration 1. First Name: 2. Last Name: 3. Are you an Owner or a Tenant? Owner Tenant 4. Phone Number: 5. Email: 6. Login ID: 7. Password: 8. Confirm Password: Submit
tagged with: javascript
has comment: http://stackoverflow.com/comment/46484694
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46487572

http://stackoverflow.com/q/29214824
has comment: http://stackoverflow.com/comment/46639190
has comment: http://stackoverflow.com/comment/46639101
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29215102
has comment: http://stackoverflow.com/comment/46639362
has comment: http://stackoverflow.com/comment/46639742
type: Question
has body: This an array ARRAY = ["A","B","C","D","E"]; var mlength = ARRAY.length; Depending on mlength the length of DATES must be declared. Here the length is 5. Hence the array DATES must be var DATES = [[], [], [], [], []]; similarly if array ARRAY length is 3 then var DATES = [[], [], []] This is static declaration. How do I declare it based upon the array ARRAY length?
answer count: 2
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/29215349
has comment: http://stackoverflow.com/comment/46639577
has answer: http://stackoverflow.com/a/29215349
has comment: http://stackoverflow.com/comment/46639834
has answer: http://stackoverflow.com/a/29215102
has comment: http://stackoverflow.com/comment/46639564
has title: declare dynamic array based on dynamic variables in jquery
tagged with: multidimensional-array

http://stackoverflow.com/q/29166640
has comment: http://stackoverflow.com/comment/46554289
has title: Object property being read as undefined even though the object lists it as set
score: 0
has body: I have a JS Widget that is used to work out the closest location to a users current location from a list (using lat/long). First of all I use the _create() method tries to set the users location by calling setLocation() method, and then after that there is a check to see if the coordinates were successfully set before continuing. Here is the setLocation() method, which generates no errors but doesn't result in my proceeding beyond the aforementioned check (if(typeof(this.coords) != 'undefined')) - /** * Set the users current loction (latitude and longitude) */ setLocation : function(){ var t = this; // This object if(navigator.geolocation){ // Ensure that the users location is available navigator.geolocation.getCurrentPosition(function(position){ // Set the users current location within this object t.coords = { latitude: position.coords.latitude, longitude: position.coords.longitude }; }); } }, // getLocation The curious thing however is that when I console.log(this), this.coords is correctly set as an object. However, console.log(this.coords) results in undefined being output. Is anyone able to help me understand why this behavior is occurring? I've listed my full code in this pastebin, and as an example here is how your could test the code - $('#closest').closest({ stations: new Array( { "name": "Exeter St David's", "code": "EXD", "link": "neveryoumindEXD.html", "latitude": "50.729342", "longitude": "-3.543290" }, { "name": "Swindon (Wilts)", "code": "SWI", "link": "neveryoumindSWI.html", "latitude": "51.566828", "longitude": "-1.785450" } ) });
tagged with: jquery-widget-factory
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46552137
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
type: Question

http://stackoverflow.com/a/29104321
has comment: http://stackoverflow.com/comment/46438755
has body: Don't use div use a span insert: function(data){ return '' + '[' + data.name + '] '+data.id+' ' + ''; }
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46438921
has comment: http://stackoverflow.com/comment/46438601
type: Answer
has comment: http://stackoverflow.com/comment/46438790
has comment: http://stackoverflow.com/comment/46438854
accepted answer of: http://stackoverflow.com/q/29104228
answers question: http://stackoverflow.com/q/29104228

http://stackoverflow.com/q/29191039
type: Question
accepted answer: http://stackoverflow.com/a/29247836
tagged with: javascript
tagged with: bootstrap-typeahead
answer count: 2
downvote count: 0
has title: Has anyone else run into problems styling Twitter Typeahead's searchbar?
score: 1
has answer: http://stackoverflow.com/a/29324737
favorite count: 0
tagged with: ruby
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29247836
possible better answer: http://stackoverflow.com/a/29324737
tagged with: ruby-on-rails
type: AnsweredQuestion
upvote count: 1
has body: I'm having an incredibly difficult time styling Twitter Typeahead's search bar. Adding the Typeahead javascript seems to add three new classes to my search bar, .twitter-typeahead, .tt-hint, and .tt-input, which each behave in different, bizarre ways. First, the background of the search bar was set to transparent after I added Typeahead, even though I had set it to white with a different class, so I had to add a white background wrapper, which contains all three new classes. Giving .typeahead width: 100%; height:100%; border-radius: 20px;fits it to the border-radius and height of the wrapper, but it's about 50px shorter than the wrapper. .tt-input fits the height and width perfectly, but it's apparently what is making the background transparent, because the about 50px of discrepancy between .tt-input and .twitter-typeahead is the color of the background, not the white wrapper. Finally, .tt-hint obeys only the color. It's white, but it doesn't respond when I try to set the border-radius, height, or width. If explicitly setting the attributes of these classes doesn't appear to work to style them, I have to conclude that there are other classes in play that I can't find. That, or there's a bug in Typeahead's code. Has anyone run into anything like this?? Does anyone know why the three classes might not be responding to the css? I'm at my wit's end.

http://stackoverflow.com/q/29164092
favorite count: 0
has answer: http://stackoverflow.com/a/29178491
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29178491
has body: I am working on an undirected graph in d3. When I click a node, I want to display its data in a separate div (class: info) outside the svg. However, I can't figure out how to place the data from node to the div. var node = svg.selectAll(".node") .data(graph.nodes) .enter().append("circle") .attr("class", "node") .attr("r", 5) .style("fill", function(d) { return color(d.group); }) .call(force.drag) .on("click", function(d){ d3.selectAll(".node").attr('r', 5) .style("fill", function(d) { return color(d.group); }) .style("stroke","none"); d3.select(this).attr('r', 25) .style("fill","lightcoral") .style("stroke","red"); d3.select("#info").text(/* TEXT */); }); I tried: I've tried d3.select("#info").text(function(d){return d.text;});. However, if I have understood correctly, d would refer to the data from the current selection. So, with this, there is no data inside d3.select("#info") since the current selection is the div #info. I also tried getting binding function(d){return d.text;} to a variable, and passing that variable to text(). However, Javascript does not pass by value; it's the same scenario as #1. I've read about creating an object just for the text. I think I have overlooked something here. Is there an elegant way to show the data from the node to a div outside the svg?
has title: On click, display other data in separate div in d3.js; Passing by value
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46547352

http://stackoverflow.com/comment/46457470
comment on: http://stackoverflow.com/a/29090097
has text: Right but this piece should be universal imo. Another people who read this topic could copy-paste this code and have some redundant errors. ;-) Thanks!
score: 0
type: AnswerComment
type: Comment

google-polyline
tags question: http://stackoverflow.com/q/29182835
type: Tag
tags question: http://stackoverflow.com/q/29115278
tag name: google-polyline

http://stackoverflow.com/q/29106063
answer count: 3
has body: I am currently applying a css class based on the sum of 2 nth childs height for example if height of 2nd child + height of 3rd child equals x add specific class. This is my javascript to calculate - $(function() { var fl = $('ul img:nth-child(3n+3)').height(); var fr = $('ul img:nth-child(3n+4)').height(); var result = fl += fr; if (result == 1092) { $('ul img:nth-child(3n+3)').addClass('style1a'); $('ul img:nth-child(3n+4)').addClass('style1b'); } else if (result == 2460) { $('ul img:nth-child(3n+3)').addClass('style2a'); $('ul img:nth-child(3n+4)').addClass('style2b'); } else if (result == 1776) { $('ul img:nth-child(3n+3)').addClass('style3a'); $('ul img:nth-child(3n+4)').addClass('style3b'); } }); This almost works perfectly, it calculates the height of THE FIRST ITERATION OF 3n+3 and 3n+4 and applies a style to all 3n+3. However, i need to alter my javascript to calculate the height of EVERY ITERATION of 3n+3 and 3n+4 rather than just the first iteration and then apply the style. SUM of li(3)+li(4) add style, SUM of li(6)+li(7) add style. Thanks in advance!
tagged with: javascript
has comment: http://stackoverflow.com/comment/46443117
accepted answer: http://stackoverflow.com/a/29106712
has comment: http://stackoverflow.com/comment/46442309
tagged with: css
has answer: http://stackoverflow.com/a/29106539
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29106434
has comment: http://stackoverflow.com/comment/46442243
has answer: http://stackoverflow.com/a/29106434
has title: Javascript styling nth child
type: Question
has answer: http://stackoverflow.com/a/29106712
has comment: http://stackoverflow.com/comment/46442450
has comment: http://stackoverflow.com/comment/46442111
score: 0

http://stackoverflow.com/a/29127905
has comment: http://stackoverflow.com/comment/46481816
type: Answer
has comment: http://stackoverflow.com/comment/46482481
has comment: http://stackoverflow.com/comment/46481944
score: 1
answers question: http://stackoverflow.com/q/29127468
has body: I think that you need the ng-repeat directive. Try something like this: Docs: https://docs.angularjs.org/api/ng/directive/ngRepeat You don't need an if block to add a closing
has comment: http://stackoverflow.com/comment/46482023
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29178401
answer count: 2
tagged with: javascript
tagged with: jquery
has title: How do i do this with hover effect with javascript/jquery?
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29178561
has body: So i am slightly new to JS and jQuery, but i know html and css very well. I want to know if this is possible to do. I have some HTML code for a nav in an info area. I have it all set up and I have it so it calls a function on mouseover, this function turns the color of the link to white. And for mouseout it turns it black again. Now I know you can probably do this with css but I need the practice for Js/jQuery. I wrote some code and it works and all but instead it colors all the colors white and it blends in, test the code and you will see. Is there a way to only choose the selected button and color only that one. maybe with an array or something?? I dont really need to know if there is a way to do it with css, i just need to get into the habit of using js/jQuery. Code: function colorLink() { $(".infoNav nav ul li a").css("color", "white"); } function colorLinkOut() { $(".infoNav nav ul li a").css("color", "black"); } * { margin: 0px; padding: 0px; } .header-wrap { position: fixed; } .fixed { position: fixed; top: 0; left: 0; width: 100%; background-color: transparent; } body { background: #CCC; width: 70%; margin-left: 20%; margin-top: 0px; height: 900px; } .mainHeader { padding: 0; background: #666; height: 36px; width: 100%; border-radius: 5px; position: relative; top: 150px; left: -70px; box-shadow: 10px 10px 10px #767373; } .mainHeader nav ul li { display: inline-block; list-style: none; margin: 10px 0px 0px -30px; margin-left: 15px; position: relative; top: -128px; left: 10px; } .mainHeader nav ul li a { text-decoration: none; border-radius: 3px; color: white; padding: 7px 20px 10px 20px; margin-right: -15px; font-family: 'Eras ITC'; } .mainHeader nav ul li a:hover { background: #f18529; } .mainHeader nav ul .active { background: #f18529; } .mainInfo { background: white; height: 500px; width: 100%; position: relative; top: 200px; left: -70px; border-radius: 5px; box-shadow: 10px 10px 10px #727272; } .mainInfo .miInfo p { font-family: Arial; padding: 10px 10px …
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29178528
type: Question

http://stackoverflow.com/q/29150920
upvote count: 0
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/46523723
score: -1
has title: How to create two image output boxes in HTML?
has body: http://postimg.org/image/7jsmjfchh/ Hi Everyone, I am trying to create a rock paper scissors game with javascript and i need to make an HTML design like the one displayed in the picture. I would like help or advice on how to create the two boxes in the middle of the page that will be used to display images of rock paper or scissors. This is the HTML code that I have done. Project 1- Sample Solution Game ROCK PAPER SCISSORS PLAY PLAYER COMPUTER YOUR WINS: MY WINS: DRAWS: NEW GAME Thank you.
has answer: http://stackoverflow.com/a/29151736
type: Question
has comment: http://stackoverflow.com/comment/46524110
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46524274
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29188057
has body: I have this small HTML page: Untitled Document text here And it changes the font size of the element with the id p, but I want it to change the font size for all the text on the page; even the ones not enclosed in a p tag. More exactly, I want it to do something like *{} does in CSS.
upvote count: 2
has comment: http://stackoverflow.com/comment/46591531
type: Question
type: AnsweredQuestion
downvote count: 3
score: -1
has answer: http://stackoverflow.com/a/29188414
has title: Set font size for an entire page using JavaScript
has comment: http://stackoverflow.com/comment/46591612
has comment: http://stackoverflow.com/comment/46591491
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46591674
has comment: http://stackoverflow.com/comment/46591414
accepted answer: http://stackoverflow.com/a/29188414

http://stackoverflow.com/q/29149409
tagged with: checkbox
has title: Cannot update score
has answer: http://stackoverflow.com/a/29149763
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46523651
has comment: http://stackoverflow.com/comment/46523761
type: Question
has comment: http://stackoverflow.com/comment/46523113
has comment: http://stackoverflow.com/comment/46524295
has body: I was trying to make a content score as a class assignment. Assume : (The user sees a URL and then select the checkboxes that are assigned to issues . Each issue is assigned a score in a array.) Whats working : Individual checks are registered with their respective scores being displayed Whats not working : Can someone help me to update the score ( as the user checks the checkbox or unchecks). I am assuming in future if i want to increase the issues I will be able to do that since it is in an array. (am i right) (my week 4 in JS) //Set up an array with the respective score var code = new Array(); code["v1"] = 1; code["v2"] = 2; code["v3"] = 3; code["v4"] = 5; // As the user selects the checkbox I want to keep on adding the score and as the user unchecks I want to recalculate and display. function getvalueScore() { var score = 0; //Get a reference to the form var theForm = document.forms["contentForm"]; //Get a reference to the score from the "ContentForm" var contentScore = theForm.elements["contentScore"]; // loop through each check box for (var i = 0; i < contentScore.length; i++) { //if the radio button is checked if (contentScore[i].checked) { // I want to calculate and keep updating the score score = code[contentScore[i].value]; } } //return score return score; } function calculateTotal() { //calculation for final score var scoreCard = getvalueScore(); //display the result var divobj = document.getElementById('totalPrice'); divobj.style.display = 'block'; divobj.innerHTML = "Your Content Score is " + scoreCard; } function hideTotal() { var divobj = document.getElementById('totalPrice'); divobj.style.display = 'none'; } Content Score Content Score Please select the issues you see on the page to calculate the content score No content value Mediocre content value Obsolete content Irrelevant content
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29149763
has comment: http://stackoverflow.com/comment/46524186
has comment: http://stackoverflow.com/comment/46523126
score: 0
tagged with: arrays
answer count: 1
has comment: http://stackoverflow.com/comment/46520938

http://stackoverflow.com/comment/46572745
type: Comment
comment on: http://stackoverflow.com/q/29177331
has text: I recommend looking into jQuery selectors. A good understanding of how to work with selectors creates a solid knowledge base to help you write code that manipulates the DOM. Documentation here: http://api.jquery.com/category/selectors/
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46616885
type: Comment
type: QuestionComment
has text: "this doesn't work" is not an error. Give us inputs, expected outputs, and actual outputs.
comment on: http://stackoverflow.com/q/29202056
score: 0

http://stackoverflow.com/a/29178490
accepted answer of: http://stackoverflow.com/q/29178467
upvote count: 3
has comment: http://stackoverflow.com/comment/46586456
answers question: http://stackoverflow.com/q/29178467
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
has body: You could use a function as second argument in String.prototype.replace(). var str = "ABCDE-----FGABC--"; var code = str.replace(/-/g, function() { return Math.floor(Math.random() * (max - min + 1)) + min; });

http://stackoverflow.com/comment/46504869
has text: Check http://imgur.com/FQXe08P for how I found it. Its all there in the chrome dev tools... Trick is to emulate focus event by selecting at the top :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29140210
score: 1

css-selectors
tags question: http://stackoverflow.com/q/29152372
tags question: http://stackoverflow.com/q/29120822
tags question: http://stackoverflow.com/q/29105062
tags question: http://stackoverflow.com/q/29187210
tags question: http://stackoverflow.com/q/29101299
tag name: css-selectors
tags question: http://stackoverflow.com/q/29089467
type: Tag

http://stackoverflow.com/q/29188167
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46592277
score: 0
has comment: http://stackoverflow.com/comment/46637896
tagged with: validation
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46591374
has title: How can i overcome an error validating an image input field
answer count: 0
type: UnansweredQuestion
has body: I am close to completing a task but are stuck on validating 3 fields so at least one field has a value. The first and last fields validate fine. The problem is the type=file input, as the validation doesn't like file[] as the field name. How can I validate the type=file input? Here is my code - text image video splat! you submit you agree to piggy's terms 0%

http://stackoverflow.com/a/29206161
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29206089
score: 2
downvote count: 0
has body: Here is a solution: $(".sel").on("change", function(){ var selected = []; $(".sel").each(function() { selected.push($(this).val()); }); $("#output").val(selected.join(", ")); }); Please check the updated JSFiddle

http://stackoverflow.com/comment/46375774
comment on: http://stackoverflow.com/a/29070403
score: 0
type: Comment
has text: Thank you very much. Quick and helpful
type: AnswerComment

http://stackoverflow.com/comment/46413913
type: Comment
comment on: http://stackoverflow.com/q/29075564
type: QuestionComment
has text: First off, you cannot disable EMIE through JavaScript. Second, when you right-click the page and check properties, what zone is the page loading in? If not Internet, then you need to either disable the compatibility setting that automatically loads intranet pages into compatibility view or you need to add a mark of the web to load the page in the Internet zone.
score: 0

http://stackoverflow.com/comment/46575994
type: QuestionComment
type: Comment
has text: What config.url returning you?
comment on: http://stackoverflow.com/q/29179503
score: 0

http://stackoverflow.com/q/29148592
duplicate of: http://stackoverflow.com/q/14220321
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17684153
has comment: http://stackoverflow.com/comment/46519552
accepted answer: http://stackoverflow.com/a/29148637
has comment: http://stackoverflow.com/comment/46520116
type: Question
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46520180
has title: How to access data outside of 'then'
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/29148637
tagged with: angularjs
has body: I have a piece of code that I only seem to be able to access inside of then. I would like to get access to it outside so that I can use it in other places. $scope.model = {'first_name':'','last_name':'','email':'',}; djangoAuth.profile().then(function(data){ $scope.model = data; console.log($scope.model); //this prints the data }); console.log($scope.model); //this prints empty data The profile code is like this: 'profile': function(){ return this.request({ 'method': "GET", 'url': "/user/" }); }

http://stackoverflow.com/q/29114122
upvote count: 1
has body: I want to unformat number in specific currency format to convert it in plain number. E.g.: If user enters value 11,000.50 in USD, convert it in plain number (without comma) 11000.50 If user enters value "1 450 789,32" in ZAR (south african Rand), convert it in plain number(without space) "1450789.32". South Africa officially uses a decimal comma, with a space as thousands separators. In same way, I want to format number with specific currency format to display back to user. E.g.: Convert number "1450789.32" back to south african ran (ZAR) to display it as "1 450 789,32" Convert Value in UK Format 1100.123 to display it as 1,100.123
answer count: 1
has answer: http://stackoverflow.com/a/29115159
has comment: http://stackoverflow.com/comment/46458771
favorite count: 0
tagged with: currency
has comment: http://stackoverflow.com/comment/46459815
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46458121
downvote count: 0
score: 1
tagged with: currency-formatting
type: Question
has title: Java script plugin to convert number into currency format specific to culture and unformat number with specific currency format into plain number
has comment: http://stackoverflow.com/comment/46459260
tagged with: javascript

http://stackoverflow.com/comment/46463279
score: 0
type: AnswerComment
has text: Item is just a variable name I could call it dinosaurs and it would work :)
type: Comment
comment on: http://stackoverflow.com/a/29117413

http://stackoverflow.com/a/29177969
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46574269
has comment: http://stackoverflow.com/comment/46584588
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29177333
has comment: http://stackoverflow.com/comment/46573915
has comment: http://stackoverflow.com/comment/46574106
answers question: http://stackoverflow.com/q/29177333
upvote count: 2
has body: Create a service, called highlightService for instance: myModule.factory('highlightService', function() { var highlighted = []; var toggleHighlight = function(tag) { var index = highlighted.indexOf(tag); if(index &gt; -1) { highlighted.splice(index, 1); } else{ highlighted.push(tag); } } return { highlighted: highlighted, highlight: highlight } }); Inject the service into your controller, then assign a local scope variable to it: $scope.highlightService = highlightService; Then in your html: &lt;div ng-repeat="tags in highlightService.highlighted"&gt; &lt;div ng-click="highlightService.highlight(tag)&gt;&lt;/div&gt; &lt;/div&gt; Both controllers will contain a reference to the same object, so they will see each other's changes on that object during angular's $digest cycle, and everything will be updated appropriately. Alternatively you could make a filter available in the service, repeat over a local array of tags with the filter from the provided service. EDIT: Here is an example of how to do that: myApp.controller('highlightService', [function() { var highlightedIDs = []; var isHighlighted = function(tag) { if(var index = highlightedIDs.indexOf(tag.id) &gt; -1) { return index; } else { return false; } } var highlight = function(tag) { var index = isHighlighted(tag.id); if(index) { highlightedIDs.splice(index, 1); } else { highlightedIDs.push(tag.id); } } return { isHighlighted: isHighlighted, highlight: hilight } }]).filter('highlighted', ['highlightService', function(highlightService) { return function(input) { if(highlightService.isHighlighted(input) { return input; } else { return false; } }; }]); Use both the service and filter in your HTML as appropriate.

http://stackoverflow.com/a/29088175
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29073283
answers question: http://stackoverflow.com/q/29073283
type: Answer
has body: Turns out what was going on was hoisting. Somewhere in my code there was something along these lines // This condition was never being met as it contained code to check if I'm // in a node.js environment. if (thisConditionIsNotTrue){ // But because there's no 'var' before Promise it's being hoisted and // setting my global Promise variable to undefined. Even though if the // require statement was actually run it would throw an error as it // doesn't exist in the browser. Promise = require("node-promise").Sj; }
score: 0

http://stackoverflow.com/comment/46474139
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29116564
has text: This one more picture of my code from right click on page and "Check the element" : http://postimg.org/image/u8rec19el/ When Tag is open the etc. Please check on picture
score: 0

http://stackoverflow.com/comment/46451284
score: 0
has text: Yeah sorry not very clear. By retrieve, I mean cycle through them pretty much like what @dustmouse said and then put them in to the Angular template. I have seen the ng-repeat, but i'm very new to Angular and API's.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29110945

http://stackoverflow.com/q/29111778
accepted answer: http://stackoverflow.com/a/29113029
answer count: 1
tagged with: angularjs
has body: I am using highcharts-ng within an angular app, I need to run a function when the xAxis labels are clicked see below the categories and labels I am adding to the chart. Currently I can add an onclick to the label and alert but am not able to get this to work with angular. return "&lt;a onclick='alert(1)'&gt;" + this.value + "&lt;/a&gt;"; http://pablojim.github.io/highcharts-ng/ Working example of current code here. http://jsfiddle.net/3gLr4vcu/
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29113029
type: Question
tagged with: javascript
tagged with: highcharts-ng
score: 0
has title: Add ng-click to highcharts-ng column chart xAxis labels

websocket
tags question: http://stackoverflow.com/q/29065139
tags question: http://stackoverflow.com/q/29157807
tags question: http://stackoverflow.com/q/29067725
tags question: http://stackoverflow.com/q/29164107
tags question: http://stackoverflow.com/q/29193578
tags question: http://stackoverflow.com/q/29099915
type: Tag
tags question: http://stackoverflow.com/q/29091693
tags question: http://stackoverflow.com/q/29186154
tag name: websocket
tags question: http://stackoverflow.com/q/29187122
tags question: http://stackoverflow.com/q/29120216
tags question: http://stackoverflow.com/q/29092228

http://stackoverflow.com/comment/46502975
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29139498
has text: @Ghost Rider :-) I wanted to pass that all in single $id.

http://stackoverflow.com/comment/46574645
type: QuestionComment
has text: When you tried the two dimensional array, was it an array of the computed values, instead of the elements? If you made it of the elements, then I would think it would work for you. You would compute the values when you are iterating through the array, not while you are building the array..
comment on: http://stackoverflow.com/q/29178106
score: 0
type: Comment

http://stackoverflow.com/comment/46380805
type: QuestionComment
has text: What's the error are you facing? Place error function and verify what's the error `error:function(x,h,r){ ...}`
score: 0
comment on: http://stackoverflow.com/q/29073351
type: Comment

http://stackoverflow.com/comment/46413969
has text: http://jsfiddle.net/arunpjohny/772d7aza/3/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29090869
type: QuestionComment

http://stackoverflow.com/q/29091764
tagged with: javascript
has comment: http://stackoverflow.com/comment/46415657
has comment: http://stackoverflow.com/comment/46415723
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/29091973
has body: Here is the codepen I'm trying to get working: http://codepen.io/Bounasser-Abdelwahab/pen/ruiky Here is the head of my index.html file in my Brackets project: When I try to run this, it runs about 90% correctly, but it's not a complete match. The menu is misaligned, and I can see bullet points that weren't there before, and the padding is all wrong. How can I get a complete replication of the codepen code into my own project? Edit: here is an image of how mine is coming out: https://i.sstatic.net/nNglE.png Edit 2: Here is my slightly modified HTML. Problem is persisting. item 2 item 3 sub item 1 sub item 2 sub item 3 google yahoo! jQuery sub sub item 1 sub sub item 2 sub sub sub item 1 sub sub sub item 2 sub sub sub item 3 sub item 1 sub item 2 sub item 3 sub sub item 3 sub sub item 4 sub sub item 5 item a little longer item 4 item 5
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29091923
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: When step am I missing from moving a premade code from Codepen into my Brackets project?
has answer: http://stackoverflow.com/a/29091923
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46415663
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29091973
has comment: http://stackoverflow.com/comment/46415576
type: Question
has comment: http://stackoverflow.com/comment/46415550

http://stackoverflow.com/a/29105598
accepted answer of: http://stackoverflow.com/q/29103488
has comment: http://stackoverflow.com/comment/46493734
has comment: http://stackoverflow.com/comment/46443363
answers question: http://stackoverflow.com/q/29103488
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46474871
has comment: http://stackoverflow.com/comment/46441722
has body: You can use fancybox In this page you can see a lot of examples. There are several iframe examples. javascript code $("#various5").fancybox({ 'width' : '75%', 'height' : '75%', 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); HTML code Iframe (75% width and height) You load fancybox library and initialize fancybox object. When you click in your link with iframe url href the popup shows iframe content
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46637941
score: 1
has text: Can you create a plnkr/fiddle?
comment on: http://stackoverflow.com/q/29153623
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29089289
has comment: http://stackoverflow.com/comment/46411783
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29089237
type: Answer
has comment: http://stackoverflow.com/comment/46411457
answers question: http://stackoverflow.com/q/29089237
has comment: http://stackoverflow.com/comment/46425649
has comment: http://stackoverflow.com/comment/46411549
downvote count: 0
has comment: http://stackoverflow.com/comment/46420135
has body: To get selected options you should use jQuery :selected selector this way: $('#go').on('click', function(){ var city = $('#cities option:selected').text(); var state = $('#states option:selected').text(); var newLocation = 'http://' + state + '.' + city + '.domain.com'; // window.location = newLocation; alert(newLocation); }); Acre Rio de Janeiro São Paulo Tocantis Queimados Volta Redonda Nova Iguaçú Go
score: 1

http://stackoverflow.com/comment/46578624
score: 1
comment on: http://stackoverflow.com/a/29181028
type: AnswerComment
has text: The tail-recursive variant is nice. I would just avoid it because it needlessly creates new arrays with every step.
type: Comment

indexeddb
tags question: http://stackoverflow.com/q/29152166
type: Tag
tag name: indexeddb
tags question: http://stackoverflow.com/q/29186422
tags question: http://stackoverflow.com/q/29103115

http://stackoverflow.com/comment/46569030
type: Comment
has text: Hello Gregory. I am not restricted to SVG, so if you have a simpler alternative that could do the work I will be happy to try it :)
comment on: http://stackoverflow.com/a/29175078
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46616040
comment on: http://stackoverflow.com/q/29202049
has text: You have an **odd** number of curly brackets.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29203289
tagged with: javascript
has answer: http://stackoverflow.com/a/30528239
has body: I'm following the standard practice of organizing my angular assets by feature; e.g. AngularJS Folder Structure and AngularJS Best Practices: Directory Structure. Which file should I put my module / dependency declaration in? I'm trying to solve the following problems: I'd like to be able to sort my &lt;script&gt; references alphabetically for maintenance reasons, but I can't because that breaks my Angular bootstrap (for some modules). I've tried keeping them in the alphabetically-first *.js file in the module, but I spend a lot of time as my app grows moving my dependency declarations around. I often have to hunt around to find module declarations. I end up staring at Angular's relatively uninformative module error too often for related reasons. Regardless, attaching the module declaration to a specific controller seems to imply a direct correlation that doesn't exist. Here's an example: metric/ _module.js // Should I create this file? detail-controller.js detail.html search-filter.js selector-controller.js selector-directive.js selector.html Currently, for this module, that line of code exists in one of my module's controllers, you guess which one! ;) As a possible solution that I'm not entirely happy with, should I put each module definition in its own tiny, one-line file? angular.module('metric', ['lib', 'ngSanitize', 'ui.select', 'data']); How do you do this? Am I missing some other clever or obvious solution? p.s. as a related problem, if you feel like it, how do to track which components of your module are the source(s) of the dependency?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/30528156
possible better answer: http://stackoverflow.com/a/30528239
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/18542353
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/30528156
has title: Where to specify module dependencies?
tagged with: dependency-injection

http://stackoverflow.com/q/29181406
type: UnansweredQuestion
tagged with: nanogallery
upvote count: 1
score: 1
has body: I know this has been asked before but the answers given did not work for me and my scenario is in any case slightly different. I am just starting to evaluate nanoGallery, which looks good for my requirement which is to run a slideshow of inline image references. But I simply want to run the slideshow from a link rather than having to display a set of thumbnails and then clicking/tapping on one to actually start the slideshow. Which doesn't seem to me to be a particularly unusual requirement, especially for a very large slideshow where the set of thumbnails would occupy far too much space on the screen. My HTML is simply: run slide show ... So I have tried: $(document).ready(function () { $("#startlink").click(function (e) { $("#nanoGallery").nanoGallery({ slideshowAutoStart: true, ... }); $("#first").trigger("click"); }); }); I have tried various alternatives, including placing the script block at the end of body rather than in head, simply doing click() rather than trigger("click"), referencing $("#nanoGallery").children()[0] rather than $("#first"), and so on. I have even tried the createEvent/dispatchEvent approach as suggested elsewhere. But all I ever get is the row of (in my case empty as I have not supplied thumbnail images) thumbnail blocks which I still have to click on to start the slideshow. So it is possible that nanoGallery uses a different event or events rather than click? Has anyone actually got this to work with nanoGallery? I have also seen a suggestion to use 'deep linking' using a hash value in the URL to identify the gallery/album in question, but I have no idea how to generate or determine this value and it may be that this only works with an online image repository such as Picasa. Jon
type: Question
has title: how to autostart nanoGallery from a link
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46580817
answer count: 0

http://stackoverflow.com/q/29202966
has comment: http://stackoverflow.com/comment/46631157
has answer: http://stackoverflow.com/a/29382315
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46641461
answer count: 1
has title: Is there a JavaScript spy/mock/stub library that doesn't use eval?
has comment: http://stackoverflow.com/comment/46649068
tagged with: firefox-os
tagged with: unit-testing
has body: I have an HTML5 app that targets Firefox OS, among others. Packaged apps in Firefox OS can't use eval. (A CSP of default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline' is in force and can't be relaxed.) My app does not itself use eval, but the spy/mock/stub libraries I know of, such as Sinon, do. So my unit tests that use a spy, mock or stub fail when running under Firefox OS. (They succeed in a regular browser.) Obviously, I could manually create spies, mocks and stubs, but I'd rather not re-invent the wheel. Is there a JavaScript spy/mock/stub library that doesn't use eval?
tagged with: bdd
tagged with: javascript
type: UnansweredQuestion
tagged with: tdd
has comment: http://stackoverflow.com/comment/46617694

http://stackoverflow.com/a/29157354
has comment: http://stackoverflow.com/comment/46544312
upvote count: 9
has body: Yes, it apparently is. This syntax was included to cater for browsers that do not support JavaScript, to avoid them rendering the code inside &lt;script&gt; tags. This was more important in the early days of the Web, when a large proportion of browsers did not support JavaScript. Both &lt;!-- and --&gt; delimit single line comments. &lt;!-- this is treated as a single line comment --&gt; and this is treated as a single line comment So you can write your script tags using the following syntax: &lt;script&gt; &lt;!-- console.log('this is my code') --&gt; &lt;/script&gt; Note that the Wikipedia page on JavaScript syntax does not mention this.
score: 9
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29157298
type: Answer
accepted answer of: http://stackoverflow.com/q/29157298
has comment: http://stackoverflow.com/comment/46535920
has comment: http://stackoverflow.com/comment/46543718

http://stackoverflow.com/q/29088048
has title: What is diference?
has comment: http://stackoverflow.com/comment/46409101
has comment: http://stackoverflow.com/comment/46409552
has body: I am a begginer in javascript, so i just need theoretical explanation. What's mean ; behind } and why I must put it there? When i work in PHP I don't need to put ; after function {} like in this case. var orangeCost = function(price) { var quantity = 5; console.log(quantity * price); }; orangeCost(5); I just want to know is this code good or not because I can't get a desired result in this case: var orangeCost = function(price) { var quantity = 5; console.log(quantity * price); } orangeCost(5);
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/444080
has comment: http://stackoverflow.com/comment/46484732
has answer: http://stackoverflow.com/a/29088243
has comment: http://stackoverflow.com/comment/46409123
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46484525
tagged with: javascript
has answer: http://stackoverflow.com/a/29088073
duplicate of: http://stackoverflow.com/q/444080
score: 0

http://stackoverflow.com/q/29124435
tagged with: decode
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46475261
has comment: http://stackoverflow.com/comment/46475112
tagged with: encode
possible better answer: http://stackoverflow.com/a/29125345
tagged with: python
type: AnsweredQuestion
has title: How do I parse json keys into json objects
tagged with: http://stackoverflow.com/tag/json
has body: So I'm having this issue where I'm trying to convert something such as [0]['question']: "what is 2+2", [0]['answers'][0]: "21", [0]['answers'][1]: "312", [0]['answers'][2]: "4" into an actual formated json object like so [ { 'question': 'what is 2+2', 'answers': ["21", "312", "4"] } ] but I'm not too sure what approach to take to make this work. I'm planning on parsing the key-values in the first snipped through javascript and decode it into a json object like in the second snippet through python. Have you got any idea on how to do this? I'd accept an example in pretty much any language as it shouldn't be much of a worry to read the concept behind them.
has answer: http://stackoverflow.com/a/29124940
accepted answer: http://stackoverflow.com/a/29124940
has comment: http://stackoverflow.com/comment/46475300
type: Question
has answer: http://stackoverflow.com/a/29125345
tagged with: javascript
has comment: http://stackoverflow.com/comment/46475092

http://stackoverflow.com/a/29181127
answers question: http://stackoverflow.com/q/29180992
type: Answer
has comment: http://stackoverflow.com/comment/46594527
score: 0
has body: try this one.. DEMO $('#click').click(function(){ var total = $(':radio:checked').length; alert(total); }); clcik next and check it in jsfiddle demo.

http://stackoverflow.com/comment/46579104
has text: http://stackoverflow.com/questions/29181389/fill-textbox-when-click-a-button-according-to-dropdown-selection-in-php-jqery take a look on this link i put my whole codings here.Thanks
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29179948

http://stackoverflow.com/comment/46503496
score: 0
type: QuestionComment
has text: And one more problem that I identified with resourceURL is URL having some length limit. So it will make problem when data is huge..
comment on: http://stackoverflow.com/q/29139704
type: Comment

http://stackoverflow.com/a/29132104
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29132059
has body: Think this should work: if (typeof jQuery('#correct-sound').get(0).currentTime !== 'undefined') { jQuery('#correct-sound').get(0).currentTime = 0; }

http://stackoverflow.com/comment/46498047
comment on: http://stackoverflow.com/a/29135735
has text: You could also call `setMainPage` method inside the controller.
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/comment/46481316
type: Comment
comment on: http://stackoverflow.com/q/29127509
has text: i found somethin similar http://stackoverflow.com/questions/22929862/jquery-containsregex
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46600866
has text: Yes, that works, but now i have no chance to count all results, I'm wondering, how transform code, to have 5 results and also have possibility to show number of all results in other place.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29185319

http://stackoverflow.com/comment/55746018
comment on: http://stackoverflow.com/q/29175877
has text: Looking for a similar answer, except for javascript client side (no node). Meanwhile, here's an answer to your problem, @boris: http://stackoverflow.com/questions/24153996/is-there-a-limit-on-the-size-of-a-string-in-json-with-node-js
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46601954
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73516/discussion-between-arkantos-and-c-had1990).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29194084

http://stackoverflow.com/q/29075286
accepted answer: http://stackoverflow.com/a/29075444
type: AnsweredQuestion
has body: We have a facts page on our website with the following code: Fun Fact #1 Fun Fact #2 Fun Fact #3 Fun Fact #4 Fun Fact #5 Fun Fact #6 <?php $lang_code = icl_object_id(15,'page', true, ICL_LANGUAGE_CODE); ?> <?php the_field( "fact_1", $lang_code ); ?> <?php the_field( "fact_1", $lang_code); ?> <?php the_field( "fact_2", $lang_code ); ?> <?php the_field( "fact_3", $lang_code ); ?> <?php the_field( "fact_4", $lang_code ); ?> <?php the_field( "fact_5", $lang_code ); ?> <?php the_field( "fact_6", $lang_code ); ?> What we would like to do is to make it a timed event. So that the facts change every 5 seconds, but still has the click funtion as it has now. Does anyone know a way to do this?
has answer: http://stackoverflow.com/a/29075444
possible better answer: http://stackoverflow.com/a/29075474
type: Question
has comment: http://stackoverflow.com/comment/46384185
has answer: http://stackoverflow.com/a/29075474
answer count: 2
tagged with: javascript
tagged with: jquery
upvote count: 1
has title: jQuery Timer for click event
downvote count: 4
favorite count: 0
tagged with: timed
score: -3

http://stackoverflow.com/q/29082521
type: Question
tagged with: javascript
score: 0
tagged with: jquery-events
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29082610
type: UnansweredQuestion
has body: I have the following JavaScript function: $('div[id^="event"]').each(function( index ) { fullID = $(this).attr('id'); object = $(this); idOnly = fullID.replace( /^\D+/g, ''); var jqxhr = $.ajax({ type: 'POST', url: '/welcome', data: { 'lat': lat, 'lon': lon , 'eventID': idOnly }, success: function(msg){ object.show(); } }); }); What I want this piece of code to do is the following : For each div id which has an ID which starts with event, get the number portion of the div element id (for example one could have an id of 'event39410') - so get the '39410' piece - send that along with two variables to an AJAX service - and when the response comes back, show the div with id 'event39410'. The ajax component works fine - the problem is however, that if i have 10 of these event tags, I get 10 ajax calls to my backend, but I only ever get the last 'event' div shown - which suggests that by the time the success function gets called the object is always referencing the last entry in the loop. Can somebody help me to fix this variable scoping issue?
has title: JavaScript function variable scoping issue

http://stackoverflow.com/comment/46376061
type: Comment
has text: why're you nesting click events? any specific reason? Also read about event bubbling and event capturing in jQuery. You'll get a fair idea as to what is happening.
type: QuestionComment
comment on: http://stackoverflow.com/q/29070494
score: 0

http://stackoverflow.com/q/29090036
tagged with: socket.io
type: Question
possible better answer: http://stackoverflow.com/a/29090075
has answer: http://stackoverflow.com/a/29090174
tagged with: javascript
has title: What does mean "Server(srv:http#Server, opts:Object)" in socket.io api doc?
answer count: 2
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/736120
has body: Mentioning above, I want to know about the meaning of special character in socket.io api document, link below. https://github.com/Automattic/socket.io#serversrvhttpserver-optsobject At that document, some title use #, :, srv, and I can't understand what they mean. Another question is, does anybody know about tutorial or guidance post of socket.io? The official document has only few examples and the explanation is insufficient to me. Thanks.
accepted answer: http://stackoverflow.com/a/29090174
tagged with: node.js
type: AnsweredQuestion
score: 2
linked to: http://stackoverflow.com/q/2587896
upvote count: 2
has answer: http://stackoverflow.com/a/29090075

http://stackoverflow.com/comment/46457935
comment on: http://stackoverflow.com/q/29114657
score: 0
type: Comment
type: QuestionComment
has text: check [this](http://stackoverflow.com/questions/4249353/jquery-scroll-to-bottom-of-the-page)

http://stackoverflow.com/comment/46566611
type: AnswerComment
type: Comment
has text: works perfectly my bad, there was a syntax error , thanks a lot !
comment on: http://stackoverflow.com/a/29172695
score: 0

asp.net
tags question: http://stackoverflow.com/q/29100260
tags question: http://stackoverflow.com/q/29175741
tags question: http://stackoverflow.com/q/29150358
tags question: http://stackoverflow.com/q/29076425
tags question: http://stackoverflow.com/q/29194621
tags question: http://stackoverflow.com/q/29204497
tags question: http://stackoverflow.com/q/29097234
tags question: http://stackoverflow.com/q/29145559
tags question: http://stackoverflow.com/q/29069760
tags question: http://stackoverflow.com/q/29062839
tags question: http://stackoverflow.com/q/29123721
tags question: http://stackoverflow.com/q/29122975
tags question: http://stackoverflow.com/q/29204215
tags question: http://stackoverflow.com/q/29105718
tags question: http://stackoverflow.com/q/29179001
tags question: http://stackoverflow.com/q/29125092
tags question: http://stackoverflow.com/q/29211435
tags question: http://stackoverflow.com/q/29191327
tags question: http://stackoverflow.com/q/29095976
tags question: http://stackoverflow.com/q/29083290
tags question: http://stackoverflow.com/q/29095355
tags question: http://stackoverflow.com/q/29203928
tags question: http://stackoverflow.com/q/29073515
tags question: http://stackoverflow.com/q/29139296
tags question: http://stackoverflow.com/q/29141521
tags question: http://stackoverflow.com/q/29062821
tags question: http://stackoverflow.com/q/29185270
tags question: http://stackoverflow.com/q/29163091
tags question: http://stackoverflow.com/q/29103020
tags question: http://stackoverflow.com/q/29064030
tags question: http://stackoverflow.com/q/29070203
tags question: http://stackoverflow.com/q/29160400
tags question: http://stackoverflow.com/q/29121055
tags question: http://stackoverflow.com/q/29106324
tags question: http://stackoverflow.com/q/29186210
tags question: http://stackoverflow.com/q/29196999
tags question: http://stackoverflow.com/q/29179469
tags question: http://stackoverflow.com/q/29178117
tags question: http://stackoverflow.com/q/29064814
tags question: http://stackoverflow.com/q/29103933
tags question: http://stackoverflow.com/q/29170719
tags question: http://stackoverflow.com/q/29216002
tags question: http://stackoverflow.com/q/29063142
tags question: http://stackoverflow.com/q/29077966
tags question: http://stackoverflow.com/q/29116582
tags question: http://stackoverflow.com/q/29131310
tags question: http://stackoverflow.com/q/29201964
tags question: http://stackoverflow.com/q/29137794
tags question: http://stackoverflow.com/q/29085090
tags question: http://stackoverflow.com/q/29193939
type: Tag
tags question: http://stackoverflow.com/q/29099243
tags question: http://stackoverflow.com/q/29158986
tags question: http://stackoverflow.com/q/29204698
tags question: http://stackoverflow.com/q/29163907
tags question: http://stackoverflow.com/q/29136333
tags question: http://stackoverflow.com/q/29110816
tags question: http://stackoverflow.com/q/29125552
tags question: http://stackoverflow.com/q/29161549
tags question: http://stackoverflow.com/q/29164404
tags question: http://stackoverflow.com/q/29153759
tags question: http://stackoverflow.com/q/29179285
tags question: http://stackoverflow.com/q/29138372
tags question: http://stackoverflow.com/q/29103792
tags question: http://stackoverflow.com/q/29091490
tags question: http://stackoverflow.com/q/29073474
tags question: http://stackoverflow.com/q/29117068
tags question: http://stackoverflow.com/q/29115021
tags question: http://stackoverflow.com/q/29204732
tags question: http://stackoverflow.com/q/29096426
tags question: http://stackoverflow.com/q/29179087
tags question: http://stackoverflow.com/q/29077877
tags question: http://stackoverflow.com/q/29146155
tags question: http://stackoverflow.com/q/29173245
tags question: http://stackoverflow.com/q/29127575
tags question: http://stackoverflow.com/q/29093368
tags question: http://stackoverflow.com/q/29107783
tags question: http://stackoverflow.com/q/29196143
tags question: http://stackoverflow.com/q/29170961
tags question: http://stackoverflow.com/q/29098558

http://stackoverflow.com/comment/46626249
score: 0
comment on: http://stackoverflow.com/a/29198455
type: AnswerComment
has text: @Vinz, not sure if you got notified of my comment.
type: Comment

http://stackoverflow.com/comment/46513791
comment on: http://stackoverflow.com/q/29145548
has text: Sure, and that's fine, I could focus #new which is visible. But what event can trigger that focus?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46465835
has text: Remove the dot before the name of the class : `$('#removeArrow').removeClass('acc_head')`
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29119414

http://stackoverflow.com/a/29214744
has body: You should read $http documentation. Simply get your data with $http.get() then treats the way you need. $http.get('http://maricoih.e21designs.com/services/productionhourlyscopra').then( function (data) { console.log('data retrieved', data); //Your code here }, function (error) { console.error(error); });
type: Answer
answers question: http://stackoverflow.com/q/29214276
score: 0

http://stackoverflow.com/comment/46593516
type: Comment
has text: @fgb Yes, that's what the OP found out already. The JDK bug report doesn't mention JavaScript but a 2-days difference between JRE6 and JRE7.
comment on: http://stackoverflow.com/a/29188933
type: AnswerComment
score: 0

http://stackoverflow.com/q/29108430
has answer: http://stackoverflow.com/a/29112717
downvote count: 0
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/33943954
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29132772
tagged with: casperjs
type: UnansweredQuestion
upvote count: 1
has body: I try to call an external function in SpookyJS by doing the same thing than in the wiki: https://github.com/WaterfallEngineering/SpookyJS/wiki/Introduction But when I try the following code, I have this error: ReferenceError: Can't find variable: test try { var Spooky = require('spooky'); } catch (e) { var Spooky = require('../lib/spooky'); } var urls = ["http://www.google.fr", "http://www.yahoo.com" ]; exports.clicker = function(req, res) { console.log("FIRST: " + visitUrl + " \n\n\n END FIRST"); var visitUrl = function(urlIndex, nbClicked) { console.log("HELLO"); }; var spooky = new Spooky( { child: { // transport: 'http' }, casper: { logLevel: 'debug', verbose: true } }, function (err) { if (err) { e = new Error('Failed to initialize SpookyJS'); e.details = err; throw e; } spooky.start(urls[0]); console.log("SECOND: " + visitUrl + " \n\n\n END SECOND"); spooky.then([{ test: visitUrl }, function(){ console.log("THIRD: " + test + " \n\n\n END THIRD"); }]); spooky.run(); }); // Uncomment this block to see all of the things Casper has to say. // There are a lot. // He has opinions. spooky.on('console', function (line) { console.log(line); }); spooky.on('hello', function (greeting) { console.log(greeting); }); spooky.on('log', function (log) { if (log.space === 'remote') { console.log(log.message.replace(/ \- .*/, '')); } }); } These two following logs work: console.log("FIRST: " + visitUrl + " \n\n\n END FIRST"); console.log("SECOND: " + visitUrl + " \n\n\n END SECOND"); But the third one is responsible for the error message: console.log("THIRD: " + test + " \n\n\n END THIRD"); Any suggestion?
tagged with: node.js
has title: ReferenceError: Can't find variable with SpookyJS
tagged with: spookyjs
tagged with: phantomjs
type: Question

http://stackoverflow.com/a/29088354
score: 0
has comment: http://stackoverflow.com/comment/46409526
answers question: http://stackoverflow.com/q/29088290
has body: This satifies your requirements. You just need to use quotes around your selector and call hide instead of remove. Works with all versions of jQuery available on the Google jQuery CDN (1.2.3 - 2.1.1) $(document).ready(function() { // You can replace 'hide' with 'remove' if you want it purged from the DOM. $('.inner:empty').parent().hide(); }); Hello World
has comment: http://stackoverflow.com/comment/46409549
type: Answer

http://stackoverflow.com/q/29099762
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has title: Retrieve saved value and bind it to ng-model
type: Question
has answer: http://stackoverflow.com/a/29101075
tagged with: javascript
has body: I bind users' input with ng-model in the view like this &lt;input ng-model="car"&gt; and in my controller I have $scope.car to get the value and store it somewhere. In my case I store it into localstorage, but how to get the saved value from localstorage and set it to $scope.car? I tried var settingFrmStorage = $localstorage.getObject('vehicles'); $scope.car = settingFrmStorage[0].type.car; but I don't see any value in my input. I console.log(settingFrmStorage[0].type.car;) I can see the value is there.
score: 0
has comment: http://stackoverflow.com/comment/46429869

http://stackoverflow.com/comment/46565506
score: 2
has text: Please show your full code.
comment on: http://stackoverflow.com/q/29173813
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46362277
comment on: http://stackoverflow.com/q/29062679
has text: and also, if your template is only HTML, why use `_.template` at all? Just pass the HTML string to `append`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29085792
has comment: http://stackoverflow.com/comment/46410009
has answer: http://stackoverflow.com/a/29086478
tagged with: javascript
has comment: http://stackoverflow.com/comment/46405942
has comment: http://stackoverflow.com/comment/46407136
score: 0
has title: Create pop-up thank you message on form submit
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46406439
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46406318
has comment: http://stackoverflow.com/comment/46404501
has comment: http://stackoverflow.com/comment/46406399
has body: I just added an e-mail sign-up form to a landing page and it works fine (using firebase as back-end btw). However, I'd like to either redirect to a "thankyou.html" page or have a pop-up thank you message appear upon submit. How can I make it work? I know this is probably pretty easy, but I'm a novice. Here's the code I'm using. Included this script in html: ` var signupForm = document.getElementById('signup-form'); var signupSuccess = document.getElementById('signup-success'); var signupError = document.getElementById('signup-error'); var signupBtn = document.getElementById('signup-button'); var onSignupComplete = function(error) { signupBtn.disabled = false; if (error) { signupError.innerHTML = 'Sorry. Could not signup.'; } else { signupSuccess.innerHTML = 'Thanks for signing up!'; // hide the form signupForm.style.display = 'none'; } }; function signup(formObj) { // Store emails to firebase var myFirebaseRef = new Firebase("https://crowdfluttr.firebaseio.com/signups"); myFirebaseRef.push({ email: formObj.email.value, }, onSignupComplete); signupBtn.disabled = true; return false; } ` Also in Html: Request Early Access Any help appreciated!
type: Question

http://stackoverflow.com/q/29151754
has title: How can I compile an IIFE JSX file?
has answer: http://stackoverflow.com/a/29152408
type: Question
tagged with: reactjs
tagged with: javascript
score: 0
tagged with: iife
answer count: 1
type: UnansweredQuestion
has body: I have been having trouble compiling a JSX file. A minimal example of my JSX file is a test.jsx: (function() { })(); I run: &gt; jsx --output test.js test.jsx And I get the following error message: [test.jsx:1:0] expected keyword: class interface mixin abstract final native __fake__ __export__ (function() ^ JSX is: &gt; jsx --version 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) What is the proper JSX wrapper (or other appropriate modification for an IIFE) for a JSX file? Thanks,

http://stackoverflow.com/comment/46671134
score: 0
type: Comment
type: QuestionComment
has text: Can you please specify with an image what output you would expect from this?
comment on: http://stackoverflow.com/q/29147510

http://stackoverflow.com/comment/46499233
score: 0
has text: So you know how to call one JavaScript function – `alert` – correctly “from within PHP”, but you are not able to transfer that knowledge to calling another JS function? And btw., you don’t need to use JavaScript for this in the first place – instead you could simply _not_ output the `style="display:none;"` attribute on the form, by checking whether or not a password was send right there and then in PHP.
comment on: http://stackoverflow.com/q/29136152
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29171498
type: Question
has title: JavaScript Run function only if its the last time its being called
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46561574
answer count: 1
downvote count: 0
has body: I have an issue using a Javascript function to update a bootstrap spinner, in general it works fine, the issue comes when i do multiple clicks, i use ajax to update the quantity of the products selected for the cart. If i click just once in the button it works good, but if click multiple times to increase the quantity by 10 then the function is executed 10 times and that generates 10 responses. It's kinda annoying. This is the function: var contador = 0; function UPDATE_SUM(cant,modo,precio,prod_id,inv_id,lim){ var canti = document.getElementById(cant).value; var quantity = canti; if(modo == "up"){ var cantidad = parseInt(canti) + 1; if (cantidad > 0 && cantidad <= lim){ quantity = cantidad; document.getElementById(cant).value = quantity; x.request('r:ajax/u.php?cant='+cantidad+'&id='+prod_id+'&inv='+inv_id+'; rl:resp'); } }else if(modo == "down"){ var cantidad = parseInt(canti) - 1; if (cantidad > 0){ quantity = cantidad; document.getElementById(cant).value = quantity; x.request('r:ajax/u.php?cant='+cantidad+'&id='+prod_id+'&inv='+inv_id+'; rl:resp'); } } console.log("UPDATE_SUM "+contador); var precio = parseFloat(precio); var sub_total = precio*quantity; contador++; setTimeout(function(){ updtQty(prod_id,sub_total,quantity); },1000); calcSeguro(); calcTurcoSafe(); var envio = document.getElementById('inpenvio'); var turcosafe = document.getElementById('inpturcosafe'); var seguro = document.getElementById('inpseguro'); TOTALIZAR(envio,turcosafe,seguro); } function updtQty(id,sub_total,qty){ contador--; console.log("updtQty "+contador); if(contador == 0){ $("#resp").fadeIn().delay(5000).fadeOut(); document.getElementById('sub_total'+id).innerHTML = 'Bs. '+decimales(sub_total,2); document.getElementById('subt'+id).value = sub_total; } } This is the handler: Any help will be appreciated
score: 1
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29171874
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29171874
has comment: http://stackoverflow.com/comment/46562479
upvote count: 1

http://stackoverflow.com/q/29186419
has comment: http://stackoverflow.com/comment/46588079
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/29186679
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29186583
has title: get innerHTML but input and textarea are all empty
score: -1
type: Question
has body: I have a form with input and textarea fields. How can I get the div.innerHTML with the completed fields var foo = $('#div').innerHTML all fine, but the fields are empty
has answer: http://stackoverflow.com/a/29186986
downvote count: 1

http://stackoverflow.com/comment/46459544
score: 0
comment on: http://stackoverflow.com/q/29110300
type: Comment
type: QuestionComment
has text: @arun-p-johny something like that, I have chamged the html side blease check it now jsfiddle.net/kb0rjypx/4

http://stackoverflow.com/comment/46555816
score: 0
type: Comment
type: QuestionComment
has text: yes offcourse this is not the problem
comment on: http://stackoverflow.com/q/29165149

http://stackoverflow.com/comment/46465160
type: QuestionComment
comment on: http://stackoverflow.com/q/29118239
score: 0
has text: @JohnIdol I already saw that question and the answers do not answer this question. But it did answer my other question.
type: Comment

http://stackoverflow.com/comment/46554902
has text: Required reading: http://learn.jquery.com/performance/
comment on: http://stackoverflow.com/q/29167254
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/46385760
has text: Try [this solution](http://stackoverflow.com/a/8888498/4583548) I found in similiar question
comment on: http://stackoverflow.com/q/29076016
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46563474
type: Comment
has text: Why are you not using escape sequence ?
comment on: http://stackoverflow.com/q/29172633
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46621019
comment on: http://stackoverflow.com/q/29195506
type: QuestionComment
score: 0
has text: browser hung happens(mostly) if your are trying to bind a data via ajax call with `async` option set `false` other than this it should work fine .
type: Comment

http://stackoverflow.com/comment/46475984
type: Comment
has text: Is there any way to make the razor view use js syntax instead of html?
comment on: http://stackoverflow.com/a/29108889
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46499185
has text: Have you included meta tag
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29137317
type: Comment

http://stackoverflow.com/comment/46641181
comment on: http://stackoverflow.com/q/29215718
type: Comment
type: QuestionComment
score: 0
has text: @ElliotM No its not working, I think either the beforeShowDay option could be wrongly coded or I am using an incorrect/older datepicker js file. I am not sure what else to try.

http://stackoverflow.com/a/29245169
has body: You appear to be using an older version of Select2 4.0.0, most likely one of the betas. In 4.0.0-beta.3, we stopped packaging jQuery in select2.full.js because it caused strange issues like this.
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29213488
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29213488
type: Answer
score: 2

http://stackoverflow.com/q/29157690
accepted answer: http://stackoverflow.com/a/29157768
has body: I am using a loop to display data in table and I would like a way to extract two elements specific to which dropdown option the user is clicking on. Firstly I would like to get the text value from within the selected tags. Secondly I would like to get the accompanying url which is the value of the hidden input field (#"lead_path"). Here is my table below. For example I would like a way to save both "/leads/50" and "Agent 456" into separate variables if a user clicked on this dropdown option. For brevity only the first table row in the loop is displayed, but each table row looks exactly the same as the one below. Mellie Price IV 12:24 am 03-09-2015 Count: 0 Most recent: $100,000+, Hamillburgh 9:24 am 03-16-2015 Jeff Manson Kevin McCarthy Warsama Gabriel Chris Sass Agent123 Agent456 Agent789 Here is my effort to try to solve this problem. My code gets me the text of the selected option but only displays the first url "/leads/50" and not any of the other ones. Any help would be greatly appreciated. Thanks! $(document).ready(function() { $("table").delegate("#agent_lead", "change", function(){ var agent_name = $("option:selected", this).text(); alert($('#lead_path').val()); });
type: Question
has title: Jquery how to display a specific input value with in a table
has comment: http://stackoverflow.com/comment/46536043
has comment: http://stackoverflow.com/comment/46535944
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29157768
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46535967
possible better answer: http://stackoverflow.com/a/29157957
has answer: http://stackoverflow.com/a/29157957
type: AnsweredQuestion

http://stackoverflow.com/q/29118570
type: Question
score: 1
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/46464429
has title: why angular service attribute changes can not affect the relative value in the controller scope?
upvote count: 1
tagged with: angularjs-service
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46464597
has comment: http://stackoverflow.com/comment/46464744
has body: Here is my code brief: controller: angular.module('testApp').controller('TestCtrl', function ($scope, EssayRsc, EssaySvc) { $scope.pageInfo = EssaySvc; } service: angular.module('testApp').service('EssaySvc', function (EssayRsc, $document, $rootScope) { var count = 1; var essayList = [{title:11111},{title:11111},{title:11111},{title:11111},{title:11111},{title:11111},{title:11111}]; var pageNum = null; var pages = null; $document.scroll(function () { if ($document.height() == ($document.scrollTop() + angular.element(window).height())) { EssayRsc.get({pageSize:count}, function (resp) { essayList = essayList.concat(resp.list); pageNum = resp.pageNum; pages = resp.pages; this.essayList = essayList; // this changes here but not changes in the controller console.log(this.essayList); }); } }); this.essayList = essayList; this.pageNum = pageNum; this.pages = pages; }) html: &lt;ul class="no-bullet" ng-repeat="essay in pageInfo.essayList"&gt; &lt;li class="essay-query-li" ng-click="viewEssay(essay.id)"&gt;&lt;a href="#"&gt;{{essay.title}}&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; This is my question: I want to set a listener in a service,so erverytime I scroll to the bottom of the window it can load one record. but everytime essayList attribute in the service changed,but in the controller and view it never change, i really cannot figure out why and how to solve it,if you know the answer please tell me, thanks a lot!
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29140831
has body: Promises are what you are looking for, I'm thinking of this one. But jQuery also has one ($.Deferred even though it does not implement what is called A+ promises This comes from kris kowal's q On the first pass, promises can mitigate the “Pyramid of Doom”: the situation where code marches to the right faster than it marches forward.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29140719
type: Answer
upvote count: 1

http://stackoverflow.com/a/29098095
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/46426486
has comment: http://stackoverflow.com/comment/46426555
answers question: http://stackoverflow.com/q/29097973
score: 1
has comment: http://stackoverflow.com/comment/46426802
upvote count: 2
has comment: http://stackoverflow.com/comment/46426763
has body: Add them all to a class, and add the class to the element with JavaScript instead. jQuery: $('#my-element').addClass('mygradient'); Vanilla: document.getElementById('my-element').className = 'mygradient';

http://stackoverflow.com/a/33671119
score: 1
has body: If you're trying this on an iOS device: Apple won't let you auto focus on an element without the user explicitly expressing the intention to. This is because of a setting KeyboardDisplayRequiresUserAction which is true for Mobile Safari. This is a usability decision on Apple's part and at present there is no workaround for it.
upvote count: 1
answers question: http://stackoverflow.com/q/29098350
type: Answer
downvote count: 0

http://stackoverflow.com/a/29209352
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29206609
has body: If you want to interact between JavaScript code and a host C++ app (like an app built with V8, CEF or Minko), you can: call eval from the C++ host (for example Minko provides the AbstractDOM::eval() method) using the code provided by cipher call methods specific to the C++ host implementation, for example Minko provides a two-way C++/JS messaging system described here

http://stackoverflow.com/q/29099216
has title: How do I create curved css content divider?
has comment: http://stackoverflow.com/comment/46430235
type: Question
has answer: http://stackoverflow.com/a/29100602
has comment: http://stackoverflow.com/comment/46429042
has comment: http://stackoverflow.com/comment/46428890
tagged with: javascript
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/17202548
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46429394
has comment: http://stackoverflow.com/comment/46430004
tagged with: css
has body: I'm working on a small web project and got a nice little detail on the page: a curved content divider. Usually those are just lines, but this is not. So I was thinking about, how to code that in CSS or possibly with SVG, but I'm not sure exactly how it could work. Here you can see what I mean: As you can see, the gray content above ends exactly with the orange curve and the white content part beneath start along the curve. Is there any way to code it with css or svg, instead of using images? Thank you! I highly appreciate any help.
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
score: 1

http://stackoverflow.com/q/29189559
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/19266197
has body: I use setState to update part of the html but I found the new update html is not rendered. Here is the code, js fiddle: html: hello world js: var Main = React.createClass({ getInitialState: function() { return {output: 'hello world '}; }, render: function() { return ( {this.state.output} ); } }); React.renderComponent(<Main/>, document.getElementById('content')); I omit the part that update html from the server but the result is the same. How to let the string in state be rendered?
has title: render html in state string
has answer: http://stackoverflow.com/a/29189660
type: AnsweredQuestion
score: 10
tagged with: javascript
upvote count: 10
type: Question
accepted answer: http://stackoverflow.com/a/29189660
tagged with: reactjs
answer count: 1
downvote count: 0
favorite count: 0
duplicate of: http://stackoverflow.com/q/19266197

http://stackoverflow.com/comment/46601900
type: Comment
has text: Any specific reason for using `!important`. You're not supposed to use that unless you inherit some styles for which you don't have to access to :)
comment on: http://stackoverflow.com/a/29194084
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46583945
comment on: http://stackoverflow.com/a/29183907
has text: I tested it right now and it works just fine. The rendered html is: `if ([{'A': 1}, {'B': 2}]) {`
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/29079844
type: Question
has answer: http://stackoverflow.com/a/38426558
has comment: http://stackoverflow.com/comment/46394544
tagged with: javascript
tagged with: http-headers
has body: I am trying to trigger a file download when a user clicks on a "Download PDF" button. A call is made to the API which makes a few checks, and then returns the file. I don't want the file to open in the browser. I have read a lot of stackoverflow-questions about how to do this, but can't get it to work. I get the file content as text back, but the browser doesn't save the file, nor gives me the choice to save it as a file. This is what I have. HTML Download PDF AngularJS controller $scope.apiDownload = function(){ var config = { method: 'GET', url: "/api/download", headers: { 'Accept': 'application/pdf' } }; $http(config) .success(function(res){ console.log(res); }) .error(function(res){}); }; PHP API (mostly from here) function apiDownloadFile() { $file_name = "download/test.pdf"; $abs_file_name = realpath(dirname(__FILE__)).'/'.$file_name; if(is_file($abs_file_name) && file_exists($abs_file_name)) { // required for IE if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); } // get the file mime type using the file extension switch(strtolower(substr(strrchr($file_name, '.'), 1))) { case 'pdf': $mime = 'application/pdf'; break; case 'zip': $mime = 'application/zip'; break; case 'jpeg': case 'jpg': $mime = 'image/jpg'; break; default: $mime = 'application/force-download'; } header('Pragma: public'); // required header('Expires: 0'); // no cache header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Last-Modified: '.gmdate ('D, d M Y H:i:s', filemtime ($abs_file_name)).' GMT'); header('Cache-Control: private',false); header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename='.basename($abs_file_name)); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize($abs_file_name)); // provide file size header('Connection: close'); readfile($abs_file_name); // push it out exit(); } } I see these headers in chrome developer tools: Request Headers GET /api/download HTTP/1.1 Host: s…
linked to: http://stackoverflow.com/q/9723262
answer count: 2
accepted answer: http://stackoverflow.com/a/29098376
has comment: http://stackoverflow.com/comment/46393900
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
tagged with: php
has title: Download file from server with angular $http.get
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29098376
linked to: http://stackoverflow.com/q/4545311
upvote count: 1
possible better answer: http://stackoverflow.com/a/38426558
tagged with: http

http://stackoverflow.com/a/29242400
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29149759
type: Answer
answers question: http://stackoverflow.com/q/29149759
has body: In your fiddle, you aren't updating the stage after you change the scaleX and scaleY of the container so the canvas is never redrawn with the new scale. You ARE, however, still changing the css zoom. You need only change the scale of the container and update the stage. I've updated your fiddle to achieve the desired result. function zoom(){ //document.body.style.zoom = 2; container.scaleX = container.scaleY = 2; stage.update(); }
upvote count: 2
score: 2

http://stackoverflow.com/a/30085284
downvote count: 0
score: 7
has body: Here's a little trick I've been using to run a package in development only: from your app root, create a blank package (or add to your PACKAGE_DIRS directory): meteor create --package my-package-manager In package.js: Package.on_use(function(api) { // production only if (process.env.IS_PRODUCTION) { api.use('some:package'); } // dev only if (process.env.IS_DEVELOPMENT) { api.use('devonly:package'); } }); On dev environment: echo "export IS_DEVELOPMENT=true" &gt;&gt; ~/.bash_profile (or ~/.zshrc in my case) Then obviously do the same thing for IS_PRODUCTION on whatever you use for production server. on heroku for example: heroku config:set IS_PRODUCTION=true I'm using this for a dev-only package, haven't tried it with production-only but it should work.
upvote count: 7
answers question: http://stackoverflow.com/q/29189225
has comment: http://stackoverflow.com/comment/60560314
type: Answer

http://stackoverflow.com/comment/46371484
has text: Okay, so this should have worked, right?
type: AnswerComment
comment on: http://stackoverflow.com/a/29067849
score: 0
type: Comment

http://stackoverflow.com/a/41015840
has body: In my project I've created something like this with ES6: String.prototype.interpolate = function(params) { const names = Object.keys(params); const vals = Object.values(params); return new Function(...names, `return \`${this}\`;`)(...vals); } const template = 'Example text: ${text}'; const result = template.interpolate({ text: 'Foo Boo' }); console.log(result);
has comment: http://stackoverflow.com/comment/111955747
has comment: http://stackoverflow.com/comment/79578447
has comment: http://stackoverflow.com/comment/84810720
has comment: http://stackoverflow.com/comment/94196626
has comment: http://stackoverflow.com/comment/75296042
has comment: http://stackoverflow.com/comment/125200928
has comment: http://stackoverflow.com/comment/101353855
has comment: http://stackoverflow.com/comment/118348620
has comment: http://stackoverflow.com/comment/88741690
type: Answer
has comment: http://stackoverflow.com/comment/118481630
upvote count: 174
has comment: http://stackoverflow.com/comment/121268318
has comment: http://stackoverflow.com/comment/88755608
score: 173
has comment: http://stackoverflow.com/comment/110697809
downvote count: 1
has comment: http://stackoverflow.com/comment/111956411
has comment: http://stackoverflow.com/comment/102916782
has comment: http://stackoverflow.com/comment/119879996
has comment: http://stackoverflow.com/comment/75257709
has comment: http://stackoverflow.com/comment/75284724
answers question: http://stackoverflow.com/q/29182244
has comment: http://stackoverflow.com/comment/84751831
has comment: http://stackoverflow.com/comment/132452137
has comment: http://stackoverflow.com/comment/105007413
has comment: http://stackoverflow.com/comment/109976683
has comment: http://stackoverflow.com/comment/118326913

http://stackoverflow.com/q/29146877
has body: How can I call function loadTable from another controller? app.controller('tableCtrl', ['$scope', function (scope) { scope.loadTable = function() { //some code }; }); app.controller('secondCtrl', ['$scope', function (scope) { scope.buttonClick = function() { //call loadTable from tableCtrl }; });
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29146946
has answer: http://stackoverflow.com/a/29146985
score: 1
type: Question
answer count: 2
has title: Call function from another controller
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/19468334
favorite count: 0
possible better answer: http://stackoverflow.com/a/29146985
has comment: http://stackoverflow.com/comment/46516283
accepted answer: http://stackoverflow.com/a/29146946
has comment: http://stackoverflow.com/comment/46516210
tagged with: angularjs

http://stackoverflow.com/a/29139145
has body: .replace() returns modified string it doesn't update existing text. You need to use returned string and reset it to inputs text. You can use .text(function) $('.am-product-terms').text(function(_, text){ return text.replace(/for[\s\S]+/, ''); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46502818
type: Answer
answers question: http://stackoverflow.com/q/29139129
score: 2
has comment: http://stackoverflow.com/comment/46502269
has comment: http://stackoverflow.com/comment/46502282
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29139129
has comment: http://stackoverflow.com/comment/46502252

http://stackoverflow.com/q/29202460
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29202524
accepted answer: http://stackoverflow.com/a/29202524
favorite count: 0
has title: Automatically play a video on my site at a certain time of day
has answer: http://stackoverflow.com/a/29202553
type: AnsweredQuestion
downvote count: 0
has body: Context: A video on an html page. I have a hidden video on an html page. I'd like the video to appear (and autoplay) daily at 12:00 noon EST. Can this be accomplished with JavaScript? Where should I start? Any feedback is appreciated.
score: 1
has answer: http://stackoverflow.com/a/29202487
type: Question
possible better answer: http://stackoverflow.com/a/29202553
upvote count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46559871
type: Comment
has text: I placed my directive in a seperate JS file known as app.js. What can I do else ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29161513

http://stackoverflow.com/a/29238784
upvote count: 3
has body: I change 'validator' function and this work for me validator: function(Value) { var existname = projectdetails.projectname; if(Value !== existname){ var existnamestore = Ext.StoreMgr.lookup("update-ptoject-project-names-get"); if(existnamestore){ var namestore = existnamestore.findExact('projectname',Value); if(namestore &lt; 0){ return true; }else{ return 'Job name already exist. Please select different job name.'; } } } return true; }
answers question: http://stackoverflow.com/q/29213553
downvote count: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29213553
score: 3

http://stackoverflow.com/q/29170548
accepted answer: http://stackoverflow.com/a/29307575
tagged with: parameter-passing
has answer: http://stackoverflow.com/a/29307575
tagged with: parameters
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
tagged with: loops
type: Question
has title: Increment XML parameter on click
tagged with: javascript
score: 0
has body: I have an rss feed which has a FeedLimit parameter of 5 I want to put a button at the bottom which says "View Next Five" In order to do this I imagine I need an href with some javascript embedded which will set FeedLimit = FeedLimit+5 Although from my research it seemed as though the only way to increment XML parameters is within a loop. The segment of my code is below, and you'll notice there is a ToggleItemDescription, which shows/hides a description for each item..this was my inspiration but it is code which was generated by SharePoint &lt;xsl:param name="rss_FeedLimit"&gt;5&lt;/xsl:param&gt; &lt;xsl:template name="RSSMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"&gt; &lt;xsl:param name="Rows"/&gt; &lt;xsl:param name="RowCount"/&gt; &lt;xsl:for-each select="$Rows"&gt; &lt;xsl:variable name="CurPosition" select="position()" /&gt; &lt;xsl:variable name="RssFeedLink" select="$rss_WebPartID" /&gt; &lt;xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" /&gt; &lt;xsl:if test="($CurPosition &amp;lt;= $rss_FeedLimit)"&gt; &lt;div class="item link-item" &gt; &lt;a href="{concat(&amp;quot;javascript:ToggleItemDescription('&amp;quot;,$CurrentElement,&amp;quot;')&amp;quot;)}" &gt; &lt;xsl:variable name="SafeHtml"&gt; &lt;xsl:call-template name="GetSafeHtml"&gt; &lt;xsl:with-param name="Html" select="title"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/&gt; &lt;/a&gt; &lt;xsl:if test="$rss_ExpandFeed = true()"&gt; &lt;xsl:call-template name="RSSMainTemplate.description"&gt; &lt;xsl:with-param name="DescriptionStyle" select="string('display:block;')"/&gt; &lt;xsl:with-param name="CurrentElement" select="$CurrentElement"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:if&gt; &lt;xsl:if test="$rss_ExpandFeed = false()"&gt; &lt;xsl:call-template name="…
answer count: 1

http://stackoverflow.com/q/29095448
tagged with: javascript
tagged with: jquery
has body: I'm trying to make a simple form page have some localstorage functionality to restore settings/input after the page has been closed/reloaded. I've attempted to make a start but I am still learning so there are mistakes and I can't get it to work. If a change is made to the name input field it should update the localstorage with the new name. If a change is made to any of the dropdown (selector? option?) fields it should update the localstorage with the new value. On page load it should automatically restore all of the values. The "Clear" button should ONLY reset the dropdown (selector? option?) fields to blank, it should NOT reset the name field. Example: https://jsfiddle.net/5gam3b6f/ $(document).ready(function () { $.each($("select"), function (index, value)) { localStorage.getItem($(this).attr(“id”)); }; }); $("select").on("change", function () { localStorage.setItem($(this).attr(“id”), $(this)); }); I haven't managed to start on the name input field or the clear function yet because I can't even get the first one to work. I would rather not use external libraries as this is as complicated as it will get, nothing else needed.
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29096520
accepted answer: http://stackoverflow.com/a/29096520
type: AnsweredQuestion
has title: jQuery setting & getting localstorage data for dropdowns & input's
type: Question
tagged with: jquery-ui

http://stackoverflow.com/comment/46583788
comment on: http://stackoverflow.com/q/29183737
type: Comment
type: QuestionComment
has text: @nevvermind. Yes, I tried that too. But it does not matter where to put it.
score: 0

http://stackoverflow.com/comment/46402667
type: QuestionComment
has text: @Baidaly Hey thanks to your response I figured out my problem and got it working! It was fool of me not trying to throw Error outside the function. I thought it could be a phonegap limitation or something, and lost focus... The actual arrays I had were much different than the example I provided here. It was a mere test condition fail like: myTestIndex > index. I changed it to myTestIndex >= index, and voila..
score: 0
comment on: http://stackoverflow.com/q/29065065
type: Comment

http://stackoverflow.com/comment/46439720
score: 0
type: AnswerComment
has text: Thanks. All of the above is helpful. The answer that RLRishe provided was what I was looking for. I want to start straight-forward - with a function and 'console' output. I modified my code as RLRishe suggested. I am using 'chrome dev tools' but I am not getting anything in the Console. Why ?
type: Comment
comment on: http://stackoverflow.com/a/29104202

http://stackoverflow.com/comment/46465366
comment on: http://stackoverflow.com/q/29119009
type: Comment
type: QuestionComment
score: 2
has text: There is no HTML options, like: multiple="true"?

http://stackoverflow.com/q/29207685
type: Question
score: 3
tagged with: javascript
upvote count: 3
answer count: 1
has answer: http://stackoverflow.com/a/29210026
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29210026
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: How to access an observable element from observable array in knockout.js and change its value
downvote count: 0
has body: I am creating a ViewModel as: function PurchaseOrderViewModel() { var self = this; self.seqNo = ko.observable(1); self.barcode = ko.observable(''); self.expDate = ko.observable(''); self.importDate = ko.observable(''); self.name = ko.observable(''); } And on keypress event of barcode addOrder event gets executed: function OrderCollection() { var self = this; self.ShirtOrder = ko.observableArray([new PurchaseOrderViewModel()]); self.addOrder = function (data, event) { if (event.keyCode == 13) { //Here before pushing new object to self.ShirtOrder. I want to access current object and change its expDate and importDate value. var _SO = new PurchaseOrderViewModel(); _SO.seqNo = $("#SOBody > tr").length + 1; self.ShirtOrder.push(_SO); } }; } HTML: When Enter key event is pressed in barcode textbox. The import date and export date value should be changed and also a new TR should be created. I am not able to change the value.
tagged with: knockout.js

http://stackoverflow.com/a/29172498
type: Answer
has body: You can return out of any function using return eg: function parseGuess(guess){ var diff = Math.abs(generatedNumber - guess); if(diff &gt;= 50){ view.displayMessage("Ice cold"); return false; } } Here is a fiddle in context of your example: https://jsfiddle.net/theodin/0e4mso4L/1/
has comment: http://stackoverflow.com/comment/46563143
score: 0
has comment: http://stackoverflow.com/comment/46563236
answers question: http://stackoverflow.com/q/29172446

http://stackoverflow.com/comment/46620789
type: QuestionComment
type: Comment
score: 0
has text: @swalog I am using D3.
comment on: http://stackoverflow.com/q/29204824

http://stackoverflow.com/a/29069509
has comment: http://stackoverflow.com/comment/46374551
has comment: http://stackoverflow.com/comment/46400770
has comment: http://stackoverflow.com/comment/46374379
type: Answer
has comment: http://stackoverflow.com/comment/46374315
score: 0
answers question: http://stackoverflow.com/q/29069416
has body: You should be able to just set the value to "" in jquery. $(".input").val("") Hope that helps.

http://stackoverflow.com/q/29158660
has comment: http://stackoverflow.com/comment/46537580
has title: Jquery : binding a function to a click event of an element already bound
type: Question
tagged with: function
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29158839
tagged with: click
score: 0
answer count: 1
has body: There's a first binding done on the click event of an element : $("#element").on("click", function() { //actions of function1 }); I would like to be able to bind another function to it, preserving the actions of the precedent function. Something like : function elementClickAdd(elementId,newFunction){ //here, get the actions of function1 $("#"+elementId).on('click', function() { //perform actions of function1 newFunction(); }); } But I can't figure out how to make this. Could you help me please ? Thanks Edit : thanks for helping, the solution is here : https://jsfiddle.net/9bo6dvmb/1/ enjoy :)
type: UnansweredQuestion

http://stackoverflow.com/comment/46621250
comment on: http://stackoverflow.com/a/29204877
type: Comment
score: 0
has text: ev ery thing is done. My request is sending but it saying parameter expected. how can I put parameter in url. I supposed parameter is in json format
type: AnswerComment

http://stackoverflow.com/a/29079045
type: Answer
score: 16
downvote count: 0
has body: You need to run webdriver-manager update with sudo: $ sudo -s $ webdriver-manager update
type: AcceptedAnswer
upvote count: 16
has comment: http://stackoverflow.com/comment/96634508
has comment: http://stackoverflow.com/comment/90961688
accepted answer of: http://stackoverflow.com/q/29079021
answers question: http://stackoverflow.com/q/29079021

http://stackoverflow.com/comment/46472077
comment on: http://stackoverflow.com/q/29122913
type: Comment
type: QuestionComment
score: 0
has text: But how come it output is true for "i" and false for "j" ?

http://stackoverflow.com/comment/46542082
score: 0
has text: Cool that answers my questions and now I know where to have a look at :) Are you adding your snippet as an answer so I can accept it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29133527

http://stackoverflow.com/comment/46494252
has text: So `console.log(v);` is simply empty?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29134379
score: 0

http://stackoverflow.com/comment/46435725
has text: remember to make `urlencode($data["code"])` if there can be spaces or other forbidden characters
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29102704
type: Comment

http://stackoverflow.com/q/29205439
has body: I want to test inheritance in JavaScript. I made a sample script but it doesn't work. The program returns TypeError. var Mammal = function(spec) { this.name = spec.name; }; Mammal.prototype.get_name = function() { return this.name; }; var Cat = function(spec) { this.name = spec.name; }; Cat.prototype = new Mammal(); var cat = new Cat({name: 'Mike'}); console.log(cat.get_name()); If I set the arguments of Mammal and Animal functions as non objects, the program runs finely.
upvote count: 2
has title: JavaScript returns TypeError when I set the arguments as objects
has answer: http://stackoverflow.com/a/29205489
score: 2
type: AnsweredQuestion
tagged with: oop
type: Question
accepted answer: http://stackoverflow.com/a/29205489
tagged with: javascript
tagged with: inheritance
tagged with: prototype
tagged with: typeerror
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46621767
favorite count: 0

http://stackoverflow.com/a/29157609
has comment: http://stackoverflow.com/comment/46536155
has comment: http://stackoverflow.com/comment/46537107
has comment: http://stackoverflow.com/comment/46536029
answers question: http://stackoverflow.com/q/29157494
score: 0
has body: Use jQuery .data to work with data attributes http://api.jquery.com/data/
type: Answer
has comment: http://stackoverflow.com/comment/46535966

iphone
tags question: http://stackoverflow.com/q/29140253
tags question: http://stackoverflow.com/q/29184199
tag name: iphone
tags question: http://stackoverflow.com/q/29164415
type: Tag

http://stackoverflow.com/comment/46606459
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29196641
has text: I think there is a problem with your selector check if the element rendered you want to create has the class="tinymce" attribute, or test with other selector as tinymce.init({ selector: "textarea",
type: AnswerComment

http://stackoverflow.com/comment/46569520
type: Comment
comment on: http://stackoverflow.com/q/29175617
type: QuestionComment
has text: @KevinB , tat was't my intention ;) LOL
score: 0

http://stackoverflow.com/q/29161330
has answer: http://stackoverflow.com/a/29161341
has comment: http://stackoverflow.com/comment/46552848
tagged with: javascript
score: 90
answer count: 2
linked to: http://stackoverflow.com/q/22752116
has comment: http://stackoverflow.com/comment/46542167
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29161341
possible better answer: http://stackoverflow.com/a/59604654
has answer: http://stackoverflow.com/a/59604654
has body: I know that for 'class' we must use className, but how do i get react to preserve 'for' attribute? The following: Recipient: is rendered as: Recipient: on an unrelated note, i find it annoying that i can not change attributes using chrome's console when using React. is there a way around that? for example if i inspect the rendered element and add the 'for' attribute manually, it disappears when i click away from that control (presumably because react re-renders the control i'm guessing)
upvote count: 90
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46550528
type: Question
has title: React-js ignores label's 'for' attribute
tagged with: reactjs

instagram-api
tags question: http://stackoverflow.com/q/29209647
type: Tag
tag name: instagram-api

http://stackoverflow.com/comment/46470591
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29121876
has text: Hi thanks, Here is the fiddle... http://jsfiddle.net/2boz374q/ (I hope this correct, never used it before) I did some research into bootstrap and modal and found that I should wrap the modal around the button for it to work, if this is the problem.

http://stackoverflow.com/comment/46366628
type: Comment
comment on: http://stackoverflow.com/a/29065093
has text: Well thanks, now it works. Btw. better is to use keyup() method, otherwise last letter stay ignored.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29205636
has title: how to hide ul li with specific class on page load by default before toggle click function apply
tagged with: treeview
type: Question
has body: I have toggle tree which responds on click i.e. show or hide UL>li. I want to hide all the UL --> li who has parent ul-li. To make it more obvious I have apply css background-color to red which I want to be hidden by when page loads but show when it click back. https://jsfiddle.net/toxic_kz/vr84pd6u/ System Administration System Core f2 f3 f4 f5 f6 f7 f8 f10 f11 f9 MyFunctionA f12 f13 f14 f16 Course Management jQuery
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29205851
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29205851

http://stackoverflow.com/comment/46491634
has text: Also a helpful response. Thanks for that.
comment on: http://stackoverflow.com/a/29132885
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46464840
type: AnswerComment
has text: this is screen recode : http://i.imgur.com/XwwEPZU.gif if you test put these files to localhost and open it http://localhost/new.html like that
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29115614

http://stackoverflow.com/comment/46457821
type: AnswerComment
comment on: http://stackoverflow.com/a/29114478
score: 0
type: Comment
has text: What you say is "one important note about **.bind** is not a note, it's actually the fundamental thing that `bind` does for a living. Your point about performance is quite misplaced. First, you have no way to know that calling `bind` is going to be faster or slower than writing out the anonymous function inline. Second, the probability that whatever difference there is is going to affect the performance of the app is vanishingly small.

http://stackoverflow.com/a/29176388
has body: The problem is that after the ajax request, login.php script sends header back to the browser with 302 (redirect) status code, then the browser sends another GET request for the home page, and the result of that request is returned as the success of ajax call. So, you put a complete home page inside .login-result div. Now, if you just use window.location call inside success function, you will get all of the above plus another GET request for the home page. One solution is to send the response as JSON object with success or error status. Example: // login.php if ($email == $dbemail &amp;&amp; $password == $dbpassword) { die( json_encode( [ 'success' =&gt; 1 ] ) ); } else { die( json_encode( [ 'success' =&gt; 0, 'error' =&gt; 'invalid username or password' ] ) ); } That way you will know whether the login was successful or not, and then you can choose the appropriate action (redirect or show error). Not to mention avoiding of unnecessary requests. dataType: 'json', success: function( data ) { if ( data.success ) window.location = "home.php"; // change location else $(".login-result").html( data.error ); }
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/92311685
answers question: http://stackoverflow.com/q/29175076

http://stackoverflow.com/q/29177286
answer count: 4
has answer: http://stackoverflow.com/a/29177379
possible better answer: http://stackoverflow.com/a/29177345
accepted answer: http://stackoverflow.com/a/29177508
has answer: http://stackoverflow.com/a/29177524
has title: Regex matching in rejex101.com but not in javascript
type: Question
type: AnsweredQuestion
has body: I'm doing this regex: https://regex101.com/r/jB1cO7/1 I'm trying to capture everything between the pointy brackets, and it seems to match what I want in regex101. When I try to do this in node.js: var regex = /&lt;(.+?\.?.+?)&gt;|&lt;(.*)&gt;/g; var specialStrings = regex.exec(message); console.log('special strings are ',specialStrings); I get: [ '&lt;Users.username.53a47a469c52c9d83a2d71d9&gt;', 'Users.username.53a47a469c52c9d83a2d71d9', undefined, index: 0, input: 'message is &lt;Users.username.53a47a469c52c9d83a2d71d9&gt; has published a new Announcement in Test. Click &lt;hyperlink&gt; to watch the 1slide announcement' ] So why does it match on regex101, but not in javascript?
has answer: http://stackoverflow.com/a/29177508
score: 0
has answer: http://stackoverflow.com/a/29177345
tagged with: javascript
tagged with: regex

http://stackoverflow.com/comment/46436243
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29102120
score: 0
has text: Well if you can make a test page using that code, you could explore *why* Modernizr is getting the result it's getting. To check whether IE is in compatibility mode, look at the "Emulation" tab in the F12 Developer Tools.

http://stackoverflow.com/a/29204851
downvote count: 0
score: 1
upvote count: 1
has body: There are several ways to accomplish this. One way would be to stack background images on top of each other. You can do this by using the following CSS: .image-container{ background: url(meat.png) no-repeat, url(lettuce.png) no-repeat, url(bun.png) no-repeat; }
answers question: http://stackoverflow.com/q/29204616
type: Answer

http://stackoverflow.com/a/29212629
score: 2
answers question: http://stackoverflow.com/q/29188907
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: To anyone having the same problem: I couldn't figure out what was causing it, but I could get it done using the window.frame approach elaborated in this answer.
accepted answer of: http://stackoverflow.com/q/29188907

http://stackoverflow.com/comment/46629399
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29209511
has text: @Jocheved your problem is not related to javascript.only you need to change your query,then everything should work.please see me answer below

http://stackoverflow.com/q/29140456
has answer: http://stackoverflow.com/a/29140842
tagged with: date
has answer: http://stackoverflow.com/a/29140519
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29140842
tagged with: javascript
has body: How to display date in angular with filter. Below output shows the input and the output (with/without angular date filter) In: {{v.Dt}} Angular: prints: In: 2015-03-19T05:52:10.634062Z Angular: 2015-03-19T05:52:10.634062Z The desired display format is 19 Mar 2015 Any help is appreciated.
score: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29140519
has title: How to display date in angular with filter
type: AnsweredQuestion

http://stackoverflow.com/q/29074689
has comment: http://stackoverflow.com/comment/46384510
type: Question
score: 1
has body: I have tried to find data-type of each column using Java Script, It prints string data-type for number,string and date. I need each column data-type whether it is date or string or number or float. Without CSV it prints correct data-type. Working Example without CSV file var num=15; var str="xyz"; console.log(typeof num); console.log(typeof str); Output number string But using csv file it prints string for all columns. My CSV file is: 01/01/1991,12,xyz,14.4 01/01/1992,20,abc,20.5 01/02/1980,78,xy,60.8 I am using Papa Parse javascript plug-in for getting each column and then checking data-type. How do I get each column's data-type from CSV file? Is there any other way to parse CSV to array where we can traverse on particular row or column?
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29075184
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/46383427
downvote count: 0
type: UnansweredQuestion
has title: How to find data type of each column from csv file using Java Script?

http://stackoverflow.com/a/29147267
answers question: http://stackoverflow.com/q/29146555
type: Answer
has body: Just creating a variable inside a factory does not make a variable available in one of the views. The regular approach is adding the variables to a scope from inside a controller. So you're factory method would return the contents of useful like this: .factory('UsefulData', function($http){ var factory = {}; factory.useful = [ { "id": 1, "name": "Services", "img": "img/useful/services.png", "url": "http://www.amazon.co.uk/", }, { "id": 2, "name": "Plan", "img": "img/useful/communications.png", "url": "http://www.bbc.com/sport/0/", } ]; return factory; } And you're controller would look like this: .controller('UsefulController', function($scope, UsefulData) { $scope.useful = UsefulData.useful; }); Now all you need to do is make sure the scope from the contraller is available within the view with ng-controller="UsefulController", and your links should be available.
has comment: http://stackoverflow.com/comment/46517693
score: 0
has comment: http://stackoverflow.com/comment/46517278

http://stackoverflow.com/comment/46656524
score: 0
comment on: http://stackoverflow.com/a/29203757
has text: No need for quadratic curves and lines, just use four arcs - simpler and more efficient. Also, problem 1 (1.) does not seem to be addressed.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29160183
tagged with: javascript
tagged with: dc.js
score: 0
answer count: 1
has title: Does yAxis().tickFomat does not work for composite charts on dcjs?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29160431
has body: I have this code which throws up error if I use yAxis() ticks or tick formatting. revSpendCompositeChart .width(400).height(180) .elasticX(true) .transitionDuration(1000) .dimension(dateDim) .elasticY(true) .zoomOutRestrict(true) .x(d3.time.scale().domain([minDate,maxDate])) .renderHorizontalGridLines(true) .compose([ dc.lineChart(revSpendCompositeChart) .dimension(dateDim) .colors('orange') .group(spendDateGroup, "Spend"), dc.lineChart(revSpendCompositeChart) .dimension(dateDim) .colors('green') .group(revenueDateGroup, "Revenue") ]) .brushOn(false); However this throws up error as undefined function. revSpendCompositeChart .width(400).height(180) .elasticX(true) .transitionDuration(1000) .dimension(dateDim) .elasticY(true) .zoomOutRestrict(true) .x(d3.time.scale().domain([minDate,maxDate])) .yAxis().tickFormat(function (v) { return v + '%'; }) .renderHorizontalGridLines(true) .compose([ dc.lineChart(revSpendCompositeChart) .dimension(dateDim) .colors('orange') .group(spendDateGroup, "Spend"), dc.lineChart(revSpendCompositeChart) .dimension(dateDim) .colors('green') .group(revenueDateGroup, "Revenue") ]) .brushOn(false); The documentation does not tell anything about the this. But I found that yAxis() function is supported for line charts. So since my composite chart is for two line charts I need to make it work.
type: Question

bing-maps
tags question: http://stackoverflow.com/q/29082396
type: Tag
tag name: bing-maps
tags question: http://stackoverflow.com/q/29110287
tags question: http://stackoverflow.com/q/29113986

http://stackoverflow.com/q/29211198
tagged with: javascript
tagged with: errai
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: For an upcoming project, we're evaluating GWT / Errai as the foundation. As our application will be heavy in terms of data throughput and at the same time will often face offline use, we're worried about localStorage being a limiting factor - it varies between 2mb and 10mb depending on the browser. The homepage of the Errai project does not mention any use of, for example, indexedDB or WebSQL to overcome the limit of localStorage. Does anyone know if Errai is indeed relying on localStorage only (and hence is limited to max. 10mb offline storage)?
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: gwt
has title: Is Errai using anything besides localStorage for offline persistence?

http://stackoverflow.com/q/29150998
downvote count: 0
has comment: http://stackoverflow.com/comment/46523910
tagged with: javascript
tagged with: gruntjs
score: 109
favorite count: 0
tagged with: karma-jasmine
accepted answer: http://stackoverflow.com/a/29151264
has body: So, I've been looking all over for this, found "similar" answers here, but not exactly what I want. Right now if I want to test a single file with karma, I need to do fit(), fdescribe() on the file in question... However, what I do want is to be able to just call karma, with the config file, and direct it to a specific file, so I don't need to modify the file at all, ie: karma run --conf karma.conf.js --file /path/to/specific/test_file.js is it possible to do this? Or with any helper? (using grunt or gulp?)
tagged with: gulp
possible better answer: http://stackoverflow.com/a/41258888
has answer: http://stackoverflow.com/a/72189604
linked to: http://stackoverflow.com/q/26552729
tagged with: karma-runner
has answer: http://stackoverflow.com/a/41258888
has answer: http://stackoverflow.com/a/31598188
has comment: http://stackoverflow.com/comment/46524081
answer count: 4
has comment: http://stackoverflow.com/comment/77663401
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29151264
has comment: http://stackoverflow.com/comment/46524121
linked to: http://stackoverflow.com/q/10832031
has title: Karma: Running a single test file from command line
has comment: http://stackoverflow.com/comment/46524154
type: Question
has comment: http://stackoverflow.com/comment/46523877
upvote count: 109
has comment: http://stackoverflow.com/comment/46523944

http://stackoverflow.com/q/29179486
favorite count: 0
accepted answer: http://stackoverflow.com/a/29426742
type: Question
score: 1
has comment: http://stackoverflow.com/comment/46575945
has body: I am developing mvc web application. I have added following scripts in bundle bundles.Add(new ScriptBundle("~/bundles/adminscripts").Include( "~/Scripts/jquery.js", "~/Scripts/bootstrap.js", "~/Scripts/jquery.dcjqaccordion.2.7.js", "~/Scripts/jquery.scrollTo.min.js", "~/Scripts/jquery.nicescroll.js", "~/Scripts/jquery.sparkline.js", "~/Scripts/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js", "~/Scripts/owl.carousel.js", "~/Scripts/jquery.customSelect.js", "~/Scripts/respond.js", "~/Scripts/slidebars.js", "~/Scripts/common-scripts.js", "~/Scripts/sparkline-chart.js", "~/Scripts/easy-pie-chart.js", "~/Scripts/count.js", "~/Scripts/Main.js")); When I run the site it is giving me this error 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'cookie' Instead of adding these scripts in bundle if I add it on my _LayOut.cshtml then all works fine. I have added BundleTable.EnableOptimizations = true; in my Bundle.config. I am not getting where is the issue. Can someone help me to solve this? I searched that cookie keyword entire from my solution and I didn't find anything. Please see following screenshot I have upgraded my scripts by using nugget command line package manager. But still my problem isn't solved. I found the script which cause an issue. EDIT ~/Scripts/common-scripts.js this script giving me error. Here is script code /*---LEFT BAR ACCORDION----*/ $(function () { $('#nav-accordion').dcAccordion({ eventType: 'click', autoClose: true, saveState: true, disableLink: true, speed: 'slow', showCount: false, autoExpand: true, // cookie: 'dcjq-accordion-1', classExpand: 'dcjq-current-parent' }); }); // right slidebar $(function () { $.slidebars(); }); var Script = function () { // sidebar dropdown menu auto scrolling jQuery('#sidebar .sub-menu &gt; a').click(function () { var o = ($(this).offset()); diff = 250 - o.top; if (diff &gt; 0) $("#sidebar").scrollTo("-=" + Math.abs(diff), 500); else $("#sidebar").scrollTo("+=" + Math.abs(diff…
has comment: http://stackoverflow.com/comment/46576169
has comment: http://stackoverflow.com/comment/46576138
has comment: http://stackoverflow.com/comment/47023615
has comment: http://stackoverflow.com/comment/47023399
has comment: http://stackoverflow.com/comment/46575912
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46576200
has comment: http://stackoverflow.com/comment/47023872
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/29426742
has comment: http://stackoverflow.com/comment/47023631
has title: 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'cookie'
tagged with: c#
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46576215
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46575968
has comment: http://stackoverflow.com/comment/47023572

http://stackoverflow.com/q/29183290
type: Question
has answer: http://stackoverflow.com/a/29183349
answer count: 2
tagged with: javascript
tagged with: class
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29183362
tagged with: css
linked to: http://stackoverflow.com/q/27857095
has title: HTML & JS - How to modify CSS class atributes
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/27857095
has body: I have the following code and nothing happens: HTML: &lt;head&gt; &lt;script type="text/javascript" src="log-oth.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body onResize="nav_fontsz()"&gt; JS: function nav_fontsz(){ var nav = document.querySelectorAll('.nav'); var navbtn = document.querySelectorAll('.nav-button'); for (i=0 ; i&lt;navbtn.length ; i++){ navbtn[i].style.fontSize = (nav[0].style.width / 3.5)+'px';} alert(nav[0].style.width); } plus, the alert box shows nothing, not even 0

http://stackoverflow.com/a/29160829
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: \[\[(\d+)\]\] Try this.Grab the capture or group 1.See demo. var re = /\[\[(\d+)\]\]/gs; var str = '[[12]],23,asd'; var m; while ((m = re.exec(str)) != null) { if (m.index === re.lastIndex) { re.lastIndex++; } // View your result using the m-variable. // eg m[0] etc. }
answers question: http://stackoverflow.com/q/29160705

http://stackoverflow.com/a/29102905
type: Answer
answers question: http://stackoverflow.com/q/29098888
score: 3
has body: I've found this very good module that does exactly what I was trying to achieve. Allows me to delimit the stdout buffer by any character (in my case '\r') and trigger a new stdout event to handle the data. Like.... var splitter = process.stdout.pipe(StreamSplitter("\r")); splitter.on('token', function (data) { console.log("OUT: " + data); }); splitter.on('done', function (data) { console.log("DONE: " + data); });
upvote count: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29098888
type: AcceptedAnswer

http://stackoverflow.com/q/29107816
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46445371
type: UnansweredQuestion
tagged with: angular-promise
tagged with: memory-leaks
has title: Destroy promise without memory leak and don't execute any callbacks
has comment: http://stackoverflow.com/comment/46448130
has answer: http://stackoverflow.com/a/29107903
type: Question
has body: I use $q to create deferred object. Normal use case like this: deferred.promise.then(success_callback, error_callback) When deferred.resolve() / deferred.reject(), it's fine, no memory leak because success_callback or error_callback was executed. But now I want to destroy the promise object, that means I don't want to call deferred.resolve() or deferred.reject(), without memory leak. How can I do that? EDIT: More clearly, I want to ignore the existent of the promise, I don't want success_callback or error_callback to be executed anymore. Yes, maybe I want to unregister callbacks.
tagged with: javascript
has comment: http://stackoverflow.com/comment/46445249
score: 4
tagged with: http://stackoverflow.com/tag/q
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/29149005
tags question: http://stackoverflow.com/q/29194197
tags question: http://stackoverflow.com/q/29121557
tags question: http://stackoverflow.com/q/29072004
tags question: http://stackoverflow.com/q/29079498
tags question: http://stackoverflow.com/q/29118925
type: Tag

http://stackoverflow.com/comment/46606368
type: Comment
has text: I don't understand why `window[...]` is necessary here! The variable dataFromDb is in scope since `dataFromDb.name` works fine but if I remove the `window[...]` it doesn't work anymore.
comment on: http://stackoverflow.com/a/29195619
type: AnswerComment
score: 0

iframe-resizer
tags question: http://stackoverflow.com/q/29116312
tag name: iframe-resizer
type: Tag

http://stackoverflow.com/comment/46414696
type: AnswerComment
score: 0
type: Comment
has text: it definitely is, Firefox works fine and from memory IE does as well but for some reason the Chrome developers decided to not implement it fully
comment on: http://stackoverflow.com/a/29091136

http://stackoverflow.com/q/29196853
has title: PayPal - Users can change price before checkout
answer count: 5
has answer: http://stackoverflow.com/a/29197305
type: UnansweredQuestion
tagged with: php
tagged with: paypal
has answer: http://stackoverflow.com/a/29197079
has answer: http://stackoverflow.com/a/62360423
has answer: http://stackoverflow.com/a/54474046
type: Question
has body: I'm having a small problem on my website. I want to make it so right before users check out they can change some options to their own liking, which edits the final price. I have this working, but the user can easily inspect element and change the amount to pay on the PayPal button. This is my HTML for the button right now: &lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"&gt; &lt;input type="hidden" name="cmd" value="_xclick"&gt; &lt;input type="hidden" name="business" value="agservers7@gmail.com"&gt; &lt;input type="hidden" name="lc" value="US"&gt; &lt;input type="hidden" name="item_name" value="VPS"&gt; &lt;input type="hidden" id='priceValue' name="amount" value="0.99"&gt; &lt;input type="hidden" name="currency_code" value="USD"&gt; &lt;input type="hidden" name="button_subtype" value="services"&gt; &lt;input type="hidden" name="no_note" value="0"&gt; &lt;input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest"&gt; &lt;input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"&gt; &lt;img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"&gt; &lt;/form&gt; So, for price updating, I do this in JavaScript. The updateFinalPrice() function is called when the user changes the options that they have: function updateFinalPrice(){ var mainPrice = 24.99 var finalPriceElement = $("#finalPrice") var finalPrice = addedRAM + mainPrice finalPrice = (finalPrice).toFixed(2) finalPriceElement.text("$" + finalPrice) $('#priceValue').attr("value", finalPrice) // Changes amount value of paypal button } So this works overall, but once the user has set all their options, they could just change the value of the amount input to whatever they want to pay, which is clearly an issue. I understand I could do this on the server, but I don't understand how to go about doing that when t…
tagged with: javascript
has answer: http://stackoverflow.com/a/29197394
has comment: http://stackoverflow.com/comment/46606721
score: 0

http://stackoverflow.com/comment/46643321
comment on: http://stackoverflow.com/q/29216977
type: Comment
type: QuestionComment
has text: using the second implementation does not ensure that you'll iterate through your whole array contents...however the first does. if you dont want undefineds, you can strip the undefined elements of the array then iterate through the array (in which case both methods would yield the same result)
score: 1

http://stackoverflow.com/q/29078681
tagged with: html-table
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46390961
favorite count: 0
type: UnansweredQuestion
has body: The table with the knockout.js bindings currenlty looks lke this: source total division 00234 4506 div1 30222 456 div2 63321 23 div2 40941 189 div1 The desired output would be something like below. The data needs to grouped by division. source total div1 00234 4506 40941 189 div2 30222 456 63321 23 Here's my ViewModel: var ReportingViewModel; ReportingViewModel = { Results: ko.observableArray(null) } The ReportingViewModel gets populated via an ajax request: ReportingViewModel.Results(data["Data"]["Report"]); Q: How can I achieve the desired output? EDIT: Here's my View: source total division
has answer: http://stackoverflow.com/a/29079239
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29079334
has title: KnockoutJS observableArray: group data in foreach
tagged with: ko.observablearray
score: 1
upvote count: 1
tagged with: knockout.js
type: Question
tagged with: javascript

http://stackoverflow.com/a/29153773
upvote count: 2
downvote count: 0
type: Answer
has body: Look at split instead of slice. href.split('?')[0] should work.
score: 2
answers question: http://stackoverflow.com/q/29153693

http://stackoverflow.com/q/29139252
linked to: http://stackoverflow.com/q/29072506
has comment: http://stackoverflow.com/comment/46503414
has comment: http://stackoverflow.com/comment/46502449
upvote count: 1
has comment: http://stackoverflow.com/comment/46503099
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46503280
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46502622
has answer: http://stackoverflow.com/a/29139975
has comment: http://stackoverflow.com/comment/46502410
answer count: 1
has title: Javascript Splice array value
has comment: http://stackoverflow.com/comment/46503108
favorite count: 0
has comment: http://stackoverflow.com/comment/46502546
has body: Couple days ago I have asked a question, I will link it here, since it has some explanations about what I want, so you can get a idea what I want to do, JavaScript array splice This is solved now, and the codes works fine, But now I want to get the value of the card that has been spliced ( the cards we get when we drag them in box and click on it ) I thought this would be simple, but I guess I am wrong, Concrete: I want that the user picks up 3 cards, and this will be mailed to the owner of the website, at the moment I can pick up 3 cards, by using splice the user can not pick multiple the same card, but now I want that the cards that it picks up, turn into a variable or something that I can mail them later. $(function () { var cars = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; var rand = cars[Math.floor(Math.random() * cars.length)]; $(".cards img").each(function (index) { var src = cars.splice(Math.floor(Math.random() * cars.length), 1); console.log(src, cars.join()) $(this).wrap(' ') .parent().wrap(' ') .parent().wrap(' ') .append(' JSFiddle : http://jsfiddle.net/arunpjohny/dkk2nqyg/9/ quite hard to explain, hope you get the idea.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29139975

http://stackoverflow.com/comment/46612671
comment on: http://stackoverflow.com/q/29166937
has text: @William Denniss: There is no way to get the google site admin keep in sync with thousand of installations. Each is getting it's own domain. Our application i always the same. However, the main question is: Is there any way to get the window title of an ssl site via JavaScript?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46523430
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29150789
score: 2
has text: I think you should add a fiddle of the code that's not working, as there's nothing wrong with the code you put on here.

http://stackoverflow.com/a/29070022
answers question: http://stackoverflow.com/q/29069762
has comment: http://stackoverflow.com/comment/46411101
has body: You should extract the common state into its own module, and add it as a dependency in both modules. Then you can access the same shared state in both modules. EDIT: I made an example of what I mean in Plunker. So you make one module which contains the service that both modules need: (function(){ angular.module("sharedData", []) .service("sharedService", function(){ this.getSharedData = function(){ return this.sharedObject; }; this.setSharedData = function(newData){ this.sharedObject = newData; }; }); }()); Then you make this module a dependency of the modules that need it: (function(){ angular.module("firstModule", ["sharedData"]) .controller("firstCtrl", function($scope, sharedService){ $scope.get = function(){ $scope.data = sharedService.getSharedData(); }; }); }()); (function(){ angular.module("secondModule", ["sharedData"]) .controller("secondCtrl", function($scope, sharedService){ $scope.set = function(){ sharedService.setSharedData("Test"); }; }); }()); Ask ahead if you have more questions.
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/29070064
has body: First, you need to recognize that a parent state's controller runs only once when you enter the subtree of its child states, so switching between its children would not re-run the controller. This is to say that if you want the itemId parameter to always be up to date, you'd need a $watch (which you tried to avoid). For the first time, you could collect the itemId like so in the parent's state: $scope.itemId = $state.params.itemId; If you need it to be kept up-to-date, then you'd need to watch for changes, for example: $scope.$watch(function(){ return $state.params; }, function(p){ $scope.itemId = p.itemId; }); plunker Similarly, if you only need to place it in the view, then set $state on the scope: $scope.$state = $state; and in the view: parent /orders/{{step}}/{{$state.params.itemId}} EDIT: I guess another way would be to call a scope-exposed function on the parent to update the value. I'm not a fan of such an approach, since it relies on scope inheritance (which is not always the same as state inheritance) and scope inheritance in a large application is difficult to track. But it removes the need for a $watch: In the parent controller: $scope.updateItemId = function(itemId){ $scope.itemId = itemId; }; and in the child controller: if ($scope.updateItemId) $scope.updateItemId($stateParams.itemId)
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/29069836
score: 4
accepted answer of: http://stackoverflow.com/q/29069836
type: AcceptedAnswer

http://stackoverflow.com/comment/46556378
type: QuestionComment
comment on: http://stackoverflow.com/q/29169011
has text: Does order matter? ie: [9,7] and [7,9], are they considered distinct?
score: 0
type: Comment

http://stackoverflow.com/q/29100139
upvote count: 3
has body: I have a section on my site where I display user uploads. Currently, I do this via an iFrame like this: &lt;iframe src="path/to/users/file.pdf" width="500px" height="500px" /&gt; Some of these files can be huge, so I'd like to show a progress bar so users can track what's going on. I found a ton of answers on SO relating to checking when the content of an iframe itself is 100% loaded (so that a spinner can be disabled). However, I want to show the actual percentage of what has been downloaded. Is this possible? If it can't be done that way, can I "inject" raw data onto the page somehow? For instance, if I make an ajax call to `/path/to/filedownload.pdf', can I pop that response onto the page? I'm not totally sure where to start with this.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
score: 3
has comment: http://stackoverflow.com/comment/46430785
has comment: http://stackoverflow.com/comment/46430656
type: Question
has comment: http://stackoverflow.com/comment/46430963
tagged with: javascript
tagged with: jquery
has title: Is it possible to capture the load percentage of content being downloaded in an iFrame?

http://stackoverflow.com/comment/46368932
comment on: http://stackoverflow.com/q/29066399
type: QuestionComment
type: Comment
score: 1
has text: @VladimirKovalchuk: nonetheless, it's a clever little trick that is occasionally useful.

http://stackoverflow.com/q/29132907
has comment: http://stackoverflow.com/comment/46491925
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46491777
has comment: http://stackoverflow.com/comment/46491676
has comment: http://stackoverflow.com/comment/46491876
has comment: http://stackoverflow.com/comment/46491853
has comment: http://stackoverflow.com/comment/46491763
has title: Having trouble with JS/jQ on the 'use strict' error
has comment: http://stackoverflow.com/comment/46491720
answer count: 1
downvote count: 0
tagged with: jquery
has body: I have a small function that I'm using to change the background of an HTML file, but JSLint keeps returning the"'Missing 'use strict' staetment" error message even after I've tried many, many things. Any help as to how I could fix this issue? Here's the JS - /*jslist browser = true*/ /*global $, jQuery, alert*/ /*jshint strict: true*/ $(document).ready(function () { $('#black').click(function () { 'use strict'; $('.outer-container').css('background-color', '#000'); $('.outer-container').css('color', '#fff'); $('a:link').css('color', 'white'); $('a.hover').css('color', 'white'); $('a:visited').css('color', 'white'); }); });
has answer: http://stackoverflow.com/a/29133127
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46491962
tagged with: css

http://stackoverflow.com/a/29205783
has comment: http://stackoverflow.com/comment/46623318
has comment: http://stackoverflow.com/comment/46628290
downvote count: 0
has comment: http://stackoverflow.com/comment/46627803
accepted answer of: http://stackoverflow.com/q/29196345
has comment: http://stackoverflow.com/comment/46623224
answers question: http://stackoverflow.com/q/29196345
has comment: http://stackoverflow.com/comment/46630027
has body: You can try something like this var e = angular.module("editor", []) .constant("editor.url", "/editor"); var m = angular.module("main", ["editor"]); m.constant("serverUrl", "http://someserverurl.com"); m.config(["editor.url","serverUrl", "$provide", function(eu,se,$provide){ $provide.constant("editor.serverUrl",se+eu); }]); var e = angular.module("editor", []) .constant("editor.url", "/editor"); var m = angular.module("main", ["editor"]); m.constant("serverUrl", "http://someserverurl.com"); m.config(["editor.url", "serverUrl", "$provide", function(eu, se, $provide) { $provide.constant("editor.serverUrl", se + eu); } ]); e.controller('ctrl', ["$scope", "serverUrl", "editor.url", "editor.serverUrl", function($scope, su, eu, seu) { $scope.serverUrl = su; $scope.editorUrl = eu; $scope.editorServerUrl = seu; } ]) serverUrl = {{serverUrl}} editorUrl = {{editorUrl}} editorServerUrl = {{editorServerUrl}} UPDATE In AngularJS used dependency injection, so when you add dependency in your module it must be loaded before this module run. In your first variant: you try use main module that depend on editor module inside editor modue. For solving you can use third module from your second variant mainModuleProviders, or configure all inside main module. NOTE: inside angular does not have module, so no matter where declared this constant
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46628017
has comment: http://stackoverflow.com/comment/46630008
has comment: http://stackoverflow.com/comment/46629864
has comment: http://stackoverflow.com/comment/46626267
has comment: http://stackoverflow.com/comment/46629223
type: Answer

http://stackoverflow.com/comment/46510882
score: 0
type: AnswerComment
has text: I honestly prefer using `on[event]`, compare to the code in the answer you suggested, or as you said using only one `attachEvent`, that basically is the same I said – using a reimplementation of event system, like jQuery does – rather than the code you suggested. The execution of the listener is random, at least it was in the past, and the documentation seems still confirm that (see: https://msdn.microsoft.com/en-us/library/ie/ms536343%28v=vs.85%29.aspx)
type: Comment
comment on: http://stackoverflow.com/a/29143869

http://stackoverflow.com/comment/46515442
type: QuestionComment
comment on: http://stackoverflow.com/q/29146469
score: 7
has text: It's an anoymous function, how can have a name?
type: Comment

gulp
tags question: http://stackoverflow.com/q/29188357
tags question: http://stackoverflow.com/q/29089884
tags question: http://stackoverflow.com/q/29201843
tags question: http://stackoverflow.com/q/29062557
tags question: http://stackoverflow.com/q/29134762
tags question: http://stackoverflow.com/q/29177799
tags question: http://stackoverflow.com/q/29084657
tags question: http://stackoverflow.com/q/29206061
tags question: http://stackoverflow.com/q/29123447
type: Tag
tag name: gulp
tags question: http://stackoverflow.com/q/29196213
tags question: http://stackoverflow.com/q/29103020
tags question: http://stackoverflow.com/q/29192208
tags question: http://stackoverflow.com/q/29118988
tags question: http://stackoverflow.com/q/29200686
tags question: http://stackoverflow.com/q/29142648
tags question: http://stackoverflow.com/q/29150998
tags question: http://stackoverflow.com/q/29152536
tags question: http://stackoverflow.com/q/29216551
tags question: http://stackoverflow.com/q/29063427
tags question: http://stackoverflow.com/q/29117128
tags question: http://stackoverflow.com/q/29176819
tags question: http://stackoverflow.com/q/29144700
tags question: http://stackoverflow.com/q/29215175
tags question: http://stackoverflow.com/q/29125088
tags question: http://stackoverflow.com/q/29088595

http://stackoverflow.com/a/29211088
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29211060
answers question: http://stackoverflow.com/q/29211060
upvote count: 1
type: AcceptedAnswer
has body: Just remove return html_bar += ' bar ';

http://stackoverflow.com/comment/46522680
comment on: http://stackoverflow.com/a/29150380
score: 1
type: AnswerComment
has text: What could be then the purpose of `e = e || window.event;` because anyway `window.event` isn't defined on FF, using `new Event(type)`?
type: Comment

http://stackoverflow.com/comment/46589413
type: QuestionComment
type: Comment
score: 1
has text: If there isn't a selector, I would assume you just filter the results in a loop based on the classes they have.
comment on: http://stackoverflow.com/q/29187210

tcp
type: Tag
tags question: http://stackoverflow.com/q/29077409
tag name: tcp

http://stackoverflow.com/a/29199996
upvote count: 15
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/123151502
answers question: http://stackoverflow.com/q/29199089
type: Answer
accepted answer of: http://stackoverflow.com/q/29199089
has body: I digged all internet and then I find a solution. th:attr="ng-click='addSubComment(\''+${newsComment.comment.id}+'\');'" referenced : http://www.mattheye.com/passing-data-between-spring-mvc-and-angularjs/
score: 15

http://stackoverflow.com/a/29127026
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29127006
downvote count: 0
has body: You can do this by checking if x + 10 &lt; y.

http://stackoverflow.com/q/29202799
type: Question
has answer: http://stackoverflow.com/a/29202833
has title: JavaScript this issue with parent and child classes/objects
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29202823
has body: I'm not quite sure how to explain it in words so here is some example code to show what I'm trying to achieve: function carFactory(){ this.wheelsPerCar = 4; this.car = function() { this.wheels = []; this.addWheels = function(){ for(var i = 0; i &lt; this.wheelsPerCar; i++){ var wheel = new this.wheel(); this.wheels.push(wheel); } }; this.wheel = function(){ }; }; }; var cf = new carFactory(); var myCar = new cf.car(); myCar.addWheels(); When I print myCar.wheels I get an empty array back. I think this is because this.wheelsPerCar is out of scope. I think I'm likely designing this completely wrong as I haven't work much with JavaScript classes and objects.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29202883

http://stackoverflow.com/q/29158853
score: 0
tagged with: firefox
answer count: 1
tagged with: javascript
has body: This code is intended a open a new tab and close the current: My link It works in Chrome, but in Firefox and Safari it doesn't close close the current tab.
has answer: http://stackoverflow.com/a/29158941
tagged with: safari
has title: Close the current tab and open a new - works only in Chrome
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46537988
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/29090343
tagged with: javascript
has answer: http://stackoverflow.com/a/29090423
tagged with: jquery
has body: I have this structure with dynamic DIVs and all have the same class, since all are created automatically. The problem here is that, the last of them prior to other DIV with other class, I would like to have his style as width:100% instead of width:50% as all others set by CSS. Here's a sample: So I only want to change that third DIV, which sometimes is the first and only one, other times is the second, other times is the fourth, etc... I am usually good with CSS but this time I'm having a hard time finding a solution for this one. Can someone please give me a hand here guiding me in the right track so I could put this working?
has comment: http://stackoverflow.com/comment/46413401
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29090801
tagged with: css
has comment: http://stackoverflow.com/comment/46413632
has comment: http://stackoverflow.com/comment/46413459
type: AnsweredQuestion
has title: Change DIV width that is before another DIV
has comment: http://stackoverflow.com/comment/46413934
has answer: http://stackoverflow.com/a/29090801
has comment: http://stackoverflow.com/comment/46413694
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46413278
answer count: 2
linked to: http://stackoverflow.com/q/8300185
has comment: http://stackoverflow.com/comment/46413358
has comment: http://stackoverflow.com/comment/46413079
possible better answer: http://stackoverflow.com/a/29090423
has comment: http://stackoverflow.com/comment/46413580

http://stackoverflow.com/comment/46429741
comment on: http://stackoverflow.com/a/29099387
has text: its not working, i have to convert "'<?php echo hash('sha1', 'my-secret-key' . $_REQUEST["email"]); ?>'" to scripts
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29093368
has comment: http://stackoverflow.com/comment/46418497
has answer: http://stackoverflow.com/a/29160394
has comment: http://stackoverflow.com/comment/46418475
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46418359
has comment: http://stackoverflow.com/comment/46418250
score: 0
has comment: http://stackoverflow.com/comment/46418208
accepted answer: http://stackoverflow.com/a/29160394
type: Question
has title: Click Event Unbinded after Server Side Call
has body: I'm facing an issue on Click event of button. Kindly have a look at the following Javascript code. $(function () { UploadBtnDisableEvents(); function UploadBtnDisableEvents() { var buttonUpload = $('#' + '&lt;%= imgBtnDocUpload.ClientID %&gt;'); var txtfile = $('#' + '&lt;%= filUpload.ClientID %&gt;'); var txtname = $('#' + '&lt;%= txtDocName.ClientID %&gt;'); buttonUpload.on('click', function () { validateControls(txtfile, txtname)) { setTimeout(function () { buttonUpload.prop('disabled', true); buttonUpload.removeAttr('href'); }, 10); } }); var validateControls = function (file, docname) { var inputname = docname.val(); var inputfile = file.val(); if (inputname == "" || inputfile == null || inputfile == "" || inputfile == null) { return false; } else { return true; } } } }); This code works perfectly when intially page is loaded. When user click on upload button, button is disabled and server call is intiated. In Code behind at the end of button click button is again re-enabled. It's purpose is to stop user from clicking button again. Now when user click on delete button this click event which is bound using .on event is unbinded and when user again clicks on upload button, It is not disabled. Kindly give me your suggestions. By the way on delete complete page is reloaded which is why it's not rebinding the button with event. Thanks. Note : Kindly if you require more information just mention in comments. Controls we have used are anthem controls for ajax call purpose.
has comment: http://stackoverflow.com/comment/46418332
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/q/29150655
accepted answer: http://stackoverflow.com/a/29150711
downvote count: 7
type: Question
has answer: http://stackoverflow.com/a/29150711
tagged with: javascript
has comment: http://stackoverflow.com/comment/46523510
has comment: http://stackoverflow.com/comment/46523131
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/46523100
has comment: http://stackoverflow.com/comment/46523145
favorite count: 0
has title: Function not returning true when it should
has body: I am learning how to program, and I received the following task in my coding class: Make a function which take a parameter and returns true if no numbers are negative I've tried to do this using the below code: function allPositive(a) { if(a &gt; 0) { return true } } I tried to run allPositive([4,3,2,1]), but it didn't return true. How can I fix this?
has comment: http://stackoverflow.com/comment/46523191
has comment: http://stackoverflow.com/comment/46523298
type: AnsweredQuestion
score: -5

http://stackoverflow.com/comment/46482386
has text: That is how it looks though. The hidden inputs are at the same level as the tr's.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29128016

http://stackoverflow.com/comment/46455468
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29110923
has text: I formatted the links in your post and added the code from your plunk and JSFiddle. Next time, please add them yourself. You can use the "Code snippet" button when posting or editing your question (Ctrl + M if you like keyboard shortcuts) to add the snippets.
score: 0

http://stackoverflow.com/comment/46454970
type: Comment
type: QuestionComment
has text: @James Thorpe. Some older browsers like IE 8 and below don't support the native array map function. Why not use a well documented and relatively standard library like underscore.js that can handle the browser compatibility/implementation details as well as offer tons of other functionality?
comment on: http://stackoverflow.com/q/29111002
score: 0

http://stackoverflow.com/a/29156130
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29156023
has body: maybe your situation is not same as like me , but i made a service for my own $http call var myService = angular.module('apix',[]); myService.service('api',function( $http ){ this.http = function( method , path , data ){ return $http({ method: method, url: path, headers: { 'Content-Type' : 'application/x-www-form-urlencoded' }, data : jQuery.param(data) }); } }); and used to call this as like api.http('POST','your_path', data).success(function(result){ });
downvote count: 0
score: 1

http://stackoverflow.com/a/29188750
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29188728
type: Answer
has body: Use background-image. IE supports this syntax. function flipBack() { var tile_1 = document.getElementById(memory_tile_ids[0]); var tile_2 = document.getElementById(memory_tile_ids[1]); tile_1.style.backgroundImage = "url('Images/tile_bg.png') no-repeat"; tile_1.innerHTML = ""; tile_2.style.backgroundImage = "url('Images/tile_bg.png') no-repeat"; tile_2.innerHTML = ""; memory_values = []; memory_tile_ids = []; }

http://stackoverflow.com/a/29203833
answers question: http://stackoverflow.com/q/29203784
has body: I did this: $(document).ready(function() { $("#container li").click(function() { // $('#container li div').slideUp(); // $('#container li span').text('+'); $(this).find('.panel').slideToggle(); $(this).find('span').text('-'); }); }); That is, I commented out the first two line. Is the idea that you are trying to close a div a previous click opened? You need to do that some other way.
upvote count: 1
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/q/29104169
has answer: http://stackoverflow.com/a/29107965
favorite count: 0
has body: <input type="button" value="<" name="ml" onClick="form()" /> " name="mr" onClick="form()" /> So i need to pass the value from right to left and from left to right using the greater and lesser symbols when the exact checkbox is checked. Example: If the two first checkboxes from the left are checked and you hit the greater symbol it should pass the Name and Surname into the right form.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Pass value from one form to another with javascript
downvote count: 1
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46438569
upvote count: 0
answer count: 1

http://stackoverflow.com/a/29169771
upvote count: 2
answers question: http://stackoverflow.com/q/29120270
downvote count: 0
has body: The cleanest way to trigger autocomplete would be to use ngSubmit. However as you want to use ngClick, a solution like this https://stackoverflow.com/a/25102791 would work. You are submitting the form from the controller. Triggering the native submit function needs to be applied through a directive as this is the recommended place to manipulate the DOM using AngularJS.
type: Answer
score: 2

http://stackoverflow.com/comment/46362176
comment on: http://stackoverflow.com/a/29063034
type: AnswerComment
score: 0
type: Comment
has text: i just add @DavidSherret

http://stackoverflow.com/comment/46605113
comment on: http://stackoverflow.com/q/29196138
type: QuestionComment
type: Comment
has text: I also believe you have to include your external JavaScript file at the end of your HTML file (instead of in the head) in order for the div to actually exist. The browser loads the JavaScript before the rest of the body, and the JavaScript is run before the div is created in the DOM.
score: 1

http://stackoverflow.com/comment/112440419
comment on: http://stackoverflow.com/a/63585414
type: Comment
score: 2
has text: Nothing in the OP's question states that there will always be hyphens in between the different parts. Your solution will only work when there are hyphens.
type: AnswerComment

http://stackoverflow.com/q/29127008
has answer: http://stackoverflow.com/a/29135335
answer count: 4
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29131365
type: Question
has answer: http://stackoverflow.com/a/29128267
has answer: http://stackoverflow.com/a/29129535
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46480453
upvote count: 1
favorite count: 0
tagged with: angularjs
has title: convert jquery form submission to angular
has comment: http://stackoverflow.com/comment/46517257
type: UnansweredQuestion
has body: I'm trying to convert the following jquery into angular, but can't seem to get it to work. // jquery $('#formsubmit').click(function(ev){ ev.preventDefault(); $.ajax({ url: "/url.json", type: "POST", data: {email: $("#emailinput").val()}, dataType: "json", success: function(data){ console.log(data); }, error: function(data){ console.log(data); } }); }); Here is my angular. I put most of the logic into a controller, I'm not really sure if it's the best approach. Would it be better to use a directive? var app = angular.module("app", []); app.controller('myCtrl', [ '$scope', '$http', function($scope, $http) { $scope.submitform = function() { $http({ url: "/url.json", method: "POST", data: {email: $scope.email} }).success(function(data, status, headers, config) { $scope.data = data; }).error(function(data, status, headers, config) { $scope.status = status; }); } }]); EDIT Thanks for the help so far. I adjusted a few things, but still having problems. When I click the button nothing seems to happen. Here's what I have so far. ------html------ submit ------factory file----- var emailUser = angular.module("emailUsers", []); emailUser.factory("emailUsers", [ "$http", "$q", function($http, $q){ var fetch = function(theEmail){ $http.post('/url', {email: theEmail}) .success(function(data, status, headers, config) { $scope.data = data; console.log("success", data); }).error(function(data, status, headers, config) { $scope.status = status; console.log("error", status); }); } return { fetch: fetch, } }]); -----directive------ var emailSubscribe = angular.module("emailsubscribe", []); emailSubscribe.directive('emailDir', [function() { return { restrict: 'E', replace: true, controller: ['$scope', '$filter', '$attrs', 'i18n', 'emailUsers', function($scope, $filter, $attrs, i18n, emailUsers) { $scope.email; $scope.response = []; // when the user clicks the button with the ng-click="send", // I want this to call the factory "emailUsers" fetch function function $scope.send = function()…

http://stackoverflow.com/q/29146043
type: Question
has comment: http://stackoverflow.com/comment/46514779
tagged with: javascript
score: 0
has title: Multiple lists with multiple options
has comment: http://stackoverflow.com/comment/46515202
answer count: 1
has answer: http://stackoverflow.com/a/29146421
accepted answer: http://stackoverflow.com/a/29146421
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has body: I'm trying to create 3 different lists with the first containing different car brands, the second the model of the car and the third the motor of the car. Once the user has selected the first option, which is the car brand he should then get the options for that car in the next drop-down list and from that option the third drop-down list should adjust to that specific model. If my explanation was too hard to understand here's an example of the exact thing I'm trying to create. http://www.quantumtuning.se/?page_id=36 Would appriciate if someone could hand me a link to a guide or explanation somewhere because I've been looking everywhere without success.
type: AnsweredQuestion
tagged with: mysql

http://stackoverflow.com/comment/46594577
type: AnswerComment
has text: I wish I could upvote this answer 50 times, because it's great. The reason for the so-called anti-pattern approach is I discovered the hard way that I needed to slow down the accessing of the data, to avoid a ridiculous amount of requests happening virtually simultaneously. The dataset is broken up into about 60,000 small JSON files in total so I needed to set it up so it wouldn't request the next one until the first one had loaded, or it would cause the server to swear at me. (I tried). Thus using a nested promise approach - the data load finishing triggers loading the next one.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29189496

http://stackoverflow.com/comment/46506545
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29141472
has text: Clarify your question, please...
type: Comment

http://stackoverflow.com/q/29129482
has body: I need to change the current url after a form has been submitted using an AJAX GET request. I've tried to use history.pushState(null, null, url+'?'+form.serialize()) and it works fine. The problem is that what I'm retrieving is only a subset of the page, therefore the browser will display that subset instead of the whole page when navigating through history. I like history.pushState approach, but it doesn't look viable; do you know any better way? Or, even better, do you know how to save the whole content of the page instead of the subset? The url I need to get is mydomain.com/some-page?variable=1&amp;varialbe_2=2 To give you more informations: the controller method I need to access detects if the route has been called by an Ajax request, and if it has the response will be json. Otherwise it will load the whole page normally. Thanks for any help you can give.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29129516
has title: Change url after successfully submitting a form through AJAX with a GET method
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29129516
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/172957

http://stackoverflow.com/comment/46498164
type: Comment
has text: I understand your point. and this answer works too. But only problem will be that it would keep unwanted html in the DOM. I have made a modification to your code and posted below and it removes all the content in the DOM related to the added div.
comment on: http://stackoverflow.com/a/29136569
score: 0
type: AnswerComment

http://stackoverflow.com/a/29210503
has body: In code you have to write this {name:'accountType',index:'accountType', width:100,editable:true, editrules:{required:true},editoptions:{size:10},edittype:"select",formatter:'select',editoptions:{ value: "Debit:Debit;Credit:Credit"},jsonmap:"acntTypeName"}, this will solve my requirement
answers question: http://stackoverflow.com/q/29210160
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29210160
type: Answer

http://stackoverflow.com/comment/46601095
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29193874
type: AnswerComment
has text: Using the exact syntax in your question, no, it's not possible. What you'll get are answers with creative ways to solve the problem using standard language features

http://stackoverflow.com/a/46214408
has body: i had same problem i had used the CDN but instead use the angularjs library that is available for download and include in your page happy coding
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29160446

http://stackoverflow.com/q/29158365
has body: I'm implementing a video texture in THREE.js, similar to this example: Stemkoski Video Texture Example I've noticed that the author of that example resorted to custom keyboard controls. Is that because it's not currently possible to use the native controls provided by HTML5 if you have a video texture in THREE.js? I tried the following code in the video tag, &lt;video controls src="example_video_source"&gt;&lt;/video&gt; and although the video played correctly, no controls were present. Why? Thanks in advance.
has comment: http://stackoverflow.com/comment/46575979
tagged with: three.js
tagged with: video
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46573652
has title: Is it necessary to create custom video controls if you are using a video texture in THREE.js?
score: 0

google-chrome
tags question: http://stackoverflow.com/q/29063357
tags question: http://stackoverflow.com/q/29074318
tags question: http://stackoverflow.com/q/29195856
tags question: http://stackoverflow.com/q/29189347
tags question: http://stackoverflow.com/q/29183963
tags question: http://stackoverflow.com/q/29185821
tags question: http://stackoverflow.com/q/29189547
tags question: http://stackoverflow.com/q/29184621
tags question: http://stackoverflow.com/q/29091008
tags question: http://stackoverflow.com/q/29169937
tags question: http://stackoverflow.com/q/29215107
tags question: http://stackoverflow.com/q/29192641
tags question: http://stackoverflow.com/q/29174762
tags question: http://stackoverflow.com/q/29205567
tags question: http://stackoverflow.com/q/29067198
tags question: http://stackoverflow.com/q/29077544
tags question: http://stackoverflow.com/q/29189641
tags question: http://stackoverflow.com/q/29076520
tags question: http://stackoverflow.com/q/29121599
tags question: http://stackoverflow.com/q/29100856
tags question: http://stackoverflow.com/q/29166465
tags question: http://stackoverflow.com/q/29173983
tags question: http://stackoverflow.com/q/29114436
tags question: http://stackoverflow.com/q/29157077
tags question: http://stackoverflow.com/q/29178193
tags question: http://stackoverflow.com/q/29152672
tags question: http://stackoverflow.com/q/29079172
tags question: http://stackoverflow.com/q/29111339
tags question: http://stackoverflow.com/q/29209558
tags question: http://stackoverflow.com/q/29188943
tags question: http://stackoverflow.com/q/29149740
tags question: http://stackoverflow.com/q/29086481
tags question: http://stackoverflow.com/q/29146693
tags question: http://stackoverflow.com/q/29185601
tags question: http://stackoverflow.com/q/29203545
tags question: http://stackoverflow.com/q/29108347
tags question: http://stackoverflow.com/q/29203312
tags question: http://stackoverflow.com/q/29182418
tags question: http://stackoverflow.com/q/29158853
tags question: http://stackoverflow.com/q/29102874
tags question: http://stackoverflow.com/q/29197268
tags question: http://stackoverflow.com/q/29075805
tags question: http://stackoverflow.com/q/29207785
tags question: http://stackoverflow.com/q/29132198
tags question: http://stackoverflow.com/q/29152166
tags question: http://stackoverflow.com/q/29120822
tags question: http://stackoverflow.com/q/29193578
tags question: http://stackoverflow.com/q/29141567
tags question: http://stackoverflow.com/q/29095392
tags question: http://stackoverflow.com/q/29130394
tags question: http://stackoverflow.com/q/29141734
type: Tag
tags question: http://stackoverflow.com/q/29123425
tags question: http://stackoverflow.com/q/29159314
tags question: http://stackoverflow.com/q/29078461
tags question: http://stackoverflow.com/q/29151120
tags question: http://stackoverflow.com/q/29107835
tag name: google-chrome
tags question: http://stackoverflow.com/q/29114891
tags question: http://stackoverflow.com/q/29157563
tags question: http://stackoverflow.com/q/29153107
tags question: http://stackoverflow.com/q/29074347
tags question: http://stackoverflow.com/q/29203502
tags question: http://stackoverflow.com/q/29204732
tags question: http://stackoverflow.com/q/29113974
tags question: http://stackoverflow.com/q/29100577
tags question: http://stackoverflow.com/q/29114794
tags question: http://stackoverflow.com/q/29178900
tags question: http://stackoverflow.com/q/29186154
tags question: http://stackoverflow.com/q/29097527
tags question: http://stackoverflow.com/q/29208173
tags question: http://stackoverflow.com/q/29190800
tags question: http://stackoverflow.com/q/29103660
tags question: http://stackoverflow.com/q/29066487
tags question: http://stackoverflow.com/q/29184370
tags question: http://stackoverflow.com/q/29072744
tags question: http://stackoverflow.com/q/29162771
tags question: http://stackoverflow.com/q/29089422
tags question: http://stackoverflow.com/q/29190581
tags question: http://stackoverflow.com/q/29158022

http://stackoverflow.com/comment/46382096
comment on: http://stackoverflow.com/q/29072914
score: 0
type: Comment
type: QuestionComment
has text: toggle(5000) i have same problem

http://stackoverflow.com/comment/46448199
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29109316
score: 3
has text: Read about [Asset Pipeline](http://guides.rubyonrails.org/asset_pipeline.html).

http://stackoverflow.com/a/29131539
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29131505
has body: For Javascript, use an indexer. print (sessionScope.Me["vname"]) There is no get function on your Me object.
accepted answer of: http://stackoverflow.com/q/29131505
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/46631733
type: QuestionComment
type: Comment
has text: I've always wanted to ask a stack overflow question in stack overflow
comment on: http://stackoverflow.com/q/29210454
score: 0

http://stackoverflow.com/comment/46575820
comment on: http://stackoverflow.com/q/29179001
has text: Is there any reason why you can't do this all on the backend?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29155277
answers question: http://stackoverflow.com/q/29155084
score: 3
has body: You can try using .filter method instead of .find method. Or change your array in database to json.
accepted answer of: http://stackoverflow.com/q/29155084
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47316656
has comment: http://stackoverflow.com/comment/46542703
type: Answer
upvote count: 3

http://stackoverflow.com/comment/46453878
type: Comment
has text: what I am asking how to execute function getID without ng-click ?
type: AnswerComment
comment on: http://stackoverflow.com/a/29112391
score: 0

http://stackoverflow.com/comment/46513920
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29145642
has text: I like this method but you left out the part that I needed the most which was putting the TABLEDATA in there. I just want to send the entire html to the server, I will parse the html into csv on the server side. It wouldnt be as easy as $('#myTable').html() right? Because I think it would need to be escaped somehow.

http://stackoverflow.com/a/29205513
score: 0
type: Answer
has body: As you said there is no radio button with value "null", therefor observable object won't find any suitable DOM to move the checked property.. Until the developer of observable rewrite how checked property work with null value, you could use jquery or javascript code for this check this dojo
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29199038
has comment: http://stackoverflow.com/comment/46654305
answers question: http://stackoverflow.com/q/29199038

http://stackoverflow.com/comment/46422990
has text: could you put it on http://plnkr.co/edit/?p=preview ?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29096031

http://stackoverflow.com/comment/46488047
has text: This is fine for learning, but note that this is *not* fine for production code. You don't check a password against a list, you never store the password, only a hash and a salt that you check against.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29131150
score: 4

drupal
type: Tag
tags question: http://stackoverflow.com/q/29138769
tags question: http://stackoverflow.com/q/29120102
tag name: drupal

http://stackoverflow.com/comment/46509363
score: 2
type: Comment
type: QuestionComment
has text: what you need is debouncing, or throttling, depending on what you want to achieve.. infact ng-modal-options provides you the debounce option, so you can use that as well
comment on: http://stackoverflow.com/q/29141423

http://stackoverflow.com/q/29117299
has comment: http://stackoverflow.com/comment/46465897
has comment: http://stackoverflow.com/comment/46464128
has comment: http://stackoverflow.com/comment/46469032
has comment: http://stackoverflow.com/comment/46465277
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46465343
has answer: http://stackoverflow.com/a/29123043
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46464952
tagged with: css
score: 10
has answer: http://stackoverflow.com/a/63071638
has answer: http://stackoverflow.com/a/61139485
tagged with: http://stackoverflow.com/tag/svg
has title: Preserve aspect ratio for SVG Text
accepted answer: http://stackoverflow.com/a/29123043
answer count: 3
has body: This is an edited copy of https://stackoverflow.com/questions/29105120/preserve-aspect-ratio-for-svg-text-and-react-to-javascript-touch-events which I will remove, because it asked 2 related but technically different questions. as I already explained in my last question, I'm trying to make a navigation-div with 4 buttons, one to go left, one to go right, another one to go down and yet another one to go up. Plus there needs to be an OK-button in the middle. That worked really well with the explanation given here: Using CSS and HTML5 to create navigation buttons using trapezoids I created the SVG like: <g class="function" id="keyboard_btn_24"> OK </g> <g class="function" id="keyboard_btn_25">  </g> <g class="function" id="keyboard_btn_26">  </g> <g class="function" id="keyboard_btn_27">  </g> <g class="function" id="keyboard_btn_28">  </g> But I have two problems that I seem not to be able to figure out. First of all: While I want the SVG to be responsive, I don't want to scale the text without keeping the aspect-ratio given by the font. I already tried (unsuccessfully) preserveAspectRatio, which does not seem to do much to the text. Questions: How can you make the tag keep it's aspect ratio, while changing the aspect ratio of the svg? You can view and edit the minimal example: jsFiddle Paulie_D - Commented on my old question: As for the Aspect Ratio, you should remove the width & height 100% values. They aren't really needed. The SVG will scale to the required size based on the div size. - jsfiddle.net/2qqrL7ng/1 – This is not an option, because the SVG Element needs to respond to size changes that can not keep the aspect ratio. Just the text needs to keep the ratio, everything else should be as responsive as possible. EDIT Switching the svg argument of perserveAspectRatio from "none" to "xMidYMid" keeps the aspect ratio of the SVG, but the desired effect is, that the SVG itself does not keep it's aspect ratio, but the -tags do. Which means the following would NO…
has comment: http://stackoverflow.com/comment/46469069
possible better answer: http://stackoverflow.com/a/61139485
has comment: http://stackoverflow.com/comment/46465715
linked to: http://stackoverflow.com/q/28835743
tagged with: javascript
upvote count: 10

http://stackoverflow.com/q/29086585
has body: I have a button onclick event that works fine like here: // create function to remove "popup-open" classes // function used in onclick attribute (function( $ ){ $.fn.popupClose = function() { $( "body" ).removeClass( "popup-open" ) $( ".overlay_btn" ).removeClass("popup-open"); return this; }; })( jQuery ); // if a exists // onclick read button ID value // add "popup-open" class to span with IDvalue as class, with fadein effect if ( $( "button.popup" ).length ) { $("button.popup").click( function() { var btnId = $(this).attr('id'); $( "body" ).hide().addClass( "popup-open" ).fadeIn(100); $( "."+ btnId ).hide().addClass( "popup-open" ).fadeIn(200); } ); } if ( $( "button.link" ).length ) { $("button.link").click( function() { var btnFormAction = $(this).attr('formaction'); var btnTarget = $(this).attr('formtarget'); //alert(btnFormAction); window.open(btnFormAction, btnTarget); } ); } button { padding: 10px; font-size: 1.5rem; background-color: #d5d5d5; border: 3px solid #ddd; margin: 15px; box-shadow: 0px 0px 15px #888888; cursor: pointer; } button:hover { box-shadow: 0px 0px 10px #888888; } body:after { content: ""; display: none; position: fixed; /* could also be absolute */ top: 0; left: 0; height: 100%; width: 100%; z-index: 10; background: rgba(0,0,0,0.6); } .overlay_btn { display: none; padding: 10px; width: 300px; height: 200px; position: fixed; top: 50%; left: 50%; margin-top: -100px; margin-left: -150px; background-color: #fff; border-radius: 5px; text-align: center; z-index: 11; /* 1px higher than the overlay layer */ } body.popup-open:after, .popup-open { display: block; } popup button 1 close your content title 1 your content 1 popup button 2 close your content title 2 your content 2 link button 3 Here, you have a JS-less equivalent, but with much more CSS (LESS): http://codepen.io/maccadb7/pen/nbHEg Using the same code in this project: http://kine.sarabernaert.be/contact/ Button 'Maak Afspraak' gives a popup on the popup there's a button 'Ga naar aanmel…
has answer: http://stackoverflow.com/a/29086999
has comment: http://stackoverflow.com/comment/46406441
answer count: 1
downvote count: 0
tagged with: button
tagged with: jquery
has comment: http://stackoverflow.com/comment/46406392
favorite count: 0
has title: JQuery onclick works only once
accepted answer: http://stackoverflow.com/a/29086999
has comment: http://stackoverflow.com/comment/46406611
type: AnsweredQuestion
tagged with: onclick
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/29130227
has answer: http://stackoverflow.com/a/29143576
favorite count: 0
tagged with: angularjs
tagged with: android
has comment: http://stackoverflow.com/comment/46502131
accepted answer: http://stackoverflow.com/a/29143576
upvote count: 1
has title: AngularJS + Android 4.2: very slow to react
type: Question
type: AnsweredQuestion
score: 1
tagged with: android-4.2-jelly-bean
has body: Our web app is built with AngularJS v1.2.26 We're troubleshooting an issue that only seems to happen on older Android browsers, specifically 4.2... In short, asynchronous things are happening ~600% slower than they should. For example, we show an error message in response to a failed HTTP request. The service in charge of making the request has a variable which holds status messages. Then a controller watches it like this: // Status msg ctrl var statusCtrl = app.controller('statusCtrl', function($scope, updateService, $timeout) { $scope.message = false; //watch for status messages $scope.$watch(function () { return updateService.loadingTroubleMsg; }, function (value) { $scope.message = value; } ); }); In other browsers this works perfectly. The http request fails and then the message appears right away. On the Android browser (which the client is running from a USB) the message shows up ~20 minutes later. I have a couple theories: The promise is taking a very long time to be resolved, The $watch is happing in slow motion. The http request is taking a reallllly long time to timeout. There are no visible errors, and everything else seems to work. Unfortunately, I do not have the exact USB Android device in my position, which makes troubleshooting more difficult. Why would this happen? Are any of my theories more plausible then the others? Any advice on how to get to the bottom of this is welcome.
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46619088
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29203427
has text: Add one more condition, Check $(window).scrollTop(); and see if it's above 650. In that case don't store the scrollPosition in the local storage :)

http://stackoverflow.com/q/29155084
has title: TypeError: Object [object Object], [object Object] has no method find
tagged with: node.js
favorite count: 0
downvote count: 1
has answer: http://stackoverflow.com/a/34458351
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/29584191
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29155277
has comment: http://stackoverflow.com/comment/46531212
type: Question
upvote count: 4
possible better answer: http://stackoverflow.com/a/29584191
has comment: http://stackoverflow.com/comment/47316652
has comment: http://stackoverflow.com/comment/46542708
accepted answer: http://stackoverflow.com/a/29155277
tagged with: mean-stack
tagged with: javascript
has comment: http://stackoverflow.com/comment/46531100
has body: I have following a tutorial in a book called "Sitepoint Full Stack Javascript with MEAN" and I've just finished chapter 6, and should've created a "server" with a "database". The database is nothing more than a JSON document. However, even though (what I can see), my code is a direct copy of his, I get the error mentioned in the title when i try to run it. It's var result = data.find(function(item) {... (line located in employees.js, about line 16) that is the cause of this problem. I can't see what else I can do, and hope you people can find a solution to my problem. I have a couple of different files which I use for this. Index.js: var http = require('http'); var employeeService = require('./lib/employees'); var responder = require('./lib/responseGenerator'); var staticFile = responder.staticFile('/public'); http.createServer(function(req,res) { // a parsed url to work with in case there are parameters var _url; //In case the client uses lower case for methods req.method = req.method.toUpperCase(); console.log(req.method + ' ' + req.url); if (req.method !== 'GET') { res.writeHead(501, { 'Content-Type': 'text/plain' }); return res.end(req.method + ' is not implemented by this server.'); } if (_url = /^\/employees$/i.exec(req.url)) { //return a list of employess employeeService.getEmployees(function(error, data){ if(error) { return responder.send500(error, res); } return responder.sendJson(data,res); }); } else if (_url = /^\/employees\/(\d+)$/i.exec(req.url)){ //find the employee by the id in the route employeeService.getEmployee(_url[1], function(error, data) { if (error) { return responder.send500(error, res); } if(!data) { return responder.send404(res); } return responder.sendJson(data,res); }); } else{ res.writeHead(200); res.end("static file") } }).listen(1337); console.log('server running'); employee.js var employeeDb = require('../database/employees.json') exports.getEmployees = getEmployees; exports.getEmployee = getEmployee; function getEmployees (callback…
answer count: 3

http://stackoverflow.com/a/29080791
score: 1
has comment: http://stackoverflow.com/comment/46399077
has comment: http://stackoverflow.com/comment/46399182
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46401609
has comment: http://stackoverflow.com/comment/46420771
type: Answer
has comment: http://stackoverflow.com/comment/46415763
has comment: http://stackoverflow.com/comment/46401035
answers question: http://stackoverflow.com/q/29080719
accepted answer of: http://stackoverflow.com/q/29080719
has comment: http://stackoverflow.com/comment/46457953
has comment: http://stackoverflow.com/comment/46399876
has body: This is because showModalDialog is deprecated in modern browsers. showModalDialogs was used in pre-7.1 Sitecore releases. What you need is to install a proper package for you Sitecore version. Here is a list of Sitecore Support patches for different Sitecore versions: Sitecore Knowledge Base: Sitecore does not work in Chrome 37 and later or Fixing Chrome's ShowModalDialog JavaScript Error In Sitecore
has comment: http://stackoverflow.com/comment/46399542

http://stackoverflow.com/comment/46597043
type: QuestionComment
has text: @Moogs - question is the comments in the code itself. OP seemingly does not know how to handle a new year.
score: 0
comment on: http://stackoverflow.com/q/29191525
type: Comment

http://stackoverflow.com/a/29062972
has body: Always go for PHP when using a database. It is a more robust and proven technique. Also PHP pages are protected by the server and nobody can see how the code works, they only see HTML output, whereas with Javascript anyone can see your code. After all I don't know how JS supposed to interact with data, maybe store data in an XML page and then retrieve them, not sure. Why invent a wheel when you have PHP which is supposed to work with databases unlike JS which is designed mostly to be an improved front end functionality, unless its back end JS, but few people use JS that way.
has comment: http://stackoverflow.com/comment/46362539
has comment: http://stackoverflow.com/comment/46362289
has comment: http://stackoverflow.com/comment/46362635
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46362392
type: Answer
has comment: http://stackoverflow.com/comment/46361999
has comment: http://stackoverflow.com/comment/46362331
upvote count: 1
answers question: http://stackoverflow.com/q/29062828
accepted answer of: http://stackoverflow.com/q/29062828

http://stackoverflow.com/comment/46400709
comment on: http://stackoverflow.com/a/29082877
has text: Solved it by doing changing the ng-repeat to: `selection in manualFilter(model.selections)` and added `return result` to the end of the $scope.manualFilter function.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46564225
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29171979
has text: Thanks for the code, My code will also have multiple div's and multiple styles. Please see my updated question.
score: 0

http://stackoverflow.com/q/29163395
favorite count: 0
tagged with: xpath
upvote count: 2
accepted answer: http://stackoverflow.com/a/29167382
tagged with: scrapy
type: AnsweredQuestion
tagged with: web-crawler
type: Question
score: 2
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29167382
tagged with: javascript
has title: Scrapy and Xpath to extract data from javascript code
has body: I am in the process of learning and simultaneously building a web spider using scrapy. I need help with extracting some information from the following javascript code: &lt;script language="JavaScript" type="text/javascript+gk-onload"&gt; SKART = (SKART) ? SKART : {}; SKART.analytics = SKART.analytics || {}; SKART.analytics["category"] = "television"; SKART.analytics["vertical"] = "television"; SKART.analytics["supercategory"] = "homeentertainmentlarge"; SKART.analytics["subcategory"] = "television"; &lt;/script&gt; I wish to extract the category information as television using Xpath. Please help me with the selectors I should use.
tagged with: python

http://stackoverflow.com/q/29207686
has comment: http://stackoverflow.com/comment/46626184
has comment: http://stackoverflow.com/comment/46626060
has title: add custom play and pause button to vine iframe video
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I have following code to play vine video in my web page. But it is play video by default. Can any one help me to know how can I load video in pause state and after that when I click on my custom button It play that video. Thanks
answer count: 0
score: 1
tagged with: iframe
upvote count: 1
type: Question

http://stackoverflow.com/a/29163844
has body: displayLocation method is a function and just one more property. Property can be anything: primitive type, object or function. So you should configure it the same as you did with other properties: this.displayLocation = function(locationName){ this.strLocation = locationName; }; Another improvement, is that you might want to move reusable method to the function prototype so it's not recreated on every instance instantiation: function level(intLevel) { this.identifier = 'level'; this.intLevel = intLevel; this.strLocation = 'Unknown'; this.monsterDelay = 300; this.setGrid(50, 24); } level.prototype.displayLocation = function(locationName) { this.strLocation = locationName; }; Couple of notes. You don't need to return this, as return this is implied automatically. It is also recommended to name constructor functions with capital letter, in your case Level would look better.
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29163832
accepted answer of: http://stackoverflow.com/q/29163832

http://stackoverflow.com/comment/46417022
comment on: http://stackoverflow.com/q/29091390
score: 0
type: Comment
type: QuestionComment
has text: @VikrantVirBhalla you're not matching the spaces. `\s` should do that.

http://stackoverflow.com/comment/46403771
has text: I'd probably use a [hash in the url](http://www.w3schools.com/jsref/prop_loc_hash.asp). Set it when the user zooms, and read it when the page loads (if it's there)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29085461
score: 0

xmlhttprequest
tags question: http://stackoverflow.com/q/29176417
tags question: http://stackoverflow.com/q/29196999
tags question: http://stackoverflow.com/q/29101325
tags question: http://stackoverflow.com/q/29198368
tags question: http://stackoverflow.com/q/29204698
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/29136535
tags question: http://stackoverflow.com/q/29077213
tags question: http://stackoverflow.com/q/29130731
type: Tag
tags question: http://stackoverflow.com/q/29133527
tags question: http://stackoverflow.com/q/29144685
tags question: http://stackoverflow.com/q/29111969
tags question: http://stackoverflow.com/q/29109032
tags question: http://stackoverflow.com/q/29109630
tags question: http://stackoverflow.com/q/29165763
tags question: http://stackoverflow.com/q/29062552
tags question: http://stackoverflow.com/q/29080062
tags question: http://stackoverflow.com/q/29099096
tags question: http://stackoverflow.com/q/29151420

http://stackoverflow.com/comment/46441491
comment on: http://stackoverflow.com/q/29105765
type: Comment
type: QuestionComment
has text: "The code is not working as expected." is a bad statement on SO. Tell us what it is doing and what it is supposed to be doing.
score: 0

http://stackoverflow.com/comment/46615168
has text: please rate my answer
comment on: http://stackoverflow.com/a/29200899
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46393458
type: QuestionComment
comment on: http://stackoverflow.com/q/29076233
has text: Do you have the `"clipboardRead"` permission declared?
score: 0
type: Comment

http://stackoverflow.com/comment/46471931
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29122740
score: 1
has text: Are you on the same domain as the parent window? If not, you cannot control the parent with JS at all for security reasons.

http://stackoverflow.com/comment/46512673
type: Comment
has text: What are you doing in `handleResult` that you would need to promise? Don't you want to use the result of `processUsers()`?
type: AnswerComment
comment on: http://stackoverflow.com/a/29143875
score: 0

http://stackoverflow.com/a/29251665
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29149759
has body: That was the solution to my actual problem (the one after the edit). EaslJS doesn't consider the zoom CSS and the coordinates are created globally and because the zoom is translating the divs. So I switched to transform: scale(2); and using: body.style.top = -body.getBoundingClientRect().top + "px"; body.style.left = -body.getBoundingClientRect().left + "px"; In order to fix the position of the scaled object. The reason I didn't think of it before is because I tried it, but I was having this issue: some items were disappearing after transform: scale(2) was applied. Then I solved the latter with the workaround suggested in the linked stackoverflow's question, which was: translate3d(0px, 0px, 0px); http://jsfiddle.net/vqq8dxw7/6/ EDIT: updated the answer because I found that it's not necessary to manually move the body, but you can do it with a "transform origin": document.body.style.transformOrigin = "top left"; Updated jsfiddle

http://stackoverflow.com/comment/46571540
has text: ya, I'm just trying to get the event to trigger first, before I add all the necessary code in the function. I also tried adding another class (.close.removethumb) because it looks like bootstrap has a close class, and the bootstrap modal is using it and there might be interference here. But .close.removethumb isn't working either
comment on: http://stackoverflow.com/q/29176539
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29215725
has answer: http://stackoverflow.com/a/29215784
favorite count: 0
downvote count: 2
has body: I've created a simple ajax request to post some json to my api. I've done this a couple times before in other pages, but suddenly I can't get this new call to work properly. var request = $.ajax({ type: "POST", url: "/my-api-call", dataType: "json", data: JSON.stringify({"pid": 5, "comment": $('#comment').val()}) }); request.done(function(data){ console.log('weve got a succesful response!!'); }) request.fail(function(error){ console.log('weve got an error!!!'); console.log(error); }); The call simply returns an empty 200 response, which I verify in the browser. But somehow the browser console constantly says weve got an error!!!. As you can see I also log the error, but I that is an object so full of information, that I have no idea what could be important in it. In that error object it also says the response is a plain 200 btw. Seeing that this code is fairly simple, I can't really figure out what I'm doing wrong. Does anybody know what I'm doing wrong here? All tips are welcome!
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/29215784
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46640948
has comment: http://stackoverflow.com/comment/46641028
tagged with: post
type: Question
answer count: 1
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/46640890
tagged with: jquery
has title: Why does an empty 200 create a fail in jQuery?
has comment: http://stackoverflow.com/comment/46641443

http://stackoverflow.com/a/39488340
type: Answer
has body: This is my solution using relatedTarget.state to get the direction. var owl = $(".owl-carousel").owlCarousel({ items: 1, loop: true, autoplay: true }); owl.on("dragged.owl.carousel", function (event) { if (event.relatedTarget.state.direction === "left") { $(".owl-carousel").not(this).trigger("next.owl.carousel"); } else { $(".owl-carousel").not(this).trigger("prev.owl.carousel"); } }); Note that my carousels are using the same .owl-carousel class.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29214470
downvote count: 0

http://stackoverflow.com/a/29077635
accepted answer of: http://stackoverflow.com/q/29077598
type: Answer
answers question: http://stackoverflow.com/q/29077598
downvote count: 0
has body: Change: obj = JSON.parse(text).filter; to obj = JSON.parse(text)[filter]; There are two ways to access properties: dot notation and bracket notation. var test = object.property; //(dot notation) var test = object[property_name]; //(bracket notation) The issue you are facing is that you are trying to access a property called 'filter' on your object which does not exists and therefore undefined.
score: 3
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/46519928
has text: if u call readTextFile('http://stackoverflow.com/questions/29148634/put-txt-file-in-a-textarea/29148706#29148706') - u get text with THAT page =-) all what u need - path to file at web, or ur local webmachine
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29148706
type: Comment

gmaps.js
tags question: http://stackoverflow.com/q/29186043
tag name: gmaps.js
type: Tag

http://stackoverflow.com/comment/46371804
score: 3
has text: If you post your code and the results or any errors you are seeing, someone will be more likely able to help you. You can edit your original question to provide more information.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29068162

http://stackoverflow.com/q/29198195
answer count: 3
accepted answer: http://stackoverflow.com/a/29200041
has comment: http://stackoverflow.com/comment/46609502
has body: It is a known fact that using arguments improperly in JavaScript may result in a function not being optimisable (see here and here by the end): function notOptimisable (a, b) { // Optimising compiler says: Nope. var args = [].slice.call(arguments) } However, none of the sources have so far managed to explain why this prevents the optimisation from happening. It is even more mind-boggling as all I have to do is function optimisable (a, b) { // Optimising compiler says: I can do this! var args = new Array(arguments.length) , i = 0 // Copy the arguments into an actual array, very carefully... for(i; i &lt; args.length; ++i) args[i] = arguments[i] } and voilá - I have a copy of arguments that is an actual array and the function can be optimised: node --trace_opt --trace_deopt script.js # Exerpt below [marking 0x24ba2c0bf0f1 &lt;JS Function notoptimisable (SharedFunctionInfo 0x26b62a724859)&gt; for recompilation, reason: small function, ICs with typeinfo: 3/3 (100%), generic ICs: 0/3 (0%)] [disabled optimization for 0x26b62a724859 &lt;SharedFunctionInfo notoptimisable&gt;, reason: Bad value context for arguments value] [failed to optimize notoptimisable: Bad value context for arguments value] [marking 0x24ba2d0041b1 &lt;JS Function optimisable (SharedFunctionInfo 0x26b62a7247b1)&gt; for recompilation, reason: small function, ICs with typeinfo: 7/7 (100%), generic ICs: 0/7 (0%)] [optimizing 0x24ba2d0041b1 &lt;JS Function optimisable (SharedFunctionInfo 0x26b62a7247b1)&gt; - took 0.039, 0.164, 0.051 ms] Thus, I ask thee: Why? What technical challenges prevent the optimisation from taking place? Why can't the v8 engine simply return a standard array of arguments, just like the second code sample shows and optimise the function? For extra points, why is the arguments only an "array-like" object from the language design perspective (i.e. it has numeric keys, but it is not a descendant of Array) and does that somehow play a role in the optimisation process?
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29198309
has answer: http://stackoverflow.com/a/29198520
possible better answer: http://stackoverflow.com/a/29198520
has title: What's the deal with optimising arguments?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/47047360
has answer: http://stackoverflow.com/a/29200041
tagged with: v8
score: 9
type: Question
has comment: http://stackoverflow.com/comment/54175017
upvote count: 9
tagged with: javascript
tagged with: optimization

http://stackoverflow.com/comment/46470692
has text: @Rajeev still not injecting it the right way, check carefully the answers!
comment on: http://stackoverflow.com/a/29122041
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29203467
accepted answer of: http://stackoverflow.com/q/29203358
answers question: http://stackoverflow.com/q/29203358
type: Answer
score: 0
type: AcceptedAnswer
has body: use this code, <?php $logged_user = $_SESSION['logged_user']; print(" Welcome back, $logged_user! ");?> print(' Username Password '); ?> in script use like this instead of: window.location = 'index.php'; use below lines, $('.after_login').show(); $('.before_login').hide();

http://stackoverflow.com/q/29166310
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/29166350
upvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46551175
has comment: http://stackoverflow.com/comment/46551258
tagged with: php
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29166350
has body: I search Google and find lots of link for similar but none help me,,, how to add a piece of jquery code inside &lt;?php......?&gt; here's my code &lt;script type="text/javascript"&gt; var $j = jQuery.noConflict(); $j(document).ready(function(){$j('.number').Number();});&lt;/script&gt;
possible better answer: http://stackoverflow.com/a/29166838
has title: How to add jquery code inside php file
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29166838

http://stackoverflow.com/comment/53092040
has text: I actually found a better way to do this altogether. I built my transitions from the ground up and developed my css alongside my code. This way the code words with my page. It isn't a universal solution, but programming rarely has those.
comment on: http://stackoverflow.com/a/32561785
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46379010
comment on: http://stackoverflow.com/q/29071986
score: 0
has text: @rory I will use it for Math.Round(), so I need called it all.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29119587
tagged with: jquery
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/46466151
has title: Lightbox Locations
type: Question
tagged with: javascript
has body: I hit a problem on a website i was doing for work: http://www.dotcomholdings.co.za the portfolio page has a gallery but the lower images open the lightbox at the top of the page instead of at the users location. i already mailed the themes developer for support but wanted to know in case i need to do this on another site, using jquery how would you set something like this to open at the place you are at on the page? i would like to use jquery but also is there a css property to do the same thing? Thanks
score: 0
has comment: http://stackoverflow.com/comment/46473304
tagged with: lightbox

http://stackoverflow.com/comment/46381281
type: Comment
comment on: http://stackoverflow.com/a/29073093
score: 0
type: AnswerComment
has text: i changed the code based on you said. but i have the same problem yet !

http://stackoverflow.com/comment/46490982
type: QuestionComment
comment on: http://stackoverflow.com/q/29131869
score: 0
type: Comment
has text: Actually the ul tree was generated by a json file, I'll remove the tag from this question, since the topic is not related to json.

http://stackoverflow.com/q/29179672
has body: I need to backup a file on a daily basis, I have resolved this issue using the following script: function myFunction() { DocsList.getFileById(SpreadsheetApp.getActiveSpreadsheet().getId()).makeCopy(SpreadsheetApp.getActiveSpreadsheet().getName() + "_Backup"); } And I'm using the Time-driven trigger to set the hour I want the script creates the backup file. However, I would like these daily backups going to a specific Subfolder, lets call it "Daily Backup Folder". Can someone help me with a script for that? Thanks in advance!
type: Question
tagged with: google-apps-script
has title: Google Spreadsheet, script, backup file, subfolder
answer count: 2
tagged with: google-sheets
tagged with: javascript
tagged with: subdirectory
has answer: http://stackoverflow.com/a/29181033
tagged with: backup
has answer: http://stackoverflow.com/a/35677550
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2

http://stackoverflow.com/comment/46580300
has text: Like this? $("a img").hover(function() to this $(".img").hover(function() But didn't work. The Zoom went nuts.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29181961
type: Comment

http://stackoverflow.com/a/29096036
downvote count: 0
score: 1
has body: First way syntax: $( ".selector" ).tabs({ load: function( event, ui ) {} }); Try, it helped, second way syntax $( ".selector" ).on( "tabsload", function( event, ui ) {} ); Or, if you need exactly on create: $( ".selector" ).tabs({ create: function( event, ui ) {} }); $( ".selector" ).on( "tabscreate", function( event, ui ) {} );
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29095899

http://stackoverflow.com/q/29108347
type: Question
answer count: 2
tagged with: windows-8
has comment: http://stackoverflow.com/comment/62632651
downvote count: 0
tagged with: javascript
tagged with: protocols
tagged with: custom-protocol
has comment: http://stackoverflow.com/comment/46793933
has answer: http://stackoverflow.com/a/40684864
has comment: http://stackoverflow.com/comment/46446484
has comment: http://stackoverflow.com/comment/46805681
has answer: http://stackoverflow.com/a/29300534
favorite count: 0
has comment: http://stackoverflow.com/comment/46446974
upvote count: 25
linked to: http://stackoverflow.com/q/836777
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46446450
score: 25
has body: I am trying to detect if my application to handle a custom protocol is installed and working using the different browsers. I have looked at other questions on this site such as: How to detect browser&#39;s protocol handlers?, and have looked at resources like this to make it work on most platforms in most browsers. Before you flag this as duplicate, hear me out... I was able to get my function working on everything except Chrome on Windows 8+. I cannot use the window focus method on Chrome like I can on Windows 7 because it pops up the message that asks me to find an app in the store. Is there any way (short of an extension) to detect a custom protocol handler in Windows 8+ on Chrome? UPDATE: Using an onBlur to detect it only works on Windows 7, because in 8+, if it doesn't find something to open your protocol, it opens the 'find something from the app store' dialog that makes the browser lose focus.
has title: Detecting Custom Protocol Handler in Windows 8+ with Chrome
has comment: http://stackoverflow.com/comment/46446843
tagged with: google-chrome

http://stackoverflow.com/q/29131445
score: 0
has comment: http://stackoverflow.com/comment/46498856
has comment: http://stackoverflow.com/comment/46498778
type: AnsweredQuestion
tagged with: d3.js
has comment: http://stackoverflow.com/comment/46498750
type: Question
has answer: http://stackoverflow.com/a/29137567
has comment: http://stackoverflow.com/comment/46498765
tagged with: dc.js
has comment: http://stackoverflow.com/comment/46498911
linked to: http://stackoverflow.com/q/18742406
has comment: http://stackoverflow.com/comment/46498793
has body: I am trying to create a bar chart that will display the record counts by identifier and am unable to get it to display properly. Hoping somebody can look at this and discover where my issue lies. I am hooking up to a data source that returns an array of objects that appear like this: [{ "pollCycleCount": 1, "identifier": "21", "value": "Value", "timestamp": "2015-03-12T18:47:28-05:00", "collection": "D4B5D33B-9151-46BB-AF2A-71FDFEB5E573", "readableTimestamp": "Thu Mar 12 2015 23:47:28 GMT+0000 (UTC)", "name": "name", "description": "description" }, ...] The identifier field will be what I am wanting to count the number of. Here is the code I have so far: var dateFormat = d3.time.format.iso; d3.json("http://url-to-web-service-that-returns-out-data") .header("Content-Type", "application/json") .post(JSON.stringify({"apiKey": "private_key", "collection":"D4B5D33B-9151-46BB-AF2A-71FDFEB5E573"}), function(error, data) { if(error) { console.log(error); return; } console.log(data); var xAxisUnits = [""]; data.forEach(function (d) { d.timestamp = dateFormat.parse(d.timestamp); d.decodedValue = +d.decodedValue; if(xAxisUnits.indexOf(d.identifier) == -1 && typeof d.identifier != "undefined") { xAxisUnits.push(d.identifier); } }); console.log(xAxisUnits); var ndx = crossfilter(data); var idCountDim = ndx.dimension(function(d) { return d.identifier; }); var idCountGroupCount = idCountDim.group().reduceCount(function(d) { return d.identifier; }); var barChart = dc.barChart("#barChart"); barChart.width(480) .height(150) .margins({top: 10, right: 10, bottom: 20, left: 40}) .dimension(idCountDim) .group(idCountGroupCount) .transitionDuration(500) .centerBar(true) .x(d3.scale.ordinal().domain(xAxisUnits)) .xUnits(d3.scale.ordinal) .elasticY(true) .xAxis().tickFormat(); dc.renderAll(); }); The HTML file body looks like this: Update here is a sample of the data returned that should show 3 bars that are one tall each. [{ "pollCycleCount": 1, "identifier": "21", "value": "Value", "times…
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29137567
has title: Bar Chart with Counts in dc.js

http://stackoverflow.com/comment/46543251
has text: Where do you get the string? If you are getting that string from the DOM then please mention it in the question, it would be easier to just use the element object itself to extract the data attributes.
comment on: http://stackoverflow.com/q/29161508
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46401615
type: Comment
type: QuestionComment
score: 1
has text: You should look into how the page edits the ckeditor configuration (CKEDITOR.config) and based on the help documentation here (http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar) you can probably just pass in null for the toolbar configuration to load all.
comment on: http://stackoverflow.com/q/29073312

xss
tags question: http://stackoverflow.com/q/29124061
type: Tag
tag name: xss

http://stackoverflow.com/comment/123105778
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/69646691
type: Comment
has text: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

http://stackoverflow.com/comment/46413162
score: 0
type: AnswerComment
has text: Alright, cool. I gonna try something I just thought of, as I don't want you guys to feel like I'm just awaiting to have the code handed to me. :)
type: Comment
comment on: http://stackoverflow.com/a/29090358

http://stackoverflow.com/a/29092513
has body: Move the newOption = document.createElement("option") inside for loop to create new element for every loop iterations like below if (curLength &lt; monthDays) { for (i = curLength; i &lt; monthDays; i = i + 1) { newOption = document.createElement("option"); newOption.text = i; newOption.value = i.toString(); sday.add(newOption); } } Hope it helps.
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/29091990
accepted answer of: http://stackoverflow.com/q/29091990
type: Answer

http://stackoverflow.com/q/29138316
has comment: http://stackoverflow.com/comment/46501887
tagged with: image
type: Question
has body: this is my code and its working. but i want to to save the captured jpeg file in directory. please help this is my code and its working. but i want to to save the captured jpeg file in directory. please help full source code
downvote count: 0
tagged with: javascript
has title: Save image in directory after capturing from web page (php)
score: 2
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/comment/46546528
has text: @Sush if answer helps you make it as answer so other who face same problem can get answer too. Glad to help you.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29146370

http://stackoverflow.com/comment/46694965
has text: Are you including `modernizr`? `javascript_include_tag "vendor/modernizr"`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29199656
score: 0

http://stackoverflow.com/comment/46517975
type: QuestionComment
comment on: http://stackoverflow.com/q/29145802
has text: @thefourtheye But what about my "that=this" assignment? 'that' always ponts to 'this' of the Playground.prototype right? Anyways I thought that requestAnimationFrame was passed the function that 'this.update' was assigned to so the 'this' inside the function became window... GAaah I will never understand this, I will have to re-read the post I guess.
score: 0
type: Comment

http://stackoverflow.com/comment/46625412
type: QuestionComment
score: 1
has text: No. If flipping the boolean is really the only thing you want to do, it's easiest to drop the function and just do `dropdwns.assetshow=!dropdwns.assetshow` in the view.
comment on: http://stackoverflow.com/q/29207396
type: Comment

http://stackoverflow.com/q/29163656
has answer: http://stackoverflow.com/a/29164054
tagged with: javascript
has body: I've tried to create a legend using inspiration from http://zeroviscosity.com/d3-js-step-by-step/step-3-adding-a-legend. However, despite having almost the exact same code, the legend isn't visualized. Here's the jsfiddle and the code: http://jsfiddle.net/u5hd25qs/ var width = $(window).width(); var height = $(window).height() / 2; var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var legendRectSize = 36; // 18 var legendSpacing = 8; // 4 var recordTypes = [] recordTypes.push({ text : "call", color : "#438DCA" }); recordTypes.push({ text : "text", color : "#70C05A" }); var legend = svg.selectAll('.legend') .data(recordTypes) .enter() .append('g') .attr('class', 'legend') .attr('transform', function (d, i) { var height = legendRectSize + legendSpacing; var offset = height * recordTypes.length / 2; var horz = -2 * legendRectSize; var vert = i * height - offset; return 'translate(' + horz + ',' + vert + ')'; }); legend.append('rect') .attr('width', legendRectSize) .attr('height', legendRectSize) .style('fill', function (d) { return d.color }) .style('stroke', function (d) { return d.color }); legend.append('text') .attr('x', legendRectSize + legendSpacing) .attr('y', legendRectSize - legendSpacing) .text(function (d) { return d.text; });
type: Question
accepted answer: http://stackoverflow.com/a/29164054
score: 0
tagged with: visualization
answer count: 1
tagged with: d3.js
type: AnsweredQuestion
has title: D3 - legend won't visualize

http://stackoverflow.com/a/29086639
type: Answer
answers question: http://stackoverflow.com/q/29086562
has body: You need to get a reference to the gun from the property name like this: var rockSpearguns = { Sharpshooter: {barbs: 2, weight: 10, heft: "overhand"}, Pokepistol: {barbs: 4, weight: 8, heft: "shoulder"}, Javelinjet: {barbs: 4, weight: 12, heft: "waist"}, Firefork: {barbs: 6, weight: 8, heft: "overhand"}, "The Impaler": {barbs: 1, weight: 30, heft: "chest"} }; function listGuns(guns) { for (var speargun in guns) { // modify the log message here var gun = guns[speargun]; console.log("Behold! " + speargun + ", with " + gun["heft"] + " heft!"); } }
score: 0

http://stackoverflow.com/comment/46458237
score: 0
type: Comment
type: QuestionComment
has text: Try using live instead of bind
comment on: http://stackoverflow.com/q/29114891

http://stackoverflow.com/q/29095449
score: 0
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46422328
has answer: http://stackoverflow.com/a/29095837
has title: Problems with this-parent and this
type: Question
has comment: http://stackoverflow.com/comment/46422046
has comment: http://stackoverflow.com/comment/46421988
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am trying to make a little quiz in jquery. So I'll have several div-blocks with each 2 li-elements (one for yes, one for no). Clicking one of these li-elements updates a variable, gives visual feedback and toggles the display of either the current div and the next div. That's the plan. I do use this js-code: var ergebnis = 0; $(this).click(function () { console.log(this.className); if ($(this).hasClass("ja")) { ergebnis++; $(".ergebnis").html(ergebnis); console.log(ergebnis); } else { ergebnis = ergebnis + 5; $(".ergebnis").html(ergebnis); console.log(ergebnis); } //Styles updaten $("#frage__1 li").not(this).css({ opacity: '0.2', transition: '1s' }); $(this).css({ background: 'green', transition: '1s' }); $("#frage__1").slideToggle("slow", function () {}); $("#frage__2").slideToggle("slow", function () {}); }); And this html-code: 1. So you ever wanted to get alongside? Yes Extra Text Nope Extra Text 2 2. So you ever wanted to get alongside? Yes Again text Nope And another one So you may already see that this is not really functional, as I always need to toggle all div-blocks in the very end of the code by hand; and currently do only get a result from the else-part. The console also logs me "undefined" at the very beginning and I always get my result always updated by 5, no matter what I click. So I am looking for a solution how to exactly use this.parent() and something like not(this).parent at the very end of the code and what I did wrong at the very beginning with "this" Thanks so much!
accepted answer: http://stackoverflow.com/a/29095837
favorite count: 0

http://stackoverflow.com/a/29173980
accepted answer of: http://stackoverflow.com/q/29173915
has comment: http://stackoverflow.com/comment/46565828
answers question: http://stackoverflow.com/q/29173915
has body: Methods document.getElementsByClassName document.getElementsByTagName never return undefined or null. The result returned is a HTMLCollection so you should check if this collection empty or not. Use length property: if (document.getElementsByClassName("submit").length) { // ... } Note however that in your case, you should be checking type attribute of the button, not it's class or tag name. For this another method is very convenient document.querySelectorAll (collection): if (document.querySelectorAll('[type=submit]').length) {} or if you want to check only one button use document.querySelector (single element): if (document.querySelector('[type=submit]')) {}
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46566326
score: 1
has comment: http://stackoverflow.com/comment/46566057
has comment: http://stackoverflow.com/comment/46566165
upvote count: 1

http://stackoverflow.com/comment/46555028
score: 0
type: AnswerComment
has text: Unfortunately, that didn't seem to do it.
type: Comment
comment on: http://stackoverflow.com/a/29168135

http://stackoverflow.com/q/29084843
accepted answer: http://stackoverflow.com/a/29084956
has comment: http://stackoverflow.com/comment/46402914
has comment: http://stackoverflow.com/comment/46402651
type: AnsweredQuestion
has body: A user inputs a date range like: From: 01/04/2015 To: 01/12/2015 I have some periods defined like: var period1 = '01/04/2015'; var period2 = '01/11/2015'; I would like to know how many days are: Before Period 1 After (or equal to) Period 1 but before Period 2 After (or equal to) Period 2 I would like to work this out using javascript. I am making a calculator that works out the cost of a booking based on different date ranges. Thank you for your help, David
has answer: http://stackoverflow.com/a/29085497
score: -2
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/29085497
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/46402610
has comment: http://stackoverflow.com/comment/46439644
has answer: http://stackoverflow.com/a/29084956
upvote count: 0
has comment: http://stackoverflow.com/comment/46402605
has title: How many days fall in a set of date ranges based on a date range
tagged with: javascript
tagged with: jquery
tagged with: date-range

http://stackoverflow.com/comment/46365089
has text: Not sure, @duskwuff?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29064109
type: Comment

http://stackoverflow.com/q/29106463
score: 4
linked to: http://stackoverflow.com/q/13698043
has title: Can Javascript check a file for content changes?
has comment: http://stackoverflow.com/comment/46442835
has comment: http://stackoverflow.com/comment/46442776
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46442715
has comment: http://stackoverflow.com/comment/46443090
accepted answer: http://stackoverflow.com/a/29107865
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29107865
type: Question
tagged with: javascript
has body: Example: I have var r = new FileReader(); r.onload = function(e) { drawGraph(r.result); } r.readAsText(f); drawing a graph from the file f input by the user. Is there a way to check to see if the file f has been changed and then re load it's content without needing for the user to pick the file again?

http://stackoverflow.com/comment/46636469
type: QuestionComment
has text: @DontVoteMeDown not what OP is asking....
comment on: http://stackoverflow.com/q/29213392
score: 0
type: Comment

http://stackoverflow.com/comment/46424586
type: QuestionComment
comment on: http://stackoverflow.com/q/29096463
has text: Dont know where the problem was but it started working.. Anyway thanks a lot guys...
score: 0
type: Comment

http://stackoverflow.com/comment/46485507
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29128821
score: 0
has text: @PetrAveryanov I did somewhat similar what you said..

http://stackoverflow.com/q/29114485
accepted answer: http://stackoverflow.com/a/29114885
tagged with: 3d
tagged with: javascript
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has body: I have gone through different three.js examples. Some of the examples uses .js or .bin files instead of .obj files. e.g. used in webgl_materials_cars.html example. How do I get .js file for my .obj file?
has answer: http://stackoverflow.com/a/29114885
type: Question
upvote count: 2
tagged with: three.js
has title: Convert .obj to .js files
answer count: 1

http://stackoverflow.com/a/29155441
answers question: http://stackoverflow.com/q/29155327
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/29155327
upvote count: 1
has body: The problem with the "unclosed" calls is that the function reference that you return (m.sayName) is immediately disassociated from the variable m from which the function property was retrieved. A function reference doesn't know anything about which object it was retrieved from so therefore when the function is eventually invoked it has no "context" - this will be set to the global object instead of the object that originally had this function as a property: var obj = { func : function() { console.log(this) } } obj.func() // outputs "obj" because a.b() calls "b" with "this" === "a" var ref = obj.func; ref(); // outputs "window" To fix it you can have the unclosed call do return m.sayName.bind(m), although having got that far there's no need for the IIFE either, and it would work just as well to say: var unclosedCall = monster.sayName.bind(monster);

http://stackoverflow.com/comment/46587405
comment on: http://stackoverflow.com/q/29185843
type: Comment
type: QuestionComment
has text: I don't get why there's a deleted question which got a downvote followed, long after, by an identical answer which was upvoted...
score: 0

http://stackoverflow.com/comment/46478334
type: QuestionComment
has text: As a side note: your code is vulnerable to SQL injection
comment on: http://stackoverflow.com/q/29125741
score: 0
type: Comment

http://stackoverflow.com/q/29151800
has comment: http://stackoverflow.com/comment/46525862
score: 0
has comment: http://stackoverflow.com/comment/46526294
has comment: http://stackoverflow.com/comment/46525717
has comment: http://stackoverflow.com/comment/46525900
has comment: http://stackoverflow.com/comment/46526355
has body: I have a php function which displays all the data in my mysql table and allows the user to delete data not needed. I managed to get the data to show in a table, get the delete button to ask for confirmation using javascript, but when i try to get the value in the 2nd cell of the table with the query result (the name) and display it on the confirmation tab, it says undefined. Why is that happening? From what i understand, document.getElementById("myText").value where myText is the id of the cell, should return the value in the cell, correct? Also, how would i call and send that value to another php file that has the delete query? <?php $row = mysqli_fetch_array($result); echo " "; echo " Delete "; echo " Added "; echo " Name "; echo " Genre "; echo " Developer "; echo " Rating "; ?> <?php for ($x=0; $row; $x++) { echo " $row[Added] $row[Name] $row[Genre] $row[Developer] $row[Rating] "; $row = mysqli_fetch_array($result); } ?>
type: UnansweredQuestion
tagged with: php
has title: Getting text and sending it to a php function using javascript
answer count: 0
has comment: http://stackoverflow.com/comment/46526131
tagged with: mysql
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46526148

http://stackoverflow.com/comment/46541101
comment on: http://stackoverflow.com/q/29160182
has text: I suggest that you bind by reference. Put a '.' in your model on scope.
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46490879
has text: This should have worked. Try using UPPERCASE in your div `id`'s
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29131029

http://stackoverflow.com/comment/46457037
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29093133
score: 0
has text: Sorry, I couldn't spend much time in the discussion yesterday as I was busy. That's why I removed it.

http://stackoverflow.com/a/29168427
type: Answer
has body: Saw this question the other day and wondered why you didn't use something like: $("input[name=timeFrame]").on("change", function () { var val = $(this).val(); $('#timePeriods label').each(function () { if (val == 'cycles') $(this).html($(this).html().replace('Months', 'Cycles')) if (val == 'months') $(this).html($(this).html().replace('Cycles', 'Months')) }) });
score: 0
answers question: http://stackoverflow.com/q/29105674

http://stackoverflow.com/comment/46585964
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29185104
has text: @adeneo I just set up a jsfiddle to show my code: jsfiddle.net/TyGoss/j9ddLhj3 After checkout.js loads, I use $.getScript() to load stripe.js I'm trying to call setup() from stripe.js, but it's not working.
score: 0

http://stackoverflow.com/comment/46585502
type: QuestionComment
comment on: http://stackoverflow.com/q/29184604
has text: Have you tried to access the URL directly to see what it returns if anything?
score: 0
type: Comment

http://stackoverflow.com/q/29103203
score: 0
tagged with: mongodb
answer count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/46442575
accepted answer: http://stackoverflow.com/a/29105688
tagged with: aggregation-framework
tagged with: mongodb-query
type: AnsweredQuestion
has body: I am new to MongoDB and I have a mongodb document like this { "_id": 1, "title": "abc123", "author": { "last": "zzz", "first": "aaa", "address": { "street": "stvalue", "city": "NewYork" } } } I am using MongoDB Java client and trying to convert the above document as { "_id": 1, "title": "abc123", "author_last": "zzz", "author_first": "aaa", "author_address_street": "stvalue", "author_address_city": "New York" } Is this possible using MongoDB Java client using MongoDB query without modifying the result in Java. Update Since it is not possible to convert to required format in MongoQuery, I have to change my mind and add some Java code to get the required format.
has title: MongoDB projection to return child objects as columns
upvote count: 1
has comment: http://stackoverflow.com/comment/46436746
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46436500
has answer: http://stackoverflow.com/a/29103593
has answer: http://stackoverflow.com/a/29105688
has comment: http://stackoverflow.com/comment/46436601
tagged with: java
has comment: http://stackoverflow.com/comment/46437760
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29103593

http://stackoverflow.com/comment/46434205
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29101946
has text: @doniyor, please update your answer to match the desired output

http://stackoverflow.com/a/29076555
type: Answer
upvote count: 1
has body: Your question is not very clear to me. If you want to identify which is clicked the following code snippets may help you. $("a").on("click",function(){ alert($(this).html()); }); Link 1 Link 2 Link 3 Link 4
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29076380

http://stackoverflow.com/comment/110207188
comment on: http://stackoverflow.com/a/54520876
has text: I know its late in the day. But superb answer saved donkeys hours for me ! Just can you tell me how to trim the right and bottom white space ?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29146102
answers question: http://stackoverflow.com/q/29145965
has comment: http://stackoverflow.com/comment/46514669
has body: Why not something like this? var index = 0; var tempArray = ... setInterval(function() { index = (index + 1) % tempArray.length; $.ajax( "flash-" + tempArray[index] + ".php" ) .done(function(res) { document.getElementById("swfdiv").innerHTML = res; }) }, 3000);
accepted answer of: http://stackoverflow.com/q/29145965
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46487780
type: AnswerComment
type: Comment
has text: I think you have typo in the code, it might still work but maybe you deleted something or forgot to delete something
comment on: http://stackoverflow.com/a/29131029
score: 1

http://stackoverflow.com/q/29066238
has title: CreateJS - d.mousedown.f error on hitAreas
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
has body: While programming in CreateJS I have encountered a bug: Unhandled exception at line 13, column 10113 in https://code.createjs.com/createjs-2014.12.12.min.js 0x800a138f - Runtime Error JavaScript code: Can not retrieve "matrix" properties for undefined or empty appeal This bug appears only when I add a hit area into an image: function drawButton(e) { var button = new createjs.Bitmap(e.target); var newContainer = new createjs.Container(); newContainer.addChild(button); var label = new createjs.Text("Next round", "20 px Arial", "#000"); newContainer.addChild(label); button.hitArea = new createjs.Rectangle(0, 0, 100, 100); button.addEventListener("click", onClick); buttonContainer.addChild(newContainer); GameData.hudStage.update(); } After removing: button.hitArea = new createjs.Rectangle(0, 0, 100, 100); the bug does not appear. Is it a a library bug, or did I something miss?
tagged with: easeljs
tagged with: createjs
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29066367
favorite count: 0
has answer: http://stackoverflow.com/a/29066367

http://stackoverflow.com/a/29215137
answers question: http://stackoverflow.com/q/29215088
downvote count: 0
has comment: http://stackoverflow.com/comment/46639712
has comment: http://stackoverflow.com/comment/46639699
type: Answer
has comment: http://stackoverflow.com/comment/46642624
has body: Assuming you've JSON.parse'd your local storage data into an array, you can remove the second item like you would from any other array- by popping it off. var data = localStorage.getItem('data'); // At this point, data is either null or a string value. // To restore the string to an Array you need to use JSON.parse if (data) { data = JSON.parse(data); // At this point you can use Array methods like pop or splice to remove objects. } // At this point, your Array will only contain the first item. // If you want to write it back to local storage, you can like so: // Be sure to use JSON.stringify so it can later be restored with parse. localStorage.setItem('data', JSON.stringify(data));
upvote count: 1
has comment: http://stackoverflow.com/comment/46640127
score: 1
has comment: http://stackoverflow.com/comment/46639773

http://stackoverflow.com/comment/46374020
type: QuestionComment
comment on: http://stackoverflow.com/q/29069259
has text: Do you want code or just an algorithm?
score: 0
type: Comment

http://stackoverflow.com/comment/46388505
comment on: http://stackoverflow.com/a/29074805
score: 0
type: Comment
has text: A good old bit of trial and error with your direction has got it coming through in the email. Had to use type: $('.radioval:checked').val(). Thanks! I still have the problem that 'An error occurred (2)' comes up as an alert everytime. The success message is not shown so the page is failing somehow.
type: AnswerComment

http://stackoverflow.com/comment/46468621
type: QuestionComment
has text: @Liam sorry, i can't get it, how this solution solves my answers?
comment on: http://stackoverflow.com/q/29120877
score: 1
type: Comment

http://stackoverflow.com/a/29168741
has comment: http://stackoverflow.com/comment/46631430
has body: You should iterate over list and concatenate items to the result string. items = ['apple', 'grape'] html_string = ''' My list {list} ''' my_list = ''.join([' {} '.format(i) for i items]) html_string = html_string.format(list=my_list) with open('test.html', 'w') as html: html.write(html_string)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29167649

http://stackoverflow.com/q/29125166
has title: Animated loader gif not spinning
favorite count: 0
has answer: http://stackoverflow.com/a/29125743
has comment: http://stackoverflow.com/comment/46477902
has answer: http://stackoverflow.com/a/29125529
upvote count: 1
has comment: http://stackoverflow.com/comment/46477171
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46477177
possible better answer: http://stackoverflow.com/a/29125529
has comment: http://stackoverflow.com/comment/46476890
has comment: http://stackoverflow.com/comment/46476518
has comment: http://stackoverflow.com/comment/46477079
type: Question
accepted answer: http://stackoverflow.com/a/29125743
answer count: 2
has body: I have a simple html file with some javascript that takes some time to run, and I want to show an animated loader gif while the user is waiting. The problem is that the animation does not work. I tried some solution. Some of them from stack overflow, but nothing really worked. I'm limited for using IE8 only. Does someone knows of a solution that works well? My code: Run & Show
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/46477277
has comment: http://stackoverflow.com/comment/46477697
has comment: http://stackoverflow.com/comment/46476999
has comment: http://stackoverflow.com/comment/46476640
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46444912
type: Comment
has text: Can you add a bit more code to the fiddle? Just so I can fiddle with it?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29106293

http://stackoverflow.com/a/29100767
type: Answer
has comment: http://stackoverflow.com/comment/46466708
has comment: http://stackoverflow.com/comment/46439483
accepted answer of: http://stackoverflow.com/q/29099886
score: 3
has comment: http://stackoverflow.com/comment/46467239
upvote count: 3
has comment: http://stackoverflow.com/comment/46437517
has body: One of the solutions I found, is to define a function to test the equality of the objects, and then you need to call that function for each element on the array. this code works fine for me: Object.prototype.equals = function(x) { for(p in this) { switch(typeof(this[p])) { case 'object': if (!this[p].equals(x[p])) { return false }; break; case 'function': if (typeof(x[p])=='undefined' || (p != 'equals' &amp;&amp; this[p].toString() != x[p].toString())) { return false; }; break; default: if (this[p] != x[p]) { return false; } } } for(p in x) { if(typeof(this[p])=='undefined') {return false;} } return true; } Source : Object comparison in JavaScript function identical (arr1, arr2) { if(arr1.length != arr2.length) { return false; } var exists = arr1.length; for(var i = 0; i&lt;arr1.length; i++) { for(var j =0; j&lt;arr2.length ; j++) { if(Object.keys(arr1[i]).equals(Object.keys(arr2[j]))) { exists--; } } } return !exists; } Now the result of this code is true var result = identical([ {"firstName": "John", "lastName": "Doe", "contactno": {"ph": 12345, "mob": 485428428}}, {"depid": "100", "depname": ""}, {"city": "abc", "state": "xyz"} ], [ {"firstName": "John", "lastName": "Doe", "contactno": {"ph": 12345, "mob": 485428428}}, {"depid": "100", "depname": ""}, {"city": "abc", "state": "xyz"} ]); Edit : To compare only keys, you need to use : Object.keys(arr1[i]).equals(Object.keys(arr2[j]) instead of arr1[i].equals(arr2[j]) I made the update on the code above.
answers question: http://stackoverflow.com/q/29099886
has comment: http://stackoverflow.com/comment/46466945
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46439562

http://stackoverflow.com/comment/46447551
type: QuestionComment
has text: @levi is correct. But more philosophically, avoid `checkbox.checked` (or anything so DOM-related) in the controller. Instead send the `item` (or `item.selected`).
score: 2
type: Comment
comment on: http://stackoverflow.com/q/29108858

http://stackoverflow.com/q/29137995
type: Question
has title: PhotoSwipe with Isotope (galleries)
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/50120370
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: photoswipe
has body: Trying to get my gallery functioning properly. Right now I am using isotope.js to filter my gallery, and photoswipe.js as the lightbox. My problem is that even though it is filtering the gallery properly, photoswipe still shows all of the images. I found this: // Use the shinybox only for visible elements var shinyboxInstance = $(".shinybox-isotope:not(.isotope-hidden .shinybox-isotope)").shinybox(); // Callback function that fire the refresh method, once the animation is finished onAnimationCompleted = function(){ shinyboxInstance.refresh(); }; I have it so when an item is hidden, the class .isotope-hidden is added to the element, so I'm halfway there. I just need the appropriate script to force photoswipe to only show the filtered images. Photoswipe Isotope Any help would be appreciated. Thank you!
tagged with: gallery
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/63618401
has comment: http://stackoverflow.com/comment/53927536

http://stackoverflow.com/q/29072518
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/107682230
tagged with: unit-testing
tagged with: javascript
type: Question
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/29073099
favorite count: 0
has body: There is a function in my codebase (legacy), which has: function test() { method1("#input a") method2("test") method3(1,2) } given the fact it calls other methods, how one will write a good unit testing for these sort of functions?
has answer: http://stackoverflow.com/a/35389947
upvote count: 8
has comment: http://stackoverflow.com/comment/46379433
has title: How to unit test a function, which just calls other functions?
score: 8
has answer: http://stackoverflow.com/a/29074798

http://stackoverflow.com/comment/46390345
type: Comment
has text: Not an answer, but: you can massively shorten your code by using array-literal syntax like `var carts = [2,0,1,1,0,1,2,2];`
score: 0
comment on: http://stackoverflow.com/q/29078491
type: QuestionComment

http://stackoverflow.com/q/29101853
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/29102081
tagged with: javascript
has answer: http://stackoverflow.com/a/29102081
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29101946
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29102193
score: -2
downvote count: 2
has comment: http://stackoverflow.com/comment/46433713
has comment: http://stackoverflow.com/comment/46433749
has answer: http://stackoverflow.com/a/29101946
has answer: http://stackoverflow.com/a/29101994
answer count: 5
has body: Ok, my thirst for awesome oneliners is not quenched yet.. I have var a = "2:3:9:5"; I want to find the biggest number and its index. in this case: 9 and index 2. what is the complicated and awesome way to do this? I tried: var biggest_number = Math.max.apply(Math, a.split(':'));
has answer: http://stackoverflow.com/a/29102075
has title: find the greatest number in string and its index

http://stackoverflow.com/q/29066555
has comment: http://stackoverflow.com/comment/46369179
has comment: http://stackoverflow.com/comment/46368944
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29066912
tagged with: javascript
score: 0
tagged with: user-agent
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29066865
has title: HTML - How to show different image in different user agents?
has answer: http://stackoverflow.com/a/29066865
favorite count: 0
linked to: http://stackoverflow.com/q/2400935
linked to: http://stackoverflow.com/q/10978940
has body: If I use Chrome I want to show img1.jpg (&lt;img src="img1.jpg" alt="my Chrome Image"&gt;). Otherwise, if I use IE, I want to show img2.jpg (&lt;img src="img2.jpg" alt="my IE Image"&gt;). Is it possible? Thanks in advance.
has answer: http://stackoverflow.com/a/29066912

http://stackoverflow.com/comment/46580015
comment on: http://stackoverflow.com/q/29181857
has text: "What is the mistake I am making?" - you didn't try to debug it. big mistake.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/29181007
upvote count: 1
has comment: http://stackoverflow.com/comment/46578993
answers question: http://stackoverflow.com/q/29180953
has body: You wrote in your style: .editor{ font-size: 16px; } This line sets font-size to all its child tags thats why it always give 16 instead of .editor:first-line{ font-size: 26px; } This user needs to write #t1{ font-size: 26px; } it will give you the perfect size.
downvote count: 0
has comment: http://stackoverflow.com/comment/46578952
has comment: http://stackoverflow.com/comment/46578498
type: Answer
score: 1

http://stackoverflow.com/q/29134418
has title: How to download a blob file from Chrome iOS in Javascript?
answer count: 3
has answer: http://stackoverflow.com/a/63656162
accepted answer: http://stackoverflow.com/a/29288471
tagged with: ios
downvote count: 1
tagged with: javascript
has body: How to download a blob file from Chrome iOS in Javascript ? I'm working on download files (pdf, excel, txt, png) from iOS. iOS hasn't a file systems which is a problem for downloads. I create a code which download a blob file depending of the OS and the navigator if is required. It works nicely on desktop (lastest versions of Chrome and IE), Mobile Android (Chrome, native navigator) and iOS iPad2 (Safari). Now, Chrome iOS supposed to be like Safari mobile, but the algorithm doesn't works, Chrome iOs download the file by opening in a new tab but the page is empty. I create my own blob to create the downloadUrl. This is a part of the download function . var URL = window.URL || window.webkitURL; var downloadUrl = URL.createObjectURL(iobBLOB); var newWindow = null; if (typeof a.download === 'undefined') { var newWindow = null; newWindow = window.open(downloadUrl, '_blank'); setTimeout(function() { newWindow.document.title = isbFilename; }, 10); } More details Debugging on iPad 2 and iPhone 4 Trying to download an excell, pdf, txt, and Png files. The devices doesn't have file system. Thanks for helping me... Tell me if you need more information it's my first question.
favorite count: 0
possible better answer: http://stackoverflow.com/a/63656162
has comment: http://stackoverflow.com/comment/46554923
has comment: http://stackoverflow.com/comment/46562595
has answer: http://stackoverflow.com/a/59690446
has answer: http://stackoverflow.com/a/29288471
upvote count: 15
linked to: http://stackoverflow.com/q/24485077
tagged with: download
tagged with: chrome-ios
has comment: http://stackoverflow.com/comment/46726797
type: Question
score: 14
type: AnsweredQuestion
tagged with: blob
has comment: http://stackoverflow.com/comment/46494447
has comment: http://stackoverflow.com/comment/46494434

http://stackoverflow.com/comment/46508294
has text: That definitely looks worth trying. Wrapping would be a wonderful thing for my application too.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29136276

http://stackoverflow.com/comment/46558299
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29169912
has text: And may be remove those square brackets before and after also (`[]`)

http://stackoverflow.com/comment/46485309
type: AnswerComment
has text: No problem. You should edit your question to make it clearer, so that it is more useful to others.
comment on: http://stackoverflow.com/a/29129637
score: 0
type: Comment

http://stackoverflow.com/a/70821171
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29070246
has body: I had similar issues with my web page. I post the workaround here in case anyone else is struggling with it. In my case I've accidentally removed the class name from my javascript code and the function was triggering with every tag in my page!! The old one: $("a").on("click", function (e) { // ... my function ... }); and the right way: $(".the-classname").on("click", function (e) { // ... my function ... }); In your case I think the return false is preventing the tag from working. Go ahead and delete it and check if it works fine.

http://stackoverflow.com/comment/46437816
has text: well done thank you. Here as well ---> $('#example2').on( 'click', 'tbody td', function () { editor2.inline( this ); } );
type: AnswerComment
comment on: http://stackoverflow.com/a/29103630
type: Comment
score: 0

http://stackoverflow.com/a/29133965
upvote count: 2
has comment: http://stackoverflow.com/comment/46525377
score: 2
downvote count: 0
has body: Instead of altering console methods, you can capture error messages by defining a custom onerror global event handler: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror Example: window.onerror = function myErrorHandler(errorMsg, url, lineNumber) { document.getElementById('my_console').innerText += errorMsg + '\r\n'; console.error(errorMsg, url, lineNumber); } &lt;input type="button" value="Error!" onclick="missing_function()" /&gt; &lt;div id="my_console"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/109606094
answers question: http://stackoverflow.com/q/29130814
has comment: http://stackoverflow.com/comment/46517026
type: Answer

http://stackoverflow.com/comment/46396268
has text: Has this worked for you on ie8, I see what you suggest and have implemented it, however still no luck in ie8
comment on: http://stackoverflow.com/a/29080720
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29205458
type: Question
has comment: http://stackoverflow.com/comment/46621875
has comment: http://stackoverflow.com/comment/46621851
has body: I cant make a jquery image gallery with pagination inside jquery UI Tabs. The Tab works well but the pagination doesn't work. I used Jpages as plugin. This is my HTML Code: Info Menu First Tabs This is the Javascript: $(function() { $("#tabs").tabs({ show: function(e, ui) { $("div.holder").jPages({ containerID : "itemContainer", previous : "Previous", next:"Next", perPage:6 }); } }); });
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46623311
has comment: http://stackoverflow.com/comment/46622518
answer count: 0
type: UnansweredQuestion
has title: Jquery Jpages Function doesnt work inside Jquery ui Tabs
has comment: http://stackoverflow.com/comment/46622190
has comment: http://stackoverflow.com/comment/46623951

http://stackoverflow.com/comment/46637623
has text: Just set `pointer-events: none;` to all object except for draggable while dragging?
score: 2
type: Comment
comment on: http://stackoverflow.com/q/29212899
type: QuestionComment

http://stackoverflow.com/comment/46464804
type: QuestionComment
type: Comment
has text: also the `else if()` is useless, just go for an `else()`
score: 0
comment on: http://stackoverflow.com/q/29118817

http://stackoverflow.com/q/29089169
has title: Remove "checked" from radio when a checkbox is unchecked
tagged with: javascript
has answer: http://stackoverflow.com/a/29089511
tagged with: forms
has answer: http://stackoverflow.com/a/29089411
accepted answer: http://stackoverflow.com/a/29089411
score: 0
answer count: 2
tagged with: radio-button
tagged with: jquery
has body: I have a checkbox (#FBmngCH) that reveals a set of radio buttons (name=adManage) when clicked. When the checkbox is unclicked, the radio button that was previously selected still remains checked. I would like to have the checked status of the radio button removed once the checkbox is unchecked. This is being used in a form, so if the user changes their mind about selecting that service, I would like the details about that service to be wiped also (so the value of the selected radio will not end up in the PHP and ultimately the email). I hope this makes sense. I have given this some considerable time and am not seeming to get this to work correctly. The last set of if-statements is the part of the code that I wrote. Not sure if I am missing something, selecting something wrong, or what. Any help with this would be highly appreciated. Thanks! HTML Facebook Ad Management Ad Fund - 1 Ad Fund - 2 Ad Fund - 3 Ad Fund - 4 JS $FBmngCH = $("#FBmngCH"); $FBmngList = $("#FBmngList"); //hide FB Management List $FBmngList.hide(); //on FB Management select $FBmngCH.click(function() { //toggle FB Management List $FBmngList.toggle(); }); $FBadValid = false; $FBADerror = $("#FBADerror"); //if FB Ad Management is checked if ($FBmngCH.attr('checked')) function validateFB() { $("input[name=adManage]").each(function () { //LoopingthroughradioButtons // "this" is the current element(radio) in the loop if ($(this).is(':checked')) { $FBadValid = true; //Radio Button is Checked); } if ($FBadValid.attr = true ) { $FBADerror.empty(); } }); }; if ($FBmngCH.blur($FBadValid.attr = false)) { $FBADerror.append(" Please select a Facebook Ad plan. "); //appends error to document } if ($FBmngCH.blur($FBmngCH.not('checked'))) { $("input[name=adManage]").each(function () { if ($(this).is(':checked')) { $("input[name=adManage]").removeAttr('checked'); } }); //remove checks from radios }; $("input[name=adManage]").click(validateFB);
possible better answer: http://stackoverflow.com/a/29089511
tagged with: checkbox
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/29139536
has title: what is the purpose of an ajax submit with leading hash characters?
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/29139605
answer count: 1
accepted answer: http://stackoverflow.com/a/29139605
has body: Hi I'm observing ajax submit via console and I'm wondering when the site requests or pulls somethings via ajax it processes it on a js with leading hash character. application-74fe7540bbc2a304e421e68726a13599.js Would anybody know the purpose of this?
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46503015
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/q/29145382
score: 1
has comment: http://stackoverflow.com/comment/46514590
has comment: http://stackoverflow.com/comment/46513409
upvote count: 1
has comment: http://stackoverflow.com/comment/46514340
has title: $.Callbacks alternative in angular or a way to manage many callbacks
has comment: http://stackoverflow.com/comment/46516638
type: Question
has comment: http://stackoverflow.com/comment/46514716
has answer: http://stackoverflow.com/a/29147650
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29147650
has comment: http://stackoverflow.com/comment/46515710
downvote count: 0
has body: Is there an alternative in angular of jquery $.Callbacks? I want a simple way to to manage callback lists in angular. I want to do the following in angular: function Broadcast(){ var self= this; this._statusRecivedCallbacks = $.Callbacks(); setTimeout(function () { self._statusRecivedCallbacks.fire('arg1', 'arg2'); }, 500); } Broadcast.prototype.onStatusRecived = function(callback){ if($.isFunction(callback)){ this._statusRecivedCallbacks.add(callback); } } var broadObj = new Broadcast(); //subscribe to this for example in a controller broadObj.onStatusRecived(function(arg1, arg2){ alert('the argument 1 is: ' + arg1 + ' and the argumet 2 is: ' + arg2); }); //subscribe to this for example in a directive broadObj.onStatusRecived(function(arg1, arg2){ alert("I'am suscribe too"); }); code: http://jsfiddle.net/w0hmqbea/6/ If is there not an alternative in angular, is there an alternative in lodash, underscore or any other crosscutting framework? Perhaps i can do something similar with promises, any idea? But I do not want to do then().then(), because I will subscribe to the event in different places like for example in a controller an a directive. I'm looking for an explicit way and easy to follow, to subscribe to an event in different places like $.Callbacks but in angular without jquery dependency. For example pubsub is not easy to follow when many objects are suscribe to the same event. And I don't know any way/technique to subscribe to the same event in many objects with promises.
answer count: 1
has comment: http://stackoverflow.com/comment/46514094
favorite count: 0
has comment: http://stackoverflow.com/comment/46513957
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46514860
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46514506
has comment: http://stackoverflow.com/comment/46513506

http://stackoverflow.com/comment/46593227
comment on: http://stackoverflow.com/a/29189282
score: 0
type: AnswerComment
has text: This is awesome. Thank you so much! just a couple questions: is the data-table attribute just another way to specify a table in HTML? also what is the function of the + symbol around $newAgent when you are putting it in the table class in the jquery. Thanks so much for your help. This will keep me moving forward!
type: Comment

http://stackoverflow.com/comment/46658443
has text: I am wondering if Analytics Solutions also face the same problem. Those calls can be mimicked as well. I am not sure if those solutions solve this problem and bifurcate the fake calls some way.
comment on: http://stackoverflow.com/a/29192946
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29078159
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29078049
type: Answer
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/29078049
has body: Try: var number = ''; function selectNum(num) { number += num; document.getElementById("outputbox").innerHTML = number; }

http://stackoverflow.com/a/29062707
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29062412
has body: Create a new file and declare a new object. var mySharedLib = mySharedLib || {}; // declare a new namespace for the shared code. mySharedLib.DataShare = function() { // your factory logic } Then, the angular side: app.factory('DataShare', mySharedLib.DataShare);
score: 3
has comment: http://stackoverflow.com/comment/46363575
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29062412

http://stackoverflow.com/q/29147847
tagged with: php
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29149383
downvote count: 1
type: Question
tagged with: javascript
score: 0
has title: Combining a header and modifying for each page
accepted answer: http://stackoverflow.com/a/29149383
answer count: 1
tagged with: header
favorite count: 0
has body: I currently have multiple pages for my website. I currently am using no header for each page because the links change on each page. Example: if I am on the home page and click on a Testimonial tab, I don't want the Testimonial tab to still be there once I am redirected to that page, since I am already on that page! How can I do create a single header file that gets modified on each page. Can this be done in php or javascript
has comment: http://stackoverflow.com/comment/46518176
tagged with: http://stackoverflow.com/tag/html
tagged with: header-files

http://stackoverflow.com/comment/56658420
type: AnswerComment
comment on: http://stackoverflow.com/a/29425761
type: Comment
score: 11
has text: Use `require('babel-core/register')` with Babel 6

http://stackoverflow.com/q/29074077
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/46382133
duplicate of: http://stackoverflow.com/q/26657398
has body: I want to remove all attributes with name starting data-val-range. I.e. from the following element I wanna remove the matching attributes: &lt;input data-val-range-min="*" data-val-range-max="$" data-val-range="hallelujah"/&gt; Is this possible?
has comment: http://stackoverflow.com/comment/46382021
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29074368
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: attributes
linked to: http://stackoverflow.com/q/14645806
has comment: http://stackoverflow.com/comment/46382276
type: Question
has comment: http://stackoverflow.com/comment/46383324
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46382081
has comment: http://stackoverflow.com/comment/46382200
upvote count: 1
has title: jQuery select when attribute NAME starting with?
has answer: http://stackoverflow.com/a/29074368
has comment: http://stackoverflow.com/comment/46382073
answer count: 1
has comment: http://stackoverflow.com/comment/46382183
linked to: http://stackoverflow.com/q/26657398

http://stackoverflow.com/comment/46479751
has text: Thats correct, you can add more parameters by: `renderData(JSON, newParam1, newParam2)` etc and pass them to the callback, i.e. `callBacks[i](JSON, newParam1, newParam2);`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29126442
score: 1

http://stackoverflow.com/q/29097653
upvote count: 2
score: 2
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29101905
has body: I adapted the ajax call in RESTAdapter for retrieving the data from vert.x bus bridge. But, I have a problem with retrieving the promise in the success part of processing request. I suppose that the problem is with form of data structure that Ember expects. This is the code of my adapter: var VertxAdapter = DS.RESTAdapter.extend({ protocol: 'http', host: 'localhost', port: '4200', addressMapping: { "GET localhost/mindMaps": "mindMaps.list" }, pendingRequests: [], vertx: function() { var adapter = this; if (typeof adapter._vertx === 'undefined') { adapter._vertx = new vertx.EventBus(adapter.protocol + '://' + adapter.host + ':' + adapter.port + '/eventbus'); console.log('initialize vertx'); adapter._vertx.onopen = function() { // TODO: register for messages send from server to this client adapter.processPendingRequests.apply(adapter); }; } return adapter._vertx; }, ajax: function(url, type, params) { console.log(url, type, params); var adapter = this; var messageAddress = adapter.addressMapping[type + " " + url]; return new Ember.RSVP.Promise(function(resolve, reject) { var success = function(json) { Ember.run(null, resolve, json); }; var error = function(json) { Ember.run(null, reject, json); }; if(adapter.vertx().readyState === vertx.EventBus.OPEN) { console.log('ready state'); adapter.processRequest(messageAddress, params, success, error); } else { var pendingReq = { address: messageAddress, params: params, success: success, error: error }; console.log('push pending req'); adapter.pendingRequests.push(pendingReq); } }); }, processPendingRequests: function() { console.log('processPendingRequests'); var adapter = this; adapter.pendingRequests.forEach(function(req){ console.log(req); adapter.processRequest(req.address, req.params, req.success, req.error); }); }, processRequest: function(address, params, success, error) { console.log(address, params, success, error); var adapter = this; adapter.vertx().send(address, params, function(json){ //TODO: implement //console.…
tagged with: ember-data
downvote count: 0
tagged with: javascript
has title: EmberJS: Resolve promise in the success of processing request
tagged with: vert.x
tagged with: ember.js
answer count: 1
accepted answer: http://stackoverflow.com/a/29101905
favorite count: 0

http://stackoverflow.com/q/29084703
score: 1
type: Question
has title: Vertical scrollable div inside horizontal scrollable container
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29084822
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
tagged with: scroll
upvote count: 1
type: AnsweredQuestion
has body: Take a look at the picture, please: I have a container which has many .items-wrapper elements that is horizontally scrollable (red line) &amp; it works fine. The problem is that .items-wrapper divs should be vertically scrollable (green line), but I cannot come out with a solution nor post the code, which is really huge. I tried using overflows, but it didn't worked. Did you have similar problem &amp; can you help me, please?
has answer: http://stackoverflow.com/a/29084822

http://stackoverflow.com/q/29106383
type: Question
tagged with: javascript
has title: Reinitialize Zurb Equalizer in Reveal Modal using click and window hash
has answer: http://stackoverflow.com/a/29127161
score: 0
tagged with: zurb-foundation
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a minor problem and hoping someone can give a helping hand. I'm using Zurbs Reveal Modal but rather than using the data attribute data-reveal-id="myModal" I've opted to use just id="myModal" for one or more reasons. Because of this I've ran into some problems when attempting to Reinitialize the Equalizer after the modal has been triggered either by a click or a hash window trigger. My HTML looks like: My JavaScript looks like: (function($){ $(document).foundation({reveal:animation_speed:400,root_element:".bContent"}}); $("a.about").on("click",function()$("#about").foundation("reveal","open")}); $("a.close").on("click",function()$("#about").foundation("reveal","close")}); $(document).ready(function(){var a=$(window.location.hash);a.length>0&&a.hasClass("reveal-modal")&&a.foundation("reveal","open")}); })(jQuery); What I need... The triggers on both click and window location work perfectly, what I want it too reinitialize the equalizer after a click or during window.location.hash, I'm not the best person when it comes to working with JavaScript but none the less I've given it my best and some of the failed attempts I've tried can be seen below: $('.reveal-modal').hasClass('open')foundation.libs.equalizer.reflow() $(document).on('opened.fndtn.reveal', '#about', function () { Foundation.libs.equalizer.reflow(); }); and for the window location hash this one: $(document).ready(function(){var a=$(window.location.hash);a.length>0&&a.hasClass("reveal-modal")&&a.foundation("reflow")}); Where have I gone wrong! thanks in advance!

http://stackoverflow.com/comment/46467574
has text: Ya I tried with that. This is working fine. But is it possible to implement callback on it ? Because I need it :(
type: Comment
comment on: http://stackoverflow.com/a/29120382
score: 0
type: AnswerComment

http://stackoverflow.com/q/29081286
answer count: 2
tagged with: canvas
tagged with: javascript
has answer: http://stackoverflow.com/a/29141295
score: 0
tagged with: html5-canvas
has answer: http://stackoverflow.com/a/29108040
has title: Large svg to png in fixed resolution
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46432351
has body: I am using canvg lib to convert svg to png but some how when my svg size is more than 10000 it fails to draw it on canvas and data-URL get only "data:;" empty here is my code that I am using function getDiagramImage(isTrue,_callback){ var html = d3.select("svg") //.attr("version", 1.1) //.attr("xmlns", "http://www.w3.org/2000/svg") .attr({ 'xmlns': 'http://www.w3.org/2000/svg', 'xmlns:xmlns:xlink': 'http://www.w3.org/1999/xlink', version: '1.1' }) .node().parentNode.innerHTML; d3.select('#hiddenCanvas').attr('width',_canvasWidth).attr('height',(parseFloat(_canvasHeight) + 300) ); var canvas = document.getElementById('hiddenCanvas'); var context = canvas.getContext("2d"); canvg(document.getElementById('hiddenCanvas'), html, { renderCallback: function() { var dataURL = canvas.toDataURL(); if(!isTrue){ var pngimg = '&lt;img src="'+dataURL+'"&gt;'; d3.select("#pngdataurl").html(pngimg); var a = document.createElement("a"); a.download = "export_"+Date.now()+".png"; a.href = dataURL; document.body.appendChild(a); a.click(); } if(_callback){ _callback(dataURL); } } }); } About This function .. there d3.js code which create diagram. and one save and download button is there save will get data URL to png and save it on server while download will download image instantly.. same function work for both with arguments . Issue comes with "renderCallback " while svg is large that data URL comes empty I tried with timeout also but it's not get me result and timer keep running
has comment: http://stackoverflow.com/comment/46421298
linked to: http://stackoverflow.com/q/6081483
has comment: http://stackoverflow.com/comment/46421445
has comment: http://stackoverflow.com/comment/46396743
type: Question

http://stackoverflow.com/a/29103919
accepted answer of: http://stackoverflow.com/q/29103884
has comment: http://stackoverflow.com/comment/46438330
answers question: http://stackoverflow.com/q/29103884
has comment: http://stackoverflow.com/comment/46438388
score: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46438367
has body: The problem you have is that the selector is computed only when you create the object, so that container is still an empty collection when you do the last append. You should reassign the variable : var container = $('#container'); if(container.is(':visible') == false) { $(body).append(' '); container = $('#container'); } container.append(' Test '); But if you don't do more, there's no reason to cache $('#container'), it's fast to compute.
downvote count: 0
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/46438332
has comment: http://stackoverflow.com/comment/46438646

http://stackoverflow.com/comment/46377606
has text: I am using angular js.
comment on: http://stackoverflow.com/a/29071251
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46495152
has text: I did in a different way with PhantomJS-node :)
type: AnswerComment
comment on: http://stackoverflow.com/a/29132772
score: 0
type: Comment

http://stackoverflow.com/comment/46639685
has text: Do you mean "hijack"?
comment on: http://stackoverflow.com/q/29204710
score: 0
type: Comment
type: QuestionComment

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/29152372

http://stackoverflow.com/a/52515104
has body: I encountered the same problem not long ago. Do you have a code fragment that prerender.io would not be able to run? In my case, I was using platform.js (https://github.com/bestiejs/platform.js/), and was doing a test in my appComponent.ts about "platform.name". This was not existing in Prerender.io, and I was getting a blank page.
answers question: http://stackoverflow.com/q/29080564
score: 0
type: Answer

http://stackoverflow.com/comment/46639530
type: QuestionComment
comment on: http://stackoverflow.com/q/29214977
has text: Exactly what I was gonna write -__-
score: 0
type: Comment

http://stackoverflow.com/a/29190963
has body: The best way would be to use HEREDOC syntax as follows: echo &lt;&lt;&lt;CODE &lt;!-- Place code here --&gt; CODE; There can be nothing else (not even spaces on the CODE; line). Examples of Heredoc can be seen here: What is the advantage of using Heredoc in PHP ? If you don't want to use Heredoc, then you would need to escape every instance of your quotes with a backslash (\).
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29190917
type: Answer
answers question: http://stackoverflow.com/q/29190917

http://stackoverflow.com/comment/46563643
type: QuestionComment
has text: Yea some fool gave you 1 vote for close and a down vote on topci :P
comment on: http://stackoverflow.com/q/29164759
score: 0
type: Comment

http://stackoverflow.com/q/29134588
has title: Converting to bootstrapped: Notification undefined
upvote count: 1
possible better answer: http://stackoverflow.com/a/29143737
has answer: http://stackoverflow.com/a/29143737
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29139790
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46496240
downvote count: 0
tagged with: javascript
tagged with: firefox-addon-restartless
accepted answer: http://stackoverflow.com/a/29139790
tagged with: firefox-addon
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I wrote a Firefox add-on that works fine as an overlay, but now I'm converting it to be boostrapped (restartless). It registers a tab listener, and then opens up an HTML5 notification under certain circumstances when a tab is closed. The add-on debugger tells me that the Notification class is undefined: ReferenceError: Notification is not defined According to the Mozilla documentation, no special JSMs need to be included to use Notifications. Any idea what the problem is, and more importantly, how to fix it?

http://stackoverflow.com/a/29192527
has comment: http://stackoverflow.com/comment/46637694
has comment: http://stackoverflow.com/comment/46612759
type: Answer
has body: The problem with the code is: You try to insert e wich have a payload that contains an array. You should iterate over array and for each message insert it. Also you have (?, ?) and should be (?, ?, ?, ?, ?, ?, ?) Notes: 1) You get MSG: undefined because you display message from e.payload.message if you look closely there is no property message, should be e.payload. $("#app-status-ul").append(' MESSAGE -> MSG: ' + JSON.stringify(e.payload) + ' '); 2) You don't neet to use JSON.stringify because tx.executeSql expects the data you insert to be an array (ex [ 'medicine_value', 'tm_1_value1', ... ] 3) This table don't contains id column (add an id unique to table) 4) If you want to see if data is inserted, make a select $("#app-status-ul").append(' MESSAGE -> MSG: ' + e.payload.message + ' '); var db = window.sqlitePlugin.openDatabase({name: "drrem.db", location: 1}); db.transaction(function(tx) { tx.executeSql('DROP TABLE IF EXISTS Medicine'); tx.executeSql('CREATE TABLE IF NOT EXISTS test_table (id unique, medicine_name text,tm_1 integer,tm_2 integer,tm_3 integer,dosage text,diagnosis text,instructions text)'); var totalItems = 5; var currentArray = []; var arr = []; arr.push(currentArray); currentArray.push(arr.length); for (var key in e.payload) { var prop = e.payload[key]; for (var name in prop) { currentArray.push(prop[name]); if(i%totalItems == 0) { i = 0; currentArray.push(null); currentArray.push(null); currentArray = []; arr.push(currentArray); currentArray.push(arr.length); } } i++; }; arr.pop(); for(var idx = 0; idx < arr.length; idx++) { var j=arr[idx]; tx.executeSql("INSERT OR REPLACE INTO Medicine (id,medicine_name,tm_1,tm_2,tm_3,dosage,diagnosis,instructions) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", j, function(tx, result) { console.log("Insert succeed"); console.log(result); }); } });
has comment: http://stackoverflow.com/comment/46625198
has comment: http://stackoverflow.com/comment/46606784
has comment: http://stackoverflow.com/comment/46612779
has comment: http://stackoverflow.com/comment/46657942
has comment: http://stackoverflow.com/comment/46625022
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/29192278
answers question: http://stackoverflow.com/q/29192278

http://stackoverflow.com/q/29149272
tagged with: ecmascript-6
has body: I have the following JS object: var obj={ "j":"jack", "f":"franck", "a":"amy", }; Now I can write obj[val] , where val is in j,f,a to access the value of that key. I would like to know if they is a datastructure (in ES6) that would allow me to get the key from the value (eg write obj.inverted()["jack"] to get j). I know I can do it by using underscore or a simple function, but I would like to know if they is some datastructure in ES6 that would give me this feature out of the box.
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: data-structures
favorite count: 0
accepted answer: http://stackoverflow.com/a/29149330
upvote count: 1
has title: ES6 Type to represent a key-value object that can be inverted
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29149330
score: 1

http://stackoverflow.com/comment/46528490
score: 0
type: AnswerComment
type: Comment
has text: @phari I'm using Chrome Version 41.0.2272.89 m
comment on: http://stackoverflow.com/a/29153125

http://stackoverflow.com/q/29187920
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/46590944
answer count: 0
downvote count: 0
score: 1
favorite count: 0
tagged with: tabs
type: Question
has comment: http://stackoverflow.com/comment/46590802
upvote count: 1
has body: How can I modify this jsfiddle so that it will: a) highlight the active &lt;li&gt; b) Make it possible to activate a tab content at page load (a tab is already opened when the page is loaded for the first time) Thank you! $(document).ready(function() { var $panels = $('.panels &gt; .panel'); $('#menu &gt; li').on('click', 'a', function() { $panels.filter('.'+this.id).trigger('togglePanel'); }); $panels .on('togglePanel', function(){ var $this = $(this) , $activePanels = $panels.filter(':visible').not($this); if ($activePanels.length) { $activePanels .one('panelHidden', function(){ $this.is(':visible') ? $this.trigger('hidePanel') : $this.trigger('showPanel'); }) .trigger('hidePanel'); } else { $this.is(':visible') ? $this.trigger('hidePanel') : $this.trigger('showPanel'); } }) .on('hidePanel', function(){ var $this = $(this); $this.find('.content').fadeOut(500, function() { $this.animate({ 'width': 'hide' }, 1000, function(){ $this.trigger('panelHidden'); }); }); }) .on('showPanel', function(){ var $this = $(this); $this.animate({ 'width': 'show' }, 1000, function() { $this.find('.content').fadeIn(500, function(){ $this.trigger('panelShown'); }); }); }); $panels.find('.content .close').on('click', function() { $(this).closest('.panel').trigger('togglePanel'); }); });
has title: JQuery Set tab to "active"
has comment: http://stackoverflow.com/comment/46592794

http://stackoverflow.com/comment/46624649
score: 0
has text: Rather than using 10000 (end), you can set (and clear) a dummy interval and use that as the max. Then you can set the 0 (start) to that number for later usage ... assuming you are forced to use some library that couldn't just be fixed. You could even add a whitelist for known intervals that you don't want to kill.
type: AnswerComment
comment on: http://stackoverflow.com/a/29205929
type: Comment

http://stackoverflow.com/q/29127408
type: Question
has body: My controls inside my fragment have access to models that are bound to sap.ui.getCore(); but not to models set to the component from which I am calling the fragment. The problem seems to be that my fragment has no parent, so the models cannot be propagated. For components, I know you can simply set propagation in the componentContainer url: "resources/components/" + sPath, name: "components." + sPath.replace("/", "."), id: "components." + +sPath.replace("/", "."), propagateModel: true }); Is there such a method for my fragments?
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29131277
accepted answer: http://stackoverflow.com/a/29131277
tagged with: sapui5
has title: Can propagate models to components but not to sap.ui.jsfragment
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/46621873
has text: Still need help? I'll give this a shot.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29123136
score: 0

http://stackoverflow.com/comment/46608138
score: 0
type: Comment
type: QuestionComment
has text: No dev version. I've updated the question with the info.
comment on: http://stackoverflow.com/q/29195856

http://stackoverflow.com/a/29122663
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: Try $(control).find("option:selected").each( function() { or $(control).children.each( function() { You are passing (this) to you function from the caller. It doesn't have jquery selector.
answers question: http://stackoverflow.com/q/29122322

http://stackoverflow.com/comment/46412380
type: QuestionComment
score: 0
has text: @Eric : on the pages there is a combined ` ` and also a ` `, which in combination makes IE work in IE5 mode by default.
comment on: http://stackoverflow.com/q/29072136
type: Comment

http://stackoverflow.com/q/29079480
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29079729
has title: Getting reference to object that run function in JavaScript
answer count: 1
has body: I'm trying to use jQuery extension to check if servers are alive or not. Extension in here: https://gist.github.com/jerone/3487795 My code so far: // Device scanner class function deviceScanner(list){ this.list = list; this.totalDevices = list.length; this.scan = function () { for(var i = 0; i &lt; this.totalDevices; i++){ $.Ping(list[i],1000) .done( function(success, url, time, on) { found(url); }) .fail( function(success, url, time, on) { notFound(url); }); } } this.found = function (address){ alert(address); } this.notFound = function (address){ alert(address); } } var scanner = new deviceScanner([KVMRxDefaultIP, KVMTx1DefaultIP, KVMTx2DefaultIP]); $("#bt1").click(function(){ scanner.scan(); }); How shall i make Ping done or fail store result in deviceScanner?
tagged with: jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29079729
type: Question

http://stackoverflow.com/q/29177094
possible better answer: http://stackoverflow.com/a/29178022
has comment: http://stackoverflow.com/comment/46572813
has title: Rethinkdb Array of Object to Object of Array
has answer: http://stackoverflow.com/a/29178022
answer count: 2
downvote count: 0
favorite count: 0
tagged with: rethinkdb
has comment: http://stackoverflow.com/comment/46576662
has answer: http://stackoverflow.com/a/29178265
linked to: http://stackoverflow.com/q/10488883
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29178265
upvote count: 1
type: Question
tagged with: reql
tagged with: arrays
has body: I'm trying to work with Rethinkdb in mapreducing something like: [{"a":1, "b":2}, {"a":3}, {"c":4}] to {"a":[1,3], "b":[2], "c":[4]}. I have already consulted Javascript: How convert array of objects to object with sorted unique arrays? but the statements doesn't really work in ReQL, here's an example: r.expr([{"a":1, "b":2}, {"a":3}, {"c":4}]).do(function(user){ var c1 = {}; var keys = ["a", "b", "c"]; user.map(function(itm){ keys.map(function(p){ if(!c1[p]){ c1[p] = []; }; c1[p] = r.expr(c1[p]).setInsert(itm(p).default("NIL")); }); return 1 }); return c1 }); but this faults out on itm(p) with the error: RqlCompileError: Variable name not found in: RqlCompileError: Variable name not found in: r([{a: 1, b: 2}, {a: 3}, {c: 4}]).do(function(var_136) { return {a: r([]).setInsert(var_137("a").default("NIL")), b: r([]).setInsert(var_137("b").default("NIL")), c: r([]).setInsert(var_137("c").default("NIL"))}; }) ^^^^^^^ because rethinkdb is assigning variable id (137 in this case) to the itm(p) that's not declared beforehand. Any ideas how i can do this? Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/46572934

http://stackoverflow.com/comment/46480905
type: AnswerComment
has text: I don't think it needs to be updated... they're assuming that you know what properties are on your controller, they can't document every one of your use cases...
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29125796

http://stackoverflow.com/comment/46676392
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29212824
has text: Probably better to do a `typeof` but yeah, you're right. However, what if two things need to listen for that? The callback route then becomes messy. It's synonymous with `el.onClick = function() { ... }` vs `el.addEventListener`. Phaser has the `Signal` event system so why not use it as per the accepted answer?
score: 0

http://stackoverflow.com/comment/46450348
type: QuestionComment
comment on: http://stackoverflow.com/q/29110399
has text: PHP: fopen fwrite :)
score: 0
type: Comment

http://stackoverflow.com/a/29148224
type: Answer
answers question: http://stackoverflow.com/q/29147755
has body: This is a very loaded question. I will try to break it down into topics you really have to look into. In preparation it is important to understand the layers you're going to have to plan which will require a team: Serverside security and code: remember you can input or change many things, which will create a huge vulnerability unless properly planned. Any conflicts with CSS means that you have files that overlap. Javascript/jquery as well. In addition any other code. Solution: Look into segragating particular points on the website that the user is able to manipulate and change and you have the scope (the area on page/code) which you will have to segregate from your own code. CSS: These conflicts usually have to be handled manually if you're using many open source libraries, this is a tough one. JS: You can include multiple files and user each separate version for specific lines of code, this can be found here: Can I use multiple versions of jQuery on the same page? The rest of your code and plugins have to be well put together. To put it in simple terms: it's like putting Lego together but the blocks aren't always designed to fit together, you have to make it so. Again, just a forewarning: this is a big undertaking. Good Luck!
score: 0
has comment: http://stackoverflow.com/comment/46519101

http://stackoverflow.com/a/29112045
score: 2
upvote count: 2
has body: Here is a dynamic solution: $('select option').each(function(i, item){ var words = $(item).text().split(' '); $(item).text(words[0]); }); Demo: Fiddle
accepted answer of: http://stackoverflow.com/q/29112005
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29112005
type: Answer

http://stackoverflow.com/comment/46644793
has text: John in this case, you can add the adjust-layout attribute to the title object to fix that. Can't include a snippet in this comment, so I'm going to add it to my answer above.
type: Comment
comment on: http://stackoverflow.com/a/29103067
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46456717
comment on: http://stackoverflow.com/a/29110956
score: 0
type: AnswerComment
has text: I'm using your exact `makeNewNode` method and using it like `var newNode = addNode(new Parse.GeoPoint(location.lat(),location.lng()));` yet `newNode.id` is still `undefined`. No clue what could be going wrong now.
type: Comment

http://stackoverflow.com/a/29096035
upvote count: 1
has comment: http://stackoverflow.com/comment/46436545
accepted answer of: http://stackoverflow.com/q/29095895
score: 1
answers question: http://stackoverflow.com/q/29095895
has body: Change this app.directive('country', ['', function(){ to this app.directive('country', [function(){ Similar to state and city And also, you have an extra } in state directive declaration plnkr
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46453003
type: Answer

http://stackoverflow.com/comment/46550637
comment on: http://stackoverflow.com/q/29165712
has text: the `e` at start is either `1 or -1` depends on user but its only that two value.
score: 0
type: Comment
type: QuestionComment

resize
tags question: http://stackoverflow.com/q/29168815
tags question: http://stackoverflow.com/q/29111363
tags question: http://stackoverflow.com/q/29138656
tags question: http://stackoverflow.com/q/29174167
tags question: http://stackoverflow.com/q/29156665
tags question: http://stackoverflow.com/q/29086776
type: Tag
tag name: resize

http://stackoverflow.com/comment/46526316
type: Comment
type: QuestionComment
has text: @EugeneNaydenov thanks for the SO link you provided! super helpful
comment on: http://stackoverflow.com/q/29139075
score: 0

http://stackoverflow.com/comment/46632037
comment on: http://stackoverflow.com/q/29211052
score: 0
type: QuestionComment
type: Comment
has text: @RGraham, posted as an answer

http://stackoverflow.com/a/29203071
type: Answer
has body: You can find the complete list of class with their count from the following code.. var classes = new Object(); $("*").each(function() { if (this.className.length &gt; 0) { var arrTmp = this.className.split(" "); for (var i=0; i&lt;arrTmp.length; i++) { if ($.trim(arrTmp[i]).length &gt; 0) { if (classes[arrTmp[i]]) classes[arrTmp[i]] = classes[arrTmp[i]] + 1; else classes[arrTmp[i]] = 1; } } } }); var sortable = []; for (var arr in classes) sortable.push([arr, classes[arr]]) sortable.sort(function(a, b) {return b[1] - a[1]}); alert(sortable); Test on JsFiddle : https://jsfiddle.net/qsfdm286/
has comment: http://stackoverflow.com/comment/46617873
has comment: http://stackoverflow.com/comment/46617786
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29202888
answers question: http://stackoverflow.com/q/29202888
has comment: http://stackoverflow.com/comment/46622564

http://stackoverflow.com/q/29063142
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/29083083
accepted answer: http://stackoverflow.com/a/29083083
downvote count: 0
score: 1
type: AnsweredQuestion
tagged with: bootbox
tagged with: asp.net-mvc
has body: currently I'm trying to display a dialog where you can delete a "shelf" when you click on a button. Delete On the bootbox.js example page they link to this file as a example. This code works for me, except I don't know how to dynamically add the options from my ASP.NET MVC Model. The Shelves are stored in a Collection: @foreach (Shelf shelf in Model.Shelves) { string shelfName = @shelf.Name; } Now my Question: How can I add the Shelves as "option" to the "select" element? Thank you!
type: Question
has title: Adding Options to Select form-control in a custom dialog with bootbox.js in ASP.NET MVC
upvote count: 1

http://stackoverflow.com/a/29068502
has body: You can simplify your code to this: var randomizer = Math.random() * 100; if (randomizer &lt;= 33) { var compDecision = "a"; } else if (randomizer &gt; 67) { var compDecision = "b"; } else if (33 &lt; randomizer &amp;&amp; randomizer &lt;= 67) { var compDecision = "c"; } alert(compDecision);
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46372412
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29068435
has comment: http://stackoverflow.com/comment/46372448

http://stackoverflow.com/a/29146868
answers question: http://stackoverflow.com/q/29146277
type: Answer
has body: I am not really sure what you want to achive, but if you want to "opacity" the whole svg you can simply put a group arround it and set it there. <g opacity="0.2"> place your svg here </g>
score: 0

http://stackoverflow.com/a/29105859
score: 0
has body: You could check the user agent and use window.scrollTo instead for ios devices. More info @ http://blog.jonathanargentiero.com/?p=134
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29105662
answers question: http://stackoverflow.com/q/29105662

http://stackoverflow.com/comment/46438529
has text: Are you using the option value to get the element id you want to hide/show? for example: ` Something ` and use the value cars to hide/show another element using `id="cars"` ? I'm just curious on your method to hide/show before I decide on posting an answer.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29103931

http://stackoverflow.com/comment/46523174
score: 0
type: Comment
has text: Just tried your suggestion. It doesn't seem to have fixed the problem
type: AnswerComment
comment on: http://stackoverflow.com/a/29150178

http://stackoverflow.com/q/29131242
answer count: 2
score: 8
tagged with: canvas
tagged with: html5-canvas
tagged with: javascript
has title: Crop image like pie chart
has answer: http://stackoverflow.com/a/29131684
favorite count: 0
upvote count: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29131387
accepted answer: http://stackoverflow.com/a/29131684
type: Question
has body: I want to crop image over another image like a pie-chart to create a loading animation. I was thinking of using raphaeljs, but couldn't find any information about image cropping in pie-chart style. Here are the sample images: Start state: End state: What it should look like:
possible better answer: http://stackoverflow.com/a/29131387
downvote count: 3
tagged with: raphael

http://stackoverflow.com/comment/46543793
has text: it is working but my requirement is to select row on mouse click not using ccheckbox
comment on: http://stackoverflow.com/a/29142828
score: 0
type: AnswerComment
type: Comment

cocos2d-android
type: Tag
tags question: http://stackoverflow.com/q/29207553
tag name: cocos2d-android

http://stackoverflow.com/q/29153879
favorite count: 0
has body: I wrote two functions named some and every to expect to get results shown as below: console.log(every([NaN, NaN, NaN], isNaN)); // → true console.log(every([NaN, NaN, 4], isNaN)); // → false console.log(some([NaN, 3, 4], isNaN)); // → true console.log(some([2, 3, 4], isNaN)); // → false My functions are: function every(array,predicate){ for (var element in array){ if (!predicate(element)) return false; } return true; } function some(array, predicate){ for (var element in array){ if (predicate(element)) return true; } return false; } But the results are all false Once I change the for...in to for loop, the answers are correct. function every(array, predicate) { for (var i = 0; i &lt; array.length; i++) { if (!predicate(array[i])) return false; } return true; } function some(array, predicate) { for (var i = 0; i &lt; array.length; i++) { if (predicate(array[i])) return true; } return false; } Why for..in can not result in the correct answer?
linked to: http://stackoverflow.com/q/3010840
has title: JavaScript For loop vs for in does not work
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46528947
score: -1
has answer: http://stackoverflow.com/a/29153959
type: Question
answer count: 2
tagged with: for-loop
upvote count: 0
linked to: http://stackoverflow.com/q/500504
possible better answer: http://stackoverflow.com/a/29153912
tagged with: javascript
has answer: http://stackoverflow.com/a/29153912
accepted answer: http://stackoverflow.com/a/29153959

http://stackoverflow.com/a/29178373
has body: You are looking for PubSub JavaScript implementations with namespaces support. Quick googling gives this https://jsperf.com/pubsub-js-vs-jquery-events/12 for example.
type: Answer
answers question: http://stackoverflow.com/q/29178288
score: 0

http://stackoverflow.com/comment/46538327
comment on: http://stackoverflow.com/q/29091607
score: 0
type: Comment
type: QuestionComment
has text: If you have any proper example for cropping and uploading image in jsp and sending it to servlet,share it

npm
tags question: http://stackoverflow.com/q/29079021
tags question: http://stackoverflow.com/q/29062493
type: Tag
tags question: http://stackoverflow.com/q/29217311
tags question: http://stackoverflow.com/q/29067308
tags question: http://stackoverflow.com/q/29196203
tags question: http://stackoverflow.com/q/29089460
tag name: npm
tags question: http://stackoverflow.com/q/29144700
tags question: http://stackoverflow.com/q/29100435

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/29155855
tags question: http://stackoverflow.com/q/29147789
tags question: http://stackoverflow.com/q/29082660
tags question: http://stackoverflow.com/q/29208907
tags question: http://stackoverflow.com/q/29188545
tags question: http://stackoverflow.com/q/29107853
tags question: http://stackoverflow.com/q/29174095
tags question: http://stackoverflow.com/q/29213525
tags question: http://stackoverflow.com/q/29089537
tags question: http://stackoverflow.com/q/29097582
tags question: http://stackoverflow.com/q/29064684
tags question: http://stackoverflow.com/q/29109334
tags question: http://stackoverflow.com/q/29211052
tags question: http://stackoverflow.com/q/29142180
type: Tag
tags question: http://stackoverflow.com/q/29105198
tags question: http://stackoverflow.com/q/29174182
tags question: http://stackoverflow.com/q/29189460
tags question: http://stackoverflow.com/q/29146555
tags question: http://stackoverflow.com/q/29141766
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/29140487
tags question: http://stackoverflow.com/q/29157761
tags question: http://stackoverflow.com/q/29109850
tags question: http://stackoverflow.com/q/29206695
tags question: http://stackoverflow.com/q/29180572
tags question: http://stackoverflow.com/q/29106509

mysql
tags question: http://stackoverflow.com/q/29106580
tags question: http://stackoverflow.com/q/29212557
tags question: http://stackoverflow.com/q/29064377
tags question: http://stackoverflow.com/q/29118313
tags question: http://stackoverflow.com/q/29206753
tag name: mysql
tags question: http://stackoverflow.com/q/29111582
tags question: http://stackoverflow.com/q/29070942
tags question: http://stackoverflow.com/q/29071603
tags question: http://stackoverflow.com/q/29067583
tags question: http://stackoverflow.com/q/29185470
tags question: http://stackoverflow.com/q/29204481
tags question: http://stackoverflow.com/q/29135375
tags question: http://stackoverflow.com/q/29172378
tags question: http://stackoverflow.com/q/29074936
tags question: http://stackoverflow.com/q/29155552
tags question: http://stackoverflow.com/q/29065157
tags question: http://stackoverflow.com/q/29203445
tags question: http://stackoverflow.com/q/29140491
tags question: http://stackoverflow.com/q/29187322
tags question: http://stackoverflow.com/q/29185892
tags question: http://stackoverflow.com/q/29117068
tags question: http://stackoverflow.com/q/29207018
tags question: http://stackoverflow.com/q/29207888
tags question: http://stackoverflow.com/q/29190904
tags question: http://stackoverflow.com/q/29146043
tags question: http://stackoverflow.com/q/29113729
type: Tag
tags question: http://stackoverflow.com/q/29126342
tags question: http://stackoverflow.com/q/29195444
tags question: http://stackoverflow.com/q/29158003
tags question: http://stackoverflow.com/q/29088881
tags question: http://stackoverflow.com/q/29064714
tags question: http://stackoverflow.com/q/29151800
tags question: http://stackoverflow.com/q/29157483
tags question: http://stackoverflow.com/q/29110259
tags question: http://stackoverflow.com/q/29130598
tags question: http://stackoverflow.com/q/29073167
tags question: http://stackoverflow.com/q/29085146
tags question: http://stackoverflow.com/q/29179224
tags question: http://stackoverflow.com/q/29063897
tags question: http://stackoverflow.com/q/29168790
tags question: http://stackoverflow.com/q/29109389
tags question: http://stackoverflow.com/q/29124061
tags question: http://stackoverflow.com/q/29206417
tags question: http://stackoverflow.com/q/29179612
tags question: http://stackoverflow.com/q/29179001
tags question: http://stackoverflow.com/q/29097500
tags question: http://stackoverflow.com/q/29192837
tags question: http://stackoverflow.com/q/29084765

http://stackoverflow.com/comment/54474415
score: 0
has text: Yes , that would be much more readable . But i was trying to explain the bug in the code.Thanks for your comment.:)
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29091867

http://stackoverflow.com/comment/46638314
type: QuestionComment
comment on: http://stackoverflow.com/q/29176819
has text: @FelixKling Thank you for your quick response and for your suggestion. Appreciate it!
score: 0
type: Comment

http://stackoverflow.com/a/29084112
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29083754
has comment: http://stackoverflow.com/comment/46421090
has comment: http://stackoverflow.com/comment/46526359
has comment: http://stackoverflow.com/comment/46462772
type: Answer
has comment: http://stackoverflow.com/comment/46554225
has comment: http://stackoverflow.com/comment/46402224
upvote count: 1
answers question: http://stackoverflow.com/q/29083754
has comment: http://stackoverflow.com/comment/46406858
has body: My assumption here is that you want the animation to remain after scrolling up. To do that, let's take a look at your code. $(function(){ // Define the height the loading bar should appear at var startY = 300; // Run this function whenever you scroll $(window).scroll(function(){ checkY(); }); // The function ran when scrolling function checkY(){ // If the window position is greater than the preset height if( $(window).scrollTop() &gt; startY ){ // Make all of these ids slide down $('#sketch-progress, #photoshop-progress, #illustrator-progress, #indesign-progress, #css-progress, #html-progress, #mac-progress, #windows-progress').slideDown(); // If the window position isn't greater } else { // Make all of these ids slide back up $('#sketch-progress, #photoshop-progress, #illustrator-progress, #indesign-progress, #css-progress, #html-progress, #mac-progress, #windows-progress').slideUp(); } } // Run this function again? // Not really needed with the scroll function checkY(); }); tl;dr As you can see, the else statement in that function removes your loading icon if your if statement isn't true. So, if you want it to stay and only appear once, all you have to do is remove the else in the if statement. Was that what you wanted to know? // Try this in place of your original checkY function function checkY(){ if( $(window).scrollTop() &gt; startY ){ $('#sketch-progress, #photoshop-progress, #illustrator-progress, #indesign-progress, #css-progress, #html-progress, #mac-progress, #windows-progress').slideDown(); } }
score: 1

http://stackoverflow.com/comment/46441420
comment on: http://stackoverflow.com/a/29105557
type: AnswerComment
has text: That is precisely what I did.
score: 0
type: Comment

http://stackoverflow.com/a/29193395
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46600481
answers question: http://stackoverflow.com/q/29193133
has body: First of all it is not clear what exactly you are doing here. your javascript code which is now jquery added var data={"events":[ { "id": EX_01, "Name":"Event 1", "City":"City 1", "Dates":"13-09-2015", }, { "id": EX_02, "Name":"Event 2", "City":"City 2", "Dates":"15-09-2015", } ]} $("#EX_01").find("div:nth-child(1)").html(data.events[0].Dates); $("#EX_01").find("div:nth-child(2)").html(data.events[0].Name); $("#EX_01").find("div:nth-child(3)").html(data.events[0].City); $("#EX_02").find("div:nth-child(1)").html(data.events[1].Dates); $("#EX_02").find("div:nth-child(2)").html(data.events[1].Name); $("#EX_02").find("div:nth-child(3)").html(data.events[1].City); you can work around more for dynamic creation or selection of html elements

http://stackoverflow.com/a/29167702
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/29167227
has body: If you want to use your existing function and don't want your form to submit you can just use jquery and prevent the form from submitting with your existing function. Example $(document).ready(function(){ $("#prints").submit(function (e) { e.preventDefault(); // this will prevent from submitting the form. }); }); I added an id of prints to the form alternatively you could use a name selector or some other selector... Alternatively if you want to be able to submit the form at some point you could just add a jquery handler for keypress on the form and if its the return key cancel it. $('#prints').keypress(function(e){ if ( e.which == 13 ) e.preventDefault(); }); Example 2
type: Answer
upvote count: 1

stored-procedures
tags question: http://stackoverflow.com/q/29214528
tag name: stored-procedures
type: Tag

http://stackoverflow.com/comment/113621975
comment on: http://stackoverflow.com/a/29206656
has text: @Web.11 please elaborate on your question, if you can link me to a code snippet, I could help you better
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46580451
type: QuestionComment
has text: Yes, just checked. I can see it with inspector
comment on: http://stackoverflow.com/q/29181437
score: 0
type: Comment

http://stackoverflow.com/comment/46431663
comment on: http://stackoverflow.com/q/29100559
score: 0
type: QuestionComment
type: Comment
has text: look at my answer bellow if as you tagged jquery in your post.

http://stackoverflow.com/a/29161430
answers question: http://stackoverflow.com/q/29146697
accepted answer of: http://stackoverflow.com/q/29146697
type: AcceptedAnswer
downvote count: 0
has body: Now i do so: i still use ng-show but i'm using watcher to get filtered array: $scope.$watch('search', function(newVal, oldVal) { $scope.filteredArray = $filter('filter')($scope.users, newVal); });
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46406460
type: QuestionComment
has text: no, should always be these 3 properties.
score: 0
comment on: http://stackoverflow.com/q/29086742
type: Comment

http://stackoverflow.com/q/29165471
has answer: http://stackoverflow.com/a/29165967
has comment: http://stackoverflow.com/comment/46554236
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/29166149
has comment: http://stackoverflow.com/comment/46550209
has comment: http://stackoverflow.com/comment/46556630
has comment: http://stackoverflow.com/comment/46554107
upvote count: 3
answer count: 3
linked to: http://stackoverflow.com/q/20883421
has body: I've got an array of objects where some of the elements are clones of another, hence they have a property that references another property of the original (simplified example): var a = [{ id: 'x0', name: 'Foo', isClone: false, wasCloned: true, originalId: '' }, { id: 'y1', name: 'Bar'. isClone: false, wasCloned: false, originalId: '' }, { id: 'z2', name: 'Foo', isClone: true, wasCloned: false, originalId: 'x0' }]; In this example, the third element references the id of the first - which makes it a clone in that sense. Unfortunately, the id's are not incremental/chronological and can basically be any random string. Now, the task at hand is to sort the array in such a fashion so that the clones are always placed on the array position right before the position of its original. If the array element is not a clone, the ordering should proceed as usual. In other words, once sorted, the order in this example would be 2,0,1. I've tried to figure out how to use Array.sort for this, but can't really wrap my head around it. This is basically what I've got (which doesn't work): var sortedA = a.sort(function(one, other) { var sorted; if (one.id == other.originalId) { sorted = -1; } else { sorted = 0; } return sorted; }); Any help on this would be much appreciated, thank you.
favorite count: 0
has comment: http://stackoverflow.com/comment/46550032
possible better answer: http://stackoverflow.com/a/29165860
has comment: http://stackoverflow.com/comment/46549817
has comment: http://stackoverflow.com/comment/46557187
linked to: http://stackoverflow.com/q/24080785
has comment: http://stackoverflow.com/comment/46550819
type: AnsweredQuestion
score: 3
tagged with: algorithm
has comment: http://stackoverflow.com/comment/46549791
accepted answer: http://stackoverflow.com/a/29166149
type: Question
has answer: http://stackoverflow.com/a/29165860
has title: Sorting an array of objects with specific exceptions in Javascript

http://stackoverflow.com/q/29183609
score: 1
has answer: http://stackoverflow.com/a/29183883
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/29183883
has body: I want to replace this code from: var viewModel = function(){ var self = this; self.people = ko.observableArray([ { firstName: 'James', lastName: 'Smith', age: 38 }, { firstName: 'Susan', lastName: 'Smith', age: 36 }, { firstName: 'Jeremy', lastName: 'Smith', age: 10 }, { firstName: 'Megan', lastName: 'Smith', age: 7 }, { firstName: 'James', lastName: 'Jones', age: 40 }, { firstName: 'Martha', lastName: 'Jones', age: 36 }, { firstName: 'Peggy', lastName: 'Jones', age: 10 } ]); with select sql query that i used in PHP $result=mysql_query("SELECT * FROM table "); while($fak = mysql_fetch_array($result)){} the result will echo in this code help please thanks a lot
favorite count: 0
upvote count: 1
tagged with: php
type: AnsweredQuestion
has title: how to pass select query to js

http://stackoverflow.com/comment/46418164
comment on: http://stackoverflow.com/a/29093127
type: AnswerComment
has text: oh ! my mistake. Then it has to be something related to scaling.
score: 0
type: Comment

http://stackoverflow.com/q/29100123
type: Question
tagged with: javascript
score: -1
has title: how to stop an object when it collides with another object in javascript canvas
upvote count: 0
tagged with: html5-canvas
answer count: 1
has answer: http://stackoverflow.com/a/29100593
favorite count: 0
has body: OK, so I am making a Pacman game using HTML5 . the problem is whenever I hit one of the brick blocks I want the sprite to stop moving but it keeps going until it hits the left most brick object. how do I fix this? please help... here is the code I'm using to make the sprite stop. here is all my code, if you have time, please parse it, and tell me what I have done wrong. function init(){ var canvas=document.getElementById("ctx"); var ctx = canvas.getContext("2d"); var player = {sx:6,sy:6,sw:15,sh:15,x:230,y:377,w:20,h:20} var ss = new Image(); ss.src="SS.png"; var right=false,left= true,up = false,down = false var b = [{x:0,y:0,w:25,h:((canvas.height/2)-25)},{x:0,y:((canvas.height/2)),w:25,h:((canvas.height/2))},{x:50,y:25,w:50,h:50},{x:125,y:25,w:75,h:50},{x:225,y:0,w:25,h:75},{x:275,y:25,w:75,h:50},{x:375,y:25,w:50,h:50},{x:50,y:100,w:50,h:25},{x:125,y:100,w:25,h:125},{x:125,y:150,w:75,h:25},{x:175,y:100,w:125,h:25},{x:225,y:125,w:25,h:50},{x:325,y:100,w:25,h:125},{x:275,y:150,w:75,h:25},{x:375,y:100,w:50,h:25},{x:25,y:150,w:75,h:75},{x:375,y:150,w:75,h:75},{x:375,y:250,w:75,h:75},{x:25,y:250,w:75,h:75},{x:125,y:250,w:25,h:75},{x:325,y:250,w:25,h:75},{x:175,y:300,w:125,h:25},{x:225,y:325,w:25,h:50},{x:50,y:350,w:50,h:25},{x:75,y:350,w:25,h:75},{x:125,y:350,w:75,h:25},{x:275,y:350,w:75,h:25},{x:375,y:350,w:50,h:25},{x:375,y:350,w:25,h:75},{x:25,y:400,w:25,h:25},{x:125,y:400,w:25,h:75},{x:50,y:450,w:150,h:25},{x:275,y:450,w:150,h:25},{x:325,y:400,w:25,h:50},{x:425,y:400,w:25,h:25},{x:175,y:400,w:125,h:25},{x:225,y:425,w:25,h:50},{x:450,y:0,w:50,h:((canvas.height/2)-25)},{x:450,y:(canvas.height/2),w:50,h:((canvas.height/2))}]; function gen(){ for(var i=0;i&lt;b.length;i++){ ctx.fillStyle="blue" ctx.fillRect(b[i].x,b[i].y,b[i].w,b[i].h) } ctx.drawImage(ss,player.sx,player.sy,player.sw,player.sh,player.x,player.y,player.w,player.h) } function move(){ for(var i=0;i&lt;b.length;i++){ //((a.x + a.width) &lt; b.x) if(left &amp;&amp; player.x &gt; b[i].x &amp;&amp; (player.x…
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 1

http://stackoverflow.com/comment/47179263
type: AnswerComment
score: 0
type: Comment
has text: I like the first one because it's just one line :D
comment on: http://stackoverflow.com/a/29076698

http://stackoverflow.com/comment/46475202
type: Comment
has text: why are you using javascript when you could do everything w/ media queries?
type: QuestionComment
comment on: http://stackoverflow.com/q/29124570
score: 0

http://stackoverflow.com/q/29111002
answer count: 4
tagged with: foreach
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29111031
has answer: http://stackoverflow.com/a/29111181
has comment: http://stackoverflow.com/comment/46456942
has title: Multiply by number all ellements of an array with forEach in JavaScript
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/46454970
has answer: http://stackoverflow.com/a/54090989
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/46455410
has answer: http://stackoverflow.com/a/29111058
accepted answer: http://stackoverflow.com/a/29111058
has comment: http://stackoverflow.com/comment/46451285
has comment: http://stackoverflow.com/comment/46451326
favorite count: 0
has body: I have an array of numbers: var array = [ 23, 67, 120, 170, 200, 212, 350 ]; and I want to scale down by 20% each of the element of the array. I used array.forEach(function(item) {item * 0.8;});, but it did nothing. I tried also var scaledArray = array.forEach(function(item) {item * 0.8;});, but the result was undefined.
possible better answer: http://stackoverflow.com/a/29111031
has comment: http://stackoverflow.com/comment/46451341

http://stackoverflow.com/q/29071649
has comment: http://stackoverflow.com/comment/46407163
has comment: http://stackoverflow.com/comment/46380919
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/46382137
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/46377874
answer count: 0
score: 1
has body: I have almost no experience in browser side and I have been debugging this issue since a day now and just not able to solve it. I have a box that shows a dynamic text whenever we point to a particular object as a tooltip. The problem here is it is not wrapping up the next into multiple lines due to which it is getting clipped. Here is my code var html_comment= (this.getAttribute('comment')).toString(); html_comment = html_comment.replace(/(?:\\r\\n|\r|\\n| \\n)/g, '&lt;br /&gt;'); if(activityCount &gt; 1){ $('.highcharts-tooltip').hide(); html_comment = numberOfActivityHeader; } text = chart.renderer.text(this.getAttribute('SomeAttributeType') + ": &lt;b&gt;" + symbol + this.getAttribute('SomeAttributeValue') + suffix + "&lt;/b&gt;&lt;br&gt;" + html_comment , x + 10 + correctionX, y + 10 * 2) .attr({ zIndex: 16 }).css({ fillColor: '#fff', color: '#000' }).add(); var box = text.getBBox(); debugger; textBG = chart.renderer.rect(box.x - 5, box.y - 5, box.width + 10, box.height + 10, 5) .attr({ fill: '#ffffff', stroke: '#0072bc' || 'grey', 'stroke-width': 1, zIndex: 15 }).add(); }).on('mouseout', function (event) { text.destroy(); textBG.destroy(); $('.highcharts-tooltip').show(); What I tried till now: 1. I tried to manually wrap it up by inserting \n say every 10 characters. But i saw \n is totally neglected. I tried changing some css as well text = chart.renderer.text(this.getAttribute('someAttributeType') + ": " + symbol + this.getAttribute('someAttributeValue') + suffix + " " + html_comment , x + 10 + correctionX, y + 10 * 2) .attr({ zIndex: 16 }).css({ fillColor: '#fff', color: '#000', wordWrap: 'break-word' }).add(); textBG = chart.renderer.rect(box.x - 5, box.y - 5, box.width + 10, box.height + 10, 5) .attr({ fill: '#ffffff', stroke: '#0072bc' || 'grey', 'stroke-width': 1, zIndex: 15, wordWrap: 'break-word' }).add(); As you can see above used wordWrap to break word in both renderer.text and rederer.rect. Even above is not working. Is there a solution to this pro…
type: Question
has title: Facing word wrap issues with HighCharts chart.renderer.text
tagged with: highcharts
tagged with: javascript

end-to-end
tags question: http://stackoverflow.com/q/29123965
tags question: http://stackoverflow.com/q/29118804
tags question: http://stackoverflow.com/q/29091906
tags question: http://stackoverflow.com/q/29174754
type: Tag
tags question: http://stackoverflow.com/q/29114098
tags question: http://stackoverflow.com/q/29111830
tag name: end-to-end

http://stackoverflow.com/comment/46534454
type: Comment
comment on: http://stackoverflow.com/a/29156541
score: 0
type: AnswerComment
has text: Like you, I hate polluting rootscope. Here we are not storing the `targetProduct` in the rootscope, we are broadcasting an event that will travel from the rootscope down to the childs.

http://stackoverflow.com/a/29101165
type: Answer
answers question: http://stackoverflow.com/q/29101071
score: 0
has body: I think what you want is a label: echo ' ' + $a["Name"] + ': '; echo ' ' . $a["Code"] . " - " . $a["Name"] . ' '; echo ' ';

http://stackoverflow.com/comment/46405256
type: QuestionComment
has text: Could be a couple of things... Is `vm.teamId = Number($stateParams.id)` properly setting `vm.teamId` to a number?
score: 0
comment on: http://stackoverflow.com/q/29086029
type: Comment

http://stackoverflow.com/q/29161879
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46543179
has body: I'm trying to pull out the value from the id attribute from a list item but the javascript runtime is throwing an error saying attr is not supported. What am I missing here? Getting the first list item in the list then trying to get the id from it. $("#sortable").sortable({ start: function(event, ui) { var firstindex = $("li.imagethumbs").get(0); //console.log(firstindex); var id = firstindex.attr('id'); //error is thrown here $(ui.item).data("startindex", ui.item.index()); // $(ui.item).data("firstindexid", id); }, stop: function(event, ui) { self.sendUpdatedIndex(ui.item); } });
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29161910
tagged with: jquery-ui-sortable
has answer: http://stackoverflow.com/a/29161901
type: Question
has title: Can't get id from list item

http://stackoverflow.com/q/29090160
tagged with: javascript
has body: I don't understand this. &gt; 'a\nb'.split(/\n/) [ 'a', 'b' ] &gt; 'a\nb'.split(/(\n)/) [ 'a', '\n', 'b' ] Why?
answer count: 1
accepted answer: http://stackoverflow.com/a/29090207
tagged with: regex
favorite count: 0
upvote count: 2
has title: Why does splitting with RegEx group include the group in the result?
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29090207
downvote count: 1
has comment: http://stackoverflow.com/comment/46412787
type: Question

http://stackoverflow.com/q/29075026
favorite count: 0
answer count: 0
upvote count: 2
has title: Blur.js gives weird placement
type: UnansweredQuestion
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/46385140
type: Question
tagged with: javascript
tagged with: jquery
tagged with: blur
has body: im using blur.js to blur a div's background inside a parent div which im using as the source. This is the visual; +-----------------+ | ------- | | | div | | | ¯¯¯¯¯¯¯ | +-----------------+ My parent div has some CSS to position the background properly; background-image: url("../img/jumbo.jpg"); background-size:cover; background-position: center center fixed; But the div on the inside does not copy the same background position as its parent. I have tried adding the CSS to the class of the inside div, but this does not help me achieve the desired effect.
has comment: http://stackoverflow.com/comment/46505683
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/a/29109573
has comment: http://stackoverflow.com/comment/46451507
has body: Create a new Date object for the timestamp value, so that you can ensure they can be compared. The code should look like: var dateFromTimestamp = new Date(timestamp);
type: Answer
has comment: http://stackoverflow.com/comment/46452991
has comment: http://stackoverflow.com/comment/46451384
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29099986
answers question: http://stackoverflow.com/q/29099986
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/96064325
score: 0
comment on: http://stackoverflow.com/q/29111626
type: QuestionComment
type: Comment
has text: @sahbeewah `new Promise` directly calls the function you pass as argument, so no queued jobs can possibly be executed between 2 and 3.

http://stackoverflow.com/q/29190581
answer count: 1
has body: Is there a way to access $0 from chrome developer tool's console when a DOM node of an iFrame is selected?
has answer: http://stackoverflow.com/a/34556941
has comment: http://stackoverflow.com/comment/46596401
has comment: http://stackoverflow.com/comment/46595946
has comment: http://stackoverflow.com/comment/46595609
has comment: http://stackoverflow.com/comment/46596255
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/51046444
has comment: http://stackoverflow.com/comment/46596565
type: Question
has comment: http://stackoverflow.com/comment/46596067
tagged with: javascript
has title: Not able to access $0 when dom node of an iframe is selected
tagged with: console
linked to: http://stackoverflow.com/q/3275816
score: 0
has comment: http://stackoverflow.com/comment/46596378

http://stackoverflow.com/q/29063664
has answer: http://stackoverflow.com/a/29063689
has title: How to add two variables
duplicate of: http://stackoverflow.com/q/8976627
has comment: http://stackoverflow.com/comment/46363318
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46363914
has answer: http://stackoverflow.com/a/29063754
type: Question
accepted answer: http://stackoverflow.com/a/29063689
has answer: http://stackoverflow.com/a/29063727
possible better answer: http://stackoverflow.com/a/29063754
has body: I am trying to add two variables but they are concatenating with each other instead of adding var price = 10; $("#val").blur(function(){ var get_val = $(this).val(); var get_vale = price + get_val ; alert("there are " + get_vale + " in your cart"); }); How do I add these variables and not concatenate them?
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
linked to: http://stackoverflow.com/q/8976627

http://stackoverflow.com/comment/46582177
comment on: http://stackoverflow.com/a/29182905
type: Comment
score: 0
type: AnswerComment
has text: This is a issue only when I am loading a javascript from partial. When I use angular Js to generate the number of slides dynamically then the slides loads all the slides but after the last slide it continues to move towards left and shows blank space .

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/29067371

http://stackoverflow.com/q/29091862
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46415742
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29092933
tagged with: css
has answer: http://stackoverflow.com/a/45547733
has answer: http://stackoverflow.com/a/29091946
type: UnansweredQuestion
has body: How to check if device is Windows Surface Tablet and browser is chrome or IE using Javascript. i have tried following code function is_touch_device() { try { document.createEvent("TouchEvent"); return true; } catch (e) { return false; } } if(is_touch_device() ) { if(navigator.userAgent.toLowerCase().indexOf('chrome')&gt;-1) { //some stuff } } i have searched for useragent but i an not getting exact for surface. how to check if device is surface and browser is chrome or IE
upvote count: 1
downvote count: 1
has title: How to check if device is Windows Surface Tablet and browser is chrome or IE
type: Question
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46417681

http://stackoverflow.com/comment/46494815
comment on: http://stackoverflow.com/q/29134656
has text: You're not selecting anything, the name is invalid as it's not quoted, and using `document.forms` is a really poor way to get an element that has an ID
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29212270
has title: addEventListener is not working in IE11
has body: Below javascript function uploads the chosen file and updates the grid. Its working perfectly in firefox but not in IE11. Observed that its not executing "ESignature/Registration" function in addEventListener. I kept break point at Registration function. Its not getting hit and not refreshing the grid. Please guide me to fix this problem $("#lnkAddAttachment").click(function (e) { if (document.getElementById("txtFile").files[0] != null) { oFiles = document.getElementById("txtFile").files[0]; nFiles = oFiles.size; var selectedFile = document.getElementById("txtFile").files[0]; var xhr = new XMLHttpRequest(); var fd = new FormData(); var url = '@Url.Content("~/")' + "ESignature/getFile"; fd.append("file", document.getElementById('txtFile').files[0]); $("#loadingwrapper").fadeIn(); xhr.open("POST", url, true); xhr.send(fd); xhr.addEventListener("load", function (event) { var url = '@Url.Content("~/")' + "ESignature/Registration"; $('#gridAttachments').load(url + ' #gridAttachments'); $("#loadingwrapper").fadeOut(); }, false); $('#txtDescription').val(''); $('#txtFile').val(''); return false; } });
tagged with: asp.net-mvc-4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29212360
type: Question
has comment: http://stackoverflow.com/comment/46634098
has answer: http://stackoverflow.com/a/29212360
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/29227910
tagged with: javascript
has answer: http://stackoverflow.com/a/29212390
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29227910

http://stackoverflow.com/a/29214244
has body: Put anchors arround the regex: var strRegex = "^0[xX][0-9a-fA-F]+$";
answers question: http://stackoverflow.com/q/29214193
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/29188357
type: Question
accepted answer: http://stackoverflow.com/a/29787605
downvote count: 0
tagged with: javascript
has body: As expected, when I run gulp uncss on my index.html file, it removes all the css rules from my stylesheet not used in the html. Problem is my app is primarily javascript so much of the content isn't rendered until the js executes in the browser. Does anybody know of a good way to execute the index.html file in a server via gulp and capture the html string (post javascript execution) so that I can pass it to uncss?
answer count: 1
tagged with: gulp
has title: gulp uncss is filtering selectors needed by my javascript
favorite count: 0
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29787605

http://stackoverflow.com/q/29195763
answer count: 2
has answer: http://stackoverflow.com/a/29195826
downvote count: 0
has answer: http://stackoverflow.com/a/64666621
has title: How to properly get form data with JQuery and formData
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20795449
tagged with: php
has body: I am trying to upload some form data using ajax and php but for some reason my data is not being catch or passed. Here is what I have: form.html ( basic form with 3 text inputs and 1 file) Resultado: Descrição do Site: OG FB DESC: Imagem Imagem usada na página de resultado e Facebook 600 x 400. Adicionar Resultado Próxima Etapa And here is the JS that makes the ajax call: myjs.js $("document").ready(function(){ $('.row').on('click','.addres',function(){ console.log('Click Detectado'); var formulario = $('#superform'); var formData = new FormData(formulario); $.ajax({ type: "POST", url: "addres.php", data: formData, async: false, success: function(data) { console.log('Funcionou'); }, error: function(data) { console.log('Erro no formulario'); }, cache: false, contetType: false, processData: false }); }); }); Nothing is being passed and the POST call is empty (See screenshots below). **addres.php** <?php var_dump($_FILES); var_dump($_POST); ?>
type: Question
linked to: http://stackoverflow.com/q/166221
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/q/29186121
has body: Just a super simple javascript question, but i cannot find out how it works Need to get script output to the input. original script on http://jsfiddle.net/mYuRK/ Thanks! var theTotal = 0; $('button').click(function(){ theTotal = Number(theTotal) + Number($(this).val()); $('.tussenstand').text("Total: "+theTotal); }); $('.tussenstand').text("Total: "+theTotal); 1 2 4 6
score: 0
answer count: 3
has title: Javascript on button click add value to text box
has comment: http://stackoverflow.com/comment/46587505
has answer: http://stackoverflow.com/a/29186224
has answer: http://stackoverflow.com/a/29186201
accepted answer: http://stackoverflow.com/a/29186201
type: AnsweredQuestion
tagged with: javascript
tagged with: calculator
possible better answer: http://stackoverflow.com/a/29186188
has answer: http://stackoverflow.com/a/29186188
type: Question
has comment: http://stackoverflow.com/comment/46587907

http://stackoverflow.com/comment/46498353
comment on: http://stackoverflow.com/q/29136800
type: QuestionComment
score: 0
has text: You shouldn't be using `onblur` in your HTML and `addEventListener` in your code. Use just the latter, and put your script at the foot of your page.
type: Comment

http://stackoverflow.com/q/29075726
has title: Jquery datatables first result always stays in table
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/46385999
tagged with: knockout.js
has body: I created an ASP.NET page that sends some request and gets results. After I get the results I format it into the HTML table. The results can be different by number of columns and rows. After that I am trying to use datatables to get it formated and easy to view and search, and it works fine, but only the first time it is called. (I get results on button click.) For example, let's say I only get 1 parameter and value (name-status, value-ok), and it will be shown like this under, and that is ok status ok but after i call it again, let's say I will get the same respond results, the results are shown like this status status ok ok for every next call the output table will stay the same, it will show the first result I get, and the last one how can I get rid of the first one? I tried destroying datatable, tblResults, old values in results- pretty much everything that came to my mind HTML table: self.reportResults.removeAll(); self.reportHeaders.removeAll(); ko.mapping.fromJS(results.d.results, mappingReportResults, self.reportResults); ko.mapping.fromJS(results.d.header, self.reportHeaders); oTable = $('#tblResults').dataTable();
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
tagged with: datatables
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46385809

http://stackoverflow.com/comment/46536560
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29157768
type: Comment
has text: Im using Rails 4 hidden tag helper. I'm not sure how to pass it a class instead of an id since that is generated by Rails. Example <%= hidden_field_tag "lead_path", lead_path(lead) %> generates the name and "id" to be "lead_path".

http://stackoverflow.com/comment/46448395
type: QuestionComment
comment on: http://stackoverflow.com/q/29108987
type: Comment
has text: I have added a link to a jfiddle page which shows the javescript idea we used
score: 0

http://stackoverflow.com/q/29127970
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/594325
linked to: http://stackoverflow.com/q/8276451
has answer: http://stackoverflow.com/a/29128090
has title: JS remove leading zeros
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/29128186
has answer: http://stackoverflow.com/a/29128186
tagged with: math
accepted answer: http://stackoverflow.com/a/29128090
tagged with: javascript
has comment: http://stackoverflow.com/comment/46482019
has comment: http://stackoverflow.com/comment/46481952
score: 2
type: AnsweredQuestion
downvote count: 0
has body: In JavaScript, I want to remove the decimal place &amp; the following zeros. For example, my original number: "0.00558", I want to be left with "558". Is this possible? (I'm also using AngularJS if that has a method for this).
favorite count: 0
has comment: http://stackoverflow.com/comment/46482072

http://stackoverflow.com/q/29088381
has comment: http://stackoverflow.com/comment/46409725
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/29088511
tagged with: css
type: AnsweredQuestion
has body: I am trying to combine the ng-class condition statements in my case. I have the following statements. {{item.name}} I am getting the parsing error. Syntax Error: Token ':' is an unexpected I am not sure how to fix this. Can anyone help me about it? Thanks a lot
type: Question
accepted answer: http://stackoverflow.com/a/29088511
has title: how to setup the class name in my case
tagged with: javascript
has comment: http://stackoverflow.com/comment/46409603
score: 0

http://stackoverflow.com/a/29122931
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29120110
accepted answer of: http://stackoverflow.com/q/29120110
has body: You can just append html elements to a selection of html elements (so the browser knows where to append in the DOM). dataSet.nodes is not a selection of html elements, that's why you get the error message. Write instead: node.append("text").....
score: 0
has comment: http://stackoverflow.com/comment/46483766

http://stackoverflow.com/q/29189260
type: UnansweredQuestion
has body: I am currently reading data using ajax and using the data fetched to build a jqGrid using the code below: $.getJSON(url, function (data) { createGrid(data); }); function createGrid(data) { debugger; $("#gridCot").jqGrid( { datatype: "local", data: data.data, colNames: data.columnNames, colModel: data.columnModel, pager: "#pager", rownumbers: true, rowList: [10, 30, 50, 100, 200], rowNum: 50, height: 'auto', autowidth: true, height:600, shrinkToFit: false, loadonce: true, caption: "Test" }); } This works great (except subsequent calls do not update the grid). One question I had is how do I simply pass the 'data' the next time around to the grid so that it doesn't have to be created each time? (currently the grid is not being created but also not updating with new data, prob due to the loadonce attribute) I wanted to change the above to allow the grid itself to make the call, so I did the following: $("#gridCot").jqGrid( { url: serviceURL, datatype: "json", pager: "#pager", rownumbers: true, height: 'auto', width: '100%', loadonce: true, caption: "test", jsonReader: { colNames: "columnNames", colModel: "columnModel", data: "data" } }); This however renders a grid with no column or data. My question is, does the json format have to adhere to a specific format? I like the idea of the colModel because it means I don't have to post process my data much, which is quicker since I return a lot of columns. With the first method, my data is essentially serialized to an array of dictionaries (name, value). Can this be achieved by the second method with out having to further 'massage' the data I am returning to the page? Thanks
tagged with: jqgrid
type: Question
score: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has title: jqGrid json format
answer count: 0
upvote count: 2

http://stackoverflow.com/comment/46394572
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29080680
score: 0
has text: well you need an endpoint that answers if the page hase changed, and you ask it via ajax and if it returns true you reload the page

http://stackoverflow.com/comment/46422592
type: Comment
comment on: http://stackoverflow.com/q/29095760
score: 0
type: QuestionComment
has text: @MarsOne are you seroius ?

http://stackoverflow.com/a/29062768
accepted answer of: http://stackoverflow.com/q/29062563
has comment: http://stackoverflow.com/comment/46362021
has comment: http://stackoverflow.com/comment/46361834
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You must explicitly declare the location of your static content in app.yaml: handlers: - url: /static static_dir: static handlers: - url: /.* script: mainapp.app See docs for details: Unlike a traditional web hosting environment, Google App Engine does not serve files directly out of your application’s source directory unless configured to do so. URL handler path patterns are tested in the order they appear in app.yaml, from top to bottom. In this case, the /static pattern will match before the /.* pattern will for the appropriate paths.
upvote count: 2
answers question: http://stackoverflow.com/q/29062563
has comment: http://stackoverflow.com/comment/46362285
type: Answer

http://stackoverflow.com/q/29108111
downvote count: 0
favorite count: 0
tagged with: ruby
has answer: http://stackoverflow.com/a/29108161
accepted answer: http://stackoverflow.com/a/29108228
has answer: http://stackoverflow.com/a/29108372
has title: class variable that is modified by creation of instances
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29108228
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/29108161
tagged with: javascript
has answer: http://stackoverflow.com/a/29108221
has body: I'm curious how to implement something in javascript that I've done in ruby. Here's the ruby example: class Person @@count = 0 def initialize @@count += 1 end def self.count @@count end end Each time a person initialized, the counter increases. joe = Person.new Person.count =&gt; 1 bob = Person.new Person.count =&gt; 2 How would you I implement this in javascript? Thanks!

http://stackoverflow.com/q/29077985
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/750486
tagged with: javascript
tagged with: jquery
has title: setInterval overriding others setIntervals
score: 0
duplicate of: http://stackoverflow.com/q/750486
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29078054
has comment: http://stackoverflow.com/comment/46389231
has answer: http://stackoverflow.com/a/29078054
has answer: http://stackoverflow.com/a/29078045
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29078045
has body: I'm trying to create multiples setIntervals and store them (and clear later), but when I do this, the last setInterval override the previous, executing one time for each previous setInterval , but with the same content. Code snippet with the weird behaviour : var timeoutFunctions= {}; function log_on_console(text){ console.log(' &gt; &gt; &gt; inside function : '+text) } $( document ).ready(function() { for (i = 0; i &lt; 5; i++) { console.log(' &gt; &gt; &gt; before function : '+i) timeoutFunctions[i] = setInterval(function(){log_on_console(i)}, 2000); } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; the output on console is : " &gt; &gt; &gt; before function : 0" js:21:6 " &gt; &gt; &gt; before function : 1" js:21:6 " &gt; &gt; &gt; before function : 2" js:21:6 " &gt; &gt; &gt; before function : 3" js:21:6 " &gt; &gt; &gt; before function : 4" js:21:6 " &gt; &gt; &gt; inside function : 5" (5) js:16:2 //(this one is the "problem") I was expexcting something like this instead : " &gt; &gt; &gt; before function : 0" js:21:6 " &gt; &gt; &gt; before function : 1" js:21:6 " &gt; &gt; &gt; before function : 2" js:21:6 " &gt; &gt; &gt; before function : 3" js:21:6 " &gt; &gt; &gt; before function : 4" js:21:6 " &gt; &gt; &gt; inside function : 0" js:16:2 " &gt; &gt; &gt; inside function : 1" js:16:2 " &gt; &gt; &gt; inside function : 2" js:16:2 " &gt; &gt; &gt; inside function : 3" js:16:2 " &gt; &gt; &gt; inside function : 4" js:16:2 so, why is the last setInterval(function(){log_on_console(i)}, 2000) overriding the previous four?

http://stackoverflow.com/comment/46429200
comment on: http://stackoverflow.com/q/29099385
type: QuestionComment
has text: `evt.preventDefault();` in the `else` is suspicious, as you don't have an `evt` argument or variable anywhere.
score: 1
type: Comment

http://stackoverflow.com/a/29144451
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29144039
upvote count: 2
type: Answer
has body: ng-required didn't worked for me with variables mostly because when you use ng-required="{{test}}" the {{test}} is returned as string when ngRequired expects boolean, luckily you can use it the same way ngClass works, if you replace your input with following code it will work &lt;input name="width" type="number" ng-disabled="disable" ng-model="someValue" ng-max="{false: false, true: 100}[!disable]" ng-required="{true : true, false : false}[!disable]" /&gt;

http://stackoverflow.com/q/29151435
upvote count: 15
has comment: http://stackoverflow.com/comment/46552878
has title: Javascript: place elements that dont match filter predicate into seperate array
has answer: http://stackoverflow.com/a/76072225
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29860391
has answer: http://stackoverflow.com/a/29151475
has answer: http://stackoverflow.com/a/29860391
has answer: http://stackoverflow.com/a/29151749
downvote count: 0
accepted answer: http://stackoverflow.com/a/29151475
favorite count: 0
answer count: 5
has comment: http://stackoverflow.com/comment/46524506
has body: This may be a lot simpler than I think, but I've been trying out the .map() and .filter() functions in javascript. What i want to do is create one array using .filter(), and another array for elements that did not match the predicate for the first filter. What I have thus far: function test(array, predicate){ var filterTrue = array.filter(predicate); var filterFalse = ?? // rest of method } Is there a way to dump the items that do not match the predicate into filterFalse? Probably goes without saying, but the predicate will typically be a function of some kind EDIT: As an aside, I have tried: var filterFalse = array.filter(!predicate); But this doesn't seem to work for reasons I'm still trying to understand(Any help on that would also be greatly appreciated)
has answer: http://stackoverflow.com/a/29151518
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1187518
score: 15
has comment: http://stackoverflow.com/comment/46524960
type: Question

http://stackoverflow.com/a/29187700
answers question: http://stackoverflow.com/q/29187666
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Use comma and document.querySelectorAll: document.querySelectorAll('.class1, .class2');
has comment: http://stackoverflow.com/comment/46590328
accepted answer of: http://stackoverflow.com/q/29187666

http://stackoverflow.com/a/29148972
score: 1
upvote count: 1
has body: Use this instead, you don't need an access token or anything special to get their profile picture, just their facebook user id. Accounts.onCreateUser(function(options, user) { if (options.profile) { options.profile.picture = "http://graph.facebook.com/" + user.services.facebook.id + "/picture/?type=large"; user.profile = options.profile; } return user; });
has comment: http://stackoverflow.com/comment/46521876
answers question: http://stackoverflow.com/q/29148854
type: Answer
downvote count: 0

http://stackoverflow.com/q/29149700
accepted answer: http://stackoverflow.com/a/29150380
has body: All other browsers work perfectly fine. However, when firefox tries to execute this code: if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); it crashes and the console displays the following error: TypeError: e is undefined edit 1: function clickInactiveTab() { $(this).attr({class: "activeTab"}); $(".inactiveTab").hide(); } function clickX() { $(this).parent().attr({class: "inactiveTab"}); $(".inactiveTab").show(); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); } What it does it, change the style of a div when clicked and hides all other divs from the class. When someone clicks the x that's inside the div, it should change the style back and show the hidden divs.
has comment: http://stackoverflow.com/comment/46522606
has comment: http://stackoverflow.com/comment/46522811
has comment: http://stackoverflow.com/comment/46522078
type: AnsweredQuestion
tagged with: firefox
has comment: http://stackoverflow.com/comment/46522630
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46522618
favorite count: 0
has comment: http://stackoverflow.com/comment/46522042
type: Question
has comment: http://stackoverflow.com/comment/46522564
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29150380
has comment: http://stackoverflow.com/comment/89822915
has comment: http://stackoverflow.com/comment/46522576
upvote count: 3
score: 0
downvote count: 3
has comment: http://stackoverflow.com/comment/46521974
has title: TypeError: e is undefined - javascript
answer count: 1
has comment: http://stackoverflow.com/comment/46522148
has comment: http://stackoverflow.com/comment/46522607

http://stackoverflow.com/comment/46473738
has text: Great! you beat me to it. Had written almost the same solution.
comment on: http://stackoverflow.com/a/29123687
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46403524
score: 0
type: AnswerComment
type: Comment
has text: Well, you just have to use the return value of the `.then()` call instead of throwing it away. Whether it operates on a variable or is directly chained, and whether you call it on a deferred or on a promise doesn't really matter.
comment on: http://stackoverflow.com/a/29084383

http://stackoverflow.com/a/29115337
type: Answer
answers question: http://stackoverflow.com/q/29114678
has comment: http://stackoverflow.com/comment/46536846
has comment: http://stackoverflow.com/comment/46536957
has body: I just copy your code and it work. index.html Title {{$index + 1}} {{obj.name}} controllers.js angular.module('App.controllers', []) .controller('Controller', function($scope) { $scope.objectArray = [ {'name':'apple'}, {'name':'orange'}, {'name':'pear'}, {'name':'naartjie'} ]; $scope.onClick = function(obj){ console.log(obj); }; }) app.js angular.module('App', ['App.controllers']); Code plunker http://embed.plnkr.co/rbcH47/preview
score: 0

http://stackoverflow.com/a/29067065
type: Answer
has body: probably the main reason is that you don't have proper input for your function. Please provide example input. You should use if-else statement e.g. if (gender==='F') { bmr = 655 + (4.3*weight) + (4.7*height) - (4.7*age); } else { bmr = 66 + (6.3*weight) + (12.9*height) - (6.8*age); } Or if-else if-else structure with alert in else - when your input does not match to your ifs if (gender==='F') { bmr = 655 + (4.3*weight) + (4.7*height) - (4.7*age); } else if (gender==='M' { bmr = 66 + (6.3*weight) + (12.9*height) - (6.8*age); } else { window.alert('wrong gender: ' + gender); }
score: 0
has comment: http://stackoverflow.com/comment/46369918
answers question: http://stackoverflow.com/q/29066858

http://stackoverflow.com/a/29090004
has comment: http://stackoverflow.com/comment/46413032
has comment: http://stackoverflow.com/comment/46413074
score: 0
answers question: http://stackoverflow.com/q/29089912
type: Answer
has body: I believe this is the basic idea of what you are looking for. $('#table').html(''); //clear the table for(var x = 0, len = array.length; x &lt; len; x++){ //fill the table $('#table').append('&lt;tr&gt;'); $('#table').append('&lt;td&gt;' + array[x] + '&lt;/td&gt;'); //can also add img tag here if you get the SRC for the image $('#table').append('&lt;/tr&gt;'); } &lt;table id="table"&gt;&lt;/table&gt;

http://stackoverflow.com/a/45024009
has body: This is the best solution: &lt;div class="container"&gt; &lt;video&gt;&lt;source src="video.mp4" type="video/mp4"&gt;&lt;/video&gt; &lt;/div&gt; .container{ position: relative; width: 100% } .container video{ position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); }
answers question: http://stackoverflow.com/q/29144604
score: 0
type: Answer

http://stackoverflow.com/comment/46472279
type: Comment
has text: Okie no problem u first check the function works or not 1. go to browser console and see the error... 2. Place alert in empty function whether the function executes or not at the time of click 3.
comment on: http://stackoverflow.com/a/29121529
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46614770
type: Comment
has text: So you want to keep the color, just with a different alpha value?
type: QuestionComment
comment on: http://stackoverflow.com/q/29201324
score: 0

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/29076710
type: Tag
tags question: http://stackoverflow.com/q/29126737

http://stackoverflow.com/a/36874253
answers question: http://stackoverflow.com/q/29132059
type: Answer
has body: I've been working in Google Chrome and ran into this problem. Oddly enough in the past I've worked with changing the time in video with no issues, so I knew it was possible. I seemed to remember a trick where if you set currentTime to a string instead of a number, it works. So I just switched audio.currentTime=0; to audio.currentTime="0"; And it works now with no problems! If you're trying to set currentTime to a variable value, try: audio.currentTime=String(newTime); I'm not sure why currentTime has to be set as a string, because if you check an audio clip's currentTime value in the console, you'll get a number, not a string. But it works! EDIT: Interesting and a head-scratcher, if I change currentTime in the console, but set it using a number (not a string) it works. So the way that the console affects currentTime is different than my external JavaScript file, I guess. Changing currentTime to a number in the console works whether or not I've previously changed it to a string.
score: 0

http://stackoverflow.com/q/29125092
has comment: http://stackoverflow.com/comment/46476787
has body: I have this json: [{"Id":"1", "ZipCode":"00691","City":"Adjuntas","Municipality":"Adjuntas"},{"Id":"2", "ZipCode":"00603","City":"Aguadilla","Municipality":"Aguadilla"},{"Id":"3", "ZipCode":"00674","City":"Manati","Municipality":"Manati"}] My problem is deserializing this using javascript's json.parse(). This is what I've tried function OnZipCodeBlur() { var hfZipCodesValue = document.getElementById("&lt;%=hfZipCodesMunicipalitiesCities.ClientID%&gt;").value; var zipCode = document.getElementById("&lt;%=tbZipCode.ClientID%&gt;").value; alert("serialization: " + hfZipCodesValue); var zipCodeDeserialized = JSON.parse(hfZipCodesValue); var d = ""; for (var i = 0; i &lt; zipCodeDeserialized.length; i++) { if (zipCodeDeserialized[i].ZipCode == zipCode) { document.getElementById('&lt;%=tbCity.ClientID%&gt;').value = zipCodeDeserialized[i].City; document.getElementById('&lt;%=tbMunicipality.ClientID%&gt;').value = zipCodeDeserialized[i].Municipality; break; } d += zipCodeDeserialized[i]; } alert("deserialization : " + d); } hfZipCodesValue - holds serialized data ZipCode - holds a zip code. As you can you see, I have two alerts showing the serialized data and deserialized. The first alert displays correctly and the second just returns [object Object], [object Object], [object Object]. At first I thought that I had to pick an index instead of showing the whole array like I'm doing now but, that's when I realized that it was an array of chars. In other words d[0] == "[" and d[1] == 'o'. Nevermind the if in the for, it never goes in cause of the object results. Any suggestions would be greatly appreciated.
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46477502
has comment: http://stackoverflow.com/comment/46477150
has comment: http://stackoverflow.com/comment/46477201
tagged with: c#
has comment: http://stackoverflow.com/comment/46476571
tagged with: http://stackoverflow.com/tag/json
has title: JSON.parse() returns [object Object], [object Object], [object Object] when deserialized
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46476358
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46477208
score: 0

http://stackoverflow.com/a/29144840
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46514577
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29144642
has comment: http://stackoverflow.com/comment/46512432
has body: Maybe you just need to use a negative lookahead to check for the comment end */? But first, I'd split the string into separate lines var arrayOfLines = input_str.split(/\r?\n/); or, without empty lines: var arrayOfLines = input_str.match(/[^\r\n]+/g); and then use this regex: ["']([^'"]+)["'](?!.*\*\/) Sample code: var rebuilt_string = '' var re = /["']([^'"]+)["'](?!.*\*\/)/g; var subst = '$1'; for (i = 0; i < arrayOfLines.length; i++) { rebuilt_string = rebuilt_string + arrayOfLines[i].replace(re, subst) + "\r\n"; }

youtube
tags question: http://stackoverflow.com/q/29190917
tags question: http://stackoverflow.com/q/29212462
type: Tag
tags question: http://stackoverflow.com/q/29119568
tags question: http://stackoverflow.com/q/29095193
tag name: youtube
tags question: http://stackoverflow.com/q/29064430
tags question: http://stackoverflow.com/q/29180984
tags question: http://stackoverflow.com/q/29088397
tags question: http://stackoverflow.com/q/29109521
tags question: http://stackoverflow.com/q/29094448
tags question: http://stackoverflow.com/q/29155678
tags question: http://stackoverflow.com/q/29062821

http://stackoverflow.com/comment/46642130
type: QuestionComment
comment on: http://stackoverflow.com/q/29215894
score: 0
has text: check jQuery delegate.
type: Comment

http://stackoverflow.com/comment/46517613
type: AnswerComment
score: 0
type: Comment
has text: This is the shorter and best way.
comment on: http://stackoverflow.com/a/29143691

http://stackoverflow.com/comment/46537939
comment on: http://stackoverflow.com/a/29158583
type: AnswerComment
score: 0
type: Comment
has text: Yup. Everyone uses their mobile device a lot more. Best of luck in your future.

http://stackoverflow.com/q/29069282
has body: This is a work in progress (a calculator and some other stuff), but what I'm trying to do at the moment is whenever you type in some number into the results of the calculator, and you press "+" the onclick will call checkValidity which will determine if what you typed in was integer or not integer. It will send an alert saying integer or not an integer. My issue is that the onclick won't do anything. I tried emptying the checkValidity function of everything but alert("test); and it still won't work. Could someone please explain what I'm doing wrong? First name: Last name: Student ID: Biography: Result:
possible better answer: http://stackoverflow.com/a/29069876
has comment: http://stackoverflow.com/comment/46373880
has comment: http://stackoverflow.com/comment/46373712
accepted answer: http://stackoverflow.com/a/29069540
type: AnsweredQuestion
tagged with: onclick
type: Question
answer count: 2
has title: onClick from button to function
has comment: http://stackoverflow.com/comment/46374092
tagged with: javascript
has comment: http://stackoverflow.com/comment/46373891
has answer: http://stackoverflow.com/a/29069540
has comment: http://stackoverflow.com/comment/46373806
score: 0
has comment: http://stackoverflow.com/comment/46373869
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29069876

http://stackoverflow.com/comment/46418603
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29093285
has text: http://robertnyman.com/2010/12/16/utilizing-the-html5-file-api-to-choose-upload-preview-and-see-progress-for-multiple-files/ you find it useful
score: 0

http://stackoverflow.com/q/29217784
has answer: http://stackoverflow.com/a/29218707
type: Question
tagged with: ember.js
score: 1
favorite count: 0
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46645144
has title: In Ember, can services have computed properties?
downvote count: 0
tagged with: javascript
has body: It appears from the API that services in Ember extends the main Ember object base class, which implements the observable class, but when I define a property in my Ember service with .property, my tests fail with undefined is not a function.
type: UnansweredQuestion

http://stackoverflow.com/comment/46407992
has text: please provide us with a fiddle with relevant code. Or even a code snippet here in SO
type: Comment
comment on: http://stackoverflow.com/q/29087541
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46575770
type: QuestionComment
has text: at the execution time of this line `var string = '@jason'` , this `var jason = JsonConvert.SerializeObject(Model);` might not be executed
comment on: http://stackoverflow.com/q/29179482
score: 0
type: Comment

http://stackoverflow.com/comment/46660332
score: 0
type: AnswerComment
has text: I found a solution, please take a look if you have time. And let me know if something is wrong.
comment on: http://stackoverflow.com/a/29212470
type: Comment

http://stackoverflow.com/comment/46525949
type: QuestionComment
has text: Sorry, I'm still not sure why you cannot submit the form normally and there is a need to call `evaluate()`..thanks.
score: 0
comment on: http://stackoverflow.com/q/29091906
type: Comment

http://stackoverflow.com/comment/50955757
has text: messed a closing `}` in your answer
type: Comment
comment on: http://stackoverflow.com/a/31495958
score: 0
type: AnswerComment

http://stackoverflow.com/q/29174615
answer count: 1
downvote count: 0
has body: I have the following jQuery working in a Confluence page to get user input and some auto-suggested links, and POST them both to forms in an external page. However the user input is coming out with the last character truncated. No matter what the length, it lops off the last letter. For example if the user types foobar the POST sends fooba. If the user types foobar foobar foobar, that turns into foobar foobar fooba and so on. The code that matters is the following: $( document ).ready(function() { $('form.aui').on('keypress', showHead); function showHead() { $('.suggestHead').delay(500).fadeIn(300); $('.alertReq, .asterisk').css('visibility', 'hidden'); var dropdownText = ($( "div.searchContainer2 a.content-type-page span" ).text()); $('#capture').val( dropdownText ); var inputvalue = $("#input2").val( ); $('#describe' ).val( inputvalue ); }; }); It's only the #describe value that's the problem. There's a built-in Confluence field that I gave an ID of "#input2", and when a user types into it, the jQuery above assigns the user input to a variable called inputvalue, then assigns that variable to a hidden form field I created with an ID of "#describe". (This is so I can use POST on the form, and for other reasons). If I set up an alert to see what's in #describe, like this: //Alert function to test selectors $(document).on('click','.searchHeading2',function(){ alert ($("#describe").val()); }); The alert contains what the user typed into #input2 but with the last letter deleted. This is also what ends up in the form on the page I'm submitting to. Anyone know why it does this? EDIT: Sorry I edited to fix the AJS.$ I had left in two spots. That's the Confluence convention for jQuery, you have to replace $ with AJS.$, and replace $( document ).ready(function() { with AJS.toInit(function() {. I wanted to make it just regular jQuery here so it wouldn't be confusing. Should be right now.
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29174739
type: AnsweredQuestion
upvote count: 2
tagged with: forms
accepted answer: http://stackoverflow.com/a/29174739
type: Question
has title: Why is jQuery deleting last character of text?
tagged with: javascript
score: 2

http://stackoverflow.com/comment/46545397
type: Comment
comment on: http://stackoverflow.com/q/29162275
has text: Can't you do it in your CSS like normal?
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46468602
comment on: http://stackoverflow.com/q/29120822
has text: @collapsar: The problem is that the error correction you speak of is not supposed to happen. The given selector is invalid, period, and should throw a SYNTAX_ERR.
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/a/34876680
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/76104686
has body: You can try this one, use 'aboutView' as you set in controller As instead of vm. $scope.$watch('aboutView.radioSelection', function(newVal, oldVal) { vm.message = "Your selection is " + newVal; });
answers question: http://stackoverflow.com/q/29200161

http://stackoverflow.com/a/29076799
has comment: http://stackoverflow.com/comment/46415517
upvote count: 1
has comment: http://stackoverflow.com/comment/46391415
answers question: http://stackoverflow.com/q/29076597
has comment: http://stackoverflow.com/comment/46415454
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46391816
has body: You can't use this inside your success function. Why you don't want use simple $('#'+id).remove() in your get_tr function?
type: Answer

http://stackoverflow.com/comment/133409777
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/56150320
has text: @Stefnotch I agree that there could be a place that lets this slip through. i.e. a internal company npm package which is a wrapper for the api to pass some default options for auth headers and automatically parse JSON for convenience i.e. `const getUrl = (url) => fetch(url, apiOptions).then(res => res.json())` where `apiOptions` have some global settings. It's worth remembering that such cases may happen and these must be adapted correctly

http://stackoverflow.com/q/29159315
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29159449
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/13183630
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46538835
downvote count: 2
duplicate of: http://stackoverflow.com/q/13183630
upvote count: 16
score: 14
has title: How to open bootstrap modal without button-click?
has comment: http://stackoverflow.com/comment/46538922
has body: I need to popup a bootstrap modal in the success function of ajax in my page.The success function is called when the form is submitted.., so is there any method to popup the bootstrap modal without a button click.I'm a rookie.., please help me out here.. This is my ajax call.. $("#form").submit(function(e) { $.ajaxSetup({ headers:{'X-CSRF-Token' : $('meta[name=_token]').attr('content')} }); e.preventDefault(); //STOP default action var postData = $(this).serializeArray(); console.log(postData); var formURL = "http://localhost:8000/v1/people_roles"; $.ajax( { url :formURL , type: "POST", data : postData, success:function(response, textStatus, jqXHR) { if(response.parent==1) { $("#getCode").html(response); $("#getCodeModal").modal('show'); window.location.href="/web/staff/detail.php?id="+response.people_id; } else { //console.log(response); window.location.href="/web/staff/detail.php?id="+response.people_id; } } }); }); and this is my html modal code.. Modal title Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Close Save changes
type: Question

http://stackoverflow.com/q/29154278
answer count: 1
has title: SCRIPT5007: Unable to get property 'length' of undefined or null reference
has comment: http://stackoverflow.com/comment/46530063
has body: I am getting "Unable to get property 'length' of undefined or null reference" in IE11. The function looks like this: function chgSupr(val) { var suprDD = eval('document.getElementById.col1LIAB_SUPERVISOR_CODE'); suprDD.length = 0; if (!(val == '_')) { var suprAryStr = '&lt;select name="col1LIAB_SUPERVISOR_CODE" style="width: 150px;" required&gt;'; var suprDD = eval('document.getElementById.col1LIAB_SUPERVISOR_CODE'); suprDD.length = 0; suprAryStr += '&lt;option value=""""&gt;&lt;/option&gt;'; for (i = 0; i &lt; suprAry[val].length; i++) { tmpAry = suprAry[val][i].split('|~|'); suprDD.length++; if (tmpAry[0].length &gt; 1) { suprDD[i].value = tmpAry[0]; suprDD[i].text = tmpAry[1] + '|' + tmpAry[0]; } else { suprDD[i].value = ""; suprDD[i].text = ""; } suprAryStr += '&lt;option value="' + tmpAry[0] + '"&gt;' + tmpAry[1] + '&lt;/option&gt;'; } suprAryStr += '&lt;/select&gt;'; } else { suprDD.length = 0; } } I'm not sure what's causing it to error out.
has answer: http://stackoverflow.com/a/29154607
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29154607
type: Question
tagged with: internet-explorer-11
tagged with: javascript
score: 0

http://stackoverflow.com/q/29096743
tagged with: javascript
score: 1
favorite count: 0
tagged with: listener
type: UnansweredQuestion
upvote count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/46473338
answer count: 0
has title: reading mail sequentially in mail-listener 2 node library
type: Question
has body: is there a property to set that enables to read mail sequentially in mail-listener2 module ,so that one can perform set of operation on after reading one mail and then move on to next . what i can think of is we can change these property searchFilter: fetchUnreadOnStart:true or use seq no in any way mailListener.on("mail", function(mail, seqno, attributes){ // do something with mail object including attachments console.log("emailParsed", mail); // mail processing code goes here }); how could i get this done
downvote count: 0

http://stackoverflow.com/q/29139241
type: UnansweredQuestion
tagged with: angularjs-routing
downvote count: 0
tagged with: javascript
score: 1
tagged with: express
favorite count: 0
has body: I am using NodeJS + expressJS on server and AngularJS on client AngularJS controller have the following routes: app.config(function($routeProvider,$locationProvider) { $routeProvider .when('/field1/:id', { controller: 'ctrl1', templateUrl: "/view/mainpages/field1.html" }) .when('/field2/:id', { controller: 'ctrl2', templateUrl: "/view/mainpages/field2.html" }) ........... many many .when('/', { controller: 'ctrl0', templateUrl: "/view/mainpages/index.html" }) .otherwise({redirectTo : '/'}); NodeJS static: app.all('/*', express.static(__dirname + '/client')); How to make the server redirects all the static pages on their paths relative to the root, in the case when the call goes directly through this link. example: server:3000/field1/23 must call server:3000/client/index.html and index must upload JS like server:3000/js/cntr1.js Upd: I found a solution to the problem. But it looks ugly as a crutch app.get('/field1/([0-9]+$)', function(req, res, next) { req.url='/index.html'; next(); }); app.use('/field1', express.static(__dirname + '/client')); Perhaps there is a more elegant solution?
tagged with: angularjs
type: Question
has title: AngularJS routing Server side support (NodeJS+express)
tagged with: node.js
has answer: http://stackoverflow.com/a/29139366
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/46452457
type: QuestionComment
comment on: http://stackoverflow.com/q/29111398
score: 1
type: Comment
has text: @user3591017 Question update changes Question from _"Wrap textNodes without separating on ** **?"_ ? At "My desired result would be" : ` This is a sentence. This is another. ` . What is logic that wraps `innerHTML` of ` ` with `` ?

http://stackoverflow.com/comment/46524659
type: Comment
type: QuestionComment
has text: are you using grunt-usemin? Usemin replaces references for you.
comment on: http://stackoverflow.com/q/29151537
score: 0

http://stackoverflow.com/q/29200711
has answer: http://stackoverflow.com/a/29200757
tagged with: reloading
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42717372
has comment: http://stackoverflow.com/comment/46613617
has comment: http://stackoverflow.com/comment/46614274
downvote count: 1
has body: I'm working on a Greasemonkey userscript for a web app that needs configuration steps before I can actually test my userscript's functionality. So every time I reload the page – to refresh my userscript from the updated file –, I have to reconfigure the web app before testing. Needless to say, this gets old very quickly. Is there a way to reload only the userscript, preferably from the userscript itself? I would want to e.g. bind the reload to a keyboard shortcut. I thought that this must be a very common need, but I came up empty-handed when trying to find a solution.
type: Question
score: 5
tagged with: greasemonkey
linked to: http://stackoverflow.com/q/10700127
upvote count: 6
tagged with: userscripts
tagged with: javascript
tagged with: jquery
has title: How to reload only a userscript, i.e. without reloading the page?
possible better answer: http://stackoverflow.com/a/29200757
answer count: 2
favorite count: 0
accepted answer: http://stackoverflow.com/a/42717372

http://stackoverflow.com/comment/46390688
score: 0
type: Comment
has text: Hi, i dont' want to include this in my html. I would like to execute some code in my jade for helping me construct my content before serving ti to the server. ( I will add some details to my question)
type: AnswerComment
comment on: http://stackoverflow.com/a/29078635

http://stackoverflow.com/comment/46682404
score: 0
has text: <option value="<%=content[1]%>"><%=content[0]%>
type: AnswerComment
comment on: http://stackoverflow.com/a/29217791
type: Comment

http://stackoverflow.com/q/29063688
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29063713
has comment: http://stackoverflow.com/comment/46363489
linked to: http://stackoverflow.com/q/359788
type: AnsweredQuestion
has body: the eval function is using a string and calculate it yeah ? Isthere a function that takes an string like "console.log (lol)" as a parameter and execute it? An exemple of what i need : execute("for(var cpt=0;cpt&lt;5;cpt++){alert('lol');}"); Its because i need to execute the code asked by the client, thanks :D
accepted answer: http://stackoverflow.com/a/29063713
has comment: http://stackoverflow.com/comment/46369849
has title: Execute string as a code in a function
type: Question
has comment: http://stackoverflow.com/comment/46363680
tagged with: javascript

http://stackoverflow.com/comment/46612324
score: 0
type: QuestionComment
type: Comment
has text: @Oriol,it is not duplicate, because there's not what I need. In that question, the OP is not interested in includin/excluding the scroll-bar's width/height, but I am!
comment on: http://stackoverflow.com/q/29199905

http://stackoverflow.com/comment/46401884
has text: I'm trying to edit code in the link.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29084326

http://stackoverflow.com/comment/46426318
score: 0
comment on: http://stackoverflow.com/q/29097940
type: Comment
type: QuestionComment
has text: I have 3 plugins, Plugin1, Plugin2, Plugin3, so represented like 1/2/3.

http://stackoverflow.com/q/29139640
has title: javascript confirm() cancels navigation
has comment: http://stackoverflow.com/comment/46503132
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has body: I have a simple confirm() when a user clicks a link or a button but regardless of whether they answer yes or cancel, it seems to cancel the entire navigation. when I remove the confirm() code the navigation happens fine. is there anyway around this? I need to confirm with the user whenever they click on any element on the page but when the confirm comes up for link or button it seems to cancel the navigation from happening.
has answer: http://stackoverflow.com/a/29140169
linked to: http://stackoverflow.com/q/10462839
has comment: http://stackoverflow.com/comment/46503165
has comment: http://stackoverflow.com/comment/46503125
type: Question
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/46503173
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29076957
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29076851
type: Answer
has body: You need to expose the fact that the call is asynchronous to the callees of chooseAddress. You can achieve this by returning a promise. Update the implementation to $scope.chooseAddress = function (input) { var deferred = $q.defer(); if (input) { geolocationService.addressAutocomplete(input, function (data) { deferred.resolve(data.predictions); }); } else { deferred.resolve([]); } return deferred.promise; }; You then call chooseAddress like $scope.chooseAddress(input).then(function(result){ // the result will be available here });
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29076851

http://stackoverflow.com/q/29081909
has comment: http://stackoverflow.com/comment/46398862
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46398101
has comment: http://stackoverflow.com/comment/46397836
accepted answer: http://stackoverflow.com/a/29082052
has comment: http://stackoverflow.com/comment/46398259
tagged with: http://stackoverflow.com/tag/html
has body: I'm using this gallery in a schoolproject: http://html-tuts.com/html-photo-gallery-simple-javascript/. I got it to work, but when I validate it (using: http://validator.w3.org/) I get an error saying i should replace all "name" attributes with "id" attributes. However doing so stops my gallery from working. Any help would be greatly appreciated. html: Badkamers:
tagged with: gallery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29082052
has comment: http://stackoverflow.com/comment/46399263
has comment: http://stackoverflow.com/comment/46397812
type: Question
has comment: http://stackoverflow.com/comment/46398309
tagged with: onmouseover
tagged with: image
has comment: http://stackoverflow.com/comment/46396893
score: 0
has title: replacing "name" with "id" in a gallery (javascript/HTML)

http://stackoverflow.com/q/29129840
has body: if (document.getElementById("event-type").innerHTML === "Fashionshoot") { document.getElementById("act_price").innerHTML="50000"; document.getElementById("adv_price").innerHTML=cal(document.getElementById("act_price").innerHTML); } } function cal(actual) { advance=(actual)*20/100; return advance; } whereaas html code is &lt;TD VALIGn="TOP"&gt;&lt;select name="event_type" class="textfield" id="event-type" onChange="price()"&gt;
has comment: http://stackoverflow.com/comment/46485516
has comment: http://stackoverflow.com/comment/46485535
score: 0
has comment: http://stackoverflow.com/comment/46486129
has title: javascript fucntions are not automatically filiing textboxs having prices
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46486415
has comment: http://stackoverflow.com/comment/46486029
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29130415
type: Question
answer count: 1

http://stackoverflow.com/q/29200475
has title: Where do you put page-specific scripts in Ionic?
accepted answer: http://stackoverflow.com/a/29223405
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46613589
has comment: http://stackoverflow.com/comment/46636659
has body: I am making an app with ionic and I have JS scripts for each page. For example, one page has a script that will change the message based on time of day, while another page has a jQuery .load() script. Neither seems to be working. They are DOM-manipulative, and are at the bottom of the page. Hello! Welcome to the app. We are thrilled to share our new app with you! Controllers.js: angular.module('starter.controllers', []) .controller('AppCtrl', function($scope, $ionicModal, $timeout) { // Form data for the login modal $scope.loginData = {}; // Create the login modal that we will use later $ionicModal.fromTemplateUrl('templates/login.html', { scope: $scope }).then(function(modal) { $scope.modal = modal; }); // Triggered in the login modal to close it $scope.closeLogin = function() { $scope.modal.hide(); }; // Open the login modal $scope.login = function() { $scope.modal.show(); }; // Perform the login action when the user submits the login form $scope.doLogin = function() { console.log('Doing login', $scope.loginData); // Simulate a login delay. Remove this and replace with your login // code if using a login system $timeout(function() { $scope.closeLogin(); }, 1000); }; }) .controller('PlaylistsCtrl', function($scope) { $scope.playlists = [ { title: 'Reggae', id: 1 }, { title: 'Chill', id: 2 }, { title: 'Dubstep', id: 3 }, { title: 'Indie', id: 4 }, { title: 'Rap', id: 5 }, { title: 'Cowbell', id: 6 } ]; }) .controller('PlaylistCtrl', function($scope, $stateParams) { });
tagged with: javascript
tagged with: ionic-framework
score: 0
has comment: http://stackoverflow.com/comment/46634219
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46613971
has answer: http://stackoverflow.com/a/29223405
has comment: http://stackoverflow.com/comment/46616940
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46614616

http://stackoverflow.com/comment/46616433
type: QuestionComment
has text: Never heard of `ScriptingUpdateRequestHandler`, and Google didn't either. Can you provide a link? Nevertheless, the only way it would happen is - someone defined the class you're using and made it look like the Java's.
comment on: http://stackoverflow.com/q/29202237
score: 0
type: Comment

http://stackoverflow.com/q/29137763
has title: How to calculate age from jquery datepicker?
downvote count: 0
accepted answer: http://stackoverflow.com/a/29137872
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/42305466
has answer: http://stackoverflow.com/a/42305466
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46499896
has answer: http://stackoverflow.com/a/29137872
has body: I want to calculate age when date is selected by using jquery date picker. I added code below but it showing minus value if i select date like '19/03/2015','15/01/2015' or '19/03/2014' ,'31/12/2014' $(document).ready(function () { console.log($(document).width()); $('#patientDob').datepicker ({ dateFormat: 'dd/mm/yy', changeMonth: true, changeYear: true, yearRange: '1900:2150', maxDate: new Date(), inline: true, onSelect: function() { var birthDay = document.getElementById("patientDob").value; var DOB = new Date(birthDay); var today = new Date(); var age = today.getTime() - DOB.getTime(); age = Math.floor(age / (1000 * 60 * 60 * 24 * 365.25)); document.getElementById('patientAge').value = age; } }); });
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46500306
type: Question
answer count: 2

http://stackoverflow.com/a/29178336
has body: You can bind and unbind specific handlers. if (adIsInView("ad1") == false) { var ad1_listener = function() { if (adIsInView("ad1") == true) { displayAd("ad1"); window.removeEventListener("scroll", ad1_listener); } } window.addEventListener("scroll", ad1_listener); } You can go a step further and do: function register_ad(ad) { function listener() { if (adIsInView(ad) === true) { displayAd(ad); window.removeEventListener("scroll", listener); } } window.addEventListener("scroll", listener); } if (adIsInView("ad1") === false) { register_ad("ad1"); }
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29178288
answers question: http://stackoverflow.com/q/29178288
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/a/29098382
type: Answer
answers question: http://stackoverflow.com/q/29097611
has body: Seems that you get the error when running your .js file directly, via 'Run file_name.js' in it's right-click menu, right? When doing this you are running it using Node.js. But 'document' can't be used in server-side scripts executed by Node.js. It is only defined in client-side javascript, i.e. when running in the browser via a tag in the rendered HTML, not the Javascript API engine running on the server. BTW, your .js file is not even included in your HTML page, as far as I can see from HTML code snippet... This is not actually an error... WebStorm can't use remote resources available through CDN links for completion. Once it 'sees' such links, it searches for the corresponding library in ~.WebStorm9\system\extLibs\, and, if matching library is not found, prompts you to download it by showing this warning. You can either suppress this warning or agree to download the library: hit Alt+Enter and then either hit the right arrow and choose 'Suppress for tag' or hit Enter to download.
upvote count: 17
has comment: http://stackoverflow.com/comment/46626676
score: 17
has comment: http://stackoverflow.com/comment/64963129
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29097611

http://stackoverflow.com/comment/46638662
has text: @Kevin B Yes he would, he's not using Jquery to write to the console, only javascript. centered = currentCha.skins[index].img; console.log(centered.width());
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29214139

http://stackoverflow.com/a/29210001
type: Answer
answers question: http://stackoverflow.com/q/29208574
has comment: http://stackoverflow.com/comment/46659279
accepted answer of: http://stackoverflow.com/q/29208574
score: 0
type: AcceptedAnswer
has body: I got it working by the following code: var inputs1 = document.getElementById(serial+'ItemCode'); inputs1.focus(); inputs1.focus(); inputs1.focus();

http://stackoverflow.com/a/29093167
accepted answer of: http://stackoverflow.com/q/29092962
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46426146
type: Answer
has body: Try something like this: $('.navbar &gt; .start-item li &gt; a').click(function(e) { e.preventDefault(); $('.navbar &gt; .start-item &gt; a').text($(this).text()); }); Demo: http://jsfiddle.net/aaqzzd3b/1/
upvote count: 1
has comment: http://stackoverflow.com/comment/46429007
has comment: http://stackoverflow.com/comment/46426930
has comment: http://stackoverflow.com/comment/46418811
answers question: http://stackoverflow.com/q/29092962
has comment: http://stackoverflow.com/comment/46428664
has comment: http://stackoverflow.com/comment/46428084
has comment: http://stackoverflow.com/comment/46426336
has comment: http://stackoverflow.com/comment/46428520
score: 1
has comment: http://stackoverflow.com/comment/46429373
has comment: http://stackoverflow.com/comment/46419440

http://stackoverflow.com/q/29081951
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29083654
has comment: http://stackoverflow.com/comment/46397753
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46398480
linked to: http://stackoverflow.com/q/3100319
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/46397124
has answer: http://stackoverflow.com/a/29083325
has title: Add CSS on click of a disabled button
type: Question
has body: Following various other posts I've disabled a submit button until options have been selected from the form. What I'd like to do is highlight the select boxes when the disabled button is clicked. I'm thinking the easiest way to do this is to apply a css border-color to the select boxes with a click function. But I'm not sure how to achieve this. My script so far: $('#submitorder').prop('disabled', true); function updateFormEnabled() { if (verifyAdSettings()) { $('#submitorder').prop('disabled', false); } else { $('#submitorder').prop('disabled', true); } } function verifyAdSettings() { if ($('#course1choice').val() != '' && $('#course2choice').val() != '') { return true; } else { return false } } $('#course1choice').change(updateFormEnabled); $('#course2choice').change(updateFormEnabled); My html: Select Course 1 Lesson Planning Teaching One to One Teaching Teenagers Teaching Young Learners Select Course 2 Lesson Planning Teaching One to One Teaching Teenagers Teaching Young Learners Book Now
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29099462
type: UnansweredQuestion
tagged with: instafeedjs
has body: Im using Instafeed.js to make an instagram livefeed. Everything is fine, but I want to center the image returned by instafeed. I have tried to use a lot of different ways, but it does not seem to behave as expected. My HTML code: Scenekvelder Livefeed fra instagram #De3MusketererOslo CSS: body { background: #000000; } h1 { color: #FFFFFF; text-align: center; padding-top: 2cm; } .center { align-items: center; }
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29099871
tagged with: javascript
has comment: http://stackoverflow.com/comment/46493727
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Center image returned by instafeed.js

http://stackoverflow.com/q/29197274
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29197360
possible better answer: http://stackoverflow.com/a/29197407
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: So I have this html tag: Websites and then this jquery function: $("#1 a, #2 a").click( function() { if ($(this + "i").hasClass('fa-chevron-circle-down')) { $(this + "i").removeClass('fa-chevron-circle-down').addClass('fa-chevron-circle-up'); } else { $(this + "i").removeClass('fa-chevron-circle-up').addClass('fa-chevron-circle-down'); } } ); The idea is that when you click on the html link it will change the arrow's direction. This does work but the problem is it changes every icon on the page to that icon. So for example if pressed the html above that has fa-chevron-circle-down on it will change to fa-chevron-circle-up but will also change every other icon on my page regardless of the what icon it has to fa-chevron-circle-up. So how can i improve my function to not do this? I'm not seeing why this is happening so if someone would be kind to explain whats happening. Thank you! https://jsfiddle.net/xyeec6x6/1/
has title: jQuery selectors building with this
has answer: http://stackoverflow.com/a/29197360
has comment: http://stackoverflow.com/comment/46607208
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
upvote count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/29197407

google-visualization
tags question: http://stackoverflow.com/q/29216399
tags question: http://stackoverflow.com/q/29110923
tags question: http://stackoverflow.com/q/29087162
tags question: http://stackoverflow.com/q/29085383
tags question: http://stackoverflow.com/q/29147470
type: Tag
tags question: http://stackoverflow.com/q/29216366
tags question: http://stackoverflow.com/q/29077048
tags question: http://stackoverflow.com/q/29195215
tag name: google-visualization
tags question: http://stackoverflow.com/q/29195805
tags question: http://stackoverflow.com/q/29111293
tags question: http://stackoverflow.com/q/29136425
tags question: http://stackoverflow.com/q/29170055
tags question: http://stackoverflow.com/q/29069442

http://stackoverflow.com/comment/46440901
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29104190
type: Comment
has text: @shareyourpeace I'm on this site quite a lot, so if you post a question that I know how to answer, there's a good chance I'll swing by to answer it. :)

http://stackoverflow.com/comment/46534909
score: 0
type: Comment
has text: can you please let me know the url of your reported bug?
comment on: http://stackoverflow.com/a/29134448
type: AnswerComment

http://stackoverflow.com/comment/46515791
type: QuestionComment
comment on: http://stackoverflow.com/q/29146469
score: 0
has text: okay, is there any way to get variable name which value is this anonymous function? in the case "myFunction"
type: Comment

http://stackoverflow.com/comment/46492238
score: 1
type: AnswerComment
has text: Use http://php.net/manual/en/function.json-last-error.php to check if there were any errors during encode
type: Comment
comment on: http://stackoverflow.com/a/29132213

http://stackoverflow.com/a/29153735
has body: In your above example, test is just a string and strings don't have a method named setVisibility. However a metro object (apparently) does. The methods available to strings can be seen here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Methods
answers question: http://stackoverflow.com/q/29153714
has comment: http://stackoverflow.com/comment/46528665
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46450928
score: 0
comment on: http://stackoverflow.com/q/29110693
type: Comment
type: QuestionComment
has text: As said by floribon in his answer, learn about the so-called "dot rule".

http://stackoverflow.com/q/29192978
has title: HAML5 Canvas problems with matcmatics
has comment: http://stackoverflow.com/comment/46599584
tagged with: canvas
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: Hi I am working with the canvas element to create som shapes but I have ran into some problems with the mathematics. Problem 1: I have to calculate an angle relative to the previous line, I only use 0 to 180 and 0 to -180 degrees. Problem 1: I have to put a corner radius on the corner how do I draw this on a canvas? Here is an example: Hope somone can help?
has answer: http://stackoverflow.com/a/29203757
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 2
linked to: http://stackoverflow.com/q/1255512
type: Question
duplicate of: http://stackoverflow.com/q/1255512
accepted answer: http://stackoverflow.com/a/29203757
score: -2

http://stackoverflow.com/a/29161866
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46551143
accepted answer of: http://stackoverflow.com/q/29161777
has comment: http://stackoverflow.com/comment/46551555
has comment: http://stackoverflow.com/comment/46543760
has comment: http://stackoverflow.com/comment/46543287
type: Answer
has comment: http://stackoverflow.com/comment/46543355
has body: In this case as you're passing in a key-value paired object you could simply call JSON.parse and then take the color property. JSON.parse(toggleStyleAttributes).color If you're referring to the way the ngClass directive works, it uses scope.$eval under the hood. You could make use of that but in order to make that work you'd need to remove the curly braces out of the expression, like: data-toggle-style-attribute-on-hover="{'color':contextualGroup.GroupTextColor}" You should then be able to access the color property, much like in the case if you'd used JSON.parse.
answers question: http://stackoverflow.com/q/29161777

http://stackoverflow.com/a/29164456
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29164322
type: Answer
score: 2
has body: Normally this should be done by server side code not on client side. To remove to the user a div with javascript you can detach it. Detach removes the element from the DOM but keeps it on memory: p = $( "p" ).detach(); Later you can re-added it with $('body').append(p); For more see jQuery detach : http://api.jquery.com/detach/
upvote count: 2
has comment: http://stackoverflow.com/comment/46552691
answers question: http://stackoverflow.com/q/29164322

http://stackoverflow.com/q/29089460
tagged with: javascript
has answer: http://stackoverflow.com/a/30114736
linked to: http://stackoverflow.com/q/27594550
has title: Cannot use GLOB with JSHint in Windows?
favorite count: 0
tagged with: build-tools
tagged with: npm
type: UnansweredQuestion
score: 6
tagged with: node.js
downvote count: 0
has body: I'm doing a PoC of NPM as a build tool (http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/). I'm fairly new using NPM. For now, I only have JSHint and Mocha installed. My packagae.json is attached. Now, when I run "npm run lint" in the command line (Windows 7), it gives me an error: c:\project&gt;npm run list MyNPMProject@1.0.0 lint c:\project jshint test/*.js ERROR: Can't open test/*.js It works when I change the script "lint": "jshint test/test.js". Can I use glob with jshint? Please advise and thank you in advanced.
tagged with: jshint
type: Question
has answer: http://stackoverflow.com/a/29360402
answer count: 2
upvote count: 6

http://stackoverflow.com/a/29177659
has comment: http://stackoverflow.com/comment/46622461
type: Answer
has body: $(this) element in your example points to all '.cat_glass_thumbs ul li', you must pass variable to $.each $('.cat_glass_thumbs ul li').each(function($currentElement){ $currentElement.click(function(){ orig_src = $(this).attr('data-orig'); $(this).children("img").attr('src', orig_src); }); });
score: 0
answers question: http://stackoverflow.com/q/29177609
has comment: http://stackoverflow.com/comment/46574891

http://stackoverflow.com/a/29216634
has comment: http://stackoverflow.com/comment/46644470
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29214345
score: 3
answers question: http://stackoverflow.com/q/29214345
has body: For this kind of thing, the easiest way to find out is just to go to the source. In this case, var enter = bars.enter() .append('rect') .attr('class', 'bar') https://github.com/dc-js/dc.js/blob/develop/src/bar-chart.js#L90-L92 So the selector is rect.bar. Also, the convenience method chart.selectAll() is better than using d3 directly, because it will only select within the current chart. Finally, to avoid stomping on the events used by dc.js internally, you may want to namespace your event handler. Adding it up, barChart.on('renderlet.barclicker', function(chart, filter) { chart.selectAll('rect.bar').on('click.custom', function(d) { // use the data in d to take the right action }); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46644986
upvote count: 3

http://stackoverflow.com/q/29086511
favorite count: 0
has title: Generic session variable key template helper with Meteor
has body: How can I make the following helper more generic so that I can set arbitrary session vars with matching template vars and retrieve them without such a repetitive pattern? Template.feedback5.helpers({ 'posX': function() { return Session.get('posX'); }, 'dragPosition': function() { return Session.get('dragPosition'); }, 'stuck': function() { return Session.get('stuck'); }, 'dragging': function() { return Session.get('dragging'); } });
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29086651
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29086651
answer count: 1
downvote count: 0
tagged with: meteor

http://stackoverflow.com/comment/46431233
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29098350
has text: did you looked at https://docs.angularjs.org/api/ngTouch this, they might have handle it
score: 0

http://stackoverflow.com/q/29065668
tagged with: javascript
tagged with: string
has title: How do I use the .match javascript method to search an array versus a string?
tagged with: regex
has comment: http://stackoverflow.com/comment/46374521
has answer: http://stackoverflow.com/a/29065694
accepted answer: http://stackoverflow.com/a/29065694
type: Question
type: AnsweredQuestion
tagged with: methods
has body: This is a simple way of using the .match method to search through a string and then return whether or not a match was found. var match = "hello joe, how are you?".match('joe'); if (match) { console.log(match[0]); } else { console.log('no match found : ('); } When trying to use the .match method to search through an array for particular string – I cannot get a return. Any advice? var array = ['charlie','jeff','joe'].match('jeff'); if (array) { console.log(array[0]); } else { console.log('no dice'); }
has comment: http://stackoverflow.com/comment/46369320
score: 0
tagged with: arrays
answer count: 1

http://stackoverflow.com/comment/46617864
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29199026
type: Comment
has text: Thanks, your fix worked fine. Anyway, it seems to be a Highcharts bug, I created an issue in their github: https://github.com/highslide-software/highcharts.com/issues/4020

http://stackoverflow.com/a/29136481
has body: $state actually has a reload() function to do exactly this: $state.reload(); You can read about it in the ui-router $state docs. If you need to redirect as well, you can force a reload on state transition by passing the reload: true option to $state.go(): $state.go('stateName', {}, {reload: true});
type: Answer
has comment: http://stackoverflow.com/comment/46498201
has comment: http://stackoverflow.com/comment/46497851
answers question: http://stackoverflow.com/q/29136356
has comment: http://stackoverflow.com/comment/46497902
score: 0

http://stackoverflow.com/comment/46515710
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29145382
has text: Th thing is that promises and pub-sub are not the same pattern. I wouldn't try to recreate PS with promises, it's not the right tool for this (once resolved, that's it, you can't publish another event). As for recreating $.Callbacks - this is not about Angular either. It's just simple javascript. Check this quick example: http://jsfiddle.net/ac1dwhss/
score: 0

http://stackoverflow.com/comment/46555963
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29159249
has text: Still not working for me : Failed with: ReferenceError: resultarray is not defined at main.js:77:22 at e (Parse.js:2:5101) at Parse.js:2:4651 at Array.forEach (native) at Object.x.each.x.forEach [as _arrayEach] (Parse.js:1:665) at c.extend.resolve (Parse.js:2:4602) at Parse.js:2:5181 at e (Parse.js:2:5101) at Parse.js:2:4651 at Array.forEach (native) I try to do it with just queries and cache policies to make it faster, so don't worry if it stays unsolved Here is the pastebin for you to get the right line numbers: http://pastebin.com/jKYc2v7c

http://stackoverflow.com/comment/46522114
comment on: http://stackoverflow.com/a/29149881
type: AnswerComment
score: 0
type: Comment
has text: `onclick` is predefined with particular JavaScript objects. It's a way you can give JavaScript some instructions what to do when that element is clicked.

http://stackoverflow.com/a/29215477
answers question: http://stackoverflow.com/q/29215004
score: 0
type: Answer
has body: You are expecting sync things to happen, but it's async. Your client.business method takes in a callback as it's second argument which isn't returning by the time res.render gets called. Try this: function yelp(callback) { var b = []; var i = 0; client.business("(struck)", function(error, data) { if (error != undefined){ res.send("an error occured. exiting"); process.process.reallyExit(); } b[i++] = data.name; b[i++] = data.display_phone; b[i++] = data.rating; // No returns in async. Just call the callback. callback('yelp.ejs', { {title: 'Yelp!', arr: b}}) }); } app.get('/yelp', function(req,res){ yelp(res.render); });

http://stackoverflow.com/a/74599019
type: Answer
has body: After few frustrating hours, I found what was the problem Short Answer: To convert time to utc, we need to use format() Long Answer: Take the example moment.utc(1559586600000).format('LLL') .utc sets the isUTC flag to true. When logging the date, the d key always shows the time in local timezone. (Which makes us believe its not working properly - as shown in your screenshot) But we need to use .format to get the date/time in UTC format. The above code returns June 3, 2019 6:30 PM which is the correct UTC time.
score: 0
answers question: http://stackoverflow.com/q/29114824

http://stackoverflow.com/comment/46645665
has text: Thank you, I need it so I can make each word spoken bold, which is the end goal. Once I have a word, I can then replace the closet match with a **bold word** to help children learn to read. I shall have a play as it's missing the last work, and the first letter of the first word. Otherwise its much better than I have managed so far :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29217229

http://stackoverflow.com/a/29071988
has comment: http://stackoverflow.com/comment/46378450
has comment: http://stackoverflow.com/comment/46378603
type: AcceptedAnswer
has body: You can use .wrapAll() $('li').contents().wrapAll('&lt;span /&gt;') Note: If you have multiple li elements, then you have to iterate over each li like $('li').each(function(){ $(this).contents().wrapAll('&lt;span /&gt;') }) Demo: Fiddle Update $('div &gt; ul &gt; li').each(function () { $(this).children(':not(ul)').wrapAll('&lt;span /&gt;') }) Demo: Fiddle
score: 0
has comment: http://stackoverflow.com/comment/46378666
type: Answer
accepted answer of: http://stackoverflow.com/q/29071970
answers question: http://stackoverflow.com/q/29071970
has comment: http://stackoverflow.com/comment/46378561

http://stackoverflow.com/comment/46614132
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29196364
has text: @l19 the whitelist is the first line in my code example. It is an array of two urls. The allowedURLS, if I understand your meaning, is set in Access-Control-Allow-Origin on line 4, the first statement inside the if block.
score: 0

http://stackoverflow.com/a/29156746
score: 1
answers question: http://stackoverflow.com/q/29156176
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29156176
has comment: http://stackoverflow.com/comment/46551741
has comment: http://stackoverflow.com/comment/46543060
type: Answer
has body: Your server route will only run if no client routes also match. I suspect you have a catch-all route which is executing on the client and preventing the server route from running. One solution is to define all of the routes in a common folder like /lib so that you can properly order them. Your routes file could look something like: client route 1 client route 2 server route 1 server route 2 catch-all (not found) route
upvote count: 1

http://stackoverflow.com/a/29333783
accepted answer of: http://stackoverflow.com/q/29200787
has comment: http://stackoverflow.com/comment/46872690
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29200787
type: Answer
has body: In theory, the new fill() method on typed arrays would be a natural candidate as it would fill the buffer internally at compiled speed, and therefor performance faster. Unfortunately, this isn't the case. This performance test show that, at the time of writing this, a traditional while-loop is many times faster. Even when this test has a slight penalty for the while-loop. In addition, fill() is only supported in Firefox at the moment. So the fastest method using an Uint16Array only, and with best cross-platform support is doing: var i = 0, a = new Uint16Array(16384); while(i &lt; 16384) a[i++] = 65; Uint16/32 arrays are always memory aligned, so you could in some cases where the length of them match up on a four byte boundary, fill using a 32-bit array instead with a 2x16 bit value (refactor at will): var i = 0, len = 16384, a = new Uint16Array(len), c = 65; if (len % 4) { while(i &lt; len) a[i++] = c; // fill Uint16Array as-is } else { var u32 = new Uint32Array(a.buffer), // shares the same byte-buffer as a len32 = u32.length, v = (c &lt;&lt; 16) | c; // make value span 2x16 bits while(i &lt; len32) u32[i++] = v; // fill at close to 2x speed } // use "a" here
upvote count: 3

http://stackoverflow.com/comment/46565275
comment on: http://stackoverflow.com/q/29172620
has text: Yes, `inventory_items` is an array. But you can loop over that with a simple `for` loop, no need for `async`?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46438802
comment on: http://stackoverflow.com/q/29104311
type: Comment
type: QuestionComment
has text: The most likely explanation is a `console.log` line **elsewhere**, or that something is calling `log` with a message ending in `undefined\n`.
score: 4

http://stackoverflow.com/comment/46490942
type: Comment
comment on: http://stackoverflow.com/a/29132023
score: 0
type: AnswerComment
has text: Thanks, I understand. Is there a standard way to provide options (tabs, etc) vice hide them and risk a user un-hide them? I'm thinking something like having totally separate views, but then I would need a view for every combination of roles. I assume there is a better way?

http://stackoverflow.com/comment/46487830
score: 1
comment on: http://stackoverflow.com/q/29130731
type: QuestionComment
has text: Take a look at the Promise/Deferred pattern. AngularJS has its own implementation ($q).
type: Comment

http://stackoverflow.com/comment/46515005
has text: you want it to navigate to somewhere inside your iframe or to somewhere in the parent page?
comment on: http://stackoverflow.com/q/29146002
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46527427
has text: Use a transparent 1x1 pixel image as the favicon?
score: 0
comment on: http://stackoverflow.com/q/29153107
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29206695
tagged with: ionic-framework
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46624376
answer count: 1
has title: why "undefined" show in angular js?
tagged with: angularjs-ng-repeat
has body: I am getting undefined in console .log.I am trying to get get data from my view .could you please tell me why it is not showing the model data .I will explain thing in other words I have this in my login.html file Username I want to access username in my controller .controller name is authenticationCntrl function authenticationCntrl($scope,$state) { console.log('=====authenticationCntrl controller call') console.log($scope.username) console.log($scope.password) $scope.forgetPassword=function(){ console.log($scope.username) console.log("dddd") console.log($scope.password) } I filled my username and password when I click "forget password" I get undefined value why ? here is my code http://goo.gl/Nte89L click preview to check output
accepted answer: http://stackoverflow.com/a/29207256
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46624411
has answer: http://stackoverflow.com/a/29207256
type: AnsweredQuestion

http://stackoverflow.com/comment/46607193
comment on: http://stackoverflow.com/q/29197245
type: QuestionComment
has text: Why not *not* use `String::format` but call `.replace` manually?
score: 0
type: Comment

http://stackoverflow.com/comment/46593860
score: 0
has text: Thanks that did it. So the modal div should not have the hashtag but the anchor tag should ref?
comment on: http://stackoverflow.com/a/29189668
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29183032
type: Answer
has comment: http://stackoverflow.com/comment/46595856
answers question: http://stackoverflow.com/q/29182941
score: 2
has comment: http://stackoverflow.com/comment/46738776
has comment: http://stackoverflow.com/comment/46615021
upvote count: 2
downvote count: 0
has body: You can do this by manipulating the inner HTML of the blockquote. $('.tr_bq').each(function () { var html = $(this).html(); var newHtml = html.split('&lt;br&gt;').map(function (str) { return '&lt;strike&gt;' + str + '&lt;/strike&gt;'; }).join('&lt;br&gt;'); $(this).html(newHtml); });

http://stackoverflow.com/comment/46513957
comment on: http://stackoverflow.com/q/29145382
has text: Promises are like `$.Callbacks("once memory")`. If you want that, use Angular-promises, if not then use jQuery for broadcast events. There's nothing wrong with that?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29221317
downvote count: 0
score: 1
has body: For most standard forms you can mark them inactive. Inactive forms cannot be selected by users.
answers question: http://stackoverflow.com/q/29204210
upvote count: 1
type: Answer

http://stackoverflow.com/comment/46425049
has text: why global variable ? i dont think we should us global variable until we know exactly what we are doing. And in this case use of global variable is unnecessary
comment on: http://stackoverflow.com/a/29097261
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46490019
has text: Fixed with RGBA. `background-color:rgba(32, 32, 32, 0.8);` Thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29132045
type: AnswerComment

http://stackoverflow.com/comment/46439523
type: Comment
comment on: http://stackoverflow.com/q/29103979
score: 1
has text: @Bergi, I was able to find a link that integrates Promises with Mandrill sendMail here, https://gist.github.com/ardrian/dcb47afeb59cad0234eb . Ill post an edit
type: QuestionComment

http://stackoverflow.com/q/29077544
has body: I've used chrome.management.getAll() function in order to list all the extensions installed on my google chrome browser. However, this function returns only those extensions which I have installed from the chrome web store and not those I've loaded (the one I've created). I'm using this function with the intent to establish a communication with a second extension. chrome.management.getAll(function(extInfos) { extInfos.forEach(function(ext) { console.log(ext.name); }); });
has comment: http://stackoverflow.com/comment/46409839
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/46506863
has comment: http://stackoverflow.com/comment/46388948
linked to: http://stackoverflow.com/q/19830909
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/46388675
has title: List all the extensions installed in google chrome
has comment: http://stackoverflow.com/comment/46492671
tagged with: javascript
linked to: http://stackoverflow.com/q/26053434
score: 0
tagged with: google-chrome-app
has answer: http://stackoverflow.com/a/29077729
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/46493052
has comment: http://stackoverflow.com/comment/46395212
linked to: http://stackoverflow.com/q/21497781
has comment: http://stackoverflow.com/comment/46473041
has comment: http://stackoverflow.com/comment/128148380
type: UnansweredQuestion

http://stackoverflow.com/q/29170602
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: I have a table of invoice numbers, dates and totals due. I would like the selected total returned to jQuery in a variable. PHP is presently generating the table so if it helps to add unique ID's to the inputs or modify the HTML output, that isn't a problem at all. I've done some research into it and it seems there are a million ways to achieve what I'm looking for; from concatenating the ID's and Prices in the Input ('5:75.97' style) and then separating them for manipulation, all the way to searching through the HTML for the nearest checkbox and adding the numbers that way. They all seem like they would work; just curious to learn what the ideal solution is. For example, if Invoice 5 and 12 were selected, a variable would equal 106.94 Any help would be greatly appreciated. Invoice # Date Balance Invoice 5 2015-03-03 75.97 Invoice 8 2015-03-07 35.97 Invoice 12 2015-03-01 30.97
type: UnansweredQuestion
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/29185340
tagged with: javascript
tagged with: jquery
has title: jQuery sum cells based on related checkbox selection
has answer: http://stackoverflow.com/a/29172109
has answer: http://stackoverflow.com/a/29171378
score: 0

http://stackoverflow.com/comment/46498733
has text: Did you try `Ctl + Z`? :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29137023
score: 0

http://stackoverflow.com/a/29205847
score: 4
answers question: http://stackoverflow.com/q/29205798
has comment: http://stackoverflow.com/comment/46622745
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29205798
downvote count: 0
has comment: http://stackoverflow.com/comment/46624576
has comment: http://stackoverflow.com/comment/46624201
has body: You're using multiple quantifiers var reg = /\d+\.\d?{2}/; // here ----------^^^^ The ? there means "zero or one of the previous thing" but then you follow it with {2} which means "exactly two of the previous thing". At that point, there is no previous thing (because the ? has already been applied). You either want to remove the ?, remove the {2}, or (if you want a literal ? there), put a \ in front of the ?. You haven't said what you want, but I'll take a guess that you want either whole numbers (no decimal point), or a number with a decimal point and exactly two places of precision. If so: var reg = /\d+(?:\.\d{2})?/; That means "a series of one or more digits, optionally followed by a decimal point and exactly two digits." The (?:...) defines a non-capturing group for \.\d{2}, and the ? following it says the entire group is optional.
has comment: http://stackoverflow.com/comment/46623441
has comment: http://stackoverflow.com/comment/46623279
type: AcceptedAnswer

http://stackoverflow.com/comment/46585227
type: Comment
type: QuestionComment
score: 0
has text: @Ethaan I got an array of 9 objects, seem as if minimongo is not ready?
comment on: http://stackoverflow.com/q/29184341

http://stackoverflow.com/q/29198984
type: Question
tagged with: javascript
answer count: 1
has title: javascript cookie value variable
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29199229
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: The cookies should save the longitude and latitude values from the function, but my browser (chrome) show that the value is undefinded. How can I fix it that the longitude and latutide coordinates become the values of the cookies? Other asked how can I add a variable at a cookie? HTML Document Structure new chat
tagged with: cookies
score: 1
upvote count: 1

http://stackoverflow.com/q/29148057
has comment: http://stackoverflow.com/comment/46525105
score: 1
tagged with: render
type: Question
has body: I have an ajax function, called from a button, that calls another function in my controller: $('._save').on('click', function(event){ event.preventDefault(); var data = {}; data.campos = window.campos; data.secId = $('#Hidden1').val(); var success = function(data){ console.log("Success!", data); } var error = function(data){ console.log("Error!", data); } $.post('index.php?r=partidaasociada/get-linea',{ data : data }); This is the controller Function: public function actionGetLinea() { $model = new PartidaAsociada(); $secId = $_POST['data']['secId']; for($i=0; $i&lt;$cvectorpart;$i++) { $model-&gt;id_partidaasociada = null; $model-&gt;isNewRecord = true; $model-&gt;id_sector = $secId; $model-&gt;save(); } return $this-&gt;render('saveord', [ 'model' =&gt; $model, ]); } I need to render the data, to another view called "saveord", but it keeps doing nothing when i press the button (that calls the ajax function) The code is saving the model the right way, i'd try 'renderPartial', 'renderAjax' and 'render' but nothing is working.
tagged with: function
tagged with: yii2
has comment: http://stackoverflow.com/comment/46522920
tagged with: javascript
tagged with: controller
downvote count: 0
has title: Yii2: Render data from a function called from javascript
favorite count: 0
type: UnansweredQuestion
upvote count: 1
answer count: 0

http://stackoverflow.com/a/29191707
type: Answer
accepted answer of: http://stackoverflow.com/q/29191135
answers question: http://stackoverflow.com/q/29191135
has body: Regarding the events loop, use an IIFE to evaluate the object. events : listtask.map(function(ele) { return { title: ele.libelle_task, start: ele.date_task, end: ele.date_end, url: ele.url_task, backgroundColor: "#f56954", //red borderColor: "#f56954" //red } }); BTW: function ini_events(ele) { ele.each(function() { var eventObject = { title: $.trim($(this).text()) }; }); } Inside the eventObject this will refer to the eventObject instead of the dom. So use function ini_events(ele) { ele.each(function(el) { var eventObject = { title: $.trim($(el).text()) }; }); } or function ini_events(ele) { ele.each(function() { var self = this; var eventObject = { title: $.trim($(self).text()) }; }); }
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/29202722
has body: I have two subgrids on my dashboard which are vertically aligned. I am able to hide or show either subgrid, however when I hide the top subgrid, the bottom grid does not move to the top, there is an empty space where the grid use to be. I would like to both grids appear in the same location on the page as they are shown or hidden. I have the code below to hide/show: setVisible('subgrid1_d', false); setVisible('subgrid2_d', true); function setVisible(id, show){ if (show == true) $('#' + id).show(); else $('#' + id).hide(); } Any help is appreciated.
type: Question
has title: crm 2011 hide and show subgrids on dashboard with javascript
tagged with: dynamics-crm-2011
has answer: http://stackoverflow.com/a/29237211
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: dynamics-crm

http://stackoverflow.com/q/29107853
has title: ng-repeat isn't iterating over array
has answer: http://stackoverflow.com/a/29109462
has comment: http://stackoverflow.com/comment/46445487
type: Question
has comment: http://stackoverflow.com/comment/46445383
has comment: http://stackoverflow.com/comment/46446058
tagged with: javascript
tagged with: angularjs-scope
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46445530
has comment: http://stackoverflow.com/comment/46445454
has comment: http://stackoverflow.com/comment/46447041
has comment: http://stackoverflow.com/comment/46445581
tagged with: angularjs
has body: Simplified HTML: Description {{ entry.description }} Simplified JS: $scope.transfers = transfers; $scope.total = transfers.meta.count; for (var i = 0, j = $scope.transfers.length; i < j; i++) { if (!$scope.transfers[i].hasOwnProperty('entries')) { $scope.transfers[i]['entries'] = []; } $scope.transfers[i]['entries'].push({ description: 'A description' }); } The first {{ transfer.entries }} (the one that is to the right of "Description") shows the correct value for transfers[i].entries, something like [{"description":"A description"}], but for some reason the ng-repeat is not iterating over that array. To recapitulate: They are on the same scope. The regular binding is working properly. The ng-repeat seems to not be correctly capturing the transfer.entries value. So, what am I doing wrong?
type: UnansweredQuestion
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/46446597

http://stackoverflow.com/q/29068392
favorite count: 0
has answer: http://stackoverflow.com/a/29068426
accepted answer: http://stackoverflow.com/a/29068501
has comment: http://stackoverflow.com/comment/46372190
possible better answer: http://stackoverflow.com/a/29068426
has answer: http://stackoverflow.com/a/29068495
has comment: http://stackoverflow.com/comment/46372226
has title: date not change when using setInterval in javascript
downvote count: 1
has body: The date isn't changing when using setInterval in javascript. Why doesn't the date change every second? var myVar=setInterval(myTimer(),1000); function myTimer() { var d = new Date(); document.write(d.toLocaleString()); }
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29068501
tagged with: javascript
score: -1
type: Question
answer count: 3
upvote count: 0

http://stackoverflow.com/q/29072666
tagged with: angularjs
has answer: http://stackoverflow.com/a/29072742
type: AnsweredQuestion
tagged with: authentication
has body: I wrote a function coming from Auth for the user to login. When the user uses the correct credentials login works fine. Also when he types in a wrong email address or password the correct error message is displayed. However, if he types wrong credentials and thereafter the correct credentials I obtain the Typeerror: Boolean is not a function for login function I can't figure why this might happen. $scope.login = function(form) { $scope.submitted = true; $scope.login=true; if(form) { var test=Auth.login({ username: $scope.user.email, password: $scope.user.password }); Auth.login({ username: $scope.user.email, password: $scope.user.password }) .then( function(err) { authService.loginConfirmed(); }) .catch( function(err) { $scope.errors.other =$translate.instant('PASSWORD_MATCH2'); }); } }; It seems that the login is data is not updated correctly. Do I overwrite something? Email {{'PASSWORD'|translate}} Login Finally the standard auth service looks like this login: function(user, callback) { var cb = callback || angular.noop; return User.login(user,function() { this.updateUser(); return cb(); }.bind(this),function(err) { //this.logout(); return cb(err); }.bind(this)).$promise; },
type: Question
accepted answer: http://stackoverflow.com/a/29072742
tagged with: javascript
score: 0
has title: Typeerror: Boolean is not a function for login function in Angular
answer count: 1
tagged with: promise

http://stackoverflow.com/q/29193511
upvote count: 3
has comment: http://stackoverflow.com/comment/46600448
downvote count: 3
tagged with: visited
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29193607
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46600501
favorite count: 0
type: UnansweredQuestion
has body: Is there any way to make a visited link back to unvisited without deleteing anything from hystory? I want to do that on a forum, when someone replies in a topic, it has to turn that topic link into unvisited. I am using this css: a.newold:visited {color:#999999;} a.newold:link {font-weight: bold;} and there is the list of topics: TITLE The thing is: When I click on a topic, it will be automatically updated as visited? I want something, (if is possible) that when I add a reply INSIDE that topic, its link will be updated as unvisited More information about what I am seeking: Example: The topic name will be: TEST. The topic first is unvisited, and it looks like: TEST; I click on it, I read it, it will look like: TEST; Then I add a reply in that topic; The topic will look unvisited again: TEST; I think this is as clear as it can be. If I use some other variable like $user seen topic_id, it will be bad, because it is a large request, so I wonder if there is something that can be done without database requests.
has title: How to change visited links into unvisited links when something changed
tagged with: css
has answer: http://stackoverflow.com/a/29193725

http://stackoverflow.com/a/29064460
has body: It's not front end, it's the backend of the website that changes the comment system, you could write some CSS, but you couldn't change the functionality of it.
has comment: http://stackoverflow.com/comment/46382091
upvote count: 1
answers question: http://stackoverflow.com/q/29064430
score: 1
has comment: http://stackoverflow.com/comment/46857279
has comment: http://stackoverflow.com/comment/47199300
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46568559
has text: need _playlist_ argument returned to _saveplaylistobj_
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29175427
score: 1

http://stackoverflow.com/comment/46404742
has text: I am able to reference the values of the button's being pressed or not, and I have tried passing them to the function above(with argument) with success. So i am able to reference the buttons, I just need their states to determine the colors being drawn. I have tried pretty much every thing over the last 5-6 hours.
comment on: http://stackoverflow.com/q/29085896
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46434527
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29101689
type: Comment
has text: Thank you! The getter method works best for me, as the local variable _logging_ should not be accessible through, for example, `myObj.logging`.

http://stackoverflow.com/q/29134461
has comment: http://stackoverflow.com/comment/46494984
has body: I have a form which consist of 7 input fields displayed individually with 'next-button' to show next input and hide current and 'back-button' to hide current and show previous. The problem is that the submit function on the last input runs when I click 'back-button' and it saves incompleted fields in the database. I don't know why and how to prevent it. Here is a sample code of 'back-button' : Template.submitProblem.events({ 'click .back1':function() { //show/hide items with removeClass()/addClass() $('#submit-why1').addClass('hidden'); $('#submit-problem').removeClass('hidden'); } }); and the submit function on the last input field : Template.submitProblem.events({ 'submit form':function(event) { event.preventDefault(); var problem = $(event.target).find('[name=problem]').val(); var why1 = $(event.target).find('[name=why1]').val(); var why2 = $(event.target).find('[name=why2]').val(); var why3 = $(event.target).find('[name=why3]').val(); var why4 = $(event.target).find('[name=why4]').val(); var why5 = $(event.target).find('[name=why5]').val(); var solution = $(event.target).find('[name=solution]').val(); Problems.insert({ problem: problem, why1: why1, why2: why2, why3: why3, why4: why4, why5: why5, solution: solution, submitdate: new Date() }); Router.go('submitted'); } }); ...
score: -3
accepted answer: http://stackoverflow.com/a/29135309
type: AnsweredQuestion
has title: Why my form submits on a 'back' button?
has comment: http://stackoverflow.com/comment/46494474
downvote count: 3
tagged with: forms
has comment: http://stackoverflow.com/comment/46494469
type: Question
has comment: http://stackoverflow.com/comment/46494450
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29135309

http://stackoverflow.com/a/29093702
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46419501
answers question: http://stackoverflow.com/q/29093396
has comment: http://stackoverflow.com/comment/46419218
type: Answer
has body: if I understood ES6 correctly using class has the same effect as if you were typing var Foo = function(){} var Bar = function(){ Foo.call(this); } Bar.prototype = Object.create(Foo.prototype); Bar.prototype.constructor = Bar; syntax error when typing MyClass() without keyword new is just to prevent polluting global space with variables intended to be used by object. var MyClass = function(){this.$ = "my private dollar"; return this;} if you have // $ === jquery var myObject = new MyClass(); // $ === still jquery // myObject === global object but if you do var myObject = MyClass(); // $ === "My private dollar" because this in Constructor called as function refers to global object, but when called with keyword new Javascript first creates new empty object and then calls the constructor on it.
has comment: http://stackoverflow.com/comment/46419134
has comment: http://stackoverflow.com/comment/46418874
score: -1

http://stackoverflow.com/a/29207321
has comment: http://stackoverflow.com/comment/46625459
has body: Try This: and you can find embed code from here: Demo: http://jsfiddle.net/cxw80tux/
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29207200
downvote count: 1
score: 0

http://stackoverflow.com/a/29170320
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46560612
accepted answer of: http://stackoverflow.com/q/29169974
type: AcceptedAnswer
has body: You should be able to just loop over the strings to get the value of each successive property, the final one will hopefully be the function to call: testProperty: function(err, data, prop, chaiMethod) { if (Array.isArray(data)) data = data[0]; var propertyValue = (isNaN(parseInt(data.value, 10))) ? data.value : parseInt(data.value, 10); var assertion = (propertyValue).should, fn = assertion; for (var i = 0, len = chaiMethod.length - 1; i &lt; len; i++) { fn = fn[chaiMethod[i]]; } return fn[chaiMethod[chaiMethod.length-1]](prop); } }; Also, if you want to do tests like be.above, I don't think they will work if you are converting your propertyValue to a string, so I removed that. Note I haven't tested any of this, so you'll have to give it a go yourself.
answers question: http://stackoverflow.com/q/29169974
upvote count: 1
type: Answer

http://stackoverflow.com/q/29165981
has answer: http://stackoverflow.com/a/29166966
has comment: http://stackoverflow.com/comment/46551524
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2
upvote count: 2
has body: Looking to create single markers on my Highcharts graph, the expected outcome should look something like this - http://jsfiddle.net/m1mqv4z2/ { x: Date.UTC(2014, 6, 31) y: 26.5, marker: { symbol: 'url(http://www.highcharts.com/demo/gfx/sun.png)' } }, I'm am looking for the above icon to be displayed on this chart - http://jsfiddle.net/wkaLs9ub/3/. So for example purposes i want to set the sun icon to the middle value of this chart. The approach I've tried is shown in the above snippet, this code is nested in the data like shown in the first fiddle but I've had no success. Is this possible in the functionality of Highcharts?
type: Question
tagged with: highcharts
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29166966
has title: Highcharts - Display Marker Icon on Single Value
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46560612
comment on: http://stackoverflow.com/a/29170320
type: Comment
has text: Dude. You're a goddamned genius.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29127168
upvote count: 5
has title: $scope.$watch in Angular doesn't work in Ionic/Cordova
tagged with: javascript
has answer: http://stackoverflow.com/a/29132182
has comment: http://stackoverflow.com/comment/46482415
answer count: 1
downvote count: 0
has body: I'm building an app using the Ionic Framework for which I now want to create some on-off switches (which are basically fancy styled checkboxes). When a person flips the switch I want to send this to the server, so I'm first trying to catch the switch change event. In a basic angular install I tried it with a simple checkbox in the html (&lt;input type="checkbox" ng-model="theswitch"&gt;) and a $watch in my controller like so: $scope.$watch('theswitch', function(){ console.log('theswitch changed'); if ($scope.boel){ console.log('theswitch is TRUE'); } else { console.log('theswitch IS FALSE'); } }); This works like a charm. I now implemented a similar thing in my Ionic app. My HTML is like this: &lt;ion-item class="item-toggle"&gt; Mail &lt;label class="toggle"&gt; &lt;input type="checkbox" ng-model="mail"&gt; &lt;div class="track"&gt; &lt;div class="handle"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/label&gt; &lt;/ion-item&gt; and my controller looks like this: myControllers.controller('AccountCtrl', function ($scope) { $scope.$watch('mail', function(){ console.log('THE MODEL CHANGED'); if ($scope.mail) { console.log('The button was turned ON.'); } else { console.log('The button was turned OFF.'); } }); }); Upon loading the screen I get two logs: THE MODEL CHANGED The button was turned OFF. After that I can flip the switch a million times, but I get no log messages anymore, not even an error. Since it works perfectly in my angular test website, but not in my app, I'm kinda lost in what could be wrong. Would anybody have any idea what I can do to catch this switch event? All tips are welcome!
favorite count: 0
tagged with: angularjs
score: 5
accepted answer: http://stackoverflow.com/a/29132182
has comment: http://stackoverflow.com/comment/46482559
type: AnsweredQuestion
tagged with: cordova
tagged with: ionic-framework
type: Question

http://stackoverflow.com/q/29067342
has body: Is it possible to make something like the autocorrect feature in iOS for contenteditable fields? As the user types, spelling would be checked (I already have this part), but then I need a way to correct the word. I could replace the whole html of the contenteditable, but then cursor position is lost, and there is a possibility that the user would try to type before html is rewritten. Ideally, this would just replace x characters before the user's cursor. Is this possible?
has comment: http://stackoverflow.com/comment/46370274
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29067657
has title: Inline autocorrect with contenteditable
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46370498
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46370300
tagged with: contenteditable
has answer: http://stackoverflow.com/a/29067657
has comment: http://stackoverflow.com/comment/46370559
type: Question

http://stackoverflow.com/comment/46530852
score: 0
type: AnswerComment
has text: They're passed by reference. You can verify this with `ClassA.method === protoObject.method`
type: Comment
comment on: http://stackoverflow.com/a/29154808

http://stackoverflow.com/a/29125746
type: Answer
upvote count: 1
has body: Solution One var toRemove = collection.filter(function(model) { return condition(model); }); _.invoke(toRemove, 'destroy'); This seems like the cleanest way. It's what Addy used in his book to delete completed todos (which is a big reason why I list this solution first). It's especially clean if you're reusing the filter function (like he is). However, I think it's slower than Solution Two because it involves iteration over collection and toRemove, whereas Solution Two only involves iteration over collection. Still, they both have linear run times so it's not too big a deal. Solution Two for (var i = collection.models.length-1; i &gt;= 0; i--) { // looping from back to front var model = collection.models[i]; if (condition(model)) model.destroy(); } I think this is relatively clean. And as mentioned above, this has the benefit of only having to loop through the collection, not the collection + a filtered version of the collection. It's important that you loop from back to front. Consider what happens when you loop from front to back: for (var i = 0; i &lt; collection.models.length; i++) { // looping from front to back var model = this.models[i]; if (condition(model)) { model.destroy(); i--; } } When you destroy a model, the models in collection.models basically get shifted up by one. This has two implications: The length of the array decreases by one. Say you delete element two. The next element will be four, not three. The index gets incremented to 3, and since the models get shifted up by one, three has an index of 2 and four has an index of 3. Solutions: Calculate collection.models.length after each iteration of the loop. Ie. for (var i = 0; i &lt; **collection.models.length**; i++) Decrement i after you destroy a model. You could loop from front to back, but you would just have to address these things, which makes it a bit more complicated. Solution Three var toRemove = []; collection.forEach(function(model) { if (condition(model)) toRemove.push(model); }); toRem…
score: 1
answers question: http://stackoverflow.com/q/29112677
downvote count: 0

http://stackoverflow.com/comment/46697293
type: AnswerComment
type: Comment
has text: @stark Updated, though as Ledgends mentioned, if you're goona go that far, you might want to look into a library like http://jqueryvalidation.org/ : )
comment on: http://stackoverflow.com/a/29211947
score: 0

http://stackoverflow.com/comment/46489406
comment on: http://stackoverflow.com/q/29131606
score: 0
has text: But, what if Plan A **is** Plan B? Ah, as opposed to *"to be, or not to be"*, that *Sam*, is the question! @JayBlanchard
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29214547
answers question: http://stackoverflow.com/q/29214169
type: Answer
has body: You might be better off splitting the list by comma-space and filtering the result. Regexes (especially the JS flavor, with its lack of lookbehinds) are bad at parsing syntaxes like this. terms = "feline, cat, cheetah"; if(terms.toLowerCase().split(", ").indexOf("cat") &gt;= 0) // a cat was there!
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/a/29103014
accepted answer of: http://stackoverflow.com/q/29102891
answers question: http://stackoverflow.com/q/29102891
score: 0
type: AcceptedAnswer
type: Answer
has body: You already have specified the Max value in the declaration of the slider. If you mean how you can get the value of the slider from the database then, you need to query from the server side and set the value returned using jquery's val method in the Ajax call of get type.

http://stackoverflow.com/comment/73870057
has text: Why even use `100`? Why not `3`, because it’s exactly three options? Using 33 and 67 makes `b` more probable.
comment on: http://stackoverflow.com/a/29068482
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46618294
type: Comment
comment on: http://stackoverflow.com/q/29203206
score: 0
has text: Thanks, m59! It's working with the dot. But as you said that it is 'rule' so is it something that we can't avoid it? I mean the model inside this directive must be a nested object?
type: QuestionComment

http://stackoverflow.com/comment/46580636
score: 0
type: QuestionComment
has text: Ok, solved.I had to add `<access origin="*" />` to the config.xml file https://cordova.apache.org/docs/en/4.0.0/guide_appdev_whitelist_index.md.html
type: Comment
comment on: http://stackoverflow.com/q/29177822

http://stackoverflow.com/a/29229495
has comment: http://stackoverflow.com/comment/46665817
has body: adding to @squiroid's words {{items.name}} should work ..
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29203825
accepted answer of: http://stackoverflow.com/q/29203825
score: 1

http://stackoverflow.com/comment/46508545
type: AnswerComment
has text: `$.ajax()` **does** return: `var xmlRequest = $.ajax({ url: "page.php", processData: false, data: xmlDocument }); xmlRequest.done( handleResponse );` (_that example even is on the exact same page you linked in your answer..._)
type: Comment
comment on: http://stackoverflow.com/a/29073566
score: 0

http://stackoverflow.com/a/29098793
type: Answer
score: 2
has body: You mistake here. You forgot to put &amp; symbol. Try this code. data : "postId=" + postId + "&amp;purpose=" + purpose, Full code: If you want to manipulate result returned from ajax, you can do something on success block as following code : $.ajax({ type : "POST", url : "http://localhost/codeig_smarty/index.php/user/likeItem", data : "postId=" + postId + "&amp;purpose=" + purpose, success : function(data) { // do seomthing here with data // console.log(data) --&gt; to see data return or not } });
upvote count: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29098756
has comment: http://stackoverflow.com/comment/46428007
accepted answer of: http://stackoverflow.com/q/29098756

http://stackoverflow.com/comment/46607176
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29196898
type: Comment
has text: @Urahara Fair enough!

http://stackoverflow.com/q/29141521
linked to: http://stackoverflow.com/q/4611031
type: Question
has comment: http://stackoverflow.com/comment/46506686
tagged with: c#
answer count: 2
possible better answer: http://stackoverflow.com/a/29143999
has comment: http://stackoverflow.com/comment/46508902
has comment: http://stackoverflow.com/comment/46507503
has answer: http://stackoverflow.com/a/29143999
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46507452
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/46507719
has comment: http://stackoverflow.com/comment/46507268
has title: ajax function not returning data in C#
tagged with: asp.net
has answer: http://stackoverflow.com/a/29144534
has comment: http://stackoverflow.com/comment/46506750
has comment: http://stackoverflow.com/comment/46507169
accepted answer: http://stackoverflow.com/a/29144534
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46506761
has body: I am trying to create cross domain ajax script but I am little struggling as to why the ajax function is outputting undefined in the table id, instead of correct dynamic data. $(document).ready(function () { $.support.cors = true; $.ajax({ type: "Post", crossDomain: true, contentType: "application/json; charset=utf-8", url: "http://localhost:27335/test2.aspx/BindDatatable", data: "{}", dataType: "json", success: function (data) { console.log(data) for (var i = 0; i &lt; data.d.length; i++) { $("#tbDetails").append("&lt;tr&gt;&lt;td&gt;" + data.d[i].Name+ "&lt;/td&gt;&lt;td&gt;" + data.d[i].Loan + "&lt;/td&gt;&lt;td&gt;" + data.d[i].Evnt + "&lt;/td&gt;&lt;/tr&gt;"); } }, error: function (result) { alert("Error"); } }); }); Thanks in advance for any assistance.
has comment: http://stackoverflow.com/comment/46506747

http://stackoverflow.com/comment/76385692
has text: Hello ! I get stuck in the same problem. I followed your 'tuto' but the jic.compress return me a closely empty image : Do you have any clue to solve this ?
comment on: http://stackoverflow.com/a/29225741
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46580610
score: 0
has text: You'll need a more sophisticated concat. By arrays, i meant that `$scope.Marketing`, `$scope. Finance` and `$scope. Inventory` are just arrays containing the actual objects you need to merge.
comment on: http://stackoverflow.com/q/29181857
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29147676
score: 4
has comment: http://stackoverflow.com/comment/46517984
answers question: http://stackoverflow.com/q/29147559
has body: What is happening is that the device's default behavior for selecting an image kicks in. You wouldn't be able to bypass this from a website in javascript. (maybe even natively, I'd expect mobile vendors to protect basic functionality like this) You 'could' depending on what you are building use something like phonegap and a plugin to allow you to trigger an image selection from the devices saved images, but you wouldn't be able to do that from a website as it doesn't have the same level of access to the device. You can do it the other way and trigger the device's camera with capture="camera", but not the way you want unfortunately.
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/46468526
type: Comment
score: 0
has text: if B is constructor of A, why the last line? c is property of A.prototype and not of constructor or.. what?
comment on: http://stackoverflow.com/q/29120877
type: QuestionComment

http://stackoverflow.com/q/29194103
tagged with: c3
favorite count: 0
upvote count: 5
type: UnansweredQuestion
tagged with: data-visualization
downvote count: 0
tagged with: d3.js
type: Question
tagged with: javascript
has body: I'm looking for something like this in D3 or C3js: The default Gauge Chart in C3 takes in multiple columns as data, but then displays them on the same line, so they are overriding eachother.
has answer: http://stackoverflow.com/a/45513932
has title: Is there a D3 Gauge allowing multiple series/columns?
has answer: http://stackoverflow.com/a/29196193
answer count: 2
score: 5
tagged with: gauge

http://stackoverflow.com/comment/46371213
comment on: http://stackoverflow.com/q/29067850
score: 0
type: Comment
type: QuestionComment
has text: Yup. Read the comment section: http://stackoverflow.com/questions/29067682/drag-and-drop-code-does-not-work-on-chrome#comment46371142_29067682

http://stackoverflow.com/q/29204497
tagged with: asp.net
tagged with: gridview
type: UnansweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29204734
score: 0
has title: To get row id using javascript
has body: In the below code i a have a grid view and i want to get the product id using the javascript on clicking apply button.I tried the below code i couldn't able to get product ID .Please help me to do this. function getIndex(index) { alert(index); var grid = document.getElementById('&lt;%=gdsalespricetrigger.ClientID %&gt;'); alert(grid); var cell = grid.rows[(+index) + 1].cells[0]; alert(cell.innerHTML); var item = 'MainContent_gdsalespricetrigger_lblproductid_' + index.toString(); alert(item); var grid1 = document.getElementById(item).value; alert(grid1); } &lt;asp:GridView Width="100%" runat="server" ID="gdsalespricetrigger" AutoGenerateColumns="false" DataKeyNames="ProductID" CellPadding="4" ForeColor="#333333" ShowFooter="true" PageSize-Mode="NumericPages" OnRowDataBound="gdsalespricetrigger_RowDataBound" PageSize="10" PagerStyle-Visible="true" AllowPaging="true" AllowSorting="true" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="Product ID" ItemStyle-Width="350px" Visible="false"&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lblproductid" Text='&lt;%#Eval("ProductID") %&gt;' runat="server" &gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText="Product Name" ItemStyle-Width="350px" &gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lblproductname" Text='&lt;%#Eval("ProductName") %&gt;' runat="server" &gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText="Apply" ItemStyle-Width="50px" &gt; &lt;ItemTemplate&gt; &lt;input type="button" value="Apply" onclick="getIndex(&lt;%# Container.DataItemIndex %&gt;);" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;HeaderStyle Font-Bold="True" ForeColor="White" /&gt; &lt;FooterStyle HorizontalAlign="Right" /&gt; &lt;/asp:GridView&gt;
answer count: 1

http://stackoverflow.com/comment/55233611
has text: Recommendation requests for off-site resources or tools are off-topic on Stack Overflow. If you answer them, you specifically reinforce the belief that Stack Overflow is a good place to answer those questions. It is not. Please don't answer these questions even if you know a good answer as most answers will be highly opinionated ("I personally like..."). You can open the flag dialogue on the question and see the close reason in full under the **off-topic** category, or in the [help/on-topic]. You should also not even answer in a comment, as the effect is similar to an actual answer.
comment on: http://stackoverflow.com/a/29121267
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29089163
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46438941
has title: Adding Stripe payment data to a Multi Part Wizard form in AngularJS
tagged with: stripe-payments
tagged with: angularjs
type: Question
has body: I'm trying to create a three page wizard in angular JS, with the final part taking payment details. However, looking through the Stripe docs I notice that there are no name attributes on any of the form elements related to Stripe. At the moment I'm using buttons to link to the next step in the wizard, and only have a single form, which is submitted together. The three page wizard is based on this tutorial: https://scotch.io/tutorials/angularjs-multi-step-form-using-ui-router as you can see i'm using: Next Section to navigate to the next form page. My question is - how can i submit both the objects bound to the model (formData), and the Stripe data from within the same form. Is this possible? If so - how can i do this and still keep the wizard functionality? Below is my controller: angular.module('formApp') .controller('formController', ['$scope', 'Appointment', function($scope, Appointment) { // we will store all of our form data in this object $scope.formData = {}; $scope.formData.appintment_date = ""; $scope.opened = false; /*$scope.momentDate = moment($scope.formData.date);*/ $scope.time1 = new Date(); $scope.showMeridian = true; //Datepicker $scope.dateOptions = { 'year-format': "'yy'", 'show-weeks' : false, 'show-time':true }; // function to process the form $scope.processForm = function() { console.log($scope.formData); var date = moment($scope.formData.date).format("dddd, MMMM Do YYYY, h:mm:ss a"); /*console.log(date);*/ var app = new Appointment($scope.formData); //console.log(app); app.$save(); }; }]); home.html 1 Date 2 Address 3 Payment form-interests.html Name Email Address Phone Number Next Section form-payment.html - note the lack of name attributes. Card Number CVC Expiration (Month) Expiration (Year) Thanks For Your Money! Submit
score: 0
has comment: http://stackoverflow.com/comment/46411714
tagged with: forms
has comment: http://stackoverflow.com/comment/46411266
has comment: http://stackoverflow.com/comment/46411256
answer count: 0

http://stackoverflow.com/comment/46620054
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29204144
type: Comment
has text: yes i have specific author and want to find a price for that author

http://stackoverflow.com/comment/46449395
type: QuestionComment
has text: understandable but can use both when code preceeds the html
comment on: http://stackoverflow.com/q/29109835
score: 0
type: Comment

http://stackoverflow.com/q/29068806
has body: I have created a password protect page. The situation is this, when you enter the password protect page, it will ask for your password, when you enter the correct password the content will show if not, it will again still ask for the correct one. In my situation, even if I enter the correct password, it is still looking for the correct password. Though I have realized my mistake, I still don't know how to correct it. The mistake I did is, I have only one function in my submit button so if the submit button in the access denied form is shown, it is still going back to the original form. Can someone help on this one. Thank you so much in advance. See this link function password(){ var password = document.getElementById('pw').value; if (password==123456){ document.getElementById('1354423021').style.display = 'block'; document.getElementById('1066133308').style.display = 'none'; } else { document.getElementById('1551787368').style.display = 'block'; document.getElementById('1066133308').style.display = 'none'; } } HTML Sample Password Protect Enter password to view content: Access Denied Incorrect Password! Please try Again. SHOW CONTENT
score: 0
has comment: http://stackoverflow.com/comment/46373775
has comment: http://stackoverflow.com/comment/46373065
answer count: 1
has title: Javascript Password Page
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46373080
type: Question
tagged with: passwords
has answer: http://stackoverflow.com/a/29069097
has comment: http://stackoverflow.com/comment/46373094
tagged with: javascript

http://stackoverflow.com/comment/46466981
type: Comment
comment on: http://stackoverflow.com/a/29119665
score: 0
has text: Legally it's suggests you shouldn't, realistically i doubt very much that any implications would come your way if you did.
type: AnswerComment

http://stackoverflow.com/a/29124360
has body: Answer = No (there... that was simple.) TL;DR Ok let me see if I understand this right. You have a page with charts and dynamic content that allows user experience customization. You have report builder, you are serving up charts with what? with cfchart? and you were at one time doing a cfsavecontent to a variable but you are not doing that now. So what are you doing? Forget it...it doesn't matter. Let me tell you what I have to do and I think you might want to consider something similar. I have my page of charts that are .png generated serverside via cfchart. I do a cfsavecontent grabbing the variable and doing a cfdocument PDF generation. This will give your people or person something to print and look at. It meets whatever PDF print requirements you might have. The PDF styling no matter how you slice it is limited. you will no doubt have already experienced styling give and take when you look at your generated page of charts and divs, and your PDF output page side by side. If you want client customizations (dragging things and what not). Then store those as user preferences in a table and when they return you can set things up a certain way and then have that variable handy you can generate a PDF based on that. Understand that PDF does not follow 'all styling behaviors'. You will need to consider your give and take scenarios. If the user wants to print something like a chart, then my god man...keep it super simple and keep it all native in coldfusion: cfchart, cfsavecontent, cfdocument. Good luck.
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29121975
has comment: http://stackoverflow.com/comment/46477447
has comment: http://stackoverflow.com/comment/46476992

http://stackoverflow.com/comment/46532002
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29071908
has text: The revised code was very helpful. I've tried to put various parts of the code inside the AJAX success function to avoid that asynch. problem. Unfortunately, I always get syntax problems, some `)` or `}` missing or at the wrong place... BTW is it possible to modify your regex code to delete empty lines in the text file? Otherwise I'll have an empty array element (at the end). Thank you.

http://stackoverflow.com/comment/46492693
has text: @squint Yeah, your first JSBin link had an invalid jQuery URL so jQuery wasn't doing anything. :) Looks like 1.9.1 doesn't have the `this.remove()` part, so that explains the difference.
type: AnswerComment
comment on: http://stackoverflow.com/a/29132848
score: 0
type: Comment

http://stackoverflow.com/comment/46564919
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29173110
has text: Wait, you're right and honestly I do not explain that... Maybe, althought the documentation says otherwise, `$sce` is part of the main `angular.js` while `$sanitize` would only comes from `angular-sanitize.js`. I get a big doubt now :(
type: AnswerComment

http://stackoverflow.com/comment/46390565
score: 0
type: Comment
has text: Ok take a look at my EDIT, I posted the final code, you have to use `.textContent`instead of .value because yopu are using DIVS and not inputs, I think that solves the problem.
type: AnswerComment
comment on: http://stackoverflow.com/a/29078265

http://stackoverflow.com/a/29122742
type: Answer
has comment: http://stackoverflow.com/comment/46473191
has comment: http://stackoverflow.com/comment/46472234
downvote count: 3
upvote count: 1
score: -2
has body: if you really want to manually create Script tag inside &lt;script&gt; using JavaScript... then here is a way to achieve the same: It won't work with text/html, please try as below: &lt;script type="text/javascript" id="abc"&gt; //... var script=document.createElement('script'); script.type='text/javascript'; script.src=url; $("body").append(script); //... &lt;/script&gt;
answers question: http://stackoverflow.com/q/29122615
has comment: http://stackoverflow.com/comment/46471735

http://stackoverflow.com/comment/46361627
has text: If you put it in the public folder, you should be able to use absolute paths, but then you aren't using the asset pipeline, so you should just use ` ` tags
comment on: http://stackoverflow.com/a/29062686
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46631966
comment on: http://stackoverflow.com/a/29210789
score: 0
has text: doesn't help, dialog still appears if I click on marker
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46593041
score: 0
has text: the problem is that in this code `express` returns `express is not defined` can you construct the code so it would work under server code i included or briefly instruct me how should i redefine my vars so it wouldnt return these errors ;)
type: Comment
comment on: http://stackoverflow.com/a/29189175
type: AnswerComment

http://stackoverflow.com/comment/46536076
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29157708
has text: Nothing connected with server side :).
score: 0

http://stackoverflow.com/a/29205929
score: 1
has comment: http://stackoverflow.com/comment/46624649
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29205572
type: Answer
has body: The only way if you don't know the id is by brute forcing it. for(var c=0;c&lt;10000;c++) { window.clearInterval(c); } When possible, save the interval id. If using an external libary that implements intervals wihtout references, override those functions after loaded. This brute force method is not adviced to do because its time consuming, and has no guarantee that it will work.
has comment: http://stackoverflow.com/comment/46624978

http://stackoverflow.com/a/29186702
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29184211
downvote count: 0
has body: A simple solution for this problem is use keyup function .This function show current value of textbox. ->html Update ->JavaScript $("#txtDesc").keyup(function(){ var desc = $( "#txtDesc" ).val(); alert(desc); });
type: Answer

http://stackoverflow.com/a/29154605
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46588618
type: Answer
accepted answer of: http://stackoverflow.com/q/29154046
has comment: http://stackoverflow.com/comment/46586054
answers question: http://stackoverflow.com/q/29154046
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46702786
has comment: http://stackoverflow.com/comment/46699306
has comment: http://stackoverflow.com/comment/46614419
has body: Welcome to stackoverflow! Your question seems a bit vague. I assume that this is you want to achieve. In the specific example the value of the class is changed through the use of the jquery attr function. Firstly, the specific div in which our text is placed is retrieved and then the value gets specified. I am attaching a code snippet below. A general note, using a . in css indicates that you are referring to a class so there is no need to attach a -class in the name. $( "#myButton" ).on( "click", function() { var attr = $("#myText").attr('class'); console.log(attr); if (attr == "valueA") { $("#myText").attr("class","valueB"); } else { $("#myText").attr("class","valueA"); } }); .valueA { font-size:11pt } .valueB { font-size:25pt } Change Text size sdsa asd aasdaas asdjlasj dasdkas asldjsalj slad TEST EDIT to include another answer In order for the text included in a single span to have different font-size you need to separate it somehow. In the specific example, I have added a second span in the respective div and adjusted the cacl_summary method to get the expected result. The code is available below; I have also updated the jsfiddle here Simple payback function calc_summary(){ if (cspy) { sp = parseFloat($("input[name=upgrade]").val()) / cspy; if (sp) { sp = (sp < 100) ? sp.toString().substring(0, 4) : sp; $(".sp").html(sp); $(".year").html(" years" + ((sp > 1) ? 's': '')); $(".ror").html(parseInt((1/sp) * 100) + '%'); } } }
has comment: http://stackoverflow.com/comment/46626387
upvote count: 1

http://stackoverflow.com/q/29075623
has title: knockout.js dependent variable selects
has answer: http://stackoverflow.com/a/29158748
answer count: 1
upvote count: 6
has body: [ Please see updates at the bottom ] I'm trying to make knockout depended selects, it's intended to make a "product" selection by these attributes, for example a product can have "size" and "material", if I selected "size", a knockout script make a request to the backend and retrieves which "material" available for the selected size, in other words, if an attribute is selected, other attributes are filtered out to show only available values ("all sizes": 1,2,3,4,5; "aluminium": 1,4). Attributes list are completely dynamic, there are about 80 attributes which can be linked to the products in arbitrary way. Are there any "best practices" for this situation? I am trying to solve it with code like this, without success yet: var ViewModel = function(data) { var self = this; self.data = data; self.attributes = ko.observableArray(); self.data.forEach(function(item, i, a) { // I passed .self to catch it later // in products as view_model.attributes(). self.attributes.push(new VariableProduct(item, self)); }) }; var VariableProduct = function(item, view_model) { var self = this; self.attribute_name = ko.observable(item.name); self.attribute_value = ko.observable('--'); // list of attribute values self.attribute_values = ko.computed(function() { var result = {}; view_model.attributes().forEach(function(attribute, i, a) { // here I try to filter each attributes lists by values // it doesn't work well if (attribute.attribute_name() != self.attribute_name() &amp;&amp; self.attribute_value() != '--') { result = attribute.attribute_values().filter( function(value) { return value.indexOf(self.attribute_value()) &gt;= 0; }); } }); return result; }); }; UPDATE 1: With Dnyanesh's reference to ko.subscribe(), i've achived these results, isn't ok yet, but a progress: http://jsfiddle.net/xwild/65eq14p3/ UPDATE 2: At the end it was solved with knockout.reactor and knockout.mapping plugins. Related stackoverflow question with details and the answer.
tagged with: knockout.js
linked to: http://stackoverflow.com/q/29247444
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 6
has comment: http://stackoverflow.com/comment/46534405
has comment: http://stackoverflow.com/comment/46558701
type: Question
has comment: http://stackoverflow.com/comment/46700444
favorite count: 0
has comment: http://stackoverflow.com/comment/46538347

http://stackoverflow.com/comment/129484137
has text: This answer made more sense to me. Posting for others with the same need for a complete example. https://github.com/webpack/webpack/issues/868
comment on: http://stackoverflow.com/q/29096018
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46601421
comment on: http://stackoverflow.com/a/29190257
score: 0
type: Comment
has text: Thanks for your answer Randy. How does this work of we're not using grunt?
type: AnswerComment

http://stackoverflow.com/comment/46574053
score: 2
has text: You're taking your question as a Java question, but are you sure? Is it a Java question (doubt)? Or is it for Javascript (more likely)? If you use the wrong tags, you attract the wrong experts, so you'll want to be sure about this.
comment on: http://stackoverflow.com/q/29178385
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29185104
has body: Say I have 'main.js', and in 'main.js' I use $.getScript() to load 'secondary.js' 'main.js' has a function inside of it called function runme(). Is there a way to call runme() from secondary.js?
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46585964
has answer: http://stackoverflow.com/a/29185387
has title: When loading a script with $.getScript() is there a way to call a function in the parent script, from the script being loaded with $.getScript()?
type: UnansweredQuestion
score: 1
tagged with: getscript
upvote count: 1
has comment: http://stackoverflow.com/comment/46585736
type: Question

http://stackoverflow.com/comment/46482023
comment on: http://stackoverflow.com/a/29127905
type: Comment
score: 0
type: AnswerComment
has text: yes, I have a collection of N elements and I need to group them in a container of X items... so If I have 40 elements and X is 4 I will have 10 container nodes containg 4 elements

http://stackoverflow.com/q/29182320
has title: Understanding the usage of parameters passed inside $.each in plugin code
has answer: http://stackoverflow.com/a/29182355
has comment: http://stackoverflow.com/comment/46580804
type: AnsweredQuestion
has body: I am new to jQuery and just learning new stuff. I was just reading through Chris Coyer's article and came across the following code : $.fn.faq = function(options) { return this.each(function(i, el) { var base = el, $base = $(el); console.log(options); base.init = function() { // Do initialization stuff $base .find("dd") .hide() .end() .find("dt") .click(function() { var ans = $(this).next(); if (ans.is(":visible")) { base.closeQ(ans); } else { base.openQ(ans); } }) }; base.openQ = function(ans) { // Open panel ans.show(); // Do callback options.qOpen.call(); }; base.closeQ = function(ans) { // Open panel ans.hide(); // Do callback options.qClose.call(); }; base.init(); }); }; $("dl").faq({ qOpen: myQuestionOpenCallback, qClose: myQuestionCloseCallback }); function myQuestionOpenCallback() { alert("answer opened!"); } function myQuestionCloseCallback() { alert("answer closed!"); } Now I didn't quite understand this part of the code: return this.each(function(i, el) { The second line in the code, what exactly is i and el? I don't see anywhere these parameters being passed into the each function. I asked a senior colleague of mine and got the following answer: Many plugins start that way. Since most plugins are chainable, they have to return this. And they also have to loop through the elements from the selector, return this.each(function(i, el) { does them both. A loop, then the return. but I still didn't quite understand. The JS Fiddle can be found here.
type: Question
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/29182382
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29182382
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/29182355

http://stackoverflow.com/q/29207787
type: Question
has title: Bootstrap collapse text change
accepted answer: http://stackoverflow.com/a/29207951
has body: i'm using bootstrap collapse. I'm trying to add a simple jquery statement, once a user click on one of the collapse than a icon changes. I have multiple collapses on the page so, I'm guessing I'll have to use the "this" statement in the code. Here is the HTML 2012 text 2013 text Here is my JS i got at the moment $(".collapse").hasClass("in")?true : (function(){ $("a i").removeClass('fa-caret-right'); $("a i").addClass('fa-caret-down'); }, function () { $("a i").removeClass('fa-caret-down'); $("a i").addClass('fa-caret-right'); }); ---------------UPDATED---------------- So I've kind of got it working I've changed the js to $('.collapsible').click(function () { var $this = $(this); $this.toggleClass('collapsible'); if ($this.hasClass('collapsible')) { $this.children("i").removeClass('fa-caret-right'); $this.children("i").addClass('fa-caret-down'); } else { $this.children("i").addClass('fa-caret-right'); $this.children("i").removeClass('fa-caret-down'); } }); And have added the class collapsible to the a tag so it would be 2012 It now kind of works but the issue is once you click the a tag at first it does nothing, then click it again the function starts working, which then becomes unsync to the way i wanted it to work in the first place.
has comment: http://stackoverflow.com/comment/46626073
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46626223
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46625864
has comment: http://stackoverflow.com/comment/46626121
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29207951
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/46409490
has text: I'm viewing from above the canopy, so I think fog would be the reverse of what I'm after.. plus the goal is to make the stuff under the trees easier to see.
comment on: http://stackoverflow.com/q/29069965
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46481776
type: Comment
type: QuestionComment
has text: I'm referring to your XmlHTTPRequest to `/SampleTest/createcon` on the server. If you look at the network tab of your console in the browser you can inspect how the request was sent and what it sent back.
score: 0
comment on: http://stackoverflow.com/q/29127384

http://stackoverflow.com/a/29114871
type: Answer
answers question: http://stackoverflow.com/q/29114429
downvote count: 0
has comment: http://stackoverflow.com/comment/46787291
has comment: http://stackoverflow.com/comment/46784505
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46475942
type: AcceptedAnswer
has body: Updated answer: Please use this updated code, make sure the url is passed correctly. I hope this will help.
accepted answer of: http://stackoverflow.com/q/29114429

http://stackoverflow.com/comment/46406146
has text: Yep, I tried the fiddle with my iPhone with changed event to "touchstart" - works.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29083195
type: Comment

http://stackoverflow.com/a/29208074
has body: simple,your x and y is undefined. var y; //undefined var x; //undefined just defined x and y and it should work FIDDLER DEMO
type: Answer
answers question: http://stackoverflow.com/q/29208002
score: 0

http://stackoverflow.com/comment/46428826
type: QuestionComment
comment on: http://stackoverflow.com/q/29098871
has text: Ahh.. ok.. the month dropdown in the picker defaults back.
score: 0
type: Comment

http://stackoverflow.com/q/29175519
accepted answer: http://stackoverflow.com/a/29176143
tagged with: javascript
has answer: http://stackoverflow.com/a/29176143
answer count: 2
has answer: http://stackoverflow.com/a/29175850
downvote count: 0
has body: I am trying to pass a python list to a javascript function, but it doesn't work... I think the Javascript function will see it as one long string. This is what I do: @webiopi.macro def calcSunriseSunsetOneYear(): o=ephem.Observer() o.lat='51.21828' o.long='3.94958' s=ephem.Sun() d=datetime.date.today() t=timedelta(days=1) d=d+t o.date=d riseTime=[] setTime=[] s.compute() for x in range (0,365): o.date=o.date+1 riseTime.append(str(ephem.localtime(o.next_rising(s)))) setTime.append(str(ephem.localtime(o.next_setting(s)))) return(json.dumps(riseTime)) This is the python data: ["2015-03-22 06:43:02.000006", "2015-03-23 06:40:46", "2015-03-24 06:38:31.000001", "2015-03-25 06:36:15.000002", "2015-03-26 06:33:59.000003", "2015-03-27 06:31:44.000004", "2015-03-28 06:29:28.000005", "2015-03-29 07:27:13.000006", "2015-03-30 07:24:57", "2015-03-31 07:22:42.000001", "2015-04-01 07:20:27.000002", "2015-04-02 07:18:13.000003", "2015-04-03 07:15:58.000004", "2015-04-04 07:13:44.000005", "2015-04-05 07:11:31.000006", "2015-04-06 07:09:17", "2015-04-07 07:07:04.000001", "2015-04-08 07:04:52.000002", "2015-04-09 07:02:40.000003", "2015-04-10 07:00:28.000004"] In Javascript I do this: var printChart = function macroCallBack(macro, args, chartInfo) { document.getElementById("chartInfo").innerHTML=chartInfo; var arLength=chartInfo.length; console.log("arLength is: ",arLength); for (var i=0; i&lt;arLength; i++) { console.log(chartInfo[i]); } } And the console prints every character of the python list on a seperate line, like this: [ " 2 0 1 5 etc... I can't format the above console.log output, but every character is on a seperate line. Also the length of the array is exactly the same as the length of the total string, so my conclusion is the python list is transformed to Javascript as one long string... I hope someone can help me out!
favorite count: 0
tagged with: python
type: AnsweredQuestion
score: 3
tagged with: list
possible better answer: http://stackoverflow.com/a/29175850
upvote count: 3
has title: passing python list to javascript
type: Question

http://stackoverflow.com/comment/46539756
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29159507
type: Comment
has text: thanks, it is working. the response can be anything like [/csv/8_copy 2.csv, /img/23.png, number, text]. In that case the above reg express wont suite. Can we do it by using comma(,)? Is there any common approach?

http://stackoverflow.com/comment/46616407
has text: Have you looked at `Ember.js`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29202231

http://stackoverflow.com/a/29113776
has comment: http://stackoverflow.com/comment/46456300
answers question: http://stackoverflow.com/q/29113698
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29113698
has comment: http://stackoverflow.com/comment/46456308
type: Answer
has body: The selectionOptions is not yet implemented in IE. Since you are passing the selected options to jQuery always you can use the :selected selector instead. So $(value.selectedOptions) becomes $(value).find('option:selected') or $(value).val() or just value.value(if the select is a single select) function checkSelect() { var valid = true; var atLeastAValue = false; $("select").css("background-color", "white"); $.each($("select"), function (index, value) { var others = $("select"); if ($(value).find('option:selected').val() !== "") { $.each(others, function (otherIndex, otherValue) { if ($(otherValue).find('option:selected').val() !== "") { if (index === otherIndex &amp;&amp; $(value).find('option:selected').val() === $(otherValue).find('option:selected').val()) { atLeastAValue = true; } else if ($(value).find('option:selected').val() === $(otherValue).find('option:selected').val()) { $(value).css("background-color", "#ff9696"); $(otherValue).css("background-color", "#ff9696"); valid = false; } } }); } else if (!atLeastAValue) { $(value).css("background-color", "#ff9696"); valid = false; } }); if (!valid) { var $div2 = $("#error"); if ($div2.is(":visible")) { return; } $div2.show("slow"); setTimeout(function () { $div2.hide("slow"); }, 10000); } return valid; }; You can also use just $(value).val() to get the value of a select element, if it is single select it will return just the value, it the select is a multi select then it will return an array of selected values A more simplified way can be function checkSelect() { var $selects = $("select").removeClass('duplicate'); $selects.each(function(){ var value = this.value; $selects.not(this).has('option[value="'+this.value+'"]:selected').addClass('duplicate'); }) var valid = !$selects.hasClass('duplicate'); if (!valid) { var $div2 = $("#error").stop(true, true); if ($div2.is(":hidden")) { $div2.show("slow"); setTimeout(function () { $div2.hide("slow"); }, 10000); } } return valid; }; Demo: Fiddle
upvote count: 3
score: 3

http://stackoverflow.com/comment/46412411
score: 0
type: Comment
has text: No there isn't @zgood But i'm trying to find a way to print my details out once all the validation has been done! E.g Once all the fields are complete the code should then print the values out. Printing out the values is not the problem here, it's printing them out once all the validation is done that's the problem
comment on: http://stackoverflow.com/a/29089856
type: AnswerComment

http://stackoverflow.com/a/29200244
type: Answer
answers question: http://stackoverflow.com/q/29199442
upvote count: 3
has comment: http://stackoverflow.com/comment/46613122
has body: The problem as @Stephen Sarcsam Kamenar mentioned has to do with not wrapping the inner part of the for loop in a closure. Because .load is an asynchronous event, callback passed to .load will only run when one of the images is loaded. Because it's closing over access to the image variable, whatever the most recent value of the image variable is will be used as the argument to append. One quick solution is to wrap the inner logic of your for loop in an explicitly bound immediately invoked function expression. Like this: var limit=12; for (var count=1;count&lt;=limit;count++) { (function (count) { var img = $("&lt;img /&gt;").attr('src', 'includes/ajax/getimgurl.php?pid='+count) .load(function() { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { alert('broken image!'); } else { $("#product_img_"+count).append(img); } }); })(count); } Hope that helps :)
score: 3
has comment: http://stackoverflow.com/comment/46612744
has comment: http://stackoverflow.com/comment/46612699
downvote count: 0

http://stackoverflow.com/a/43781548
has body: You can try this @(Html.EJ().Grid&lt;EmployeeView&gt;("MasterGrid") .Datasource((IEnumerable&lt;object&gt;)ViewBag.datasource1) .SelectedRowIndex(0) .Columns(col =&gt; { col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(125).Add(); col.Field("FirstName").HeaderText("First Name").Width(100).Add(); col.Field("LastName").HeaderText("Last Name").Width(100).Add(); col.Field("Title").HeaderText("Title").Width(150).Add(); col.Field("BirthDate").HeaderText("Birth Date").TextAlign(TextAlign.Right).Width(100).Format("{0:MM/dd/yyyy}").Add(); col.Field("Country").Width(100).HeaderText("Country").Add(); }) .ClientSideEvents(eve =&gt; { eve.CellEdit("cellEdit"); }) ) &lt;script type="text/javascript"&gt; function cellEdit(args) { var pkName = args.primaryKey[0]; var pkValue = args.rowData[pkName]; } &lt;/script&gt;
score: 0
answers question: http://stackoverflow.com/q/29155617
type: Answer

http://stackoverflow.com/a/29177122
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29177039
has body: Convert to a common value and compare. Converting to Date object is effectively converting to a time value in milliseconds, but in this case it's simpler to convert to say minutes since you don't have the date part. This assumes that both dates are on the same day of course: function toMinutes(time) { var b = time.split(':'); return b[0]*60 + +b[1]; } Now compare the two values converted to minutes: if (toMinutes(timeA) &lt; toMinutes(timeB)) { // timeA is before timeB }

http://stackoverflow.com/a/29120150
has body: As Giannis mentioned, the z param of your function override the z of the for-loop. But you have to use a closure, to save the current value of z in the listener, try this : function generateLegenda(catlist) { for (z=0; z &lt; catlist.length ; z++) { var legenda = d3.select("div.legendaCats") .append("p") .attr("class", "legendaItem") .on("click", (function(catIndex){ return function(d){ blueLine = catlist[catIndex]; // Determine if current line is visible var active = (d3.selectAll("#" + blueLine)).active ? false : true, newOpacity = active ? 0.2 : 1; // Hide or show the elements d3.selectAll("#" + blueLine).style("opacity", newOpacity); d3.selectAll("#" + blueLine).style("opacity", newOpacity); // Update whether or not the elements are active (d3.selectAll("#" + blueLine)).active = active; }; })(z)); } }
accepted answer of: http://stackoverflow.com/q/29119713
type: AcceptedAnswer
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29119713

http://stackoverflow.com/q/29134106
accepted answer: http://stackoverflow.com/a/29508234
linked to: http://stackoverflow.com/q/2265922
tagged with: testing
tagged with: protractor
has comment: http://stackoverflow.com/comment/46494330
tagged with: javascript
has comment: http://stackoverflow.com/comment/46494924
score: 6
has answer: http://stackoverflow.com/a/29508513
has comment: http://stackoverflow.com/comment/47089467
type: AnsweredQuestion
tagged with: jasmine-matchers
has body: Here is the failing test: describe("Checking errors", function () { var scope = {}; beforeEach(function () { browser.get("/#endpoint"); browser.waitForAngular(); scope.page = new MyPage(); }); it("should not show any errors", function () { expect(scope.page.errors).toBeEmptyArray(); }); }); where MyPage is a Page Object: var MyPage = function () { this.errors = element.all(by.css("div.error-block b.error")) .filter(function (elm) { return elm.isDisplayed().then(function (value) { return value; }); }) .map(function (elm) { return elm.getText(); }); }; module.exports = MyPage; where errors supposed to be an array of visible error texts found on a page. Here is the error we are getting: Failures: 1) Checking errors should not show any errors Message: Expected [ ] to be empty array. Stacktrace: Error: Failed expectation FYI, toBeEmptyArray() matcher is coming from jasmine-matchers third-party. I've tried to print out the value of scope.page.errors this way: scope.page.errors.then(function (errors) { console.log(errors); }); And it is printed out as []. Array.isArray(errors) returns true. From what I see, scope.page.errors is an empty array, but the expectation fails. What I a missing?
possible better answer: http://stackoverflow.com/a/29508513
tagged with: jasmine
favorite count: 0
has comment: http://stackoverflow.com/comment/46494752
type: Question
has comment: http://stackoverflow.com/comment/46494274
has title: Failed expectation: "Expected [ ] to be empty array."
has comment: http://stackoverflow.com/comment/47069054
has comment: http://stackoverflow.com/comment/47083336
has answer: http://stackoverflow.com/a/29508234
answer count: 2
upvote count: 7
downvote count: 1

http://stackoverflow.com/q/29210218
has comment: http://stackoverflow.com/comment/46631531
answer count: 2
has answer: http://stackoverflow.com/a/38939266
has comment: http://stackoverflow.com/comment/46633041
downvote count: 0
has comment: http://stackoverflow.com/comment/46632637
has body: I am using the bootstrap progress bar to show the percentage of miles covered by someone from a total of 23,872 miles. For example if user A covered only 5 miles which means: 5/23872 = 0.00020945 * 100 = 0.02094504 miles. Currently anything below 1% does not show up on the progress bar. Is it possible to be able to show the percentage of miles below 1 the bar so it lights up green just the 28% in the image above. Code for Conversion: // Calculating Percentages for each region var ukPercent = $scope.ukTotal / 23872; var apacPercent = $scope.apacTotal / 23872; var naPercent = $scope.naTotal / 23872; $scope.ukPercentage = ukPercent * 100; $scope.naPercentage = naPercent * 100; $scope.apacPercentage = apacPercent * 100;
favorite count: 0
has title: Showing less then 1% on the BootStrap progress bar
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29216398
type: Question
has comment: http://stackoverflow.com/comment/46632362
tagged with: javascript
tagged with: progress-bar

http://stackoverflow.com/comment/46464628
type: Comment
type: QuestionComment
has text: Switch from one loop for every level to one loop to iterate the properties of the current object within a function. If the property contains other enumerable properties invoke the function again. This way you create a recursive function,
score: 1
comment on: http://stackoverflow.com/q/29118699

http://stackoverflow.com/q/29139138
downvote count: 1
has title: Attach an event on a future element
favorite count: 0
has body: I need to call a function just after some elements are loaded on the page(result of a ajax call) after the page loads, I cannot use the success callback function. Is there a way to do this?
linked to: http://stackoverflow.com/q/203198
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/46502205
type: Question
has comment: http://stackoverflow.com/comment/46502234
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29139194
upvote count: 1

http://stackoverflow.com/comment/46594758
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29190050
has text: A simple solution might be to render a single canvas at 2 times the size you need and then move the view point from the top left to the bottom right and then reset.
score: 0

http://stackoverflow.com/comment/46384058
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29075233
has text: Are you sure Mudassar Ali?
score: 1

http://stackoverflow.com/q/29117298
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29129580
answer count: 3
possible better answer: http://stackoverflow.com/a/29117486
has answer: http://stackoverflow.com/a/29117486
type: AnsweredQuestion
upvote count: 2
has body: I'm having trouble playing with Polymer and an API. I'm using core-ajax to do that and I'm experiencing this error... XMLHttpRequest cannot load http://api.comicvine.com/search/?api_key=012345678901234567890123456789&limit=10&format=json&query=&page=&resources=volume. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. I looked after .htaccess file and tried some code but nothing worked. I also saw many posts on CORS errors but I still don't know how can I make this works... Here is my comicvine-api element code: {{numResults}} Results {{r.name}} {{r.start_year}} {{r.publisher.name}} Nothing found Thanks for your time ! Sorry if I did something wrong, I'm learning JS :D
type: Question
accepted answer: http://stackoverflow.com/a/29129580
tagged with: polymer
has title: CORS error using core-ajax in Polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/29117468
tagged with: cors
score: 2
downvote count: 0

http://stackoverflow.com/q/29185220
has title: jQuery selectbox using Chosen appears multiple times
has comment: http://stackoverflow.com/comment/46586523
tagged with: jquery
has body: I have a list of articles that appears in a bootstrap table. Every article has a button that opens a modal where is a form with a select based on chosen jquery plugin, that list some reviewers. Here is the code: <?php $rec=mysql_query("SELECT * FROM users where nivel = 'reviewer'"); while($reviewers=mysql_fetch_object($rec)) { echo " idu'>$reviewers->name "; } ?> "._('Close')." The problem is that, if I have 3 articles listed, the first article generate 3 select boxes, the second one generate 2 select boxes, and the last one generate only one, as it should be. What can be the problem? LE: Here is the generated html by jquery: In normal mode, it has to generate only one .
type: UnansweredQuestion
answer count: 0
tagged with: twitter-bootstrap
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46586759
score: 0

http://stackoverflow.com/comment/58026360
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29076520
has text: I also received a same problem. Searching for solution...

http://stackoverflow.com/a/38866447
has body: As others said, it's imposable to do it using Google's JavaScript API. However, Google does allow up to 23 waypoints with a server-side request. So using PHP and JavaScript, I was able to make a workaround. I explained it here along with the code. What you have to do is get the "waypoint order" from the server side request and then have JavaScript give you directions between each location.
type: Answer
answers question: http://stackoverflow.com/q/29117931
score: 0

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/29173648
tags question: http://stackoverflow.com/q/29198119
tags question: http://stackoverflow.com/q/29198058
tags question: http://stackoverflow.com/q/29199661
tags question: http://stackoverflow.com/q/29130853
tags question: http://stackoverflow.com/q/29175006
tags question: http://stackoverflow.com/q/29201091
tags question: http://stackoverflow.com/q/29117298

http://stackoverflow.com/comment/46621683
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29205187
has text: as you can see in the directive's hml, this dropdown is composed out of 2 buttons, I need the width that i set in the custome directive to actually set the first button width...
score: 0

http://stackoverflow.com/comment/46547728
comment on: http://stackoverflow.com/q/29145829
type: Comment
type: QuestionComment
has text: Sir, but i was trying to send the json variable from one jsp to another jsp ................. so please help me out for that
score: 0

http://stackoverflow.com/comment/46448026
score: 0
type: Comment
has text: Is it possible you're trying to access the elements before they have been added to the div? I've got a basic jsFiddle that seems to be working, maybe you can mod it to match your code. http://jsfiddle.net/qd6gw6o2/
type: AnswerComment
comment on: http://stackoverflow.com/a/29109063

http://stackoverflow.com/comment/46591604
comment on: http://stackoverflow.com/a/29188399
type: Comment
has text: the moment i do this "'+ data +'" the whole code becomes invalid. this side ': if it is correct should have the a id turn blue, the href as well but the whole ': turns green and it indicates a syntax error
score: 0
type: AnswerComment

http://stackoverflow.com/q/29166827
accepted answer: http://stackoverflow.com/a/29167272
favorite count: 0
has comment: http://stackoverflow.com/comment/46552833
has comment: http://stackoverflow.com/comment/46552292
tagged with: http://stackoverflow.com/tag/html
has title: Execute javascript after reactjs render method has completed
type: AnsweredQuestion
upvote count: 19
score: 19
type: Question
possible better answer: http://stackoverflow.com/a/29167234
has answer: http://stackoverflow.com/a/29167272
has answer: http://stackoverflow.com/a/29167234
has body: I have a reactjs component: var com1 = React.createClass({ render: function() { return ( This is a text ); } }); I want to execute Javascript/Jquery once rendering of this componenet has completed. Simply adding Javascript to the render method doesn't seem to work. How would I achieve this?
tagged with: reactjs
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46642070
type: AnswerComment
has text: @Roamer-1888: [That's not their only problem](http://stackoverflow.com/a/23744774/1048572), but really I don't want to need to link that post on every promise-tagged question. jQuery deferreds are no proper promises, point :-)
type: Comment
comment on: http://stackoverflow.com/a/29210662
score: 0

http://stackoverflow.com/comment/46535670
type: QuestionComment
has text: Did any of the answers help you?
comment on: http://stackoverflow.com/q/29148893
score: 0
type: Comment

http://stackoverflow.com/a/29096221
has body: Ah what a silly problem. Detailed errors were not working as it was going via the IIS rewrite. I started hitting the API directly and the errors were showing which was "network path not found". Turns out I had the DNS of the DB server connecting to the wrong IP (the non-domain joined one). I still think it's strange it was intermittent but it seems to be working now.
answers question: http://stackoverflow.com/q/29092045
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29092045
score: 0

http://stackoverflow.com/comment/46562286
score: 0
has text: @JLRishe it probably does, therefore, the error message is probably what's creating the issue. I'll let you know if that's the case.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29170719

http://stackoverflow.com/q/29114220
tagged with: session-cookies
tagged with: forms
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29114524
upvote count: 0
has body: I am looking to pass through the landing page URL of a session as a hidden field in a site's contact form. This is ideal for salespeople so they can see the intent of the user etc. I have successfully passed through Google Analytics values as hidden fields from the _utmz cookie set by GA.js, but am unable to extract the session langing page. With this in mind I can see it is necessary to then store the first page of the session into cookie which could then be read and extracted into hidden field on the form. The logic I am looking to follow would be as follows: if cookie 'landing_page_url' does NOT exist, set 'landing_page_url' to document.URL else do nothing then on the form pass the stored value for 'landing_page_url' into the hidden field 'landing page' Would this be possible with javascript, and any ideas about an easy way to implement?
tagged with: javascript
score: -1
has title: Storing session landing page in cookie for form parsing (via hidden field)
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46733862
type: Comment
has text: Oh but one small point: I see you're new here so you probably don't know, but if you just edit your answer no-one gets notified and it can very easily get missed. You need to add a tagged comment (eg: `@<user>`), to notify concerned parties. Thanks again for some terrific work!
type: AnswerComment
comment on: http://stackoverflow.com/a/29169728
score: 0

http://stackoverflow.com/a/29084872
answers question: http://stackoverflow.com/q/29075534
type: Answer
has body: As your examples indicate, not using a store is simpler, and arguably correct in this case. A weak question to answer is: Does any other component need to know about the search results? A better question is: Might some other component need to know about the search results? Consider that if you add paging through results, or even a simple header of "12 results found", then those components need to know the result and will need to get it from the store. Or perhaps you'll want to add a router and have the search update the url and the url change to drive the app. If you can say for certain that ONLY subcomponents will ever care about a value, then state is OK.
downvote count: 0
score: 7
upvote count: 7
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29075534

http://stackoverflow.com/a/30114736
answers question: http://stackoverflow.com/q/29089460
downvote count: 1
score: -1
has body: If you need to use a wildcard that can recurse down into subfolders, such as test/**.js, the basic Windows shell (Command Prompt) doesn't support that, but there are various workarounds/alternatives. See this for more details: https://stackoverflow.com/a/30114333/1593924
upvote count: 0
type: Answer

http://stackoverflow.com/q/29072554
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46380299
has comment: http://stackoverflow.com/comment/46379978
has comment: http://stackoverflow.com/comment/46379793
has comment: http://stackoverflow.com/comment/46379830
has comment: http://stackoverflow.com/comment/46379804
type: Question
has answer: http://stackoverflow.com/a/29072767
tagged with: javascript
has body: I know this question is asked more often here on Stack, but I don't seem to get a working answer out of all the questions asked. The question "How to abort an AJAX call?" is mostly answered with the following solution (I use jQuery): var call = $.ajax({ url: 'path/to/destination', type: 'GET', dataType: 'json' }) .done(function() { console.log("Done!"); }) .fail(function() { console.log("Error!"); }) To abort the call just do: call.abort(); But that doesn't seem to work. (While it should, right?!). When I trigger the abort() function, it gives back an object, but my request is still pending in the network tab of dev tools. Once the server is done processing my request it gives it back regardless of the abort() function. According to my research, it can't be stopped that way, because the request is already sent and received by the server and therefore can't be aborted. But shouldn't there be a way to stop waiting on the server and disregard the info it would give back or just cut the connection of the AJAX call in question?
has comment: http://stackoverflow.com/comment/46379598
upvote count: 2
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46380073
tagged with: ajax
has comment: http://stackoverflow.com/comment/46379777
has comment: http://stackoverflow.com/comment/46379719
has comment: http://stackoverflow.com/comment/46379652
has title: Cancel AJAX call already received by server
score: 2
linked to: http://stackoverflow.com/q/446594
downvote count: 0

http://stackoverflow.com/comment/46524998
comment on: http://stackoverflow.com/a/29149877
has text: How do you handle `"h1#masterHeader"` and `"h1#takemeback"` differentiation in `hover( inFunc, outFunc )` ?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29198875
has body: WebGL is the right answer. It's also quite complicated to work with. But depending on the size of the tiles, React could work but you can't render 100k dom nodes performantly... no matter how you do it. Instead, you need to render the subset of tiles visible to the user. To pull something like this off, you'll need to have a lot of optimized code, and firebase most likely won't be up to par. I'd recommend a binary protocol over websockets and a database that makes sense (fast lookups on multiple numeric index ranges, and subscriptions). Ultimately, I'd probably go with: webgl (compare three.js and pixi.js) custom data server in golang (with persistence/fallback managed by a mysql engine like maria or aws's aurora) websocket server written in golang websockets (no wrapper library, binary protocol) The only reason for golang over node.js for the websocket server is CPU performance, which means lower latency and more clients per server. They perform about the same for the network aspect. You'll probably ignore most of this, but just understand that if you do have performance problems, switching some of the parts out for these will help. Do a prototype that handles 2 concurrent users and 1000 tiles, and go from there. In order of priority: don't render 100k dom nodes! webgl instead of dom binary websocket protocol, over socket.io or similar (not firebase) custom data server in go binary websocket protocol not using socket.io (e.g. ws package in node) websocket server in go (not really that important, maybe never)
has comment: http://stackoverflow.com/comment/46610489
has comment: http://stackoverflow.com/comment/46610793
has comment: http://stackoverflow.com/comment/46610464
type: Answer
has comment: http://stackoverflow.com/comment/46610904
has comment: http://stackoverflow.com/comment/46610413
accepted answer of: http://stackoverflow.com/q/29195885
answers question: http://stackoverflow.com/q/29195885
score: 5
has comment: http://stackoverflow.com/comment/46610980
has comment: http://stackoverflow.com/comment/46611270
type: AcceptedAnswer
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/46610726
has comment: http://stackoverflow.com/comment/46610580

http://stackoverflow.com/comment/46391188
comment on: http://stackoverflow.com/q/29078453
has text: nope, nothing. I added a console.log before the confirm and I don't get it dumped in the console either - that's why I think I'm not calling the function at all and my assumption that probably the event handler doesn't work whilst in an iframe..
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46536769
type: AnswerComment
score: 0
type: Comment
has text: You'd place that in an existing CSS file, a new one, or in a ` ` block in the page.
comment on: http://stackoverflow.com/a/29158140

http://stackoverflow.com/a/29145318
type: Answer
has comment: http://stackoverflow.com/comment/46514538
upvote count: 2
has comment: http://stackoverflow.com/comment/46514068
answers question: http://stackoverflow.com/q/29144750
accepted answer of: http://stackoverflow.com/q/29144750
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You need to create a custom validation directive. With Angular 1.3 $validators it's very easy. For example, simple one: .directive('maxWords', function() { return { require: 'ngModel', link: function(scope, element, attrs, ngModelController) { ngModelController.$validators.maxWords = function(viewValue, modelValue) { if (!ngModelController.$isEmpty(modelValue)) { return modelValue.trim().split(/\s+/).length &lt;= attrs.maxWords; } }; } }; }); Demo: http://jsfiddle.net/m3pp71o4/

http://stackoverflow.com/comment/46753911
type: Comment
comment on: http://stackoverflow.com/a/29264744
score: 0
type: AnswerComment
has text: Please read my question again. That's not what I asked. I asked how can I get this new css file as my last css file without having any access to the source code of the website and just use css to do that.

http://stackoverflow.com/q/29175769
has title: In jsp, hiding a field based on other field that has datepicker
tagged with: javascript
has answer: http://stackoverflow.com/a/29176359
score: 0
answer count: 2
has body: I am totally new to jsp and this is the situation, I have 2 fields, f1 and f2. I want to hide f2 if there is any change done in f1. f1 looks like: &lt;input type="text" class="form-control" id="f1-id" name="f1-id" data-date-format="yyyy-mm-dd"&gt; I added code: $("#f1-id").on('change', hidef2); function hidef2() { $("#f2-id").hide } f2 hides if I use keyboard to change f1, but f2 is not hiding at all if I change f1 using mouse. Remember f1 has date picker.
tagged with: jsp
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46570954
tagged with: datepicker
has answer: http://stackoverflow.com/a/29175816
type: Question

http://stackoverflow.com/a/29186699
type: Answer
has comment: http://stackoverflow.com/comment/46588604
score: 2
has comment: http://stackoverflow.com/comment/46589604
upvote count: 2
has body: Try that function getUrlVars() { var vars = {}, hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&amp;'); for(var i = 0; i &lt; hashes.length; i++) { hash = hashes[i].split('='); vars[hash[0]] = hash[1]; } return vars; } then urlVars = getUrlVars() in urlVars you find a key/value hash, print that out ;) console.log(urlVars)
accepted answer of: http://stackoverflow.com/q/29186315
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29186315
has comment: http://stackoverflow.com/comment/46588560
has comment: http://stackoverflow.com/comment/46589550

http://stackoverflow.com/comment/46542026
comment on: http://stackoverflow.com/q/29160283
type: QuestionComment
score: 0
has text: did you also include the js library where the function is defined? `response.getWriter().println(" ");`
type: Comment

http://stackoverflow.com/comment/52016186
type: AnswerComment
comment on: http://stackoverflow.com/a/32057600
type: Comment
score: 1
has text: Yes, I did eventually update to 1.1 but with no success. I'll update my original post.

http://stackoverflow.com/q/29104135
score: 0
has title: How to display an Image after the main page
accepted answer: http://stackoverflow.com/a/29104547
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29104547
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46438526
has comment: http://stackoverflow.com/comment/46438459
answer count: 1
tagged with: javascript
has body: I'm trying to display a thumbnail version of a logo in the header after I get past the main page and when the content starts. I'd also like it to disappear again once I go back to the main page. I've attempted some JavaScript but if anyone has any feedback or suggestions on how to fix it. I added some code to a JSFiddle for help. HTML &lt;header&gt; &lt;img src="img.png" id="logo" /&gt; &lt;/header&gt; &lt;div id="mainPage"&gt; &lt;img src="img.png" /&gt; &lt;/div&gt; &lt;div id="main"&gt; This is the content page. &lt;/div&gt; CSS header { background-color: blue; width: 100%; height: 20px; position: fixed; top: 0; border-bottom: 1px solid white; } #mainPage { margin: 0; padding: 0; background-color: blue; height: 500px; } #mainPage img { width: auto; display: block; margin: 0 auto; } #main{ height: 500px; } #logo { visibility: hidden; } JS function showImg() { var img = document.getElementById('logo'); var h = window.innerHeight; if(h &lt; 600) { img.style.visibility = 'hidden'; } else { img.style.visibility = 'visible'; } } http://jsfiddle.net/nkjqLyfg/2/
has comment: http://stackoverflow.com/comment/46438728

http://stackoverflow.com/a/29184610
answers question: http://stackoverflow.com/q/29184532
score: 0
type: AcceptedAnswer
type: Answer
has body: You need to trigger a reflow: https://jsfiddle.net/Lpk5en54/3/ var span = document.getElementsByTagName("span")[0]; document.getElementsByTagName("button")[0].onclick = function () { span.style.transition = ''; span.style.opacity = '0'; // setTimeout(function () { var foo = span.offsetTop span.style.transition = 'opacity 2s'; span.style.opacity = '1'; // }, 100); };
accepted answer of: http://stackoverflow.com/q/29184532

http://stackoverflow.com/a/29131121
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: Ok so after 3 days of hunting high and low I finally find the answer. Mongo and restangular use different ID Keys. mongo uses _id whereas restangular uses id. In order to correct this I needed to add the following var app = angular.module('richApp', ['ngResource', 'ngAnimate', 'restangular', 'xeditable']) .config(function(RestangularProvider) { RestangularProvider.setBaseUrl('api/'); RestangularProvider.setRestangularFields({ //Added this id: "_id" //Added this }); //Added this }); It's fair to say I also modified the following: $scope.save = function(change) { Restangular.one("changes", change._id).get().then(function(data) { $scope.data = data; }); var original = change; $scope.data = Restangular.copy(original); $scope.data.save(); };
answers question: http://stackoverflow.com/q/29113939

http://stackoverflow.com/a/29069588
has comment: http://stackoverflow.com/comment/46374836
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29069355
has body: Even smaller... function vanish(style) { style.display == "block" ? style.display = "none" : style.display = "block"; } vanish(document.getElementById("priceCheck1").style); or function vanish(element) { element.style.display == "block" ? element.style.display = "none" : element.style.display = "block"; } vanish(document.getElementById("priceCheck1"));

http://stackoverflow.com/a/29212903
upvote count: 1
downvote count: 0
has body: Just add an if statement: $(document).ready(function() { var lookcontent2 = 'codehtml2'; var lookcontent1 = 'codehtml1'; $('.test').click(function() { if ($('#example').html() == lookcontent1) { $('#example').html(lookcontent2); } if ($('#example').html() == lookcontent2) { $('#example').html(lookcontent1); } }); });
answers question: http://stackoverflow.com/q/29212779
type: Answer
score: 1

http://stackoverflow.com/comment/46478889
type: Comment
comment on: http://stackoverflow.com/a/29110905
has text: Could you please see the jsbin I created: [http://jsbin.com/zoruroqaki/1/edit?html,js,console,output]. I did what you suggested but when it creates the url I don't get the value I pass to it,but customerAddressId=%5Bobject+Object%5D. I had to review it in a browser as the ajax request does not work in jsbin. Thanks for your help again.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29170752
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/33136442
has title: krajee ajax-based-file-uploads-using-fileinput-plugin
tagged with: javascript
type: UnansweredQuestion
score: 2
downvote count: 0
tagged with: jquery
tagged with: file-upload
favorite count: 0
has body: First sorry for my poor english ; i am searching a good file upload with images in thumbnails.. i found Krajee bootstrap-fileinput http://plugins.krajee.com/file-input which , i think, is very complete. i have succeeded to upload photos here is my code: $("#images").fileinput({ uploadUrl: strURL, // you must set a valid URL here else you will get an error uploadAsync: true, previewFileType: "image", allowedFileExtensions: ["jpg", "gif", "png"], allowedFileTypes: ["image"], showUpload:true, maxFileSize: 5000, minFileCount: 1, maxFileCount: 8, elErrorContainer: "#errorBlock", overwriteInitial: false, initialPreview: [ "&lt;img src='http://lorempixel.com/200/150/people/1'&gt;", "&lt;img src='http://lorempixel.com/200/150/people/2'&gt;", ], initialPreviewShowDelete: true, initialPreviewConfig: [ {caption: "People-1.jpg", width: "42px", url: "/site/file-delete", key: 1}, {caption: "People-2.jpg", width: "42px", url: "/site/file-delete", key: 2}, ], }); But now , after having uploaded photos , i would like the user to modify (delete previous uploaded photos , add new etc..) so , i have to use initialPreview and initialPreviewConfig options... but i don't know how to put photos from server side in these options ?? i need to use server code to generate the initial javascript for initializing the file input I have tried: controller(MVC) $preview = array("&lt;img src='&lt;?php echo DIR;?&gt;images/2015/Mars/100_3641.jpg' class='file-preview-image' &gt;", "&lt;img src='&lt;?php echo DIR;?&gt;images/2015/Mars/100_3785.jpg' class='file-preview-image' &gt;"); View: $("#images").fileinput({ uploadUrl: strURL, // you must set a valid URL here else you will get an error uploadAsync: true, ...................... initialPreview: '&lt;?php echo $preview; ?&gt;' , // images from server ???? initialPreviewShowDelete: true, .................................... }); But it is not correct !! How can i do that ?? Many thanks
tagged with: jquery-file-upload
type: Question
has comment: http://stackoverflow.com/comment/90003792
tagged with: image-uploading

http://stackoverflow.com/a/43375450
type: Answer
answers question: http://stackoverflow.com/q/29173983
score: 0
has body: You need to trap the copy action event, and then read the clipboard in a background page. These answers should help: Google Chrome Extensions: How to detect Copy action (Ctrl-C and Edit-Copy)? How to read the Clipboard text in google chrome extension

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/29204276
type: Tag
tags question: http://stackoverflow.com/q/29189650
tags question: http://stackoverflow.com/q/29200527
tags question: http://stackoverflow.com/q/29135479
tags question: http://stackoverflow.com/q/29173878
tags question: http://stackoverflow.com/q/29074488
tags question: http://stackoverflow.com/q/29208793
tags question: http://stackoverflow.com/q/29093751
tags question: http://stackoverflow.com/q/29097090

http://stackoverflow.com/a/29105003
has comment: http://stackoverflow.com/comment/46462775
downvote count: 0
has body: You are passing a variable to a template function, which does not work (at the time of rendering, nothing is selected hence -1) Better have your code like this: var oControl = new sap.ui.commons.Button({ text : "{suser}", press : oController.openDialog }); and in your controller, define your openDialog method as follows: openDialog: function(oEvent) { var tbl = sap.ui.getCore().byId("id_of_your_table"), index = tbl.getSelectedIndex(); }
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29104488
score: 1

http://stackoverflow.com/q/29112540
has comment: http://stackoverflow.com/comment/46454413
upvote count: 0
tagged with: function
tagged with: javascript
type: UnansweredQuestion
tagged with: variables
has body: In JavaScript how to call a function from another function. My function is called Cheese and it alerts a hello cheese by passing it to another variable called X. I am practicing javascript functions. function cheese() { return function() { alert('hello cheese'); }; } var x = cheese(); alert(x);
score: -3
has answer: http://stackoverflow.com/a/29112583
has answer: http://stackoverflow.com/a/29112569
has title: How can I call a function from another function in javascript
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46454638
has answer: http://stackoverflow.com/a/29112573
answer count: 3
downvote count: 3
has comment: http://stackoverflow.com/comment/46454220

http://stackoverflow.com/a/29107900
type: Answer
has comment: http://stackoverflow.com/comment/46446499
has body: I think jquery is best suited for this task. HTML Action Comedy Fantasy Horror Mystery Non-Fiction Period Romance Sci-Fi Thriller jQuery $("#btnAddComic").click(function(){ var inz = $( "#genreList option:selected" ).map(function(){ return $(this).text(); }).get().join(','); alert(inz); }); SEE THE FIDDLE http://jsfiddle.net/inzamamtahir/1bm45gu7/2/
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46446011
has comment: http://stackoverflow.com/comment/46446114
answers question: http://stackoverflow.com/q/29107655
score: -1

http://stackoverflow.com/comment/46464985
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29118869
has text: Why u use angular by jQuery-way ? Why u cant call func from ng-click ?
score: 4

http://stackoverflow.com/q/29178340
has body: AngularJS v1.3.14: Currently, I'm successfully using the 'ngSanitize' module in my angular app with "ng-bind-html" to bind some HTML to the output of an area on the page. That works and doesn't require the older $sce 'trust HTML' stuff. But, I'd like to embed child bindings within that HTML. So... something like this works... angular.module('myApp', ['ngSanitize'...) .controller('SomeCtrl', ['$scope', function($scope) { $scope.myHTML = ' hello world '; }]); ... Something like this doesn't... angular.module('myApp', ['ngSanitize'...) .controller('SomeCtrl', ['$scope', function($scope) { $scope.myContent = 'hello world'; $scope.myHTML = ' {{myContent}} '; }]); ... Thoughts?
duplicate of: http://stackoverflow.com/q/25406461
type: Question
tagged with: ngsanitize
tagged with: javascript
has comment: http://stackoverflow.com/comment/46574035
tagged with: ng-bind-html
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29178444
score: 2
has title: AngularJS: ngBindHtml that also contains child bindings?
upvote count: 2

http://stackoverflow.com/q/29192121
tagged with: javascript
score: 0
has title: Iterate on a JSON in JavaScript Asp.net
answer count: 1
tagged with: asp.net
tagged with: javascriptserializer
has answer: http://stackoverflow.com/a/29192402
type: AnsweredQuestion
has body: I have following data that I have serialized as JSON from my code behind file. public class PieModel { public string label { get; set; } public double data { get; set; } } var data = new List&lt;PieModel&gt; { new PieModel { label = "Pending", data = 10d } new PieModel { label = "New", data = 40d } new PieModel { label = "Overdue", data = 50d } }; hdnData.Value = new JavaScriptSerializer().Serialize(data); I read this serialized data in JavaScript like this var tempHdnData = $("#hdnData"); But now I want to iterate on tempHdnData and get label and data members separately in JavaScript code. How can I achieve that?
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/29192402

http://stackoverflow.com/q/29069111
upvote count: 6
tagged with: node.js
score: 6
has title: how can check if server and port is available in nodejs ?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29069322
possible better answer: http://stackoverflow.com/a/65988527
type: Question
has answer: http://stackoverflow.com/a/65988527
answer count: 2
has comment: http://stackoverflow.com/comment/46373399
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have project with is written with Nodejs. I need to know how to check if an IP with Port is working to connect to. EX: Check example1.com 443 =>true ; Check example1.com 8080 =>false Thanks
has answer: http://stackoverflow.com/a/29069322

http://stackoverflow.com/a/29121128
type: Answer
has comment: http://stackoverflow.com/comment/46469963
has comment: http://stackoverflow.com/comment/46469213
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46469349
downvote count: 0
answers question: http://stackoverflow.com/q/29121055
has comment: http://stackoverflow.com/comment/46469874
has body: This is because the controls' id property is auto-generated when it is rendered; it will not be chkNormalServiceCost on the client side. You need to set the ClientID property on it instead: &lt;asp:CheckBox runat="server" ID="chkNormalServiceCost" ClientID="chkNormalServiceCost" Checked="true" /&gt; &lt;asp:TextBox runat="server" ID="txtNormalServiceCost" ClientID="txtNormalServiceCost" /&gt; From there you can then add a click handler using jQuery instead of attaching the change event after the first click has been fired: $('#chkNormalServiceCost').change(function () { $('#txtNormalServiceCost').prop('disabled', !this.checked); }); Example fiddle

http://stackoverflow.com/comment/46511098
has text: it is because you have a newline at the end of your real string (not the one in your post), so since it isn't followed by a word character, the newline is not replaced. You can change the lookahead like this: `(?=\w|$)`. As an aside, it is useless to add a quantifier here `(?=\w+)`, `(?=\w)` will do the same.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29143920
score: 1

http://stackoverflow.com/q/29070770
has title: window.location.href ="#find" works on mobile but not on PC. Ok on local site (Expressions 4)
has comment: http://stackoverflow.com/comment/46772449
type: Question
has comment: http://stackoverflow.com/comment/46376344
has answer: http://stackoverflow.com/a/29070904
tagged with: javascript
has comment: http://stackoverflow.com/comment/46376260
score: 0
has body: Function findme works fine on mobiles and in development using Expressions 4 (local host) however when installed on a remote host on a IE browser the function findme gets called but the page find is not displayed. window.location.href ="#find"; works on local host and on mobile on remote host but not on a PC when running from a remote host. Any recommendations? Page Title HELP FIND page 1 i-Duress Home Map Help PAGE Home FIND PAGE
has comment: http://stackoverflow.com/comment/46376267
answer count: 1
has comment: http://stackoverflow.com/comment/46376254
has comment: http://stackoverflow.com/comment/46376281
type: UnansweredQuestion

http://stackoverflow.com/comment/46638357
comment on: http://stackoverflow.com/q/29214139
score: 0
type: Comment
type: QuestionComment
has text: @Bram that seems to not matter here as I display the images on screen right away, or am I missing something?

http://stackoverflow.com/q/29083539
has answer: http://stackoverflow.com/a/29083657
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has body: I am currently developing an educational website and as part of it want to include web accessibility as a feature. I am trying to include a color content changer like seen here http://www.handicap-international.org.uk/OneStopCMS/Core/SelectLayout.aspx? but I cant figure out how to get the page to call several css external style sheets so that the color of the content will change when the link is clicked? Any help is appreciated.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29083775
has comment: http://stackoverflow.com/comment/46400190
tagged with: css
has comment: http://stackoverflow.com/comment/46401381
score: 0
type: Question
has title: using multiple style sheets
tagged with: javascript
has answer: http://stackoverflow.com/a/29083619

http://stackoverflow.com/comment/46505518
has text: @Joonas actually it could work i didnt think of that let me try it and il get back on you
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29139316
score: 0

http://stackoverflow.com/q/29109106
score: -2
has comment: http://stackoverflow.com/comment/46448048
tagged with: javascript
has comment: http://stackoverflow.com/comment/46447923
type: Question
has title: Array Pattern using Javascript
downvote count: 2
has comment: http://stackoverflow.com/comment/46447926
has answer: http://stackoverflow.com/a/29109260
accepted answer: http://stackoverflow.com/a/29109260
tagged with: arrays
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46447951
has comment: http://stackoverflow.com/comment/46447984
has body: I have an array: Myarray=[1,0,0,1,0,1,1,0,0] I want to display the elements of the array in the pattern 1,0,1,0.. I tried to set a flag: for (var i = 0; i &lt; myArray.length; i++) { if (myArray[i] == flag) { newArray = newArray + myArray[i]; if (flag == 0) flag = 1; else flag = 0; } But the problem is the mismatched elements are not showing in output. Any Idea? Thanks.
has answer: http://stackoverflow.com/a/29109458
has comment: http://stackoverflow.com/comment/46447968
possible better answer: http://stackoverflow.com/a/29109359
upvote count: 0
has answer: http://stackoverflow.com/a/29109359
has comment: http://stackoverflow.com/comment/46448021
has comment: http://stackoverflow.com/comment/46447983
has comment: http://stackoverflow.com/comment/46448211
has comment: http://stackoverflow.com/comment/46448351
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46447976

http://stackoverflow.com/q/29194772
linked to: http://stackoverflow.com/q/10812628
upvote count: 2
type: UnansweredQuestion
has title: MouseEvent's click with CtrlKey not working
type: Question
has body: Quick question; I want to open a link in a new tab without focusing on it (just like Ctrl+Click in Firefox), However the ctrlKey: true doesn't seem to be working. Here's a sample code: HTML : Sample link Javascript : var evt = new MouseEvent("click", { view: window, bubbles: true, cancelable: true, clientX: 20, ctrlKey: true, }, ele = document.getElementById("link")); ele.dispatchEvent(evt); JsFiddle
has answer: http://stackoverflow.com/a/29194797
linked to: http://stackoverflow.com/q/17570412
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/130071824
score: 2

http://stackoverflow.com/comment/46550222
comment on: http://stackoverflow.com/q/29163757
score: 0
has text: Code fully and upon another option I can change the text before redirect can be different from the rest of the text-button can be added and hide all the pages and shown only on the last page that immediately prior to redirect
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29204096
has answer: http://stackoverflow.com/a/29204154
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: ruby-on-rails-3
tagged with: ruby
type: UnansweredQuestion
has title: How to solve error regarding jquery in Rails-3
has body: I am getting one issue while some jquery script links are executing in Rails application.html.erb file.Actually i am trying to open calender while user will click on text field using one third party jquery library. After the page loading it is not happening like that and no rails error but in console option i am getting the following error. Uncaught TypeError: Cannot read property 'createPlugin' of undefined I think the above error due to page is not finding the appropriate script files given via links in application.html.erb but by using simple HTML and JS it is working properly. Some of my codes are given below. application.html.erb MakeCalender <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> <% if flash[:color]=="valid" %> <%=flash[:notice]%> <% elsif flash[:color]== "invalid"%> <%=flash[:alert]%> <% else %> <%=flash[:notice]%> <% end %> <%= yield %> views/calenders/index.html.erb <%= form_for :calenders,:url => {:action => 'create'} do |f| %> Enter Your Date :<%= f.text_field :date_today,placeholder:"Please enter your date",:id => "popupDatepicker" %> <%= f.submit "Submit" %> <% end %> javascript/common.js $(function() { console.log('datepick'); $('#popupDatepicker').datepick(); }); Please help me to resolve this issue after checking the code.
type: Question

http://stackoverflow.com/comment/46604967
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29195949
has text: $cookieStore works. but according to the angular docs it is deprecated and $cookies should be used instead
score: 0

http://stackoverflow.com/a/29104328
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46472335
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29103809
has comment: http://stackoverflow.com/comment/46480938
has body: the echostatements in your php scripts are missing the final ;. This should be the problem that causes the internal server error. How to fix your implementation: You should write something like // using multiple echo statements echo "..... your string ... "; echo $p; echo "--- something else ----"; // or you can concatenate strings with . echo ".... your string ... " . $p . "---- something else ----"; Similar but safer and clearer PHP implementation: Printing out Javascript code via PHP could be error prone, therefore I would recommend to use output big parts of text outside PHP code, like this Some text where p = &lt;?php echo $p; ?&gt; is printed out. How to improve the Javascript part: Load all images at once This is not related on the specific question, but simplifies your solution. Regarding your own project (rotating images), as suggested in the comments there are many reusable javascript components you can use (firstly using some javascript libraries, e.g. jQuery). But if you want to develop this feature by yourself, keep in mind that changing the src attribute of an image tells the browser to download it from scratch, resulting in glitches. To solve this issue, you may insert many &lt;img&gt; elements and than display it one at the time (using css styling directives). Iterate over the images using one timed function Furthermore, you could simplify your javascript code: instead of using a different function to display each image you can use global variables (i.e. window.my_rotate_current_img_id) or better clojures to select and show the current image: // 1. Declare an array of img tags ID, identifying the different images // Note that we are using PHP to generate the array - the implode function // concatenates array items into a string separated by the first argument // given var images = [&lt;?php echo '"' . implode('","', $images) . '"'; ?&gt;]; // 2. Define a function that shows the correct image function hide_first_and_show_second(first, second){ ... } /…
has comment: http://stackoverflow.com/comment/46471906

http://stackoverflow.com/q/29103273
has comment: http://stackoverflow.com/comment/46437213
has comment: http://stackoverflow.com/comment/46436618
upvote count: 10
linked to: http://stackoverflow.com/q/536538
has answer: http://stackoverflow.com/a/29411290
score: 9
type: Question
has comment: http://stackoverflow.com/comment/46438537
has comment: http://stackoverflow.com/comment/46438460
linked to: http://stackoverflow.com/q/487073
tagged with: javascript
has answer: http://stackoverflow.com/a/39832640
tagged with: jquery
has answer: http://stackoverflow.com/a/29103444
has answer: http://stackoverflow.com/a/29103537
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/46438285
has comment: http://stackoverflow.com/comment/46436761
has comment: http://stackoverflow.com/comment/46437143
type: UnansweredQuestion
tagged with: iframe
linked to: http://stackoverflow.com/q/9439725
has body: If I have a site that holds an iframe: Is it then possible for the iframe to know if it can be "seen"? This for example by knowing the top position of the iframe related to the top of the screen. This is my test iframe: (all values are 0, no matter scroll pos of parent) I made an image to be more clear. I have to know from within the iframe if it's visible or not! So not from within the page that holds the iframe.
has title: How to know when an iframe comes into view?
downvote count: 1

http://stackoverflow.com/q/29086580
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/46407018
has comment: http://stackoverflow.com/comment/46406959
score: 2
has comment: http://stackoverflow.com/comment/46406844
tagged with: arrays
downvote count: 0
tagged with: javascript
type: Question
has title: How to exclude a specific id from an array?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29165510
has comment: http://stackoverflow.com/comment/46406198
tagged with: lodash
favorite count: 0
accepted answer: http://stackoverflow.com/a/29165510
upvote count: 2
has comment: http://stackoverflow.com/comment/46406498
has comment: http://stackoverflow.com/comment/46407068
has comment: http://stackoverflow.com/comment/46407721
has body: I have an array with sports names, with the option to check and uncheck them. The items with checked = false are being saved in a DB. By default all the items are in checked = true, BUT, I want to exclude one of the items in the array and put it to checked = false instead. at first, the array looks like this [ { "id": 26, "name": "LIVE Betting", "priority": 0 }, { "id": 8, "name": "NBA", "priority": 1 }, { "id": 24, "name": "College Basketball", "priority": 2 }, { "id": 42, "name": "Women College Basketball", "priority": 3 }, { "id": 9, "name": "NHL", "priority": 4 }, { "id": 6, "name": "MLB", "priority": 5 } ] and this is the function working over here _this.getSportChecked(customer).then(function(sportChecked) { var sportIds = _.pluck(sports, 'id'), intersectedSports = _.intersection(sportIds, sportChecked.sport); if (sports.length) { //HERE I NEED TO EXCLUDE THE ID 9 sports = _.map(sports, function(sport) { sport.checked = !_.includes(intersectedSports, sport.id); return sport; }); } }); which returns this objects { "id": 26, "name": "LIVE Betting", "priority": 0, "checked": true } { "id": 8, "name": "NBA", "priority": 1, "checked": true } { "id": 24, "name": "College Basketball", "priority": 2, "checked": true } { "id": 42, "name": "Women College Basketball", "priority": 3, "checked": true } { "id": 9, "name": "NHL", "priority": 4, "checked": true } { "id": 6, "name": "MLB", "priority": 5, "checked": true } so as you can see all those items are checked = true by default, but I want to set up the id = 9 to checked = false by default until the user switches it to true in case that he wants. What are your suggestions here? read the note in my code please, there is the part where I need to exclude it.
answer count: 1

http://stackoverflow.com/comment/46407175
score: 0
comment on: http://stackoverflow.com/q/29087007
type: Comment
type: QuestionComment
has text: Assign a `value` to the checkbox, of course.

http://stackoverflow.com/comment/46642111
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29216169
has text: Would you like the variable to constantly update (as the user is typing) or once they click outside the div?

http://stackoverflow.com/q/29153538
has answer: http://stackoverflow.com/a/29153624
answer count: 3
tagged with: meteor
accepted answer: http://stackoverflow.com/a/29155408
upvote count: 1
tagged with: spacebars
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29154225
type: Question
has title: Meteor Spacebars {{#if someCondition}} shows data briefly on page refresh
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29155408
favorite count: 0
has body: I have tried this a couple different ways and they both behave the same way (see below for code). I'm using a spacebars if condition (and tried using a helper as well) to check if the user is logged in, then display login/sign up links if they aren't. If they are, hide them. What I noticed is that on the initial page load (if they navigate back from a different site), the login/sign up links show quickly before hiding (if the user is still logged in). Is there a way to insure that no elements render in the view if the condition is false? It seems to me that it should check before the view starts rendering, then display the appropriate elements on the page. Thanks for the help! -Chris Solution to the flicker that I was experiencing: I was checking against the user, though the view was rendering quicker than the DB query. I added a guard expression (see below) and that seems to take care of the flicker. isUserLoggedOut: function() { var user = Meteor.user(); if(Meteor.user()) { return user && false; } else{ return user && true; } } Attempt #1: Template.headerTpl.helpers({ isUserLoggedIn: function() { var user = Meteor.user(); if(user) { return false; } else{ return true; } } }); {{#if isUserLoggedIn}} Sign Up Login {{/if}} Attempt #2: Template.headerTpl.helpers({ isUserLoggedIn: function() { var user = Meteor.user(); if(user) { return "hide"; } else{ return "show"; } } }); Sign Up Login Attempt #3: {{#if currentUser}} {{else}} Sign Up Login {{/if}} Attempt #4: {{#if isUserLoggedOut}} {{> signInLinksTpl}} {{/if}} Sign Up Login Template.headerTpl.helpers({ isUserLoggedOut: function() { if(Meteor.user()) { return false; } else{ return true; } } });
possible better answer: http://stackoverflow.com/a/29153624

http://stackoverflow.com/comment/46609535
has text: What about strict mode then, would it be optimisable there?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29198520
type: Comment

http://stackoverflow.com/a/29134718
has body: The reason why i.e. the block: script src="//code.jquery.com/jquery-1.10.2.js"> will work in the jQueryUI page is because they are referencing a local file for them (this file exists in their servers). When you try to use the date picker on your browser, you will have to reference jQuery from an external source (like googleapis or jquery.com). As CMadi says, putting http: in front of the // will work for you. Another solution would be to download all the .js and .css that you reference and put them next to the .html file that you have.
answers question: http://stackoverflow.com/q/29134536
type: Answer
score: 0

http://stackoverflow.com/comment/46610281
has text: @MingShun: I get the normal "404 Page Not Found" page.
score: 0
comment on: http://stackoverflow.com/q/29187574
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46534572
type: Comment
score: 0
has text: It worked, but now the droplist looks: "empty selected string" "content of states/states2" But I need that the first element was from the states array Or a custom string will work as well
type: AnswerComment
comment on: http://stackoverflow.com/a/29156992

http://stackoverflow.com/q/29156139
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46533036
duplicate of: http://stackoverflow.com/q/4869609
upvote count: 0
type: Question
linked to: http://stackoverflow.com/q/4869609
score: -2
tagged with: javascript
has body: would you please tell me what is the purpose of using $.Deferred() JQuery's Object with it's predefined methods, in functions with javascript. I've read the API but I didn't understand the goal exactly. Thank you
linked to: http://stackoverflow.com/q/748175
downvote count: 2
tagged with: jquery-callback
has answer: http://stackoverflow.com/a/29156219
answer count: 1
has title: Why we use Deferred() in javascript
tagged with: jquery

http://stackoverflow.com/comment/46607769
has text: just add a console.log('finally') inside finally, it will print.
comment on: http://stackoverflow.com/q/29197539
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29182802
type: Answer
has comment: http://stackoverflow.com/comment/46582355
has comment: http://stackoverflow.com/comment/46581887
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46582174
accepted answer of: http://stackoverflow.com/q/29181857
has comment: http://stackoverflow.com/comment/46582245
has comment: http://stackoverflow.com/comment/46581770
answers question: http://stackoverflow.com/q/29181857
has comment: http://stackoverflow.com/comment/46582056
has comment: http://stackoverflow.com/comment/46582203
type: AcceptedAnswer
downvote count: 0
has body: you could use Jquery.extend property, have a look at the plnkr code $scope.result=merge($scope.Marketing, $scope.Finance,$scope.Inventory); function merge(obj1,obj2, obj3){ return $.extend(true, obj1,obj2,obj3) } }; http://plnkr.co/edit/gKQ9bc?p=preview

http://stackoverflow.com/a/29127527
has body: I found an answer to my own question. With the hack fix in place, which was to set the display to inline-block after the toggle, I noticed it only had to apply once and after that slideToggle() would correctly go between display:none and display:inline-block. I think the problem was that my .hide() was setting my panels display to none before the css ever set them as inline-block, therefore slideToggle() didn't know what default display to use, and instead reverted to block. I fixed this by adding $('#collapsible-panels div.yanswer').css('display', 'inline-block'); before my .hide(). This ensures slideToggle() knows they are supposed to be inline-block.
answers question: http://stackoverflow.com/q/29126182
score: 0
type: Answer

http://stackoverflow.com/q/29192213
has answer: http://stackoverflow.com/a/29192273
has title: Get value of xsi:type with javascript
type: AnsweredQuestion
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/29192273
tagged with: soap
score: 0
answer count: 1
has body: I am working with AngularJS. Getting a response from SOAP. having problem reading the value of xsi:type [{"attributes":{"xsi:type":"TicketNote"}] How can i get the value of xsi:type using just Javascript or AngularJS.
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/46471220
type: QuestionComment
type: Comment
has text: Like you said, zoom is not possible while objects are being rendered... After layout stop calculated positions of nodes => nodes are not moving => zoom start works good
comment on: http://stackoverflow.com/q/29122193
score: 0

http://stackoverflow.com/comment/46440845
comment on: http://stackoverflow.com/a/29103593
score: 0
has text: How would I call this javaScript from my MongoDB Java Client.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46635717
score: 0
type: Comment
has text: not working means whats happening. is the function fireing. check with alert.
type: AnswerComment
comment on: http://stackoverflow.com/a/29196952

http://stackoverflow.com/q/29122157
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46470708
tagged with: angularjs-scope
score: 0
has body: I am quite new with angular, so I am not sure if what I want to do is actually achievable with angular or if it is better to use some other framework. This is my situation, we have a website made in wordpress, that contains a bit more than 500 pages, all of the pages are the same (exact same content). The main reason they builded this way is: availability to have custom "domain names", IE: www.page.com/mypage1 www.page.com/mypage2 www.page.com/mypage... there is one section on the page that contains an iframe, the iframe is the same on all pages except for a parameter so for instance the iframe of mypage1 has as an url: www.otherpage.com?client=client1Id So I have use angular before to do a very simple $routeProvider, so I am wondering if I can use the same concept but with some changes var sampleLandingPage = angular.module('sampleLandingPage', []); sampleLandingPage.controller('landingPage',['$scope', function ($scope){ $scope.pages = [ { "FullName": "Client No 1", "Name": "mypage1", "CM": null, "AF": "CLID001", "OtherURL": null }, { "FullName": "Client No 2", "Name": "mypage2", "CM": "CLID002", "AF": "CLID002", "OtherURL": null }, { "FullName": "Client Special", "Name": "mypage3", "CM": "CLID002", "AF": "CLID003", "OtherURL": "/somethingelse" } ]; }]); sampleLandingPage.config(['$routeProvider', function($routeProvider) { //$routeProvider. }]); so what I want to achieve is if the URL is requesting mypage2; to be able to display CM and AF in my page like {{ CM }} this way I can have only one page but on my iframe have the url like www.otherpage.com?client={{ CM }}&amp;otherparam={{ AF }} and have a unique page that looks like &lt;body ng-app="sampleLandingPage"&gt; &lt;div class="container"&gt; &lt;div ng-controller="landingPage"&gt; page text... ......... iframe ... url=www.otherpage.com?client={{ CM }}&amp;otherparam={{ AF }} &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; and finally if the OtherURL param is different to null, then display the actual URL define in this…
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46491650
has title: angularjs routeprovider variation

http://stackoverflow.com/q/29121876
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46481940
answer count: 1
has comment: http://stackoverflow.com/comment/46471085
has body: I have 2 buttons that are placed on top of each other on my website. One is opens up a model and the other is used to scroll to the top. I have one piece of code that does scroll to the top, fade in and fade out. However, both buttons seem to scroll to the top and I do not want this. I have tried removing fade in, fade out, hide and show sections. How can I edit this piece of code to allow only the back to top button to scroll to the top, and both buttons to fade out when at the top and fade back in when I'm scrolling through the page. $(document).ready(function(){ $(window).scroll(function () { if ($(this).scrollTop() &gt; 50) { $('#back-to-top').fadeIn(); $('#poll').fadeIn(); } else { $('#back-to-top').fadeOut(); $('#poll').fadeOut(); } }); // scroll body to 0px on click $('#back-to-top').click(function () { $('#back-to-top').tooltip('hide'); $('#poll').tooltip('hide'); $('body,html').animate({ scrollTop: 0 }, 800); return false; }); $('#back-to-top').tooltip('show'); $('#poll').tooltip('show'); });
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: How do I stop 2 buttons doing the same job? In this case, they both scroll to the top
tagged with: css
has answer: http://stackoverflow.com/a/29122123
has comment: http://stackoverflow.com/comment/46477923
has comment: http://stackoverflow.com/comment/46470434
type: Question
has comment: http://stackoverflow.com/comment/46476503
has comment: http://stackoverflow.com/comment/46470591
has comment: http://stackoverflow.com/comment/46470736

http://stackoverflow.com/comment/46382783
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29074352
type: Comment
has text: Don't use two stylesheets, stick to one (it will keep the resources count down when loading the site). What you could do, is on each page, add a class to the body tag that relates to the page. Then you can style eachelement within the body tag for each individual page.

http://stackoverflow.com/comment/46582174
has text: Using jquery extend you can add n number of arrays, more info at http://api.jquery.com/jquery.extend/
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29182802

http://stackoverflow.com/comment/46495337
type: QuestionComment
score: 1
has text: "I talked myself into a headache trying to comment it plainly." That is already a strong indication that the other version is better.
comment on: http://stackoverflow.com/q/29134955
type: Comment

http://stackoverflow.com/a/29102687
score: 4
type: Answer
upvote count: 4
has body: You have to initialize each row of the two-dimensional array. Your declaration: var z = [[]]; only creates row 0. So: for(var i =0; i&lt;49;i++){ z[i] = []; // &lt;===== initialize the row for(var j=0; j&lt;9;j++){ z[i][j] = y[counter]; counter +=1; } }
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29102655
answers question: http://stackoverflow.com/q/29102655
type: AcceptedAnswer

http://stackoverflow.com/comment/46441211
comment on: http://stackoverflow.com/a/29099491
score: 0
type: AnswerComment
has text: Are you successfully getting the proper match from your matchedPairingIds? How do you know the promises are identical? Where are you declaring `var matched = new Parse.Object`? I'm having a hard time diagnosing your problem.
type: Comment

http://stackoverflow.com/comment/46445458
has text: Nice. Better than an image.
comment on: http://stackoverflow.com/a/29107936
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/29166151
has answer: http://stackoverflow.com/a/29166792
has title: How do I make an Angular JS controller work alongside a directive?
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29166244
tagged with: controllers
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
type: Question
has body: I'm learning Angular JS. I've written (OK, found and reused) two basic functions: controller: a basic show/hide toggle directive: a 'back to top link' which appears when you scroll 100 pixels The snippets both work individually. For some reason, when I try to combine them into one module called 'scrollApp' one of them stops working. html: Back to top Toggle this is the content to hide JS: app.directive("scroll", function ($window) { return function(scope, element, attrs) { angular.element($window).bind("scroll", function() { if (this.pageYOffset >= 100) { scope.boolChangeClass = true; } else { scope.boolChangeClass = false; } scope.$apply(); }); }; }); I've been learning Angular code from tutorials but now I'm trying to write up SPAs with multiple functions. Any advice would be welcome. Thanks! Codepen version: http://codepen.io/angeltapes/pen/embGJw/
score: 1

http://stackoverflow.com/q/29215982
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46641549
has comment: http://stackoverflow.com/comment/46641387
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
has body: I want to create a dummy data using json which can give the output like image below. So, I started the code with json data like this { "Test": [ { "id": "1", "title": "Title 1" }, { "id": "2", "title": "Title 2" }, { "id": "3", "title": "Title 3" }, { "id": "4", "title": "Title 4" } ], "Test2": [ { "id": "5", "title": "Title 5" }, { "id": "6", "title": "Title 6" }, { "id": "7", "title": "Title 7" }, { "id": "8", "title": "Title 8" } ] } This is the ajax process that I'm trying to do and I stuck to implement the code inside.
has title: Json - how to create ajax process to loop through nested array by topic to subtopic

http://stackoverflow.com/a/29084284
has body: var str = 'abc xyz() ab{( }) pp ' var result = str.split(/(?:\(\)|\{\()/); alert(JSON.stringify(result)); Something like: str.split(/(?:\(\)|\{\()/) You use | to specify either match () OR {(. The ?: makes it non-capturing.
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46402209
accepted answer of: http://stackoverflow.com/q/29084231
answers question: http://stackoverflow.com/q/29084231
score: 0

mongodb
tags question: http://stackoverflow.com/q/29103285
tags question: http://stackoverflow.com/q/29217323
tags question: http://stackoverflow.com/q/29083372
tags question: http://stackoverflow.com/q/29085377
tags question: http://stackoverflow.com/q/29073095
tags question: http://stackoverflow.com/q/29064741
tag name: mongodb
tags question: http://stackoverflow.com/q/29113210
tags question: http://stackoverflow.com/q/29115811
tags question: http://stackoverflow.com/q/29162901
tags question: http://stackoverflow.com/q/29154616
tags question: http://stackoverflow.com/q/29098830
tags question: http://stackoverflow.com/q/29087045
tags question: http://stackoverflow.com/q/29066011
type: Tag
tags question: http://stackoverflow.com/q/29173757
tags question: http://stackoverflow.com/q/29139408
tags question: http://stackoverflow.com/q/29172041
tags question: http://stackoverflow.com/q/29092265
tags question: http://stackoverflow.com/q/29111401
tags question: http://stackoverflow.com/q/29212938
tags question: http://stackoverflow.com/q/29142359
tags question: http://stackoverflow.com/q/29212037
tags question: http://stackoverflow.com/q/29122673
tags question: http://stackoverflow.com/q/29155398
tags question: http://stackoverflow.com/q/29198933
tags question: http://stackoverflow.com/q/29104207
tags question: http://stackoverflow.com/q/29063666
tags question: http://stackoverflow.com/q/29124902
tags question: http://stackoverflow.com/q/29100915
tags question: http://stackoverflow.com/q/29155681
tags question: http://stackoverflow.com/q/29154067
tags question: http://stackoverflow.com/q/29118835
tags question: http://stackoverflow.com/q/29076457
tags question: http://stackoverflow.com/q/29103203
tags question: http://stackoverflow.com/q/29166308
tags question: http://stackoverflow.com/q/29216433

http://stackoverflow.com/q/29164738
has answer: http://stackoverflow.com/a/29164813
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: jQuery Drop Down Menu Image Change
accepted answer: http://stackoverflow.com/a/29164813
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I have been given a drop down menu to alter. I have been given this in the html portion: Configure Your GT Super Sportscar Choose a Colour Black Blue Red Silver White And I have been given 5 different pictures of a car in different colors: • images/black.jpg • images/blue.jpg • images/red.jpg • images/silver.jpg • images/white.jpg When I click on the option red in the dropdown menu the picture or color of the car needs to change and I have no idea how to do it. Please Help.
type: Question

http://stackoverflow.com/q/29170799
has answer: http://stackoverflow.com/a/45924111
has comment: http://stackoverflow.com/comment/46560245
has answer: http://stackoverflow.com/a/55162828
type: Question
has answer: http://stackoverflow.com/a/38326418
has comment: http://stackoverflow.com/comment/46560312
has answer: http://stackoverflow.com/a/40821101
accepted answer: http://stackoverflow.com/a/29172435
has answer: http://stackoverflow.com/a/42681394
possible better answer: http://stackoverflow.com/a/37767156
has comment: http://stackoverflow.com/comment/46560110
tagged with: javascript
has body: I have all necessary files in my code and I am still getting this error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher This is my code: Anyone got this error before? I could try and download a local copy instead of using the CDN link but it's really unnecessary, plus i want to know why this isn't working! EDIT: I've tried many different libraries, the one I posted is the last one I've tried
has answer: http://stackoverflow.com/a/45247975
has answer: http://stackoverflow.com/a/37767156
upvote count: 66
has comment: http://stackoverflow.com/comment/46559990
has answer: http://stackoverflow.com/a/51188592
has comment: http://stackoverflow.com/comment/46560164
downvote count: 0
has comment: http://stackoverflow.com/comment/46560055
has comment: http://stackoverflow.com/comment/46562941
tagged with: jquery
score: 66
has comment: http://stackoverflow.com/comment/46559891
has answer: http://stackoverflow.com/a/68001766
favorite count: 0
has answer: http://stackoverflow.com/a/38346624
has title: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher
has answer: http://stackoverflow.com/a/29941494
has comment: http://stackoverflow.com/comment/46559853
has comment: http://stackoverflow.com/comment/46559895
has answer: http://stackoverflow.com/a/29172435
has comment: http://stackoverflow.com/comment/46559949
answer count: 15
has comment: http://stackoverflow.com/comment/67854483
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/37635003
has answer: http://stackoverflow.com/a/43248651
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/38466265

http://stackoverflow.com/comment/46517242
type: Comment
type: QuestionComment
has text: Will dist and demo have the same contents always? Can't one of them be a symlink? If not, you'll need to use a build system as @PatrickJ.S. recommended.
comment on: http://stackoverflow.com/q/29113899
score: 0

http://stackoverflow.com/comment/46405579
comment on: http://stackoverflow.com/a/29086315
has text: I tried using parent.location.hash but I received error. Will I get error if I use top.location? I don"t think there is any difference.
score: 0
type: AnswerComment
type: Comment

api
tags question: http://stackoverflow.com/q/29137521
tags question: http://stackoverflow.com/q/29179662
tags question: http://stackoverflow.com/q/29087685
tags question: http://stackoverflow.com/q/29207796
tags question: http://stackoverflow.com/q/29211731
type: Tag
tags question: http://stackoverflow.com/q/29080540
tags question: http://stackoverflow.com/q/29108151
tag name: api
tags question: http://stackoverflow.com/q/29155678
tags question: http://stackoverflow.com/q/29109880
tags question: http://stackoverflow.com/q/29211232
tags question: http://stackoverflow.com/q/29128876
tags question: http://stackoverflow.com/q/29078952
tags question: http://stackoverflow.com/q/29173144
tags question: http://stackoverflow.com/q/29095563

http://stackoverflow.com/a/29093520
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29093439
has body: All JSHint is telling you that you should not put function definition statements directly inside if/else/when/for blocks. It won't complain if you do this, and you will get exactly the same functionality: $('#project-container').html(response).imagesLoaded().then(function() { // Make the max-height of the container exact for a smoother transition function matchContainerHeight() { var containerHeight = $('#project-container').outerHeight(); $('#project-wrapper.activated').css('max-height', containerHeight); } resize(); // If the user has scrolled... if ($(window).scrollTop() !== 0) { // First scroll the page to the top $('html, body').animate({ scrollTop : 0 }, 400, function() { setTimeout(matchContainerHeight, 100); $(window).on('resize', matchContainerHeight); }); } else { // If the user has not scrolled... setTimeout(matchContainerHeight, 100); $(window).on('resize', matchContainerHeight); } }); matchContainerHeight doesn't depend on any of the variables in its enclosing scope, and to make matters worse, you're defining it identically twice. You could move it out of your AJAX callback completely and you would be just fine: // Make the max-height of the container exact for a smoother transition function matchContainerHeight() { var containerHeight = $('#project-container').outerHeight(); $('#project-wrapper.activated').css('max-height', containerHeight); } function scheduleMatchContainerHeight() { setTimeout(matchContainerHeight, 100); $(window).on('resize', matchContainerHeight); } function openProject() { var post_id = $(this).data('id'), // data-id attribute for .post-link ajaxURL = site.ajaxURL; // Ajax URL localized from functions.php $.ajax({ type: 'POST', url: ajaxURL, data: {'action': 'load-content', post_id: post_id }, success: function(response) { $('#project-container').html(response).imagesLoaded().then(function() { resize(); // If the user has scrolled... if ($(window).scrollTop() !== 0) { // First scroll the page to the top $('html, body').animate({ s…

http://stackoverflow.com/q/29065938
tagged with: javascript
has comment: http://stackoverflow.com/comment/46368218
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/29066334
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46367635
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/9566753
has title: Where do I put this line of JS for my Google map?
has body: I'm using the following code to create an embedded Google map on my webpage: function init() { var mapOptions = { // Set up the map options center: new google.maps.LatLng(40.782710,-73.965310), mapTypeId: google.maps.MapTypeId.ROADMAP, zoom: 13 }; var venueMap; // Map() draws a map venueMap = new google.maps.Map(document.getElementById('map'), mapOptions); } function loadScript() { var script = document.createElement('script'); // Create Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
has comment: http://stackoverflow.com/comment/46367835
tagged with: google-maps
answer count: 1

http://stackoverflow.com/q/29070839
answer count: 1
has body: My Webapplication is VB.NET MVC.It is currently running fine in IE8.Now we are going to migrate to IE10.While viewing the Web application from IE10,lots of bugs were found.Our clients do not wants to view the site in compatability mode by selecting the option in IE 11. Tools ---&gt;Campatability view settings Can any one suggest any code by which we can force the application to run in IE8 comapatability mode.
has title: Force the Web application to run in IE8 compatability mode
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29071161
tagged with: css
tagged with: vb.net
type: Question
tagged with: internet-explorer-8
tagged with: javascript
linked to: http://stackoverflow.com/q/3449286
score: 0

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/29200954
tags question: http://stackoverflow.com/q/29078412
tags question: http://stackoverflow.com/q/29148487
tags question: http://stackoverflow.com/q/29134800
tags question: http://stackoverflow.com/q/29124217
tags question: http://stackoverflow.com/q/29187461
tags question: http://stackoverflow.com/q/29208315
tags question: http://stackoverflow.com/q/29213237
tags question: http://stackoverflow.com/q/29211352
tags question: http://stackoverflow.com/q/29089169
tags question: http://stackoverflow.com/q/29191121
tags question: http://stackoverflow.com/q/29176890
tags question: http://stackoverflow.com/q/29131519
tags question: http://stackoverflow.com/q/29108858
tags question: http://stackoverflow.com/q/29074207
tags question: http://stackoverflow.com/q/29147636
type: Tag
tags question: http://stackoverflow.com/q/29139388
tags question: http://stackoverflow.com/q/29172655
tags question: http://stackoverflow.com/q/29072382
tags question: http://stackoverflow.com/q/29158394
tags question: http://stackoverflow.com/q/29149409
tags question: http://stackoverflow.com/q/29114451

cordova
tags question: http://stackoverflow.com/q/29065176
tags question: http://stackoverflow.com/q/29192278
tags question: http://stackoverflow.com/q/29145465
tags question: http://stackoverflow.com/q/29157863
tags question: http://stackoverflow.com/q/29140253
tags question: http://stackoverflow.com/q/29181809
tags question: http://stackoverflow.com/q/29079686
tags question: http://stackoverflow.com/q/29216001
tags question: http://stackoverflow.com/q/29157626
tags question: http://stackoverflow.com/q/29155893
tags question: http://stackoverflow.com/q/29151943
tags question: http://stackoverflow.com/q/29194831
tags question: http://stackoverflow.com/q/29090618
tags question: http://stackoverflow.com/q/29208255
tags question: http://stackoverflow.com/q/29065065
tags question: http://stackoverflow.com/q/29207831
tags question: http://stackoverflow.com/q/29188336
tags question: http://stackoverflow.com/q/29068436
tags question: http://stackoverflow.com/q/29177822
tags question: http://stackoverflow.com/q/29186232
tags question: http://stackoverflow.com/q/29133347
tags question: http://stackoverflow.com/q/29139936
tags question: http://stackoverflow.com/q/29168539
tags question: http://stackoverflow.com/q/29149524
tags question: http://stackoverflow.com/q/29084781
tags question: http://stackoverflow.com/q/29068134
tags question: http://stackoverflow.com/q/29114588
tag name: cordova
tags question: http://stackoverflow.com/q/29129961
tags question: http://stackoverflow.com/q/29149766
tags question: http://stackoverflow.com/q/29111479
tags question: http://stackoverflow.com/q/29083065
tags question: http://stackoverflow.com/q/29186422
tags question: http://stackoverflow.com/q/29121013
tags question: http://stackoverflow.com/q/29181358
tags question: http://stackoverflow.com/q/29105213
tags question: http://stackoverflow.com/q/29131250
tags question: http://stackoverflow.com/q/29127168
tags question: http://stackoverflow.com/q/29209511
tags question: http://stackoverflow.com/q/29111840
tags question: http://stackoverflow.com/q/29092286
tags question: http://stackoverflow.com/q/29076847
tags question: http://stackoverflow.com/q/29192327
tags question: http://stackoverflow.com/q/29167037
tags question: http://stackoverflow.com/q/29114798
tags question: http://stackoverflow.com/q/29210349
tags question: http://stackoverflow.com/q/29158791
tags question: http://stackoverflow.com/q/29153528
tags question: http://stackoverflow.com/q/29183693
tags question: http://stackoverflow.com/q/29081938
tags question: http://stackoverflow.com/q/29208290
type: Tag
tags question: http://stackoverflow.com/q/29075515

http://stackoverflow.com/a/29112905
has comment: http://stackoverflow.com/comment/46511182
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29112838
type: Answer
accepted answer of: http://stackoverflow.com/q/29112838
has body: your html structure is not the same as the example you posted. just change: $('#button_group_1 button').removeClass('active'); to this: $('.btn-group button').removeClass('active'); and the same for addClass...
score: 1
upvote count: 1

http://stackoverflow.com/q/29123593
favorite count: 0
has comment: http://stackoverflow.com/comment/46473414
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/29123819
accepted answer: http://stackoverflow.com/a/29123819
has comment: http://stackoverflow.com/comment/46473726
type: Question
score: -2
tagged with: javascript
downvote count: 2
has comment: http://stackoverflow.com/comment/46473510
answer count: 1
has title: Inserting HTML in a tooltip Javascript
has body: can someone kindly explain to me how I can insert an HTML table in a tooltip using plain javascript and no plugins please? function addingToolTip(element, number) { var tip = $("#tip").hide(); // $("#tip").html("testing"); var tipText = ""; var over = false; if(number == 1) addTipMouseOver(element.node, "NUMBER"); else if(number == 2) addTipMouseOver(element.node, "NUMBER"); else if(number == 3) addTipMouseOver(element.node, "NUMBER"); else if(number == 4) addTipMouseOver(element.node, "NUMBER"); else if(number == 5) addTipMouseOver(element.node, "NUMBER"); else if(number == 6) { tip = $("#tip").hide(); var html = " Testing123 "; addTipOnClick(element.node, html); } $(document).mousemove(function(e){ if (over){ tip.css("left", e.clientX+20).css("top", e.clientY+20); tip.text(tipText); } }); function addTipMouseOver(node, txt){ $(node).mouseenter(function(){ tipText = txt; tip.fadeIn(); over = true; }).mouseleave(function(){ tip.fadeOut(200); over = false; }); } function addTipOnClick(node, txt){ $(node).mousedown(function(){ tipText = txt; tip.fadeIn(); over = true; }).mouseup(function(){ tip.fadeOut(200); over = false; }); } } This is currently what I have tried so far. I know how to insert normal text. However, now I need to insert an HTML table instead of normal text. I also am using RAPHAEL JS so I have an image object. When it is click the tooltip with HTML table should pop up.

http://stackoverflow.com/a/29079183
has body: The function you're passing into .scrape has an enduring reference to the i variable, not a copy of it as of when the function was created. So it uses the value of i as of when the function runs, which is (presumably) later after the loop has finished, when i's value has changed. In this case, I'd probably use a builder function to build the callback so the callback closes over something that doesn't change: var newsUpdates = {}; var siteDatabase = [ "http://example.to" ]; var scraperjs = require('scraperjs'); for (var i = 0; i &lt; siteDatabase.length; i++) { news[siteDatabase[i]] = []; scraperjs.StaticScraper.create(siteDatabase[i]) .scrape(function($) { return $(".lang_English").map(function() { return $(this).children('td').eq(1).children( 'a').last().text(); }).get(); }, buildCallback(i)) } function buildCallback(index) { return function(news) { for (var x = 0; x &lt; news.length; x++) { if (news[x] == '') { news.splice(x, 1); } } for (var x = 0; x &lt; news.length; x++) { newsUpdates[siteDatabase[inindex]].push({ "title": news[x] }); } console.log(newsUpdates); }; } There, the function we return out of buildCallback closes over the index argument, whose value never changes. Then we pass i into it so build our callback.
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/29079104
answers question: http://stackoverflow.com/q/29079104
has comment: http://stackoverflow.com/comment/46395743
type: Answer
has comment: http://stackoverflow.com/comment/46392248
has comment: http://stackoverflow.com/comment/46395716
upvote count: 4

http://stackoverflow.com/a/32846630
score: 0
has body: A simple implementation to handle setting both the id and name selection from an autocomplete widget is by using a text field (name) and hidden field (id) to bind to both properties. When selecting the autocomplete option, use the select handler to assign both fields. You can find more information here: http://www.ozkary.com/2015/09/angularjs-autocomplete-directive-with.html
type: Answer
answers question: http://stackoverflow.com/q/29066045

http://stackoverflow.com/q/29126754
type: Question
has comment: http://stackoverflow.com/comment/46479801
has body: how can i set scroll range limit in jquery? for example i wanna set horizontally scroll limit for my body jQuery(function($){ var body_width = $("body").width(); $("body").scrollLeft(body_width); });
tagged with: javascript
has title: jquery set scroll range limit
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
answer count: 0
upvote count: 1

http://stackoverflow.com/q/29088290
has comment: http://stackoverflow.com/comment/46409494
has title: jQuery hide buttons if they don't contain text
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46409504
has comment: http://stackoverflow.com/comment/46409519
has comment: http://stackoverflow.com/comment/46409477
has comment: http://stackoverflow.com/comment/46409625
type: Question
has body: I have some buttons with dynamically generated text inside. However sometimes there will be no text generated so I want to hide the button with jQuery. However I cannot seem to get it to work. Below is my code: $('.inner:empty').parent().remove(); {{dynamic1}} {{dynamic2}} {{dynamic3}} {{dynamic4}} Thanks.
has comment: http://stackoverflow.com/comment/46409843
has comment: http://stackoverflow.com/comment/46409409
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29088354

http://stackoverflow.com/comment/46790167
type: Comment
has text: And the link to the API is broken on that page, here's the actual link: http://api.highcharts.com/highstock#plotOptions.series.dataGrouping
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29217805

http://stackoverflow.com/q/29104571
tagged with: monaca
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: ons-buttons stay grey(pressed) after clicking on it
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46439203
downvote count: 0
has comment: http://stackoverflow.com/comment/46455231
score: 1
has body: I'm actually developping an application and i want to edit/save an item. The problem is that ons-buttons stay greyed(pressed) after clicking on it. Anyone have an idea ? I'm developping on Monaca with Onsen-ui and angularjs. Here is an example: Editer Cancel OK
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/46463784
tagged with: javascript
tagged with: onsen-ui

http://stackoverflow.com/q/29169112
type: UnansweredQuestion
tagged with: module
tagged with: node.js
has comment: http://stackoverflow.com/comment/46557913
tagged with: arduino
has title: How can I install IRremote library for Node.js?
has comment: http://stackoverflow.com/comment/46557629
type: Question
has body: I want to control an IR Led hooked up to an Arduino, with an app on the computer. So I went to download the IRremote library that comes with a Node.js module (https://github.com/AnthonyMyatt/IRremote) The problem is that when I dropped the files (as stated in other posts on how to install a module for Node.js manually), and I call the 'require' function, I get an error when running the program. Debugger listening to port 5858 module.js:355 Module._extensions[extension](this,filename); ^ Error: no errorc:\users\hp\node_modules\irlib\build\Release\IRremote.node at Error (native) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.&lt;anonymous&gt; (c:\users\hp\documents\visual studio 2013\Projects\Leap motion_Arduino Test\Leap motion_Arduino Test\server.js:1:72 at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) Press any key to continue... The first lines of my server.js are: var IR = require("irlib"); var webSocket = require('ws'), Where irlib is the folder name I gave to the one containing the module. I seriously have no idea, but I suspect there is something wrong with the library (file structure isn't exactly the same as, for instance, johnny-five or ws). Can someone tell me how can I install this IRremote library in Node.js? I'm a student and I like doing things with Arduino as a hobby. I've been doing this for about a year, but i'm still a newbie. I recently started out with Node.js, because I wanted to make a project which involved communication between the Arduino and the computer.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46556822
has comment: http://stackoverflow.com/comment/46557486
has comment: http://stackoverflow.com/comment/46556698
answer count: 0

jquery-countdown
tag name: jquery-countdown
type: Tag
tags question: http://stackoverflow.com/q/29202877

http://stackoverflow.com/comment/46363680
type: Comment
has text: possible duplicate of [How to execute a JavaScript function when I have its name as a string](http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string)
type: QuestionComment
comment on: http://stackoverflow.com/q/29063688
score: 0

http://stackoverflow.com/a/29213636
score: 0
has body: For a lucky numbers function you need to check for duplicates function showFortune() { var quotes = ["The road to riches is paved with homework.", "Ignore your previous fortune.", "Avoid taking unnecessary gambles.", "You love peace.", "A friend asks only for your time and not your money."]; var numbers = []; var counter = 0; do { var num = Math.floor(Math.random() * 60 + 1); if (numbers.indexOf(num) == -1) // if the array doesn't already contain number { // add the unique number to the array numbers.push(num); counter++; } } while (counter &lt; 6); var output = ""; // Build html string from numbers for(var i = 0; i &lt; numbers.length; i++) { output += "&lt;span&gt;" + numbers[i] + "&lt;/span&gt;" } var rand_int = Math.floor(Math.random() * 5); // Show the quote &amp; number document.getElementById("fortuneArea").innerHTML = (quotes[rand_int] + "&lt;br /&gt;" + "Lucky numbers:" + output); } with your spacing set in your CSS span { padding-left: 10px; paddding-right: 10px; } This will help browsers to display it properly. array.indexOf is not supported in IE 8 and below BTW
answers question: http://stackoverflow.com/q/29213323
type: Answer

http://stackoverflow.com/q/29065752
has answer: http://stackoverflow.com/a/29065786
favorite count: 0
has title: Adding onclick Functions to Dynamic HTML Links
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29065923
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46367235
type: Question
has comment: http://stackoverflow.com/comment/46367479
has comment: http://stackoverflow.com/comment/46367370
has comment: http://stackoverflow.com/comment/46367210
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29066109
has comment: http://stackoverflow.com/comment/46367233
has comment: http://stackoverflow.com/comment/46367376
has comment: http://stackoverflow.com/comment/46367271
answer count: 3
has body: I have a program that dynamically adds links to a table. Each link is unique and is used to display an iframe when selected: function buildIframeLink(url){ var link = document.createElement('a'); link.setAttribute('href', '#'); link.setAttribute('onclick', 'displayIframe("' + url + '")'); link.className = 'iframeLink'; link.innerHTML = 'Open'; } Once the link is built I pass it to a different function: function displayIframe(url){ //creates iframe based on the URL An entire anchor tag is created like so: Open However when each link is clicked a Reference Error is returned: ReferenceError: displayIframe is not defined My function is surely defined; I've read this is an issue with dynamically created HTML content - is there a pure javascript solution to resolve this? Note * Using link.onclick = displayIframe(url) launches the function immediately which is not suitable for my application
has comment: http://stackoverflow.com/comment/46367159

http://stackoverflow.com/comment/46632637
type: QuestionComment
comment on: http://stackoverflow.com/q/29210218
score: 0
has text: You can if you round it to one decimal.
type: Comment

http://stackoverflow.com/q/29162804
has comment: http://stackoverflow.com/comment/46545241
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/29162839
linked to: http://stackoverflow.com/q/26293769
linked to: http://stackoverflow.com/q/596467
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/596467
possible better answer: http://stackoverflow.com/a/29162886
favorite count: 0
has answer: http://stackoverflow.com/a/29162886
tagged with: angularjs
type: Question
has title: How to convert double into int in angular js?
answer count: 2
downvote count: 2
accepted answer: http://stackoverflow.com/a/29162839
has comment: http://stackoverflow.com/comment/55896544
upvote count: 3
has body: I have following code snippet : &lt;span ng-if="document.size&lt;500" &gt; 0 &lt;/span&gt; &lt;span ng-if="document.size &gt;=500 &amp;&amp; document.size &lt; 1048576" &gt; {{document.size/1024}} &lt;/span&gt; &lt;span ng-if="document.size &gt;=1048576" &gt; {{document.size/1048576}} &lt;/span&gt; i got document size in byte and then i convert it into KB and MB. but it gives value in double. how can i convert it into int in angular js? can i convert it in int expression directly? Thanks in advance

http://stackoverflow.com/comment/46579026
comment on: http://stackoverflow.com/q/29181253
has text: My guess, is that raf works similar to setTimeout, so it places function call in event loop.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29094935
accepted answer of: http://stackoverflow.com/q/29094703
has comment: http://stackoverflow.com/comment/46428188
score: 0
type: AcceptedAnswer
type: Answer
has body: To control this kind of resize events use @media CSS rule @media only screen and (min-width: 700px) { // CSS style for +700px } @media only screen and (max-width: 700px) { // CSS style for -700px } This will avoid you problems with resize both from smaller to bigger and opposite.
has comment: http://stackoverflow.com/comment/46429267
answers question: http://stackoverflow.com/q/29094703

http://stackoverflow.com/comment/46519145
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29148420
has text: Good to know. But sometimes I have no control over the snippets. For instance, let's say I am just trying to understand how a stie's javascript works, to do that, I have to insert some break points, but of course I can't edit the source.
type: AnswerComment

http://stackoverflow.com/comment/46479104
has text: @Mike The use case is that this UL is rendered from an ASP.net back end that I don't have access to override, so by inserting the js on the master page, I can identify specific links and add css - what I'm not showing is that the CSS adds an icon to a jQuery mobile menu. The only unique identifier of each li a is it's text, so it's what I'm using to access the item to add the class
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29125723
score: 0

http://stackoverflow.com/a/29142428
has body: Change $args = array( 'p' =&gt; $_POST['post_id'], 'post_type' =&gt; 'projects' ); To $args = array( 'p' =&gt; $_GET['post_id'], 'post_type' =&gt; 'projects' ); as your ajax is GET and not POST anymore!
accepted answer of: http://stackoverflow.com/q/29142030
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29142030
score: 0
type: Answer

http://stackoverflow.com/comment/46520152
has text: Yea, was thinking of that. Thank you for your help.
type: Comment
comment on: http://stackoverflow.com/a/29147131
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46513936
score: 0
type: Comment
type: QuestionComment
has text: @G-Host, this seems to work, but only if the element has height > 0
comment on: http://stackoverflow.com/q/29145548

http://stackoverflow.com/a/29198386
has comment: http://stackoverflow.com/comment/46609459
answers question: http://stackoverflow.com/q/29198258
score: 0
has body: Since on an input a name is somehow required (I don't know what the documentation says about this, but if you want to retrieve it later, for example in PHP, you should put a name attribute on it), I think that referencing your element by its name it safer. As you can see here : http://www.javascript-coder.com/javascript-form/javascript-get-all-form-objects.phtml , native API use the name to reference a form element.
type: Answer

http://stackoverflow.com/a/29080570
answers question: http://stackoverflow.com/q/29079749
score: 0
has body: In addition to Marc B's comment, you could also set default values in the database for the fields that would have normally been set differently utilizing the checkboxes.
type: Answer

http://stackoverflow.com/a/29201559
type: Answer
has body: Blex's answer is fine, but it is only of a certain scope. The issue is revolves around how closures work, and how ephemeral data can be lost. The best/most useful solution is to create object closures like this fully. Something like the following: function createObjectClosure(item){ return { handler: function(direction) { $("#menu-item-" + item).toggleClass("red-bg", direction == "down"); }, offset:0 } } for(var i=0; i&lt;contentArray.length; i++){ $(contentArray[i]).waypoint(createObjectClosure(tabArray[i])); } Or (pretty much the same code... many people like this kind of inline function, but I think it is harder for people to follow): for (var i = 0; i &lt; contentArray.length; i++) { $(contentArray[i]).waypoint( function(item) { return { handler: function(direction) { $("#menu-item-" + item).toggleClass("red-bg", direction == "down"); }, offset: 0 } }(tabArray[i]) ) }
score: 3
has comment: http://stackoverflow.com/comment/46615195
upvote count: 3
has comment: http://stackoverflow.com/comment/46615060
answers question: http://stackoverflow.com/q/29201222
has comment: http://stackoverflow.com/comment/46615560
downvote count: 0

http://stackoverflow.com/q/29107407
answer count: 2
possible better answer: http://stackoverflow.com/a/64175850
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am using Video.js for a customized video player and by default it shows the captions when video starts playing. How can I have the closed captions disabled on start/autoplay? var myPlayer = _V_("myPlayer"); var videoPlaying = true; // video captions button var myCaption = myPlayer.controlBar.addChild("button"); // Styling to empty button $(".vjs-control-text").empty(); // Add class to captions myCaption.addClass("vjs-captions-icon"); myCaption.addClass("vjs-captions-icon-on"); // Adding functionality to captions button $(".vjs-captions-icon").on('touchstart', function() { $('div.vjs-captions.vjs-text-track').toggle(); $('.vjs-control-bar .vjs-captions-icon').toggleClass('vjs-captions-icon-on').toggleClass('vjs-captions-icon-off'); }); .vjs-captions-icon-on { background: url(../img/caption_button.png); background-size: 100% 100%; } .vjs-captions-icon-off { background: url(../img/caption_button_off.png); background-size: 100% 100%; } &lt;video id="myPlayer" class="video-js vjs-sublime-skin" width="1024px" height="768px" controls autoplay preload data-setup='{"nativeControlsForTouch": false}'&gt; &lt;source src="../video/brandt.mp4" type='video/mp4' /&gt; &lt;track class="caption" kind="captions" src="../video/brandt.vtt" type="text/plain" srclang="en" label="English" default/&gt; &lt;/video&gt;
favorite count: 0
has title: How not to display the captions when video starts playing using videojs?
has answer: http://stackoverflow.com/a/64175850
tagged with: video.js
accepted answer: http://stackoverflow.com/a/37245985
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/37245985
upvote count: 3
type: Question

http://stackoverflow.com/a/29176425
has comment: http://stackoverflow.com/comment/46570625
type: Answer
accepted answer of: http://stackoverflow.com/q/29174061
has comment: http://stackoverflow.com/comment/46583919
score: 1
answers question: http://stackoverflow.com/q/29174061
has comment: http://stackoverflow.com/comment/46570576
has comment: http://stackoverflow.com/comment/46570676
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Most likely its not possible but you can try a voronoi diagram which is very close to a hexagon:Spherical Voronoi Tessellation with Java 7: need fix for winding vertices around faces.
has comment: http://stackoverflow.com/comment/46645244

http://stackoverflow.com/q/29155753
tagged with: javascript
has body: Honestly, I'm not sure what the real problem is, how-ever it's only calling the update function once... I'm used to multi threading and I've hardly done any programming with JS. So if anyone can help me, I would be very grateful. I believe it has to do with the setTimeout function however I'm not sure.. Here is my source: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29155822
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has title: Source code not fully executing. (JS)
has answer: http://stackoverflow.com/a/29155822
downvote count: 0

http://stackoverflow.com/q/29101374
tagged with: javascript
score: 0
has body: I've been using something like this /(\w[.]\w)+/ig Which isn't quite doing what I need to. I'm trying to match to any period with a digit before AND after, no matter the length. Must match at least once. Is there a way to do this in one line? Thank you all Full answer: /^\d+(?:\.\d+)+$/gm Thanks everyone! You're all wizards.
has answer: http://stackoverflow.com/a/29101415
tagged with: regex
accepted answer: http://stackoverflow.com/a/29101410
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29101415
has answer: http://stackoverflow.com/a/29101410
has title: Regex for all section headers (2.0, 2.1.2, 2.3.1.5, etc)
type: Question
answer count: 2

http://stackoverflow.com/comment/46596323
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29191121
has text: Is this supposed to be happening on page load? If so, wrap your code in `$(function () { ... });`. You'd also have to take your `if (this.checked)` function out of your input change scope.

http://stackoverflow.com/q/29124370
score: -3
has comment: http://stackoverflow.com/comment/46474906
has title: Javascript error in accessing JSON
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46474994
downvote count: 3
has answer: http://stackoverflow.com/a/29124815
type: Question
has comment: http://stackoverflow.com/comment/46475070
has body: In the following JSON how to access id and name console.log($scope.mylist) {"data":"{\"projects\":[{\"id\":\"3\",\"title\":\"MYCLOUD\",\"desc\":\"DESC\"}]}"} I tried the following console.log($scope.mylist.data) //undefined console.log($scope.mylist["data"])//undefined console.log($scope.mylist.projects)//undefined console.log($scope.mylist["projects"]) //undefined
accepted answer: http://stackoverflow.com/a/29124815
tagged with: javascript
has comment: http://stackoverflow.com/comment/46474962
upvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/46403093
comment on: http://stackoverflow.com/a/29084956
has text: Since there were a few links, I wanted the space an answer offered (and it does answer the question asked to a certain extent). Nonetheless, it's a fair point and I'll keep that in mind in the future.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29069442
tagged with: google-visualization
tagged with: javascript
has title: Selected Value for CategoryFilter won't change
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: So my issue is that I am trying to change the title of a bar chart based on which state is selected in statePicker. However, since I want to have Alabama preselected for the user, every time I select a new state in statePicker, it updates the chart with the correct data but when the listener is called to update the title, the title always shows Alabama. // Define a category picker control for the State statePicker = new google.visualization.ControlWrapper({ 'controlType': 'CategoryFilter', 'containerId': 'dropdown_control_div', 'options': { 'filterColumnLabel': 'State', 'ui': { 'labelStacking': 'vertical', 'allowTyping': false, 'allowMultiple': false, 'allowNone': false, 'caption' : 'Select a state', 'cssClass': "style.css" } }, 'state': { 'selectedValue': ['Alabama'] } }); google.visualization.events.addListener(statePicker, 'statechange', function () { var state = statePicker.getState(); programmaticChart.title = "Murder Rate in " + state.selectedValue; }); Any tips on how to get the title to update properly would be helpful. Thank you!
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: charts

http://stackoverflow.com/comment/46484823
type: Comment
has text: Thanks, Nick. Unfortunately, this didn't work. None of the product sizes were grayed out, and color of the shoe preceded the size (which isn't preferable for us). E.g Black / 8.5.
comment on: http://stackoverflow.com/a/29128001
score: 0
type: AnswerComment

http://stackoverflow.com/q/29109521
score: 2
answer count: 0
has title: Cycle2 YouTube plugin not showing correct in iOS8
tagged with: jquery-cycle2
type: Question
tagged with: javascript
tagged with: jquery
has body: We are having an issue where the jquery cycle2 youtube plugin is not showing full width in iOS 8. It works fine in iOS 7. You can even look at the demo site in iOS 8 and see the error - http://jquery.malsup.com/cycle2/demo/video.php. On the example page if you look at the one with the Videos and Images you can really see it. Anyone found a solution for this?
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: youtube

http://stackoverflow.com/comment/46608349
score: 0
type: QuestionComment
has text: `p` elements don't belong into `span` elements. If you want to set up an event handler like `onmouseover` you can do that on any element so there is certainly no need to use `span` elements to have event handlers. Put them on the `p` or the `li` elements.
type: Comment
comment on: http://stackoverflow.com/q/29192763

http://stackoverflow.com/q/29155617
tagged with: jquery
favorite count: 0
type: Question
has title: MVC Syncfusion Grid - HTML EJ Grid - Get Primary Key of Selected Row in Jquery
score: 0
has answer: http://stackoverflow.com/a/43781548
answer count: 3
upvote count: 1
downvote count: 1
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/29887131
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29840720
has body: Below is my grid code, how do I get the Primary Key Value when the cell is clicked in jquery? I have tried searching online and can't find a working example. Is there another way to get the value without using jquery or javascript? &lt;div id="CampaignGrid"&gt; @(Html.EJ().Grid.Test.Test&gt;("Grid") ... }) .Columns(col =&gt; { col.Field("iCampaign").HeaderText("Campaign").IsPrimaryKey(true).TextAlign(TextAlign.Left).Width(50).AllowEditing(false).Add(); col.Field("vCampaignName").HeaderText("Campaign Name").IsPrimaryKey(false).TextAlign(TextAlign.Left).Width(260).AllowEditing(false).Add(); })

http://stackoverflow.com/a/38841649
type: Answer
answers question: http://stackoverflow.com/q/29179879
has body: I found the solution for this problem. Basically the current method will allow me to reconstruct my screen form to a printable form, but it doesn't include form data entered by the user. This requires an additional javascript loop to re-read the form data elements into the printable form elements like in this example: while (document.getElementById('word_id_' + word_page + '_' + id_start_num)) { frameDoc.document.getElementById('word_id_' + word_page + '_' + id_start_num).value = document.getElementById('word_id_' + word_page + '_' + id_start_num).value; id_start_num++; } This works for me.
score: 0

http://stackoverflow.com/q/29174584
score: 0
has answer: http://stackoverflow.com/a/29174657
tagged with: visibility
has answer: http://stackoverflow.com/a/29174669
has title: how to disable mouseout visibility="hidden" effect for medias smaller than 768px?
accepted answer: http://stackoverflow.com/a/29174657
possible better answer: http://stackoverflow.com/a/29174669
has body: I am pretty new at Javascript. I created this effect where text appears under an image icon when the user hovers over it. I would like the effect to only work when the screen is over 768px and for the text to just stay visible at all times when viewed on smaller devices. I've tried using different variants of if (screen.width < 768px) {} and @media all and (min-width: 768px) {} else {} to control the effect to my liking but without any luck. Help??? Here is my code: TRANSCRIPTION
tagged with: mouseout
type: AnsweredQuestion
tagged with: media-queries
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46567085
tagged with: javascript

http://stackoverflow.com/q/29170808
has comment: http://stackoverflow.com/comment/46559912
has comment: http://stackoverflow.com/comment/46560432
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29171417
has comment: http://stackoverflow.com/comment/46560494
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46559856
type: Question
has comment: http://stackoverflow.com/comment/46559772
answer count: 2
has answer: http://stackoverflow.com/a/29171307
has body: I work in a warehouse. I'm helping a supervisor by making a proof of concept program that will allow him to update what truck is in what dock door at any given time. I made a table to display the doors and the trailer numbers. each row has an input field to enter the new trailer number, and a submit button that when clicked should save the new trailer number to a variable, then display said variable in the table. I cannot for the life of me figure out what I am doing wrong, please help! Door # Trailer # input new trailer 1S Submit updated! I removed code that wasn't necessary. To be more specific, what I am trying to do is have a user input a string into the input box id'd as 1sInput, save that string to the variable 1s, then display it in the tag id'd as 1s. I am very much new to programming. I know this is probably a super simple question but for the life of me I cannot find the answer in any book that I own or any online tutorial.
tagged with: javascript
has title: How to update and display a variable
score: 0

http://stackoverflow.com/a/29149641
has comment: http://stackoverflow.com/comment/46603492
type: Answer
answers question: http://stackoverflow.com/q/29149556
has body: try: var dataModel = { email: "somemail@gmail.com"}; dataModel.profile = {token : "test"}
downvote count: 1
has comment: http://stackoverflow.com/comment/46561429
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/46522000

http://stackoverflow.com/a/29170490
has comment: http://stackoverflow.com/comment/46563429
upvote count: 1
has body: The problem is coming from this block in your client code: Template.posts.helpers({ posts: function() { Meteor.call("viewPosts","published"); } }); The primary way Meteor retrieves data for you on the client is through its publish/subscribe architecture, which you already have in place and looks good. That means that the posts you need to display are already there for you on the client and you don't need to do a Meteor.call() to the server to go and get them. Instead, your helper can just look like this: Template.posts.helpers({ posts: function(){ return Posts.find({status: "published"}); } }); Generally, you want to use Meteor.call() for responding to template events, e.g. in Template.posts.events({}). Server calls generally don't belong in helpers, though I guess there can be exceptions. See this excellent article under 'overworked helpers' for more on that: https://dweldon.silvrback.com/common-mistakes
score: 1
answers question: http://stackoverflow.com/q/29169600
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29169600

http://stackoverflow.com/a/29142780
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29142613
has body: add some class to this link $(' ') .html("x " + i.item.label + " - ") .attr({'id': i.item.val}) .addClass('boxClass') .appendTo('#acResults'); and then try $('.remove-link').click(function (event) { event.preventDefault(); $(this).remove(); });
has comment: http://stackoverflow.com/comment/46508720

http://stackoverflow.com/a/29154009
answers question: http://stackoverflow.com/q/29153897
has comment: http://stackoverflow.com/comment/46529230
downvote count: 1
has body: If you only want the first UL in #product-cat-list the It should probably be: if( dataid == $.urlParam('category')){ $('#product-cat-list &gt; ul:first).addClass('active'); }); If you want the first UL in every LI, it would be: if( dataid == $.urlParam('category')){ $('li &gt; ul:first).addClass('active'); }); And every UL would be: if( dataid == $.urlParam('category')){ $('li &gt; ul).addClass('active'); });
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/a/29193520
answers question: http://stackoverflow.com/q/29193123
downvote count: 0
score: 1
upvote count: 1
type: Answer
has body: Add some css. .advertcont{ display:none; } Then your html Spsonsord Links Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Get the Best Shoes at 30GHS. www.shoes.com Then some jquery $(function() { $(".advertcont").each(function(index, element) { setTimeout(function() { // fade previous element if any existed if ($(element).prev().hasClass('advertcont')) { $(element).prev().fadeOut(1000, function() { $(element).show(1000); }); } else { $(element).show(1000); } // set timer to index (current iteration of the loop (current element)) * 15 seconds: }, index * 15000); }); }); Find it here https://jsfiddle.net/njueukavi/3exn83ct/

http://stackoverflow.com/comment/46450382
has text: I can see what your saying but wont that slow down the page?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29110406
type: Comment

http://stackoverflow.com/a/29184491
has comment: http://stackoverflow.com/comment/46589074
type: Answer
accepted answer of: http://stackoverflow.com/q/29181872
answers question: http://stackoverflow.com/q/29181872
has comment: http://stackoverflow.com/comment/46584802
has comment: http://stackoverflow.com/comment/46584945
has body: If your json data is correctly formatted and evaluates to the same data structure as the tsv data, you shouldn't need to make any other change.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/29201698
has body: document.getElementById('fortuneArea').innerHTML=(quotes[rand_int]); Just add single quotes to id name....
type: Answer
answers question: http://stackoverflow.com/q/29201619
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29201619
has comment: http://stackoverflow.com/comment/46615317
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/q/29217311
has body: I tried getting several modules but every time installation hangs forever. I tried with --verbose flag and I received this message on picture. I can't figure out where is problem.
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46644039
has title: Node.js: Installation of modules hangs forever on "addRemoteTarBall"
answer count: 1
favorite count: 0
tagged with: npm
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29217419
tagged with: node.js
has comment: http://stackoverflow.com/comment/46644264
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/29113612
favorite count: 0
possible better answer: http://stackoverflow.com/a/29114379
has answer: http://stackoverflow.com/a/29114379
accepted answer: http://stackoverflow.com/a/29114212
tagged with: php
tagged with: css
type: AnsweredQuestion
upvote count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29114212
type: Question
has comment: http://stackoverflow.com/comment/46456064
tagged with: javascript
score: -1
has body: need help on this one, I could not find any other solutions for this basically what I need is to have a list of icons horizontally adjust on screen width so if I have seven icons horizontally then when i'm in a tablet then the icons that wont fit will go to a certain div which has a slideup and down effect so if ipad shows only 6 icons then the seventh icon will be on the div I have an image for illustration https://scontent-hkg.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/s480x480/10561708_10206712852445687_4831295921092928962_n.jpg?oh=fb34cea324bdaf9dfbd104b8ff04698d&amp;oe=557FD113 I could really need help on this, thanks
has title: stacking up icons horizontally and responsive
answer count: 2
downvote count: 1
tagged with: jquery

http://stackoverflow.com/comment/46642813
comment on: http://stackoverflow.com/q/29216798
score: 0
type: Comment
type: QuestionComment
has text: Are you sure about the relative URL in your $http.get() function?

http://stackoverflow.com/comment/46566005
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29174055
has text: Nope, you would need to get the background image and preload it separately.

http://stackoverflow.com/q/29192208
has title: Webpack: how can I keep the output not flatten?
answer count: 1
tagged with: gulp
favorite count: 0
upvote count: 3
has body: How can I keep the output not flatten? "entry": { "head": path.join("js/user/resume.js"), "login": path.join("js/login/login.js"), } expected output structure: dist/js/user/resume.js, dist/js/login/login.js Is there a config options like Gulp's base?
has answer: http://stackoverflow.com/a/34082620
downvote count: 0
type: UnansweredQuestion
type: Question
score: 3
tagged with: webpack
tagged with: javascript

webpack
tags question: http://stackoverflow.com/q/29134254
type: Tag
tags question: http://stackoverflow.com/q/29210325
tags question: http://stackoverflow.com/q/29211235
tags question: http://stackoverflow.com/q/29080148
tag name: webpack
tags question: http://stackoverflow.com/q/29099900
tags question: http://stackoverflow.com/q/29192208
tags question: http://stackoverflow.com/q/29096018
tags question: http://stackoverflow.com/q/29088825

http://stackoverflow.com/comment/46706358
has text: I tested it with JAWS 15 and IE11 and it works there too
type: AnswerComment
comment on: http://stackoverflow.com/a/29168723
type: Comment
score: 0

http://stackoverflow.com/q/29209830
has title: Removing space in view attribute in angular
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29210521
score: 0
answer count: 1
has body: I have a ng repeat directive in which I set the height dynamically {{val.a}} app.directive('heightDir',function(){ return { restrict: 'AE', replace: true, template: ' {{val.a}} ', link: function(scope, elem, attrs) { } }; }); $scope.values= [{a:"Doe",b:10},{a:"bom",b:20},{a:"kal",b:30},{a:"jijo",b:40}]; the problem is when I run, there is a gap between the value and % so the style is not applied.How to solve this,anything I am missing? thank you.
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/29210521
has comment: http://stackoverflow.com/comment/46630462

http://stackoverflow.com/comment/46459453
comment on: http://stackoverflow.com/a/29115605
type: Comment
has text: added this now it gives new erreo:Uncaught ReferenceError: $routeProvider is not defined
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46362890
comment on: http://stackoverflow.com/q/29063391
type: QuestionComment
score: 2
has text: If you read the jQuery docs, it removes all the html, body, and head tags and leaves you with the content. Why are you not passing back the value as JSON or just passing back the value you want? If you do not need the HTML, do not send HTML.
type: Comment

http://stackoverflow.com/a/29144702
has body: If j is your json: var a1 = []; var a2 = []; $.each( j, function( key, ob ) { if(ob.price &gt; 100 &amp;&amp; ob.status == 'available'){ a1.push(key); } if(ob.status == 'booked' || ob.status == 'unavailable'){ a2.push(key); } }); console.log(a1); console.log(a2); Yields: ["2015-03-24", "2015-03-25", "2015-03-26"] ["2015-04-10", "2015-04-11", "2015-05-01", "2015-05-02", "2015-05-03"]
type: Answer
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29144488
answers question: http://stackoverflow.com/q/29144488
score: 5
type: AcceptedAnswer

http://stackoverflow.com/a/29121219
upvote count: 0
has body: Try this: function validateEmail(email) { var re = /^(([^&lt;&gt;()[\]\\.,;:\s@"]+(\.[^&lt;&gt;()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function validateForm() { var name=document.forms["form"]["entry.1017659850"].value; var email=document.forms["form"]["entry.808043133"].value; var check=document.forms["form"]["entry.317648050"].checked; if(name == ""){ document.getElementById("alertname").style.display="block"; return false; } if(email == ""){ document.getElementById("alertemail").style.display="block"; return false; } if(!check){ document.getElementById("alertcheck").style.display="block"; return false; } if(!validateEmail(email)){ document.getElementById("alertemail").style.display="block"; return false; } return true; }
accepted answer of: http://stackoverflow.com/q/29121111
score: -1
answers question: http://stackoverflow.com/q/29121111
type: AcceptedAnswer
downvote count: 1
type: Answer

http://stackoverflow.com/a/39010421
has body: rendering is now done via ReactDOM.render() ReactDOM.render( React.createElement('Pragmatometer', null, 'Hello'), document.getElementById('app') );
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29172310
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29172310

http://stackoverflow.com/comment/46547070
has text: @JosephRaphael: Not if there's more than one of them. `id` values must be unique on the page.
type: AnswerComment
comment on: http://stackoverflow.com/a/29163156
score: 0
type: Comment

http://stackoverflow.com/q/29196552
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/12808770
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46605928
has comment: http://stackoverflow.com/comment/46606075
favorite count: 0
has answer: http://stackoverflow.com/a/29196880
has answer: http://stackoverflow.com/a/29196646
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29196880
has title: getting value of html result after ajax postback
score: -1
has body: I need to get the html result of the ajax postback after changing the select option. The new-result-item is part of the new result div html which has a value generated from server side after ajax postback. The problem i am having here is if i call new-result-item is empty value although after ajax postback the value for new-result-item is actually display. So how can i get the new-result-item value after postback using javascript or jquery? Note: new-result-item value is empty by default, it is generated by server side after ajax postback @Model.NewResult $('select#select-option').change(function(){ $.ajax({ url: ..., type: "POST", cache: false, success: function (result) { $('#new-result').html(result); }, complete: function (result) { alert($('#new-result-item').val()); } }); });
type: Question
answer count: 2
upvote count: 0
accepted answer: http://stackoverflow.com/a/29196646

http://stackoverflow.com/a/29307575
answers question: http://stackoverflow.com/q/29170548
type: Answer
accepted answer of: http://stackoverflow.com/q/29170548
has body: After researching, it seems that XML / XSL does not allow you to overwrite a parameter/variable value after it has been written. I am unsure whether the functionality I was requesting is possible.. you could possibly iterate through multiples of 5 and store each as its own parameter.. but in the end it was decided to show a full list rather than increment the current display so this answer was not needed. The inability to overwrite parameter values makes this a quite tricky problem to have
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/29190650
has body: Similar question: Empty heading warning on HTML5 validation In Short: you're fine. If you have dynamically generated text for your headers the w3 validator will throw a warning, but not an error.
type: Answer
has comment: http://stackoverflow.com/comment/46595572
accepted answer of: http://stackoverflow.com/q/29190621
has comment: http://stackoverflow.com/comment/46595576
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29190621

http://stackoverflow.com/comment/46574576
has text: Answer makes good sense, but unfortunately neither version worked for me. Same error. Just updated from 0.49 to 0.50 to make sure I was current as well.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29177070
type: Comment

http://stackoverflow.com/comment/46629484
type: Comment
type: QuestionComment
has text: ThaNKS Priyank... let me check...
score: 0
comment on: http://stackoverflow.com/q/29209511

http://stackoverflow.com/q/29178193
answer count: 2
accepted answer: http://stackoverflow.com/a/29178583
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29178744
score: 4
favorite count: 0
tagged with: google-chrome-app
tagged with: google-chrome-extension
possible better answer: http://stackoverflow.com/a/29178744
has answer: http://stackoverflow.com/a/29178583
tagged with: google-chrome
has title: Getting access to users mic via chrome background extention or background app
has body: I am trying to have my app pick up the key words "Okay Chrome" It's not picking up any sort of audio. I'm not new to javascript, but I am new to making chrome apps/extensions. Is there some sort of way, that I might have missed, that allows developers to get mic input from an unpackaged app/extent ion, if so, how? Presently, I have the Annyang library running as a background script and as another background scripts I have the following function openBrowser(){ chrome.windows.create({ url: chrome.extension.getURL('main.html'), type: 'panel' }); }; if (annyang) { var commands = { 'Ok Chrome': openBrowser }; annyang.addCommands(commands); annyang.start(); annyang.debug(); }
type: AnsweredQuestion
type: Question
upvote count: 4

http://stackoverflow.com/comment/46506808
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29141509
type: QuestionComment
has text: I am doing one step at a time :)

http://stackoverflow.com/a/29168060
score: 0
has body: A good habit I found when dealing with ajax is I always check the ajax url manually with my browser, so if there is something wrong with it definitely my ajax wont work. So I did same thing for you and I found this data: { "error": "MISSING_ARGUMENTS: api_key", "error_code": 1004 } So were you expecting to get this data on your success handler function? That is not bad but it is not coming to the success function because the response status is set to error. To check the error open the developer console( google chrome) -> network -> headers, then look at the value of status code and you will get: 400 BAD REQUEST So you are getting error 400 rather than 404. And I hope you are getting this because you are not passing the api_key argument. update: I am not sure where the server is looking the keys from ( from headers vs params). But to send it using ajax as data param do this: data:{ dataUrl: dataUrl, data api_key:"abc123",api_secret :"xyz123"}
accepted answer of: http://stackoverflow.com/q/29166367
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46558696
answers question: http://stackoverflow.com/q/29166367

http://stackoverflow.com/q/29136098
type: UnansweredQuestion
has title: Exception from Tracker recompute function: Cannot read property '0' of undefined
type: Question
tagged with: javascript
score: 0
has body: I am getting this error in console log Exception from Tracker recompute function: Cannot read property '0' of undefined TypeError: Cannot read property '0' of undefined at null.&lt;anonymous&gt; (http://104.236.39.101:3000/client/templates/Professor/professorLectureView.js?026ec69298583f9fdeecadcdf9f2899a402df744:48:41) at http://104.236.39.101:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:1821:18 at Function.Template._withTemplateInstanceFunc (http://104.236.39.101:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:3382:12) at http://104.236.39.101:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:1820:29 at Object.Blaze._withCurrentView (http://104.236.39.101:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:2105:12) at viewAutorun (http://104.236.39.101:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:1819:18) at Tracker.Computation._compute (http://104.236.39.101:3000/packages/tracker.js?21f0f4306879f57e10ad3a97efe9ea521c5b5775:308:36) at Tracker.Computation._recompute (http://104.236.39.101:3000/packages/tracker.js?21f0f4306879f57e10ad3a97efe9ea521c5b5775:322:14) at Tracker.flush (http://104.236.39.101:3000/packages/tracker.js?21f0f4306879f57e10ad3a97efe9ea521c5b5775:452:14) I believe it's due to calling the array seriesData inside my this.autorun function this.autorun(function(){ feedbacks = Router.current().data(); feedbacks = feedbacks.sort(function(a,b){return a.postedDate.getTime() - b.postedDate.getTime()}); if(Session.get('timeBarChart')){ *irrelavent code* } seriesData = [[],[],[],[],[]]; categoryData = []; var topicName = ""; for(var i = 0, len = feedbacks.length; i &lt; len; i++) { comVal = feedbacks[i].commentType; if(comVal == 0) { *irrelavent code* } else{ seriesData[comVal-2][seriesData[0].length - 1]++; &lt;--------------this line } } } However I don't see why this would cause an issue especially since seriesData is initialized a few lines above. I think it might be caused …
answer count: 1
has answer: http://stackoverflow.com/a/29136625
tagged with: meteor

http://stackoverflow.com/comment/55711378
type: Comment
score: 1
type: AnswerComment
has text: Your first snippet is actually worse than `eval` because it works only with a global `name` variable
comment on: http://stackoverflow.com/a/33970626

http://stackoverflow.com/q/29124607
has answer: http://stackoverflow.com/a/29125570
has title: How do I hide my scrollbar on my modal window popup
favorite count: 0
has comment: http://stackoverflow.com/comment/46475721
has comment: http://stackoverflow.com/comment/46476448
answer count: 4
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/29125317
downvote count: 0
has comment: http://stackoverflow.com/comment/46476101
tagged with: scrollbar
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29125987
accepted answer: http://stackoverflow.com/a/29125987
has answer: http://stackoverflow.com/a/34240425
upvote count: 3
has comment: http://stackoverflow.com/comment/46475888
has body: So I'm playing around with some new web languages, and so far come up with this: http://jsfiddle.net/lustre/j9LwghLr/ If you click on one of the pictures, a window appears with no scrollbar. Which is perfect! Exactly what I need; however, if you look closely when you click it, the items behind it shift slightly as I'm hiding the scroll bar on the body. How do I hide it ONLY on the pop-out window? As if the pop-out window is sitting on top of the scrollbar. To stop the images behind it resizing when the window opens. I've tried: .show::-webkit-scrollbar-track { visibility:hidden; } However this doesn't seem to do anything... The windows open using a jQuery onclick event: $(".wrapper").click(function(){ $(this).next(".hidden").addClass("show"); $(".wrapper").addClass("blurry"); $("body").css("overflow","hidden"); }); $(".close").click(function(){ $(".hidden").removeClass("show"); $(".wrapper").removeClass("blurry"); $("body").css("overflow","auto"); }); Apologies if something doesn't make sense :) ( To cose the pop-up window click the little green box... x3 ) jsFiddle link for you to have a play with: http://jsfiddle.net/lustre/j9LwghLr/ Again, green button closes the pop-up.
has answer: http://stackoverflow.com/a/29125317

http://stackoverflow.com/a/29143175
has body: You don't save anywhere the fact that there is an even number in your array. You could do this var containsEvenNums = function(numArray) { var containsEvenNum = false; numArray.forEach(function(element) { if(element % 2 == 0) { containsEvenNum = true; } }); return containsEvenNum; }; But this method has a disadvantage: it needs to loop through the entire array (you can't break). I'd recommend using Array.prototype.some instead var containsEvenNums = function(numArray) { return numArray.some(function(element) { return element % 2 === 0; }); };
type: Answer
has comment: http://stackoverflow.com/comment/46509820
score: 1
accepted answer of: http://stackoverflow.com/q/29143070
has comment: http://stackoverflow.com/comment/46509855
answers question: http://stackoverflow.com/q/29143070
downvote count: 0
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46475112
type: QuestionComment
comment on: http://stackoverflow.com/q/29124435
has text: 2 - How do you know that 'question' is has a single string object but 'answers' is an array?
score: 0
type: Comment

http://stackoverflow.com/q/29147636
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29150701
tagged with: checkbox
has title: How to use multiple checkboxes to return a single div
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29200932
accepted answer: http://stackoverflow.com/a/29150701
has answer: http://stackoverflow.com/a/29200932
has comment: http://stackoverflow.com/comment/46517685
has body: I am working on a page with multiple checkboxes, and would like it to return a single div based on any combination of checks. I created a jsfiddle, but even though this is the code on my site that somewhat works, it is not working on jsfiddle: HTML: Red Blue Green Show this by default This is red This is blue This is green This is purple JS: $(document).ready(function() { var r = $('#red'); var b = $('#blue'); var g = $('#green'); var p = r.add(b); $(r).click(function(){ if ($(r).is(':not(:checked)')) { $('#showred').show(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').hide(); } else { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').show(); } }); $(b).click(function(){ if ($(b).is(':not(:checked)')) { $('#showred').hide(); $('#showblue').show(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').hide(); } else { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').show(); } }); $(g).click(function(){ if ($(g).is(':not(:checked)')) { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').show(); $('#showpurple').hide(); $('#default').hide(); } else { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').show(); } }); $(p).click(function(){ if ($(r).is(':not(:checked)') && $(b).is(':not(:checked)')) { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').show(); $('#default').hide(); } else { $('#showred').hide(); $('#showblue').hide(); $('#showgreen').hide(); $('#showpurple').hide(); $('#default').show(); } }); }); http://jsfiddle.net/robert316/tu0o1z0s/13/ I would really appreciate any help to get this working correctly, what I would like to happen is: User clicks "Red" -> Display red div User clicks "Blue" -> Display blue div User clicks "Red" and "Blue" -> Only display purple div (no red or blue) I would also…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46518532
tagged with: javascript
type: Question

http://stackoverflow.com/comment/46436500
comment on: http://stackoverflow.com/q/29103203
has text: I am not sure what your question is exactly. Can't you just read the values you want from the db in Java code using the Java client, then perform the transformations in Java code, and then write it back to the db?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46605352
score: 0
type: Comment
has text: ok. But still try it might be the case Because as said by @mohamedrias you only used data field in ng-repeat
comment on: http://stackoverflow.com/a/29191815
type: AnswerComment

http://stackoverflow.com/q/29120790
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: jQuery FadeIn and FadeOut animation show white color inbetween
has answer: http://stackoverflow.com/a/29121533
tagged with: css
score: 0
type: Question
has comment: http://stackoverflow.com/comment/46469077
tagged with: javascript
tagged with: jquery
has body: I have change the background image of div every 5 seconds to make it look nices i am adding image to div as background. My script adds white color in between image transition which make it look bad, i tried to fix it but not much seems to work. Below code snippet now shows image using FadeIn effect if i add FadeOut to this then it addes white between transition. var imgSrcs = [ "../img/bg1.jpg", "../img/bg2.jpg", "../img/bg3.jpg", "../img/bg4.jpg", "../img/bg5.jpg" ]; var index = 1; $('.intro').css("background-image", "url(" + imgSrcs[0] + ")") $('.intro').fadeIn('slow', animateBackground()); function animateBackground() { window.setTimeout(function () { var url = imgSrcs[index]; index++; if (index == 5) index = 0; $('.intro').delay(5000).fadeIn(1000, function () { $(this).css("background-image", "url(" + url + ")") }).fadeIn(1000, animateBackground()) }); } I am not sure how to fix this so it will work image FadeOut &amp; FadeIn between images Fiddle http://jsfiddle.net/7xxx6ah3/5/
answer count: 1

http://stackoverflow.com/comment/46417380
type: Comment
comment on: http://stackoverflow.com/q/29092762
type: QuestionComment
has text: Scratchpad remembers variables' values, so yes, your first snippet alerts 90 when you run it for the second, third etc time. Close the current tab and reopen the SP, and you will see `NaN`.
score: 0

http://stackoverflow.com/a/29142173
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29129684
has body: So this is how you can bind event to load file: $('#csvfile').on('change', readFile); And then callback can look this way: function readFile(e) { //Load first file: var f = e.target.files[0]; if (f) { var r = new FileReader(); r.onload = renderChart; r.readAsText(f); } else { alert("Error, file not loaded"); } } Now you loaded file and need to create renderChart method, where you put your code responsible for creating chart: function renderChart(e) { var data = e.target.result; //get data // here comes the rest of the code: // Split the lines var lines = data.split('\n'); . . . var chart = new Highcharts.Chart(options); } And HTML part: &lt;input type="file" id="csvfile" accept=".csv" name="files[]" &gt;
downvote count: 0
type: Answer

http://stackoverflow.com/q/29123989
has comment: http://stackoverflow.com/comment/46474252
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29124571
type: Question
tagged with: php
answer count: 1
accepted answer: http://stackoverflow.com/a/29124571
score: 0
has comment: http://stackoverflow.com/comment/46474416
has comment: http://stackoverflow.com/comment/46475119
has title: Form submit button value
has body: Describe your basement project <img src="captcha_code_file.php?rand=<?php echo rand(); ?>" id='captchaimg'> Enter the code here : Can't read the image? click here to refresh on mail.php not getting submit button value. if i disabled javascript then i get all submit button value
has comment: http://stackoverflow.com/comment/46474291
tagged with: javascript

http://stackoverflow.com/comment/46852317
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29174888
type: Comment
has text: I can't thank you enough. You have helped me a lot! I wish I could upvote your answer more than once.

http://stackoverflow.com/q/29191852
favorite count: 0
type: UnansweredQuestion
tagged with: php
has body: I'm abit confused as to how i will go about doing this, so i'm making a .js file to collect data on a page(100% with js) and i want to POST it to a php file which will then take care of it and insert it into the db etc.. How will i go about doing this? I know you can use jquery in a html document, but i want to use it in a .js file not a .html file. I've successfully done it using a .html file and importing the jquery file, but i want to do it all in a .js file. Any help is greatly appreciated. Thank you very much (:
downvote count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/29191983
type: Question
score: -2
tagged with: javascript
tagged with: ajax
has answer: http://stackoverflow.com/a/29192372
has title: How do i post variables inside a .js file to a php file without including jquery?
answer count: 2

http://stackoverflow.com/a/29161023
downvote count: 0
has body: change ajax code like this, $.ajax({ url: "PathToPHPFileThatConnectsToDatabaseAndRetreivesValues", data: {"input":input}, success: function(msg){ alert(msg); $("#suggest").html(msg); } });
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29160962
score: 1

http://stackoverflow.com/a/29104242
answers question: http://stackoverflow.com/q/29099401
score: 0
type: Answer
has body: Your SpriteSheet format is not correct. You have used the long-form animation format, where frames should include a list of frame numbers - but you have used 5,9,true,6 -- which looks like the short form (start, end, next, speed). Here is a fixed definition using the short form instead. var ss = new createjs.SpriteSheet({ images: [img], frames: { height: 90, width: 90, regX: 45, regY: 45 }, animations: { wkRight: [5, 9, true, 0.1] stand: [15], wkLeft: [0, 4, true, 0.1] } }); Note that if your walk animations are just flipped for left/right, then you can flip the sprite using scaleX=-1, reducing the number of frames in your SpriteSheet. Let me know if that helps. It would also help if you posted a sample, maybe on JSFiddle. Here is a SpriteSheet sample I have used: http://jsfiddle.net/lannymcnie/g5epoydb/2/

http://stackoverflow.com/comment/46497918
type: Comment
has text: For instance, that would be an atomic access to an object: var = 0; function(obj) { a = 1; //access obj a = 0; } But that's obviously not true as the calls for a = 0 and a = 1 are not atomic.
type: AnswerComment
comment on: http://stackoverflow.com/a/29136445
score: 0

http://stackoverflow.com/q/29176846
type: Question
has title: Node.js: Get "Trying to open unclosed connection" when calling method from child process
tagged with: node.js
has answer: http://stackoverflow.com/a/29177178
score: 0
answer count: 1
tagged with: external-process
type: UnansweredQuestion
has body: I'm getting the "Error: Trying to open unclosed connection," but I don't believe it's due to a db issue... and that's why I'm stumped. Most solutions to this error, reference db connection issues. My goal here is execute an external process. If the process closes with anything other than exit code 0, I want to email an alert for example. I was using the child.on('close', function(code).... to get the exit value from the external process (coming back as "code") So if code !=0 I want to do something... maybe rerun the test... maybe call a different method that sends an email, etc. Each time I attempt to call a method, from within child.on('close'), I get the error "Trying to open unclosed connection." Which is why I'm also handling the save action in the same block. Code Sample: var spawn = require('child_process').spawn, child = spawn('sipp', ['-s', dnis,server, '-sn', scenario, '-m', '1','-i','127.0.0.1','-recv_timeout','1000']); } child.on('close',function(code){ if(code != 0){ Call().emailAlert(dnis, server, scenario, type, carrier); } var TestResults = mongoose.model('test_results', TestResultsSchema); // Saving results to MongoDB var result = new TestResults({ testType: type, dnis: dnis, server: server, result: code, carrier: carrier, date: Date.now() }); result.save(function (err) {if (!err) {console.log ('Successful Save!')} else{console.log(err)}}); }); }; If I remove: if(code != 0){ Call().emailAlert(dnis, server, scenario, type, carrier); } The error goes away. What's the best way for me to capture the exit code of the process, and based on it, make a call to a different method (i.e. to email an alert) in Node.js?
tagged with: javascript

http://stackoverflow.com/a/29196580
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/46606172
answers question: http://stackoverflow.com/q/29194823
has body: Unity uses a custom JavaScript variant also known as UnityScript which it historically and still today commonly (but inconsistently) refers to as "JavaScript," including as you note in its own script documentation. This is incorrect in terms of the meaning of the term "JavaScript" in the programming world at large (i.e. beyond the Unity community). UnityScript is definitely not JavaScript. They are incompatible languages with fundamental differences. From a strict correctness point of view, yes, Unity should use "UnityScript" in its documentation. The incorrect usage doesn't tend to be problem within the Unity community, within which it is assumed that "JavaScript" means the JavaScript used by Unity. In fact, it's possible that using the term "UnityScript" could cause confusion within the Unity community, because the term "JavaScript" has historically been and continues to be more commonly used, and it's possible many non-programmers within the Unity community don't even realize Unity is actually using a variant JavaScript, as opposed to actual JavaScript. However, outside of the Unity community, including here on Stack Overflow, using the term "JavaScript" to mean anything other than the actual JavaScript will cause confusion, which is why it's important to say "UnityScript" here. Incidentally, Unity adds to the potential confusion, both within and without the Unity community, by not being consistent. In its release notes for version 5, it used both "JavaScript" and "UnityScript" interchangeably. In a blog entry about an important scripting change, it used the term "UnityScript-aka-Javascript."
accepted answer of: http://stackoverflow.com/q/29194823

http://stackoverflow.com/a/29508513
has comment: http://stackoverflow.com/comment/47195567
type: Answer
has body: Inside test script your code line "scope.page = new MyPage();" is creating new empty MyPage object.Code which you have written in application script is creating page object locally and its not bounded with any angular scope.When there is requirement of testing such objects you need to replicate code for page object creation in beforeEach(); block of test script.And test it. describe("Checking errors", function () { var scope = {}; var MyPage ; beforeEach(function () { browser.get("/#endpoint"); browser.waitForAngular(); MyPage = function () { this.errors = element.all(by.css("div.error-block b.error")) .filter(function (elm) { return elm.isDisplayed().then(function (value) { return value; }); }) .map(function (elm) { return elm.getText(); }); }; }); it("should not show any errors", function () { expect(MyPage.errors).toBeEmptyArray(); }); });
answers question: http://stackoverflow.com/q/29134106
score: 0

http://stackoverflow.com/comment/46394536
comment on: http://stackoverflow.com/q/29080625
type: Comment
type: QuestionComment
has text: can you please create a sample on http://jsfiddle.net
score: 0

http://stackoverflow.com/q/29149209
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29149269
has comment: http://stackoverflow.com/comment/46520587
type: Question
has body: Is the value of this determined by the lexical nature of the invocation of a function? function Foo() {} Foo.prototype.bar = function() { console.log('this: ', this); } Foo.prototype.bar(); // this: Foo.prototype var fn = Foo.prototype.bar; fn(); // this: Window
tagged with: javascript
has title: Is the value of this determined by the lexical nature of the invocation of a function?
score: 0
has answer: http://stackoverflow.com/a/29149269
answer count: 1
favorite count: 0

http://stackoverflow.com/q/29200876
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29201233
type: Question
tagged with: jquery-ui
has title: Button with submit buttons as subitems
tagged with: forms
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29201233
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29200972
has answer: http://stackoverflow.com/a/29200972
has body: The application shows an html page which has a form element. The form has several submit buttons. One of them is a button titled "Close deal". When a user clicks on this button, something context menu appears. The context menu has choices like "not submitted", "price too high", "other". Clicking on a choice should submit the form (like a submit button would have). The backend needs to know that the user clicked on one of these choices (and not on other submit buttons) and on which one. How to achieve that? I have found a jquery ui split button example but it does not present the needed capability. For example, there is no need for two buttons (one with a text and one with an arrow) - there is just a single behavior - showing the context menu. Additionally, I did not understand how to make the items to submit the form. I have tried to find something else but failed to find anything close enough to the requirements.

http://stackoverflow.com/a/29184480
has comment: http://stackoverflow.com/comment/46586215
has comment: http://stackoverflow.com/comment/46587480
downvote count: 0
has body: alert("i=" + JSON.stringfy(i)); // this didn't get invoked. because i is not a JSON object, depArr has a string not array of string, mv.addObject("depNameList", depNameList); // depNameList is a type of List&lt;String&gt; if you print depNameList in console, output would be like: [a, b, c, d] //this is invalid JSON, missing qoutes(" OR ') Also, If you run with above statement compiler will throw a error like: Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']' Solution: Change: var depArr = "${depNameList}"; To: var depArr =[] &lt;c:forEach items="${depNameList}" var="depName"&gt; depArr.push(\"${depName}\"); &lt;/c:forEach&gt; See Also: Java EE 5 tutorial - JavaServer Pages Standard Tag Library
type: Answer
has comment: http://stackoverflow.com/comment/46586271
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29183814

http://stackoverflow.com/comment/46415576
has text: Lol, uhhhhhh, I don't know! I changed that now. Sadly, it didn't fix the problem I'm having, but I'm still glad to have made that change haha.
score: 0
comment on: http://stackoverflow.com/q/29091764
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46372101
comment on: http://stackoverflow.com/q/29067988
score: 2
has text: This is a perfectly answerable question. The answer would give an overview of the steps angular takes in the digest loop to bring about the change, and why the manual modifications aren't lost. Side note: the blog post's benchmarks are no where near accurate, but that's not the main question here.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46626531
comment on: http://stackoverflow.com/a/29202002
type: AnswerComment
has text: @BrMyAppsAD I've given you all the resources to answer your own question. Take it upon yourself to not use StackOverflow as a crutch but rather a last resort.
score: 0
type: Comment

http://stackoverflow.com/a/29372075
type: Answer
has body: Solved adding projection to text layer: var text = new OpenLayers.Layer.Text('text', { location: './js/textfile.txt', projection: map.displayProjection });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29099984
score: 0
answers question: http://stackoverflow.com/q/29099984

http://stackoverflow.com/comment/46648905
has text: And here you go, I might have gone a bit overboard, but this is the best way you could approach it imho ;-) http://www.liveweave.com/uM9Ayk
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29214114

http://stackoverflow.com/comment/46444276
score: 0
has text: Now that I reread your answer, I have to ask something: JS doesn't have an associative array? So syntax like this `myArray['key']` doesn't refer to an array, just an object with properties?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29087894

http://stackoverflow.com/comment/46605928
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29196552
has text: please add the server side code, how are you passing it back to the js?
type: Comment

http://stackoverflow.com/comment/46438289
comment on: http://stackoverflow.com/q/29087369
has text: This question has been asked before, have you checked out http://stackoverflow.com/questions/6014702/how-do-i-detect-shiftenter-and-generate-a-new-line-in-textarea ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46569838
type: Comment
type: QuestionComment
score: 1
has text: I think you can easily adapt the answers on the duplicate to your case.
comment on: http://stackoverflow.com/q/29176033

http://stackoverflow.com/q/29192367
has comment: http://stackoverflow.com/comment/46598837
has comment: http://stackoverflow.com/comment/46598486
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46598921
tagged with: javascript
tagged with: tdd
tagged with: karma-jasmine
tagged with: bdd
downvote count: 0
score: 1
favorite count: 0
has title: What is the correct way to handle prompt method when testing javascript (using karma, jasmine, webstorm)
type: UnansweredQuestion
has body: I have this line in my code: var textThatWillBeChanged = prompt("Paste the text you would like to change!"); In the browser it asks the user to enter a text. Questions: How can I write tests that feed the desired input values using karma and jasmine? What is the correct methodology to handle situations like these in Javascript?
answer count: 0

http://stackoverflow.com/comment/46442939
score: 0
comment on: http://stackoverflow.com/a/29106293
type: Comment
has text: and should I wrap that code on my question inside of the toggle?? like this? `$("#doughnutChart").toggle(MY CODE HERE);` because I tried to put this code you gave me above it and it doesn't work :\
type: AnswerComment

http://stackoverflow.com/comment/46568307
comment on: http://stackoverflow.com/q/29173813
has text: Are there multiple instances of the same ID occurring in your document?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46399387
type: Comment
comment on: http://stackoverflow.com/a/29083149
has text: @jazzpi i just provided an alternative. It could be easy for us to write the regex like mine but yours is so hard which contains many capturing groups, many optional quantifier `?`.. further you could reduce `ub|u` to `ub?`
score: 0
type: AnswerComment

http://stackoverflow.com/q/29146612
type: UnansweredQuestion
score: 1
has body: I have a table with some cells with rowspan in the first column. table { border-collapse: collapse; } td, th { border: 1px solid black; } Foo Foo 19 20 21 22 23 Foo Foo Bar Bar Bar Bar Bar Foo Foo Bar Bar Bar Bar Bar Foo Foo Bar Bar Bar Bar Bar It looks like this which is fine: I have removed many columns in this preview to make it more easy to read, but later there will be many more columns so I have added a overflow-x:auto style to the div around the table. That also works fine, but once you scroll to the right you are not able to view the first column any more, but I want it to stay visible all the time. When I tried solutions like float:left or position:absolute on the first column it is fixed like I want it, but it messes up with the rowspan columns. How can I get a fixed first column when I use the colspan attribute? If neccessary it can also use JavaScript, but I would prefer to stay with CSS. If it is only possible with JavaScript I need a library that does not change anything in the general design of the table and it would be nice if the fixed column would really be fixed and does not just move back to its original position after scrolling It is also important that it works on IE6, so solutions using position: sticky will not work
type: Question
has comment: http://stackoverflow.com/comment/67673283
tagged with: html-table
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46518510
tagged with: http://stackoverflow.com/tag/html
has title: HTML Table with rowspan and fixed Column
tagged with: css
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/46905809
comment on: http://stackoverflow.com/a/29346396
score: 0
type: Comment
type: AnswerComment
has text: It Helps. I'll try `$('textarea').highlightTextarea({ words: ['{(.+?)}'] });` for my requirements.

http://stackoverflow.com/comment/46530299
type: Comment
comment on: http://stackoverflow.com/q/29154661
type: QuestionComment
has text: Can you add where you're calling annotateAllImages? I suspect that you're invoking it outside of the ajax call meaning it may run before all the images happen to load.
score: 0

http://stackoverflow.com/a/29148207
has body: You can use regex for replacing the content: var regpattern = /(\/\*\s\*\/(.*?)\/\*\s\*\/)/gm var yourcontent = "include your content here"; yourcontent.replace(regpattern,"");
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46519632
answers question: http://stackoverflow.com/q/29148066

http://stackoverflow.com/q/29159403
has comment: http://stackoverflow.com/comment/46538995
has body: Sorry about the ambiguous title but I couldn't think of anything better. I've been struggling with this issue for a few days and haven't been able to find a way around it. A little background about my code: I have a textbox savedInfo and it stores values from different sessions. So if savedInfo is empty, I'd like to confront the user with another textbox. Once the user inputs info into the textbox and presses enter then the .val() of the textbox goes to savedInfo and the textbox is replaced with a label that has 2 buttons that appear when hovered. These two buttons give the user the ability to remove or save the textbox. The problem I am having is that my code doesn't seem to flow correctly. For instance, I have an if statement that checks if savedInfo is empty and if it isn't then show the label text of savedInfo. Then INSIDE the keypress function I check if one of the hover buttons is pressed but the code doesn't work since it is inside the keypress function. If I take it out of the keypress function then it doesn't work for when the keypress label appears. Probably best if I explain with pseudo code: $(document).ready(function() { if($("savedInfo").val() != "") { someDiv..innerHTML( $("savedInfo").val() + hover shows buttons ); } else { //Create textbox id `textbox` } $(function() { $("#textbox").keypress(function(e) { if (e.keyCode == 13) { //set innerHTML to a label with text of `textbox`. //Check if button#1 is pressed. If yes, then do something //Check if button#2 is pressed. If yes, then do something } }); }); }); So the button#1 and button#2 ids are being created inside the if but don't work inside the if because they are inside the keypress. I hope this wasn't too confusing. Any ideas on how to make this work better? Thanks
has title: jQuery event binding on dynamically created DOM elements
has comment: http://stackoverflow.com/comment/46538950
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29160212
type: Question
has comment: http://stackoverflow.com/comment/46538883
has comment: http://stackoverflow.com/comment/46538993
accepted answer: http://stackoverflow.com/a/29160212
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/46576061
type: QuestionComment
comment on: http://stackoverflow.com/q/29179612
score: 0
has text: But please make sure to show it within your code else others over here will point out that error first
type: Comment